MCPcopy Create free account
hub / github.com/cloudnative-pg/cloudnative-pg / GetInstance

Method GetInstance

pkg/management/postgres/initdb.go:298–304  ·  view source on GitHub ↗

GetInstance gets the PostgreSQL instance which correspond to these init information

(cluster *apiv1.Cluster)

Source from the content-addressed store, hash-verified

296
297// GetInstance gets the PostgreSQL instance which correspond to these init information
298func (info InitInfo) GetInstance(cluster *apiv1.Cluster) *Instance {
299 postgresInstance := NewInstance()
300 postgresInstance.PgData = info.PgData
301 postgresInstance.StartupOptions = []string{"listen_addresses='127.0.0.1'"}
302 postgresInstance.SetCluster(cluster)
303 return postgresInstance
304}
305
306// ConfigureNewInstance creates the expected users and databases in a new
307// PostgreSQL instance. If any error occurs, we return it

Callers 6

BootstrapMethod · 0.95
RestoreSnapshotMethod · 0.95
WriteRestoreHbaConfMethod · 0.95

Calls 2

SetClusterMethod · 0.95
NewInstanceFunction · 0.70

Tested by

no test coverage detected