[pgpool-hackers: 2422] Re: Load balancing with synchronous replication

Thomas Munro thomas.munro at enterprisedb.com
Mon Jul 3 06:26:09 JST 2017


On Sun, Jul 2, 2017 at 10:39 PM, Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
>> I have now renamed that proposed feature to "synchronous replay".  I
>> am wondering if it would be a good idea to do a proof-of-concept patch
>> for pgpool.  One of the central ideas of my patch is that it should be
>> easy to use for end users, which is where pgpool can help.
>>
>> Here is my idea for step 1.  Use the regular master/slave load
>> balancing mode, but with a couple of small modifications:
>>
>> 1.  If error 40P02 is raised (the new error introduced by my patch,
>> "synchronous replay is not available"), then remember not to pick that
>> server again for N seconds (configurable).
>
> Does "my patch" mean a patch for PostgreSQL or Pgpool-II?
> I am a little bit confused.

Sorry for the confusing language... I mean that error 40P02 is raised
by the synchronous replay patch[1].  I don't have a patch for pgpool,
I'm just speculating about what change would be needed for pgpool to
make it easy for end users.  I think it should recognise this new
error, "ban" that slave server for N seconds and retry the query on a
different one.  Do you think that would be very difficult?  Is there
any architectural reason why it would be difficult for pgool to "ban"
servers or to re-run queries on another servers?  I would be grateful
for any ideas or feedback!

Thanks,

[1] https://www.postgresql.org/message-id/CAEepm%3D0YigNQczAF-%3Dx_SxT6cJv77Yb0EO%2BcAFnqRyVu4%2BbKFw%40mail.gmail.com

-- 
Thomas Munro
http://www.enterprisedb.com


More information about the pgpool-hackers mailing list