From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
Cc: | Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pg_receivexlog: spurious error message connecting to 9.3 |
Date: | 2015-11-17 19:10:00 |
Message-ID: | CA+TgmoZ1+FuJmNcBpR-Pjwf00AW-10_RNd-tfG2n9cM2DhLZCA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Nov 10, 2015 at 1:35 AM, Craig Ringer <craig(at)2ndquadrant(dot)com> wrote:
> On 10 November 2015 at 01:47, Marco Nenciarini
> <marco(dot)nenciarini(at)2ndquadrant(dot)it> wrote:
>
>> I've attached a little patch that removes the errors when connected to 9.3.
>
> Looks good to me. No point confusing users.
>
> The other callers of RunIdentifySystem are pg_basebackup and
> pg_receivelogical.
>
> pg_basebackup doesn't ask for the db_name (passes null).
>
> pg_receivelogical handles it being null already (and if it didn't,
> it'd die with or without this patch).
>
> pg_receivexlog expects it to be null and fails gracefully if it isn't.
>
> So this change just removes some pointless noise.
The fprintf(stderr, ...) does not cause a non-local exit, so the
"else" just after it should be deleted. Otherwise, when that branch
is taken, *db_name doesn't get initialized at all.
Actually, I'd suggest doing it like the attached instead, which seems
a bit tighter.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
dbname-warning-fix.patch | text/x-diff | 896 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-11-17 19:14:28 | Re: proposal: multiple psql option -c |
Previous Message | Robert Haas | 2015-11-17 19:02:48 | Re: [PATCH] Skip ALTER x SET SCHEMA if the schema didn't change |