Help us shape the future of Go! Take the 2026 Go Developer Survey

pgconfig

package
v3.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package pgconfig provides tools for work with Postgres configuration.

Index

Constants

View Source
const (

	// PgConfName defines the name of general Postgres config.
	PgConfName = "postgresql.conf"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager defines a struct to correct PostgreSQL configuration.

func NewCorrector

func NewCorrector(dataDir string) (*Manager, error)

NewCorrector creates a new corrector.

func (*Manager) AdjustRecoveryFiles

func (m *Manager) AdjustRecoveryFiles() error

AdjustRecoveryFiles adjusts a recovery files.

func (*Manager) AppendGeneralConfig

func (m *Manager) AppendGeneralConfig(cfg map[string]string) error

AppendGeneralConfig appends configuration parameters to a general configuration file.

func (*Manager) ApplyPgControl

func (m *Manager) ApplyPgControl(pgControl map[string]string) error

ApplyPgControl applies significant configuration parameters extracted by the pg_control tool.

func (*Manager) ApplyPromotion

func (m *Manager) ApplyPromotion(cfg map[string]string) error

ApplyPromotion applies promotion configuration parameters.

func (*Manager) ApplyRecovery

func (m *Manager) ApplyRecovery(cfg map[string]string) error

ApplyRecovery applies recovery configuration parameters.

func (*Manager) ApplySnapshot

func (m *Manager) ApplySnapshot(cfg map[string]string) error

ApplySnapshot applies snapshot configuration parameters.

func (*Manager) ApplySync

func (m *Manager) ApplySync(cfg map[string]string) error

ApplySync applies configuration parameters for sync instance.

func (*Manager) ApplyUserConfig

func (m *Manager) ApplyUserConfig(cfg map[string]string) error

ApplyUserConfig applies user-defined configuration.

func (*Manager) GetPgVersion

func (m *Manager) GetPgVersion() float64

GetPgVersion gets a version of Postgres Data.

func (*Manager) ReadRecoveryConfig

func (m *Manager) ReadRecoveryConfig() (map[string]string, error)

ReadRecoveryConfig reads a recovery configuration file.

func (*Manager) RemoveRecoveryConfig

func (m *Manager) RemoveRecoveryConfig() error

RemoveRecoveryConfig removes a recovery configuration file.

func (*Manager) TruncatePromotionConfig

func (m *Manager) TruncatePromotionConfig() error

TruncatePromotionConfig truncates a promotion configuration file.

func (*Manager) TruncateRecoveryConfig

func (m *Manager) TruncateRecoveryConfig() error

TruncateRecoveryConfig truncates a recovery configuration file.

func (*Manager) TruncateSyncConfig

func (m *Manager) TruncateSyncConfig() error

TruncateSyncConfig truncates a sync configuration file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL