[Pgpool-general] pgpool segfaulting and dumping core

Lonni J Friedman netllama at gmail.com
Fri Sep 23 23:10:51 UTC 2011


On Fri, Sep 23, 2011 at 3:43 PM, Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
>>> Ok. I think this is the cause of the problem:
>>>
>>>> 2011-09-21 16:23:11 LOG:   pid 23588: find_primary_node:
>>>> pgpool_walrecrunning does not exist
>>>
>>> I think you did not install pgpool_walrecrunning() on DB node 2. In
>>> this case find_primary_node() returns -1 and it is stored in
>>>
>>> Req_info->primary_node_id = find_primary_node();
>>>
>>> It is used as the parameter for TSTAE macro, which actually accesses
>>> out of array because of -1.
>>>
>>> 1250                    state = TSTATE(backend,
>>>
>>> So the solution would be installing pgpool_walrecrunning() on DB node 2.
>>
>> Thanks for looking at this.  I'm admittedly rather confused.  Where is
>> pgpool_walrerunning() documented?  I looked through the official
>> documentation (
>> http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html )
>> and don't see any references.  I also checked the official tutorial (
>> http://pgpool.projects.postgresql.org/pgpool-II/doc/tutorial-en.html )
>> and didn't see any references.
>
> The documents in the URL above is for the latest stable release of
> pgpool-II 3.1 and the version does not require installing the function
> anymore.
>
> Version specific docs are coming with under doc/ directory in the
> source code.

Ah, ok thanks.  I'm not sure how I missed this when I setup pgpool
over a month ago.

>
>> After googling it sounds like I need to run
>> /usr/share/pgpool-II/sql/walrecrunning/pgpool-walrecrunning.sql
>> against the postgres database (on the master, at which point it will
>> automatically replicate to the standby's)?
>> That seems to work fine:
>> $ psql -h cuda-db2 -U postgres -d postgres -f pgpool-walrecrunning.sql
>> CREATE FUNCTION
>> $ psql -h cuda-db2 -U postgres -d postgres -c "select pgpool_walrecrunning();"
>>  pgpool_walrecrunning
>> ----------------------
>>  f
>> (1 row)
>>
>> Trying to install it on either of the standby servers fails
>> (expectedly, since they're readonly):
>> $ psql -h cuda-db0 -U postgres -d postgres -f pgpool-walrecrunning.sql
>> psql:pgpool-walrecrunning.sql:4: ERROR:  cannot execute CREATE
>> FUNCTION in a read-only transaction
>> $ psql -h cuda-db0 -U postgres -d postgres -c "select pgpool_walrecrunning();"
>> ERROR:  could not access file "$libdir/pgpool-walrecrunning": No such
>> file or directory
>>
>> I restarted pgpool, after running the above.  Please let me know if I
>> need to do anything else to resolve this.
>
> It seems cuda-db0 lacks pgpool-walrecrunning.so. Have you ever installed it?

Nope, I hadn't.  I've done that now.  Does this require a restart of
pgpool or postgresql to take effect, or is simply installing it (with
'make install + running the sql script for each DB on the master)
sufficient?


More information about the Pgpool-general mailing list