1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Implement NOWAIT option for BASE_BACKUP command

Specifying this option makes the server not wait for the
xlog to be archived, or emit a warning that it can't,
instead leaving the responsibility with the client.

This is useful when the log is being streamed using
the streaming protocol in parallel with the backup,
without having log archiving enabled.
This commit is contained in:
Magnus Hagander
2011-02-09 10:59:53 +01:00
parent 375e5b0a68
commit 3144c33a2f
6 changed files with 39 additions and 8 deletions

View File

@@ -71,6 +71,7 @@ Node *replication_parse_result;
%token K_LABEL
%token K_PROGRESS
%token K_FAST
%token K_NOWAIT
%token K_WAL
%token K_START_REPLICATION
@@ -107,7 +108,7 @@ identify_system:
;
/*
* BASE_BACKUP [LABEL '<label>'] [PROGRESS] [FAST] [WAL]
* BASE_BACKUP [LABEL '<label>'] [PROGRESS] [FAST] [WAL] [NOWAIT]
*/
base_backup:
K_BASE_BACKUP base_backup_opt_list
@@ -142,6 +143,11 @@ base_backup_opt:
$$ = makeDefElem("wal",
(Node *)makeInteger(TRUE));
}
| K_NOWAIT
{
$$ = makeDefElem("nowait",
(Node *)makeInteger(TRUE));
}
;
/*