[pgpool-general: 2222] Re: SELECT sent to both nodes in replication mode

Tatsuo Ishii ishii at postgresql.org
Tue Oct 29 08:26:49 JST 2013


Seems to be a side effect caused by the commit.
Can you please try attached patch?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

> Hi Tatsuo,
> 
> I have updated from 3.3.0 to 3.3.1 with replication_mode=on,
> replicate_select=off, load_balance_mode=off.  However, the functions
> listed in 'black_function_list' (with insert, delete, update) seem
> also to be sent to the master only.  Is this expected ?  If so, does
> that mean we cannot use load_balance_mode=off for replicate_mode=on ?
> 
> Thanks,
> Gary
> 
>> Done. Fix will appear in 3.3.1.
>> Patch is here:
>>
>> http://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=1ac45a28258074ea4d9d902aca016f970d31f311
>> --
>> Tatsuo Ishii
>> SRA OSS, Inc. Japan
>> English: http://www.sraoss.co.jp/index_en.php
>> Japanese: http://www.sraoss.co.jp
>>
>>> Looks a bug to me. Will fix.
>>> --
>>> Tatsuo Ishii
>>> SRA OSS, Inc. Japan
>>> English: http://www.sraoss.co.jp/index_en.php
>>> Japanese: http://www.sraoss.co.jp
>>>
>>>>   Hello,
>>>>
>>>>   I would like to use pgpool 3.3.0 and postges 9.1 in replication mode
>>>>   with queries send to master db, without parallel queries or load
>>>>   balancing. Unfortunately the following settings still send queries to
>>>>   both nodes:
>>>>
>>>> replication_mode = on
>>>> replicate_select = off
>>>> load_balance_mode = off
>>>> master_slave_mode = off
>>>> parallel_mode = off
>>>>
>>>> This is the log:
>>>> connection received: host=localhost port=53802
>>>> DB node id: 0 backend pid: 11864 statement: BEGIN
>>>> DB node id: 1 backend pid: 12508 statement: BEGIN
>>>> DB node id: 0 backend pid: 11864 statement: SELECT 1;
>>>> DB node id: 1 backend pid: 12508 statement: SELECT 1;
>>>> DB node id: 1 backend pid: 12508 statement: COMMIT
>>>> DB node id: 0 backend pid: 11864 statement: COMMIT
>>>> DB node id: 0 backend pid: 11864 statement:  DISCARD ALL
>>>> DB node id: 1 backend pid: 12508 statement:  DISCARD ALL
>>>>
>>>>
>>>> As a workaround, the following seems to work as expected:
>>>>
>>>> load_balance_mode = on
>>>> backend_weight0 = 1
>>>> backend_weight1 = 0
>>>>
>>>> connection received: host=localhost port=53930
>>>> DB node id: 0 backend pid: 12191 statement: SELECT 1;
>>>> DB node id: 0 backend pid: 12191 statement:  DISCARD ALL
>>>> DB node id: 1 backend pid: 12752 statement:  DISCARD ALL
>>>>
>>>> It seems to be strange because based on table provided in description
>>>> of replicate_select on
>>>> http://www.pgpool.net/docs/latest/pgpool-en.html#replication_mode I
>>>> would expect that the first setting will send queries only to the
>>>> master node.
>>>>
>>>> Can somebody help me to find out if there is some fault in my setup or
>>>> in pgpool?
>>>>
>>>>   Thanks and Regards,
>>>>   Lukas Rypl
>>>> _______________________________________________
>>>> pgpool-general mailing list
>>>> pgpool-general at pgpool.net
>>>> http://www.pgpool.net/mailman/listinfo/pgpool-general
>>> _______________________________________________
>>> pgpool-general mailing list
>>> pgpool-general at pgpool.net
>>> http://www.pgpool.net/mailman/listinfo/pgpool-general
>> _______________________________________________
>> pgpool-general mailing list
>> pgpool-general at pgpool.net
>> http://www.pgpool.net/mailman/listinfo/pgpool-general
>>
>>
> 
> _______________________________________________
> pgpool-general mailing list
> pgpool-general at pgpool.net
> http://www.pgpool.net/mailman/listinfo/pgpool-general
-------------- next part --------------
A non-text attachment was scrubbed...
Name: query_context-3.3.patch
Type: text/x-patch
Size: 551 bytes
Desc: not available
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20131029/8bfc6d7f/attachment.bin>


More information about the pgpool-general mailing list