Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf6cd14e

Browse files
committed
Documentation: update section WAL archiving
1 parent8d5c578 commitf6cd14e

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

‎Documentation.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ For details, see the sections [Setting up STREAM Backups](#setting-up-stream-bac
261261

262262
###Setting up STREAM Backups
263263

264-
To set up the cluster for STREAM backups, complete the following steps:
264+
To set up the cluster for[STREAM](#stream-mode) backups, complete the following steps:
265265

266266
- Grant the REPLICATION privilege to the backup role:
267267

@@ -273,25 +273,27 @@ To set up the cluster for STREAM backups, complete the following steps:
273273

274274
If you are planning to take PAGE backups in STREAM mode, you still have to configure WAL archiving as explained in the section[Setting up continuous WAL archiving](#setting-up-continuous-wal-archiving).
275275

276-
Once these steps are complete, you can start taking FULL, PAGE, DELTA and PTRACK backupsinSTREAM mode.
276+
Once these steps are complete, you can start taking FULL, PAGE, DELTA and PTRACK backupswith[STREAM](#stream-mode) WAL mode.
277277

278278
###Setting up continuous WAL archiving
279279

280-
ARCHIVE backups require[continious WAL archiving](https://www.postgresql.org/docs/current/continuous-archiving.html) to be enabled. To set up continious archiving in the cluster, complete the following steps:
280+
Making backups in PAGE backup mode, performing[PITR](#performing-point-in-time-pitr-recovery) and making backups with[ARCHIVE](#archive-mode) WAL delivery mode require[continious WAL archiving](https://www.postgresql.org/docs/current/continuous-archiving.html) to be enabled. To set up continious archiving in the cluster, complete the following steps:
281281

282282
- Make sure the[wal_level](https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-WAL-LEVEL) parameter is higher than`minimal`.
283283
- If you are configuring archiving on master,[archive_mode](https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-ARCHIVE-MODE) must be set to`on`. To perform archiving on standby, set this parameter to`always`.
284284
- Set the[archive_command](https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-ARCHIVE-COMMAND) parameter, as follows:
285285

286286
archive_command = 'pg_probackup archive-push -B backup_dir --instance instance_name --wal-file-path %p --wal-file-name %f [remote_options]'
287287

288-
Where*backup_dir* and*instance_name* refer to the already initialized backup catalog instance for this database cluster and optional parameters[remote_options](#remote-mode-options) should be used to archive WAL to the remotemachine. For details about all possible`archive-push` parameters, see the section[archive-push](#archive-push).
288+
Where*backup_dir* and*instance_name* refer to the already initialized backup catalog instance for this database cluster and optional parameters[remote_options](#remote-mode-options) should be used to archive WAL to the remotehost. For details about all possible`archive-push` parameters, see the section[archive-push](#archive-push).
289289

290-
Once these steps are complete, you can starttaking FULL, PAGE, DELTA and PTRACK backups inARCHIVEmode.
290+
Once these steps are complete, you can startmaking backups with ARCHIVE WAL mode, backups inPAGE backupmode and perform[PITR](#performing-point-in-time-pitr-recovery).
291291

292-
>NOTE: Instead of`archive_mode`+`archive_command` method you may opt to use the utility[pg_receivewal](https://www.postgresql.org/docs/current/app-pgreceivewal.html). In this case pg_receivewal`-D directory` option should point to '*backup_dir*/wal/*instance_name*' directory. WAL compression that could be done by pg_receivewal is supported by pg_probackup.`Zero Data Loss` archive strategy can be achieved only by using pg_receivewal.
292+
If you are planning to make PAGE backups and/or backups with[ARCHIVE](#archive-mode) WAL mode from a standby of a server, that generates small amount of WAL traffic, without long waiting for WAL segment to fill up, consider setting[archive_timeout](https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-ARCHIVE-TIMEOUT) PostgreSQL parameter**on master**. It is advisable to synchronize the value of this setting with pg_probackup option`--archive-timeout`.
293+
294+
>NOTE: using pg_probackup command[archive-push](#archive-push) for continious archiving is optional. You can use any other tool you like as long as it delivers WAL segments into '*backup_dir*/wal/*instance_name*' directory. If compression is used, it should be`gzip`, and '.gz' suffix in filename is mandatory.
293295
294-
>NOTE:using pg_probackup command[archive-push](#archive-push) for continious archiving is optional. You canuseany other tool you like as long as it delivers WAL segments into '*backup_dir*/wal/*instance_name*' directory.If compressionis used, it should be gzip and '.gz' suffix is mandatory.
296+
>NOTE:Instead of`archive_mode`+`archive_command` method you may opt tousethe utility[pg_receivewal](https://www.postgresql.org/docs/current/app-pgreceivewal.html). In this case pg_receivewal`-D directory` option should point to '*backup_dir*/wal/*instance_name*' directory.WAL compressionthat could be done by pg_receivewal is supported by pg_probackup.`Zero Data Loss` archive strategy can be achieved only by using pg_receivewal.
295297
296298
###Backup from Standby
297299

@@ -302,7 +304,7 @@ For PostgreSQL 9.6 or higher, pg_probackup can take backups from a standby serve
302304
- To perform STREAM backup on standby, complete all steps in section[Setting up STREAM Backups](#setting-up-stream-backups)
303305
- To perform ARCHIVE backup on standby, complete all steps in section[Setting up continuous WAL archiving](#setting-up-continuous-wal-archiving)
304306

305-
Once these steps are complete, you can start taking FULL, PAGE, DELTA or PTRACK backupsof appropriate WAL deliverymethod: ARCHIVE or STREAM, from the standby server.
307+
Once these steps are complete, you can start taking FULL, PAGE, DELTA or PTRACK backupswith appropriate WAL deliverymode: ARCHIVE or STREAM, from the standby server.
306308

307309
Backup from the standby server has the following limitations:
308310

@@ -922,6 +924,7 @@ Even if you are using [continuous archiving](#setting-up-continuous-wal-archivin
922924
- Backup in STREAM mode can be taken from standby of a server, that generates small amount of WAL traffic, without long waiting for WAL segment to fill up.
923925

924926
####Page validation
927+
925928
If[data checksums](https://www.postgresql.org/docs/current/runtime-config-preset.html#GUC-DATA-CHECKSUMS) are enabled in the database cluster, pg_probackup uses this information to check correctness of data files during backup. While reading each page, pg_probackup checks whether the calculated checksum coincides with the checksum stored in the page header. This guarantees that the PostgreSQL instance and backup itself are free of corrupted pages.
926929
Note that pg_probackup reads database files directly from filesystem, so under heavy write load during backup it can show false positive checksum failures because of partial writes. In case of page checksumm mismatch, page is readed again and checksumm comparison repeated.
927930

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp