Documentation ¶
Index ¶
Constants ¶
const ( WalLevelMinimal = iota WalLevelArchive WalLevelHotStandby WalLevelLogical )
WAL levels
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckPoint ¶
type CheckPoint struct { RedoLogID uint32 RedoRecordOffset uint32 ThisTimeLineID uint32 PrevTimeLineID uint32 FullPageWrites uint8 NextXidEpoch uint32 NextXid uint32 NextOid uint32 NextMulti uint32 NextMultiOffset uint32 OldestXid uint32 OldestXidDB uint32 OldestMulti uint32 OldestMultiDB uint32 Time int64 OldestCommitTs uint32 NewestCommitTs uint32 OldestActiveXid uint32 }
CheckPoint describes a checkpoint in the write ahead log. See this link for descriptions of fields: https://github.com/postgres/postgres/blob/REL9_1_STABLE/src/include/catalog/pg_control.h#L31
type Control ¶
type Control struct { SystemIdentifier uint64 Version uint32 CatalogVersionNo uint32 State PgStateType Time int64 CheckPointLogID uint32 CheckPointRecordOffset uint32 PrevCheckPointLogID uint32 PrevCheckPointRecordOffset uint32 CheckPointCopy CheckPoint UnloggedLSNLogID uint32 UnloggedLSNRecordOffset uint32 MinRecoveryPointLogID uint32 MinRecoveryPointRecordOffset uint32 MinRecoveryPointTLI uint32 BackupStartPointLogID uint32 BackupStartPointRecordOffset uint32 BackupEndPointLogID uint32 BackupEndPointRecordOffset uint32 BackupEndRequired uint8 WalLevel int32 WalLogHints uint8 MaxConnections int32 MaxWorkerProcesses int32 MaxPreparedXacts int32 MaxLocksPerXact int32 TrackCommitTimestamp uint32 MaxAlign uint32 FloatFormat float64 Blcksz uint32 RelsegSize uint32 XlogBlcksz uint32 XlogSegSize uint32 NameDataLen uint32 IndexMaxKeys uint32 ToastMaxChunkSize uint32 Loblksize uint32 EnableIntTimes uint8 Float4ByVal uint8 Float8ByVal uint8 DataChecksumVersion uint32 Crc uint32 }
Control describes various runtime constants for PostgreSQL. See this link for descriptions of fields: https://github.com/postgres/postgres/blob/REL9_1_STABLE/src/include/catalog/pg_control.h#L88
func NewControl ¶
NewControl gets control from a reader
func NewControlFromDataDir ¶
NewControlFromDataDir gets control from its default location relative to a data directory
func NewControlFromFile ¶
NewControlFromFile gets control from a specific path
type PgStateType ¶
type PgStateType uint64
PgStateType describes the state that PostgreSQL is in. See this link for details: https://github.com/postgres/postgres/blob/REL9_1_STABLE/src/include/catalog/pg_control.h#L69
const ( DbStartup PgStateType = iota DbShutdowned DbShutdownedInRecovery DbShutdowning DbInCrashRecovery DbInArchiveRecovery DbInProduction )
DATABASE State
func (PgStateType) String ¶
func (state PgStateType) String() string