Documentation ¶
Index ¶
- Constants
- func CollectAllSchemas(server *state.Server, collectionOpts state.CollectionOpts, logger *util.Logger, ...) (state.PersistedState, state.TransientState)
- func CurrentDatabaseName(db *sql.DB) (result string, err error)
- func CurrentDatabaseOid(db *sql.DB) (result state.Oid, err error)
- func EstablishConnection(server *state.Server, logger *util.Logger, ...) (connection *sql.DB, err error)
- func GetBackendCounts(logger *util.Logger, db *sql.DB, postgresVersion state.PostgresVersion, ...) ([]state.PostgresBackendCount, error)
- func GetBackends(logger *util.Logger, db *sql.DB, postgresVersion state.PostgresVersion, ...) ([]state.PostgresBackend, error)
- func GetBloatStats(logger *util.Logger, db *sql.DB, systemType, ignoreRegexp string) (report state.PostgresBloatStats, err error)
- func GetBuffercache(logger *util.Logger, db *sql.DB, systemType, ignoreRegexp string) (report state.PostgresBuffercache, err error)
- func GetColumnStats(logger *util.Logger, db *sql.DB, globalCollectionOpts state.CollectionOpts, ...) (columnStats state.PostgresColumnStatsMap, err error)
- func GetDatabases(logger *util.Logger, db *sql.DB, postgresVersion state.PostgresVersion) ([]state.PostgresDatabase, error)
- func GetFunctionStats(db *sql.DB, postgresVersion state.PostgresVersion, ignoreRegexp string) (functionStats state.PostgresFunctionStatsMap, err error)
- func GetFunctions(db *sql.DB, postgresVersion state.PostgresVersion, ...) ([]state.PostgresFunction, error)
- func GetIndexBloat(logger *util.Logger, db *sql.DB, columnStatsSourceTable, ignoreRegexp string) (indexBloat []state.PostgresIndexBloat, err error)
- func GetIndexStats(db *sql.DB, postgresVersion state.PostgresVersion, ignoreRegexp string) (indexStats state.PostgresIndexStatsMap, err error)
- func GetIsAwsAurora(db *sql.DB) (bool, error)
- func GetIsReplica(logger *util.Logger, db *sql.DB) (bool, error)
- func GetPostgresSetting(settingName string, server *state.Server, ...) (string, error)
- func GetPostgresVersion(logger *util.Logger, db *sql.DB) (version state.PostgresVersion, err error)
- func GetRelationBloat(logger *util.Logger, db *sql.DB, columnStatsSourceTable string, ...) (relBloat []state.PostgresRelationBloat, err error)
- func GetRelationStats(db *sql.DB, postgresVersion state.PostgresVersion, ignoreRegexp string) (relStats state.PostgresRelationStatsMap, err error)
- func GetRelations(db *sql.DB, postgresVersion state.PostgresVersion, ...) ([]state.PostgresRelation, error)
- func GetReplication(logger *util.Logger, db *sql.DB, postgresVersion state.PostgresVersion, ...) (state.PostgresReplication, error)
- func GetRoles(logger *util.Logger, db *sql.DB, postgresVersion state.PostgresVersion) ([]state.PostgresRole, error)
- func GetSequenceReport(logger *util.Logger, db *sql.DB) (report state.PostgresSequenceReport, err error)
- func GetSettings(db *sql.DB) ([]state.PostgresSetting, error)
- func GetStatements(server *state.Server, logger *util.Logger, db *sql.DB, ...) (state.PostgresStatementMap, state.PostgresStatementTextMap, ...)
- func GetTypes(db *sql.DB, postgresVersion state.PostgresVersion, ...) ([]state.PostgresType, error)
- func GetVacuumProgress(logger *util.Logger, db *sql.DB, postgresVersion state.PostgresVersion, ...) ([]state.PostgresVacuumProgress, error)
- func GetVacuumStats(logger *util.Logger, db *sql.DB, ignoreRegexp string) (report state.PostgresVacuumStats, err error)
- func ResetStatements(logger *util.Logger, db *sql.DB, systemType string) error
- func RunExplain(server *state.Server, inputs []state.PostgresQuerySample, ...) (outputs []state.PostgresQuerySample)
- func SetDefaultStatementTimeout(connection *sql.DB, logger *util.Logger, server *state.Server)
- func SetQueryTextStatementTimeout(connection *sql.DB, logger *util.Logger, server *state.Server)
- func SetStatementTimeout(connection *sql.DB, statementTimeoutMs int32)
Constants ¶
View Source
const QueryMarkerSQL string = "/* pganalyze-collector */ "
Variables ¶
This section is empty.
Functions ¶
func CollectAllSchemas ¶
func CollectAllSchemas(server *state.Server, collectionOpts state.CollectionOpts, logger *util.Logger, ps state.PersistedState, ts state.TransientState, systemType string) (state.PersistedState, state.TransientState)
func CurrentDatabaseName ¶
CurrentDatabaseName - Get name of the database we're currently connected to
func CurrentDatabaseOid ¶
CurrentDatabaseOid - Find OID of the database we're currently connected to
func EstablishConnection ¶
func GetBackendCounts ¶
func GetBackendCounts(logger *util.Logger, db *sql.DB, postgresVersion state.PostgresVersion, systemType string) ([]state.PostgresBackendCount, error)
func GetBackends ¶
func GetBackends(logger *util.Logger, db *sql.DB, postgresVersion state.PostgresVersion, systemType string) ([]state.PostgresBackend, error)
func GetBloatStats ¶
func GetBuffercache ¶
func GetColumnStats ¶ added in v0.41.0
func GetColumnStats(logger *util.Logger, db *sql.DB, globalCollectionOpts state.CollectionOpts, systemType string) (columnStats state.PostgresColumnStatsMap, err error)
func GetDatabases ¶
func GetDatabases(logger *util.Logger, db *sql.DB, postgresVersion state.PostgresVersion) ([]state.PostgresDatabase, error)
func GetFunctionStats ¶
func GetFunctionStats(db *sql.DB, postgresVersion state.PostgresVersion, ignoreRegexp string) (functionStats state.PostgresFunctionStatsMap, err error)
func GetFunctions ¶
func GetFunctions(db *sql.DB, postgresVersion state.PostgresVersion, currentDatabaseOid state.Oid, ignoreRegexp string) ([]state.PostgresFunction, error)
func GetIndexBloat ¶
func GetIndexStats ¶
func GetIndexStats(db *sql.DB, postgresVersion state.PostgresVersion, ignoreRegexp string) (indexStats state.PostgresIndexStatsMap, err error)
func GetPostgresSetting ¶
func GetPostgresVersion ¶
GetPostgresVersion - Reads the version of the connected PostgreSQL server
func GetRelationBloat ¶
func GetRelationStats ¶
func GetRelationStats(db *sql.DB, postgresVersion state.PostgresVersion, ignoreRegexp string) (relStats state.PostgresRelationStatsMap, err error)
func GetRelations ¶
func GetRelations(db *sql.DB, postgresVersion state.PostgresVersion, currentDatabaseOid state.Oid, ignoreRegexp string) ([]state.PostgresRelation, error)
func GetReplication ¶
func GetReplication(logger *util.Logger, db *sql.DB, postgresVersion state.PostgresVersion, systemType string) (state.PostgresReplication, error)
func GetRoles ¶
func GetRoles(logger *util.Logger, db *sql.DB, postgresVersion state.PostgresVersion) ([]state.PostgresRole, error)
func GetSequenceReport ¶
func GetSettings ¶
func GetSettings(db *sql.DB) ([]state.PostgresSetting, error)
func GetStatements ¶
func GetStatements(server *state.Server, logger *util.Logger, db *sql.DB, globalCollectionOpts state.CollectionOpts, postgresVersion state.PostgresVersion, showtext bool, systemType string) (state.PostgresStatementMap, state.PostgresStatementTextMap, state.PostgresStatementStatsMap, error)
func GetTypes ¶ added in v0.41.0
func GetTypes(db *sql.DB, postgresVersion state.PostgresVersion, currentDatabaseOid state.Oid) ([]state.PostgresType, error)
func GetVacuumProgress ¶
func GetVacuumProgress(logger *util.Logger, db *sql.DB, postgresVersion state.PostgresVersion, ignoreRegexp string) ([]state.PostgresVacuumProgress, error)
func GetVacuumStats ¶
func ResetStatements ¶
func RunExplain ¶
func RunExplain(server *state.Server, inputs []state.PostgresQuerySample, collectionOpts state.CollectionOpts, logger *util.Logger) (outputs []state.PostgresQuerySample)
func SetStatementTimeout ¶
Types ¶
This section is empty.
Source Files ¶
- backend_counts.go
- backends.go
- buffercache.go
- current_database.go
- databases.go
- establish_connection.go
- explain.go
- functions.go
- helpers.go
- querymarker.go
- relation_bloat.go
- relation_stats.go
- relation_stats_ext.go
- relations.go
- replication.go
- roles.go
- schema.go
- sequences.go
- settings.go
- statements.go
- superuser.go
- types.go
- vacuum_progress.go
- vacuum_stats.go
- version.go
Click to show internal directories.
Click to hide internal directories.