Re: [Bug fix]If recovery.conf has target_session_attrs=read-write, the standby fails to start.
Michael Paquier <michael.paquier@gmail.com>
From: Michael Paquier <michael.paquier@gmail.com>
To: "Higuchi, Daisuke" <higuchi.daisuke@jp.fujitsu.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2017-05-19T04:51:35Z
Lists: pgsql-hackers
On Fri, May 19, 2017 at 1:16 PM, Higuchi, Daisuke
<higuchi.daisuke@jp.fujitsu.com> wrote:
> The reason of this problem is that sending 'show transaction_read_only' is failed.
> 'show' must be in uppercase letters because the streaming replication protocol only accepts capital letters.
> In psql and libpq applications that do not use the streaming replication protocol, this error does not occur.
>
> The attached patch fixes this. This patch changes 'show transaction_read_only' to 'SHOW transaction_read_only'.
if (!PQsendQuery(conn,
- "show transaction_read_only"))
+ "SHOW transaction_read_only"))
Or perhaps the replication command parser could be made more flexible
with lower-case characters for replication commands?
--
Michael
Commits
-
Rethink flex flags for syncrep_scanner.l.
- 5c837ddd7092 10.0 landed
-
Capitalize SHOW when testing whether target_session_attrs=read-write.
- aa41bc794c51 10.0 landed