Re: [HACKERS] [Bug fix] PQsendQuery occurs error whentarget_session_attrs is set to read-write - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] [Bug fix] PQsendQuery occurs error whentarget_session_attrs is set to read-write
Date
Msg-id CAB7nPqTaqX01xDxca4PnXAgum4xT1M2mBKOt-oyUTQgYtVNsFQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [Bug fix] PQsendQuery occurs error whentarget_session_attrs is set to read-write  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] [Bug fix] PQsendQuery occurs error whentarget_session_attrs is set to read-write  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Thu, Feb 16, 2017 at 1:08 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> Great, thanks!  This looks good to me, so committed.

Thanks.

> Is there any
> chance you can use your amazing TAP-test-creation powers to do some
> automated testing of this feature?  For example, maybe we could at
> least set up a master and a standby and somehow test that asking for a
> read-only server picks the standby if it's first but asking for a
> read-write server tries the standby and then switches to the master?
> It would also be nice to test that probing a server that doesn't exist
> fails, but I'm not sure how to create an IP/port combination that's
> guaranteed to not work.

It is possible to get a test easily in this area by abusing of the
fact that multiple -d switches defined in psql make it use only the
last value. By looking at psql() in PostgresNode.pm you would see what
I mean as -d is defined by default. Or we could just enforce
PGHOST/PGPORT as there is a method to get the unix domain directory.
Not sure which one of those two methods is most elegant though. I
would tend for just using PGHOST and PGPORT.
-- 
Michael



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] increasing the default WAL segment size
Next
From: Thomas Munro
Date:
Subject: Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)