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

Method GetSuperUserDB

pkg/management/postgres/instance.go:875–877  ·  view source on GitHub ↗

GetSuperUserDB gets a connection to the "postgres" database on this instance

()

Source from the content-addressed store, hash-verified

873
874// GetSuperUserDB gets a connection to the "postgres" database on this instance
875func (instance *Instance) GetSuperUserDB() (*sql.DB, error) {
876 return instance.ConnectionPool().Connection("postgres")
877}
878
879// GetMetricsDB gets a connection to the named database authenticated as cnpg_metrics_exporter.
880func (instance *Instance) GetMetricsDB(dbname string) (*sql.DB, error) {

Callers 15

GetStatusMethod · 0.95
fillStatusMethod · 0.95
fillStatusFromPrimaryMethod · 0.95
fillWalStatusMethod · 0.95
fillStatusFromReplicaMethod · 0.95
IsWALReceiverActiveMethod · 0.95
PromoteAndWaitMethod · 0.95
GetPgVersionMethod · 0.95

Calls 2

ConnectionPoolMethod · 0.95
ConnectionMethod · 0.65

Tested by

no test coverage detected