Re: pgpool-II: cannot use serializable mode in a hot standby

From: Kevin Grittner <kgrittn(at)gmail(dot)com>
To: Alexander Pyhalov <alp(at)rsu(dot)ru>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, adrian(dot)klaver(at)aklaver(dot)com, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pgpool-II: cannot use serializable mode in a hot standby
Date: 2016-04-13 22:54:39
Message-ID: CACjxUsMv+mHeQMAzCUzi=POM8HddP4G_m7LS9aTbZeZDRzKbxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Apr 13, 2016 at 1:30 AM, Alexander Pyhalov <alp(at)rsu(dot)ru> wrote:
> Tatsuo Ishii писал 13.04.2016 02:36:
>>>
>>> On 04/12/2016 16:50, Adrian Klaver wrote:
>>>>
>>>> On 04/12/2016 01:06 AM, Alexander Pyhalov wrote:
>>>
>>> I understand. I mean perhaps pgpool shouldn't forward these statements
>>> to slaves.

It should not forward transactions which are requested to be
SERIALIZABLE to standbys. If you just suppress the SET statement
(or substitute REPEATABLE READ), queries in that transaction can
return incorrect results.

>> Yeah, PostgreSQL used to accept the command on standbys (at least in
>> 9.0). The restriction was added later on.

... in 9.1, for a reason.

>> It woule be nice if you send
>> a bug report to the pgpool-II bug tracker to not forget it.
>>
>> http://pgpool.net/mediawiki/index.php/Bug_tracking_system
>
> Filed http://www.pgpool.net/mantisbt/view.php?id=191

As the entry stands at the moment, the suggestions for fixes will
allow incorrect query results. See this example, and imagine that
the transaction generating the list of receipts for the closed
batch is run on the standby before the transaction adding the last
receipt commits. Or test it.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Grittner 2016-04-13 22:56:03 Re: pgpool-II: cannot use serializable mode in a hot standby
Previous Message Daniel Lenski 2016-04-13 22:48:57 Re: [HACKERS] sign function with INTERVAL?