diff options
author | Robert Haas <rhaas@postgresql.org> | 2021-11-16 15:20:50 -0500 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2022-01-20 10:46:33 -0500 |
commit | 3500ccc39b0dadd1068a03938e4b8ff562587ccc (patch) | |
tree | 1c5d639bebf9c9f493a4cebffd59baa4c7dafbb9 /src/include/utils/wait_event.h | |
parent | f80900be06f784a6bda705800305c550e05d6edf (diff) | |
download | postgresql-3500ccc39b0dadd1068a03938e4b8ff562587ccc.tar.gz |
Support base backup targets.
pg_basebackup now has a --target=TARGET[:DETAIL] option. If specfied,
it is sent to the server as the value of the TARGET option to the
BASE_BACKUP command. If DETAIL is included, it is sent as the value of
the new TARGET_DETAIL option to the BASE_BACKUP command. If the
target is anything other than 'client', pg_basebackup assumes that it
will now be the server's job to write the backup in a location somehow
defined by the target, and that it therefore needs to write nothing
locally. However, the server will still send messages to the client
for progress reporting purposes.
On the server side, we now support two additional types of backup
targets. There is a 'blackhole' target, which just throws away the
backup data without doing anything at all with it. Naturally, this
should only be used for testing and debugging purposes, since you will
not actually have a backup when it finishes running. More usefully,
there is also a 'server' target, so you can now use something like
'pg_basebackup -Xnone -t server:/SOME/PATH' to write a backup to some
location on the server. We can extend this to more types of targets
in the future, and might even want to create an extensibility
mechanism for adding new target types.
Since WAL fetching is handled with separate client-side logic, it's
not part of this mechanism; thus, backups with non-default targets
must use -Xnone or -Xfetch.
Patch by me, with a bug fix by Jeevan Ladhe. The patch set of which
this is a part has also had review and/or testing from Tushar Ahuja,
Suraj Kharage, Dipesh Pandit, and Mark Dilger.
Discussion: http://postgr.es/m/CA+TgmoaYZbz0=Yk797aOJwkGJC-LK3iXn+wzzMx7KdwNpZhS5g@mail.gmail.com
Diffstat (limited to 'src/include/utils/wait_event.h')
-rw-r--r-- | src/include/utils/wait_event.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/utils/wait_event.h b/src/include/utils/wait_event.h index e0b2f56f47..395d325c5f 100644 --- a/src/include/utils/wait_event.h +++ b/src/include/utils/wait_event.h @@ -157,6 +157,8 @@ typedef enum typedef enum { WAIT_EVENT_BASEBACKUP_READ = PG_WAIT_IO, + WAIT_EVENT_BASEBACKUP_SYNC, + WAIT_EVENT_BASEBACKUP_WRITE, WAIT_EVENT_BUFFILE_READ, WAIT_EVENT_BUFFILE_WRITE, WAIT_EVENT_BUFFILE_TRUNCATE, |