[Pgpool-general] pgpool segfaulting and dumping core

Lonni J Friedman netllama at gmail.com
Fri Sep 23 15:13:01 UTC 2011


On Fri, Sep 23, 2011 at 7:29 AM, Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
>> On Thu, Sep 22, 2011 at 5:18 PM, Tatsuo Ishii <ishii at sraoss.co.jp> wrote:
>>>> I checked a second of the coredumps, and it has the same backtrace.
>>>> Let me know if you need anything else.  thanks!
>>>
>>> Thanks. Can you show me pgpool log when DNS failed and pgpool died in
>>> segfaulting?
>
> 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.

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.

thanks


More information about the Pgpool-general mailing list