Magnus Hagander <mag...@hagander.net> writes:
> I think the cleanest way to do it is to just track if it's a standby in the
> AH struct as written.
This patch will cause pg_dump to fail entirely against pre-9.0 servers.
You need to execute the test conditionally.
Also, in view of that, this test
- if (fout->remoteVersion >= 90000)
+ if (fout->remoteVersion >= 90000 && fout->isStandby)
could be reduced to just "if (fout->isStandby)". And the comment in
front of it could stand some attention (possibly just replace it with
the one that's currently within the inner if() ... actually, that
comment should move to where you moved the test to, no?)
Also, why didn't you keep using ExecuteSqlQueryForSingleRow()?
As coded, you're losing a sanity check that the query gives exactly
one row back.
regards, tom lane
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: