Documentation
¶
Index ¶
- Variables
- func Connect(dsn string) (*sqlx.DB, error)
- type Analyze
- type BaseBackup
- type Cluster
- type Copy
- type CreateIndex
- type Pgsp
- type Progress
- func GetAnalyze(ctx context.Context, db *sqlx.DB) ([]Progress, error)
- func GetBaseBackup(ctx context.Context, db *sqlx.DB) ([]Progress, error)
- func GetCluster(ctx context.Context, db *sqlx.DB) ([]Progress, error)
- func GetCopy(ctx context.Context, db *sqlx.DB) ([]Progress, error)
- func GetCreateIndex(ctx context.Context, db *sqlx.DB) ([]Progress, error)
- func GetVacuum(ctx context.Context, db *sqlx.DB) ([]Progress, error)
- type SPTable
- type SPTaget
- type StatProgress
- type Vacuum
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AnalyzeTableName = "pg_stat_progress_analyze" AnalyzeQuery string AnalyzeColumns []string )
View Source
var ( BaseBackupTableName = "pg_stat_progress_basebackup" BaseBackupQuery string BaseBackupColumns []string )
View Source
var ( ClusterTableName = "pg_stat_progress_cluster" ClusterQuery string ClusterColumns []string )
View Source
var ( CopyTableName = "pg_stat_progress_copy" CopyQuery string CopyColumns []string )
View Source
var ( CreateIndexQuery string CreateIndexColumns []string )
View Source
var ( VacuumTableName = "pg_stat_progress_vacuum" VacuumQuery string VacuumColumns []string )
View Source
var CreateIndexTableName = "pg_stat_progress_create_index"
Functions ¶
Types ¶
type Analyze ¶
type Analyze struct {
PID int `db:"pid"`
DATID int `db:"datid"`
DATNAME string `db:"datname"`
RELID int `db:"relid"`
PHASE string `db:"phase"`
SampleBLKSTotal int64 `db:"sample_blks_total"`
SampleBLKSScanned int64 `db:"sample_blks_scanned"`
ExtStatsTotal int64 `db:"ext_stats_total"`
ExtStatsComputed int64 `db:"ext_stats_computed"`
ChildTablesTotal int64 `db:"child_tables_total"`
ChildTablesDone int64 `db:"child_tables_done"`
CurrentChildTableRelid int `db:"current_child_table_relid"`
}
pg_stat_progress_analyze.
type BaseBackup ¶
type BaseBackup struct {
PID int `db:"pid"`
PHASE string `db:"phase"`
BackupTotal sql.NullInt64 `db:"backup_total"`
BackupStreamed int64 `db:"backup_streamed"`
TablespacesTotal int64 `db:"tablespaces_total"`
TablespacesStreamed int64 `db:"tablespaces_streamed"`
}
pg_stat_progress_basebackup.
func (BaseBackup) Color ¶ added in v0.0.3
func (v BaseBackup) Color() (string, string)
func (BaseBackup) Name ¶
func (v BaseBackup) Name() string
func (BaseBackup) Pid ¶
func (v BaseBackup) Pid() int
func (BaseBackup) Progress ¶
func (v BaseBackup) Progress() float64
func (BaseBackup) Table ¶
func (v BaseBackup) Table() string
func (BaseBackup) Vertical ¶
func (v BaseBackup) Vertical() string
type Cluster ¶
type Cluster struct {
PID int `db:"pid"`
DATID int `db:"datid"`
DATNAME string `db:"datname"`
RELID int `db:"relid"`
Command string `db:"command"`
PHASE string `db:"phase"`
ClusterIndexRelid int64 `db:"cluster_index_relid"`
HeapTuplesScanned int64 `db:"heap_tuples_scanned"`
HeapTuplesWritten int64 `db:"heap_tuples_written"`
HeapBlksTotal int64 `db:"heap_blks_total"`
HeapBlksScanned int64 `db:"heap_blks_scanned"`
IndexRebuildCount int64 `db:"index_rebuild_count"`
}
pg_stat_progress_Cluster.
type Copy ¶ added in v0.0.2
type Copy struct {
PID int `db:"pid"`
DATID int `db:"datid"`
DATNAME string `db:"datname"`
RELID int `db:"relid"`
COMMAND string `db:"command"`
CTYPE string `db:"type"`
BYTESProcessed int64 `db:"bytes_processed"`
BYTESTotal int64 `db:"bytes_total"`
TUPLESProcessed int64 `db:"tuples_processed"`
TUPLESExcluded int64 `db:"tuples_excluded"`
}
pg_stat_progress_copy
type CreateIndex ¶
type CreateIndex struct {
PID int `db:"pid"`
DATID int `db:"datid"`
DATNAME string `db:"datname"`
RELID int `db:"relid"`
IndexRelid int `db:"index_relid"`
Command string `db:"command"`
PHASE string `db:"phase"`
LockersTotal int64 `db:"lockers_total"`
LockersDone int64 `db:"lockers_done"`
LockersPid int64 `db:"current_locker_pid"`
BlocksTotal int64 `db:"blocks_total"`
BlocksDone int64 `db:"blocks_done"`
TuplesTotal int64 `db:"tuples_total"`
TuplesDone int64 `db:"tuples_done"`
PartitionsTotal int64 `db:"partitions_total"`
PartitionsDone int64 `db:"partitions_done"`
}
pg_stat_progress_create_index
func (CreateIndex) Color ¶ added in v0.0.3
func (v CreateIndex) Color() (string, string)
func (CreateIndex) Name ¶
func (v CreateIndex) Name() string
func (CreateIndex) Pid ¶
func (v CreateIndex) Pid() int
func (CreateIndex) Progress ¶
func (v CreateIndex) Progress() float64
func (CreateIndex) Table ¶
func (v CreateIndex) Table() string
func (CreateIndex) Vertical ¶
func (v CreateIndex) Vertical() string
type Pgsp ¶ added in v0.0.3
type Pgsp struct {
DB *sqlx.DB
StatProgress StatProgress
}
func (*Pgsp) DisConnect ¶ added in v0.0.3
func (*Pgsp) TargetString ¶ added in v0.0.3
type Progress ¶ added in v0.0.3
type StatProgress ¶ added in v0.0.3
func NewMonitor ¶ added in v0.0.3
func NewMonitor() StatProgress
type Vacuum ¶
type Vacuum struct {
PID int `db:"pid"`
DATID int `db:"datid"`
DATNAME string `db:"datname"`
RELID int `db:"relid"`
PHASE string `db:"phase"`
HeapBLKSTotal int64 `db:"heap_blks_total"`
HeapBLKSScanned int64 `db:"heap_blks_scanned"`
HeapBLKSVacuumed int64 `db:"heap_blks_vacuumed"`
IndexVacuumCount int64 `db:"index_vacuum_count"`
MaxDeadTuples int64 `db:"max_dead_tuples"`
NumDeadTuples int64 `db:"num_dead_tuples"`
}
pg_stat_progress_vacuum
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
