# Packages
No description provided by the author
# Functions
ApplyFileIncrement changes pages according to supplied change map file.
No description provided by the author
No description provided by the author
No description provided by the author
ConfigureWalUploader connects to storage and creates an uploader.
Connect establishes a connection to postgres using a UNIX socket.
CreateFileFromIncrement writes the pages from the increment to local file and write empty blocks in place of pages which are not present in the increment.
No description provided by the author
ExtractDeleteGarbagePredicate extracts delete modifier the "delete garbage" command.
ExtractPgControl extract pg_control data of cluster by storage.
FindLastCommonPoint get the last common LSN and timeline between two slices of history records.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetMissingWals collect the slice of WAL filenames by last LSN, last timeline, current timeline, history records and folder.
GetNextWalFilename computes name of next WAL segment.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
HandleCatchupFetch is invoked to perform wal-g catchup-fetch.
HandleCatchupPush is invoked to perform a wal-g catchup-push.
HandleCopy copy specific or all backups from one storage to another.
HandleDaemon is invoked to perform daemon mode.
TODO : unit tests.
TODO : unit tests HandleWALFetch is invoked to performa wal-g wal-fetch.
TODO : unit tests HandleWALPrefetch is invoked by wal-fetch command to speed up database restoration.
TODO : unit tests HandleWALPush is invoked to perform wal-g wal-push.
HandleWALReceive is invoked to receive wal with a replication connection and push.
HandleWALRestore is invoked to perform wal-g wal-restore.
HandleWalShow gets the list of files inside WAL folder, detects the available WAL segments, groups WAL segments by the timeline and shows detailed info about each timeline stored in storage.
HandleWalVerify builds a check runner for each check type and writes the check results to the provided output writer.
No description provided by the author
No description provided by the author
No description provided by the author
Listen is used for listening connection and processing messages.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewBackupArguments creates a BackupArgument object to hold the arguments from the cmd.
NewBackupHandler returns a backup handler object, which can handle the backup.
No description provided by the author
No description provided by the author
No description provided by the author
NewBgUploader creates a new BgUploader which looks for WAL files adjacent to walFilePath.
TODO: use DiskDataFolder.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewPgQueryRunner builds QueryRunner from available connection.
No description provided by the author
NewPhysicalSlot is a helper function to declare a new PhysicalSlot object and set vaues from the parsed arguments.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewStreamingBaseBackup will define a new StreamingBaseBackup object.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewTimeLineHistFile is a helper function to define a new TimeLineHistFile.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewWalSegment is a helper function to declare a new WalSegment.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ParseWALFilename extracts numeric parts from WAL file name.
PrepareDirs makes sure all dirs exist.
QueryCurrentWalSegment() gets start WAL segment from Postgres cluster.
No description provided by the author
No description provided by the author
No description provided by the author
RestoreMissingPages restores missing pages (zero blocks) of local file with their base backup version.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ValidateSlotName validates pgSlotName to be a valid slot name.
VerifyPagedFileBase verifies pages of a standard paged file.
VerifyPagedFileIncrement verifies pages of an increment.
No description provided by the author
TODO : unit tests.
WritePagesFromIncrement writes pages from delta backup according to diffMap.
TODO : unit tests.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
prime multiplier of FNV-1a hash.
Segment exists in storage.
No description provided by the author
No description provided by the author
Surely lost missing segment.
No description provided by the author
No description provided by the author
number of checksums to calculate in parallel.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
page header checksum length (in bytes).
page header checksum offset.
No description provided by the author
No description provided by the author
No description provided by the author
Missing but probably delayed segment.
Missing but probably still uploading segment.
These are the multiple results that the methods can return.
These are the multiple results that the methods can return.
These are the multiple results that the methods can return.
These are the multiple results that the methods can return.
These are the multiple results that the methods can return.
These are the multiple results that the methods can return.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Sets standbyMessageTimeout in Streaming Replication Protocol.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
ExcludedFilenames is a list of excluded members from the bundled backup.
IncrementFileHeader contains "wi" at the head which stands for "wal-g increment" format version "1", signature magic number.
No description provided by the author
No description provided by the author
No description provided by the author
WalSegmentSize is the size of one WAL file.
# Structs
No description provided by the author
Backup contains information about a valid Postgres backup generated and uploaded by WAL-G.
BackupArguments holds all arguments parsed from cmd to this handler class.
BackupDetails is used to append ExtendedMetadataDto details to BackupTime struct.
No description provided by the author
No description provided by the author
BackupHandler is the main struct which is handling the backup process.
No description provided by the author
BackupPgInfo holds the PostgreSQL info that the handler queries before running the backup.
BackupSentinelDto describes file structure of json sentinel.
BackupSentinelDtoV2 is the future version of the backup sentinel.
No description provided by the author
BackupWorkers holds the external objects that the handler uses to get the backup data / write the backup data.
BgUploader represents the state of concurrent WAL upload.
A Bundle represents the directory to be walked.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
CatchupFileUnwrapper is used for catchup (catchup-push) backups.
No description provided by the author
No description provided by the author
No description provided by the author
CurBackupInfo holds all information that is harvest during the backup process.
TODO : add tables to info.
DefaultFileUnwrapper is used for default (backup-push) backups.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Extended metadata should describe backup in more details, but be small enough to be downloaded often.
No description provided by the author
No description provided by the author
No description provided by the author
FilesMetadataDto contains the information about the backup files.
No description provided by the author
FileTarInterpreter extracts input to disk.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IncrementalPageReader constructs difference map during initialization and than re-read file Diff map may consist of 1Gb/PostgresBlockSize elements == 512Kb.
No description provided by the author
IntegrityCheckRunner queries the current cluster WAL segment and timeline and travels through WAL segments in storage in reversed chronological order (starting from that segment) to find any missing WAL segments that could potentially fail the PITR procedure.
IntegrityScanSegmentSequence is a continuous sequence of segments with the same timeline and Status.
InvalidBlockError indicates that file contain invalid page and cannot be archived incrementally.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PgControlData represents data contained in pg_control file.
No description provided by the author
No description provided by the author
PgQueryRunner is implementation for controlling PostgreSQL 9.0+.
No description provided by the author
The PhysicalSlot represents a Physical Replication Slot.
PrevBackupInfo holds all information that is harvest during the backup process.
No description provided by the author
RatingTarBallComposer receives all files and tar headers that are going to be written to the backup, and composes the tarballs by placing the files with similar update rating in the same tarballs.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SegmentScanConfig is used to configure the single Scan() call of the WalSegmentScanner.
No description provided by the author
No description provided by the author
StatBundleFiles contains the bundle files.
The StreamingBaseBackup object represents a Postgres BASE_BACKUP, connecting to Postgres, and streaming backup data.
No description provided by the author
The mandatory keys for this map are "base_prefix" and "tablespaces".
TarBallFilePackerImpl is used to pack bundle file into tarball.
No description provided by the author
TarballStreamer is used to modify tar files which are received streaming.
No description provided by the author
TarFilesCollection stores the files which are going to be written to the same tarball.
No description provided by the author
No description provided by the author
TimelineCheckRunner is used to verify that the current timeline is the highest among the storage timelines.
The TimeLineHistFile struct represents a TimeLineHistory file containing TimeLineHistFileRows.
The TimeLineHistFileRow struct represents one line in the TimeLineHistory file.
TimelineHistoryRecord represents entry in .history file.
TimelineInfo contains information about some timeline in storage.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
UnwrapResult stores information about the result of single backup unwrap operation.
No description provided by the author
In case of recording error WalDeltaRecordingReader stops recording, but continues reading data correctly.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The WalSegment object represents a Postgres Wal Segment, holding all wal data for a wal file.
No description provided by the author
No description provided by the author
WalSegmentRunner is used for sequential iteration over WAL segments in the storage.
WalSegmentScanner is used to scan the WAL segments storage.
WalSegmentsSequence represents some collection of wal segments with the same timeline.
WalShowJsonOutputWriter writes the detailed JSON output.
WalShowTableOutputWriter writes the output in compact pretty table.
WalUploader extends uploader with wal specific functionality.
WalVerifyCheckResult contains the result of some WalVerifyCheckRunner run.
WalVerifyJsonOutputWriter writes the detailed JSON output.
WalVerifyTableOutputWriter writes the output as pretty table.
# Interfaces
Cleaner interface serves to separate file system logic from prefetch clean logic to make it testable.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The QueryRunner interface for controlling database during backup.
No description provided by the author
No description provided by the author
TarBallComposerMaker is used to make an instance of TarBallComposer.
WalShowOutputWriter writes the output of wal-show command execution result.
No description provided by the author
WalVerifyCheckRunner performs the check of WAL storage.
WalVerifyOutputWriter writes the output of wal-verify command execution result.
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
PgChecksummablePage represents single database page divided by NSums blocks for checksum calculation.
PgDatabasePage represents single database page.
The ProcessMessageResult is an enum representing possible results from the methods processing the messages as received from Postgres into the wal segment.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author