From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Add a server version check to pg_basebackup and pg_receivexlog. |
Date: | 2013-03-25 18:37:48 |
Message-ID: | E1UKCHE-0000pn-U8@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Add a server version check to pg_basebackup and pg_receivexlog.
These programs don't work against 9.0 or earlier servers, so check that when
the connection is made. That's better than a cryptic error message you got
before.
Also, these programs won't work with a 9.3 server, because the WAL streaming
protocol was changed in a non-backwards-compatible way. As a general rule,
we don't make any guarantee that an old client will work with a new server,
so check that. However, allow a 9.1 client to connect to a 9.2 server, to
avoid breaking environments that currently work; a 9.1 client happens to
work with a 9.2 server, even though we didn't make any great effort to
ensure that.
This patch is for the 9.1 and 9.2 branches, I'll commit a similar patch to
master later. Although this isn't a critical bug fix, it seems safe enough
to back-patch. The error message you got when connecting to a 9.3devel
server without this patch was cryptic enough to warrant backpatching.
Branch
------
REL9_1_STABLE
Details
-------
http://git.postgresql.org/pg/commitdiff/aa5d7d58ba40187bd8c6a2216bfd24514da78003
Modified Files
--------------
src/bin/pg_basebackup/pg_basebackup.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2013-03-25 18:37:49 | pgsql: In base backup, only include our own tablespace version director |
Previous Message | Heikki Linnakangas | 2013-03-25 15:06:25 | Re: pgsql: Add PF_PRINTF_ATTRIBUTE to on_exit_msg_fmt. |