[Pgpool-general] Database redundancy recommended approach

Daniel.Crespo at l-3com.com Daniel.Crespo at l-3com.com
Thu Oct 21 15:34:43 UTC 2010


> > > *         2 DB Servers (DB0 and DB1)
> > >
> > > *         1 pgpool instance (in a thrid server)
> > >
> > > *         Streaming replication from DB0 (master) to DB1 (slave)
> > >
> > > *         If DB0 fails, DB1 must become primary.
> >
> > Easy.
> >
> > > *         As soon as DB0 is ready again, make it slave of DB1.
> >
> > With 3.0.2(or CVS HEAD) it's possible if you write a program(outside
> > pgpool world) which triggers online recovery when DB0 is ready
again.
> >
> > 3.0.1 or before does not handle the case when DB0 is standby and DB1
> > is primary.
> 
> I downloaded CVS head (3.0.2), compiled and run it.
> 
> As soon as it starts, it segfaults:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000403c38 in find_primary_node () at main.c:2313
> 2313                    if (!strcmp(res->data[0], "t"))
> Missing separate debuginfos, use: debuginfo-install
> cyrus-sasl-lib-2.1.22-19.fc10.x86_64 e2fsprogs-libs-1.41.4-
> 6.fc10.x86_64
> glibc-2.9-3.x86_64 keyutils-libs-1.2-3.fc9.x86_64
> krb5-libs-1.6.3-18.fc10.x86_64 libselinux-2.0.78-1.fc10.x86_64
> openldap-2.4.12-1.fc10.x86_64 openssl-0.9.8g-14.fc10.x86_64
> postgresql-libs-8.3.8-2.fc10.x86_64 zlib-1.2.3-18.fc9.x86_64
> 
> Daniel

Sorry, I should have put more detail:

...
2010-10-21 11:28:29 LOG:   pid 22758: find_primary_node: do_query
returns no rows

2010-10-21 11:28:29 LOG:   pid 22758: find_primary_node: do_query
returns no data


Program received signal SIGSEGV, Segmentation fault.
0x0000000000403c38 in find_primary_node () at main.c:2313
2313                    if (!strcmp(res->data[0], "t"))  
Missing separate debuginfos, use: debuginfo-install
cyrus-sasl-lib-2.1.22-19.fc10.x86_64 e2fsprogs-libs-1.41.4-6.fc10.x86_64
glibc-2.9-3.x86_64 keyutils-libs-1.2-3.fc9.x86_64
krb5-libs-1.6.3-18.fc10.x86_64 libselinux-2.0.78-1.fc10.x86_64
openldap-2.4.12-1.fc10.x86_64 openssl-0.9.8g-14.fc10.x86_64
postgresql-libs-8.3.8-2.fc10.x86_64 zlib-1.2.3-18.fc9.x86_64

In main.c:
if (res->data[0] == NULL)
{
    pool_log("find_primary_node: do_query returns no data");
}
if (res->nullflags[0] == -1)
{
    pool_log("find_primary_node: do_query returns NULL");
}

According to the log, res->data[0] is null, and therefore is failing in:

if (!strcmp(res->data[0], "t"))
{
    is_standby = true;
}

Regards,
Daniel


More information about the Pgpool-general mailing list