View Issue Details

IDProjectCategoryView StatusLast Update
0000131Pgpool-IIBugpublic2015-04-27 16:28
Reporterjagman88Assigned ToMuhammad Usama 
Status resolvedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000131: Issue doing a PITR online recovery - xlog function cannot be found
DescriptionI am trying to set up Online Recovery for pgPool-II [Replication,Load Balancing, Connection Pooling] modes enabled.

I followed the sample provided on the pgPool-II website for the PITR recovery method, and have managed to successfully carry out the first-stage of copying base backup. When i run the second stage file, I get:

"cannot find xlog functions"
Looking at the log and debug messages it would seem the xlog function that the error happens when the pgpool_recovery function is running get_function_oid() for pg_xlogfile_name.

I am not sure how to proceed to try to rectify this

Set up:

pgpool-II 3.4.1

postgresql 9.4
Steps To Reproducerunning the following script:

#! /bin/sh
# Online recovery 2nd stage script
datadir=$1 # master dabatase cluster
DEST=$2 # hostname of the DB node to be recovered
DESTDIR=$3 # database cluster of the DB node to be recovered
port=$4 # PostgreSQL port number
archdir=/var/lib/pgsql/9.4/data/wals # archive log directory
# Force to flush current value of sequences to xlog
psql -p $port -t -c 'SELECT datname FROM pg_database WHERE NOT datistemplate AND datallowconn' template1|
while read i
  if [ "$i" != "" ];then
    psql -p $port -c "SELECT setval(oid, nextval(oid)) FROM pg_class WHERE relkind = 'S'" $i

psql -p $port -c "SELECT pgpool_switch_xlog('$xlogdir')" template1

Additional Information< 2015-04-03 07:04:01.588 CDT >DEBUG: get_function_oid: oid of "pg_catalog": 11
< 2015-04-03 07:04:01.588 CDT >DEBUG: get_function_oid: oid of "pg_switch_xlog": 2848
< 2015-04-03 07:04:01.588 CDT >DEBUG: get_function_oid: text typid: 25
< 2015-04-03 07:04:01.588 CDT >DEBUG: get_function_oid: oid of "pg_catalog": 11
< 2015-04-03 07:04:01.588 CDT >ERROR: cannot find xlog functions
TagsNo tags attached.


Muhammad Usama

2015-04-10 02:55

developer   ~0000525

Thanks for reporting the problem. The argument data type of PostgreSQL's pg_xlogfile_name() function has been changed from text to pg_lsn since PostgreSQL 9.4. And pgpool-recovery was still trying to locate the function by old signature.
I have pushed the fix to all branches

Issue History

Date Modified Username Field Change
2015-04-03 23:39 jagman88 New Issue
2015-04-10 02:55 Muhammad Usama Note Added: 0000525
2015-04-22 21:09 Muhammad Usama Assigned To => Muhammad Usama
2015-04-22 21:09 Muhammad Usama Status new => assigned
2015-04-27 16:28 t-ishii Status assigned => resolved