[pgpool-hackers: 42] Re: ERROR: cannot execute SELECT FOR UPDATE in a read-only transaction
Tatsuo Ishii
ishii at postgresql.org
Fri Mar 9 07:41:48 JST 2012
> 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