[pgpool-hackers: 43] Re: ERROR: cannot execute SELECT FOR UPDATE in a read-only transaction

Martin Kotys martin at kotys.info
Fri Mar 9 20:20:24 JST 2012


Thanks for that, I missed that one. I'll add that function to 
black_function_list and do some further tests.
Martin

Dňa 08.03.2012 23:41, Tatsuo Ishii wrote / napísal(a):
>> We've installed pgPoolII on our servers and would like to switch over
>> our application to pgpool. When we did it, we got the following error:
>>
>> ERROR: DBD::Pg::db selectrow_array failed: ERROR: cannot execute
>> SELECT FOR UPDATE in a read-only transaction
>> CONTEXT: SQL statement "SELECT id::varchar || '-' ||
>> actorderid::varchar
>>                                    FROM shop WHERE id = $1 FOR UPDATE"
>> PL/pgSQL function "nextorderid" line 5 at SQL statement [for Statement
>> "SELECT nextorderid(2)"]
>>
>> Nextorderid is a stored procedure which returns an order ID. Strange
>> thing is that it sometimes work and sometimes not.
>>
>> I assume that the problem is that if the query is sent to master
>> server, all is OK, but if the query is sent to slave it fails.
>> The same will probably happen with select nextval(), begin end, and so
>> on.
>>
>> Have you experienced similar issue by any chance? Don't you know how
>> to solve that issue?
> Are you sure that you registered nextorderid into black_function_list?
> --
> Tatsuo Ishii
> SRA OSS, Inc. Japan
> English: http://www.sraoss.co.jp/index_en.php
> Japanese: http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list