From: | Pavel Tide <paveltide(at)gmail(dot)com> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Yogesh Jadhav <pgyogesh(at)outlook(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-novice(at)lists(dot)postgresql(dot)org |
Subject: | Re: suppress empty archive_command warning message |
Date: | 2021-04-26 22:30:34 |
Message-ID: | CAAnkphVmKzU2K6C6id3oHyS+Z5EUJx5kHs0PC954UdFcrMYHaA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
> Uh, it's not that simple though.
>
> You absolutely *must* replay all of the WAL that existed at the time
> that the snapshot was taken and only after all of that WAL has been
> replayed can you stop WAL replay at some later point. There's
> additional complexities if you have to deal with multiple storage
> devices and tablespaces since, typically, snapshots are not guaranteed
> across those and therefore you really need to actually do a
> pg_start_backup and a pg_stop_backup (and save the backup label file..).
We do trigger a pg_start_backup right before taking a snapshot
(simultaneous across all devices), and once the snapshot has been
taken we trigger pg_stop_backup.
> What does that mean "places itself as an archive command"? You
> absolutely can not just start copying WAL files out of the pg_wal
> directory independently because PG recycles WAL files and the writes
> into them and you don't really "know" when a WAL file has been finished
> without taking other steps or arranging to have WAL files archived
> through calls to archive_command...
I mean that we use it as an archive_command.
Instead of placing some sort of "cp %p /mnt/nfs/%f" in
archive_command, we use '/bin/paveltide_utility %p'.
> None of this explains why you want to wait to ship WAL to the central
> server...
The server does not just accept the segments, but also uses its own
database to keep a note of the segments saved on the storage, LSNs,
and whatnot.
Continuous shipping means a higher load on the server, which we would
like to avoid.
Thanks!
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2021-04-27 14:59:16 | Re: suppress empty archive_command warning message |
Previous Message | Stephen Frost | 2021-04-26 20:51:03 | Re: suppress empty archive_command warning message |