diff options
author | Robert Haas <rhaas@postgresql.org> | 2014-03-10 13:50:28 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2014-03-10 13:50:28 -0400 |
commit | 5a991ef8692ed0d170b44958a81a6bd70e90585c (patch) | |
tree | 02bd510e825655b89c3ae14b6f02ad1b2f08ab53 /src/bin/pg_basebackup/pg_receivexlog.c | |
parent | cb9a0c7987466b130fbced01ab5d5481cf3a16df (diff) | |
download | postgresql-5a991ef8692ed0d170b44958a81a6bd70e90585c.tar.gz postgresql-5a991ef8692ed0d170b44958a81a6bd70e90585c.zip |
Allow logical decoding via the walsender interface.
In order for this to work, walsenders need the optional ability to
connect to a database, so the "replication" keyword now allows true
or false, for backward-compatibility, and the new value "database"
(which causes the "dbname" parameter to be respected).
walsender needs to loop not only when idle but also when sending
decoded data to the user and when waiting for more xlog data to decode.
This means that there are now three separate loops inside walsender.c;
although some refactoring has been done here, this is still a bit ugly.
Andres Freund, with contributions from Álvaro Herrera, and further
review by me.
Diffstat (limited to 'src/bin/pg_basebackup/pg_receivexlog.c')
-rw-r--r-- | src/bin/pg_basebackup/pg_receivexlog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_basebackup/pg_receivexlog.c b/src/bin/pg_basebackup/pg_receivexlog.c index 0f191ce6bb3..2478789ca21 100644 --- a/src/bin/pg_basebackup/pg_receivexlog.c +++ b/src/bin/pg_basebackup/pg_receivexlog.c @@ -275,10 +275,10 @@ StreamLog(void) progname, "IDENTIFY_SYSTEM", PQerrorMessage(conn)); disconnect_and_exit(1); } - if (PQntuples(res) != 1 || PQnfields(res) != 3) + if (PQntuples(res) != 1 || PQnfields(res) < 3) { fprintf(stderr, - _("%s: could not identify system: got %d rows and %d fields, expected %d rows and %d fields\n"), + _("%s: could not identify system: got %d rows and %d fields, expected %d rows and %d or more fields\n"), progname, PQntuples(res), PQnfields(res), 1, 3); disconnect_and_exit(1); } |