View Issue Details

IDProjectCategoryView StatusLast Update
0000023Pgpool-IIBugpublic2012-12-18 16:46
Reporterexto Assigned Tonagata  
PrioritynormalSeveritycrashReproducibilitysometimes
Status closedResolutionfixed 
PlatformAmazon EC2OSAmazon LinuxOS Version2012.03
Summary0000023: Segfault with pg-pool-II version 3.2
Descriptionpgpool processes will crash with a segfault. Debug output before crash is:

2012-08-23 18:45:25 DEBUG: pid 29476: pattern_compare: black_function_list (^lastval$) not matched: nextval
2012-08-23 18:45:25 DEBUG: pid 29476: pattern_compare: black_function_list (^nextval$) matched: nextval
2012-08-23 18:45:25 DEBUG: pid 29476: Bind: waiting for master completing the query
2012-08-23 18:45:25 DEBUG: pid 29476: wait_for_query_response: waiting for backend 0 completing the query
2012-08-23 18:45:25 DEBUG: pid 29476: read_kind_from_backend: kind: 2 from 0 th backend
2012-08-23 18:45:25 DEBUG: pid 29476: read_kind_from_backend: read kind from 0 th backend 2 NUM_BACKENDS: 2
2012-08-23 18:45:25 DEBUG: pid 29476: ProcessBackendResponse: kind from backend: 2
2012-08-23 18:45:25 DEBUG: pid 29476: pool_add_sent_message: portal "" already exists
2012-08-23 18:45:25 DEBUG: pid 29476: can_query_context_destroy: query context 0x9e6e4a0 is still used. query:SELECT "webshop_orders".* FROM "webshop_orders" WHERE (ses
2012-08-23 18:45:25 DEBUG: pid 29476: pool_unset_query_in_progress: done
2012-08-23 18:45:25 DEBUG: pid 29476: pool_set_query_in_progress: done
2012-08-23 18:45:25 DEBUG: pid 29476: pool_set_command_success: done
2012-08-23 18:45:25 DEBUG: pid 29476: pool_unset_query_in_progress: done
2012-08-23 18:45:25 DEBUG: pid 29476: ProcessFrontendResponse: kind from frontend D(44)
2012-08-23 18:45:25 DEBUG: pid 29476: pool_unset_doing_extended_query_message: done
2012-08-23 18:45:25 DEBUG: pid 29476: pool_set_doing_extended_query_message: done
2012-08-23 18:45:25 DEBUG: pid 29476: pool_set_query_in_progress: done
2012-08-23 18:45:25 DEBUG: pid 29476: pool_has_insertinto_or_locking_clause: returns 0
2012-08-23 18:45:25 DEBUG: pid 29476: send_to_where: 2 query: SELECT NEXTVAL('"seq_exto"')
2012-08-23 18:45:25 DEBUG: pid 29476: function_call_walker: function name: nextval
2012-08-23 18:45:25 DEBUG: pid 29476: pattern_compare: black_function_list (^currval$) not matched: nextval
2012-08-23 18:45:25 DEBUG: pid 29476: pattern_compare: black_function_list (^lastval$) not matched: nextval
2012-08-23 18:45:25 DEBUG: pid 29476: pattern_compare: black_function_list (^nextval$) matched: nextval
2012-08-23 18:45:25 DEBUG: pid 29476: Describe: waiting for master completing the query
2012-08-23 18:45:25 DEBUG: pid 29476: wait_for_query_response: waiting for backend 0 completing the query
2012-08-23 18:45:25 DEBUG: pid 29476: read_kind_from_backend: kind: T from 0 th backend
2012-08-23 18:45:25 DEBUG: pid 29476: read_kind_from_backend: read kind from 0 th backend T NUM_BACKENDS: 2
2012-08-23 18:45:25 DEBUG: pid 29476: ProcessBackendResponse: kind from backend: T
2012-08-23 18:45:25 DEBUG: pid 29476: pool_unset_query_in_progress: done
2012-08-23 18:45:25 DEBUG: pid 29476: ProcessFrontendResponse: kind from frontend E(45)
2012-08-23 18:45:25 DEBUG: pid 29476: pool_unset_doing_extended_query_message: done
2012-08-23 18:45:25 DEBUG: pid 29476: pool_set_doing_extended_query_message: done
2012-08-23 18:45:25 DEBUG: pid 29476: pool_set_query_in_progress: done
2012-08-23 18:45:25 DEBUG: pid 29476: Execute: portal name <>
2012-08-23 18:45:25 DEBUG: pid 29476: Execute: query string = <SELECT NEXTVAL('"seq_exto"')>
2012-08-23 18:45:25 DEBUG: pid 29446: reap_handler called
2012-08-23 18:45:25 DEBUG: pid 29446: reap_handler: call wait3
2012-08-23 18:45:25 ERROR: pid 29446: Child process 29476 was terminated by segmentation fault
2012-08-23 18:45:25 DEBUG: pid 29446: child 29476 exits with status 11 by signal 11
2012-08-23 18:45:25 DEBUG: pid 29446: fork a new child pid 29720
TagsNo tags attached.

Activities

nagata

2012-08-24 10:50

developer   ~0000050

What mode are you using pgpool-II in?

exto

2012-08-24 15:11

reporter   ~0000051

I'm using:

master_slave_mode = on

master_slave_sub_mode = 'stream'

exto

2012-08-27 15:35

reporter   ~0000054

Would a back trace help you? If you can give me some guidance on how to create one, I can try..

nagata

2012-08-27 18:21

developer   ~0000055

Yes. A back trace would be help.

If you have a core file, you can get a back trace as follows.

 % gdb pgpool core-file
  (gdb) bt

In addtion, could you provide the following information?

 - pgpool.conf
 - the query you executed
 - strict version of pgpool-II (3.2 STABLE? 3.2 beta? 3.2 RC? etc.)

qthiab

2012-08-27 22:40

reporter   ~0000056

Last edited: 2012-08-27 22:45

I am facing similar problem also, I have downloaded the source code, and build a fedora 16 RPM package, deployed it on the server.
---

Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: SELECT oid FROM pg_class WHERE relname = 'pg_catalog.pg_attrdef'
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: SELECT oid FROM pg_class WHERE relname = 'pg_catalog.pg_description'
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: SELECT oid FROM pg_class WHERE relname = 'pg_catalog.pg_class'
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: SELECT oid FROM pg_class WHERE relname = 'pg_catalog.pg_namespace'
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: Parse: SELECT * FROM (SELECT n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,dsc.description,t.typbasetype,t.typtype FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0 AND NOT a.attisdropped AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' ) c WHERE true ORDER BY nspname,c.relname,attnum
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: B message
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: D message
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: Execute: SELECT * FROM (SELECT n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,dsc.description,t.typbasetype,t.typtype FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0 AND NOT a.attisdropped AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' ) c WHERE true ORDER BY nspname,c.relname,attnum
Aug 27 11:56:13 ii rsyslogd-2177: imuxsock begins to drop messages from pid 15086 due to rate-limiting
Aug 27 11:56:17 ii kernel: [17640445.388338] pgpool[15086]: segfault at fffffffc880839c8 ip 000000000044eba0 sp 00007fff8bc71170 error 6 in pgpool[400000+ed000]
Aug 27 11:56:17 ii pgpool[15045]: Child process 15086 was terminated by segmentation fault
---

 The setup as follows:
- pgPool 3.2 (3 Aug 2012)
- PostgreSQL 9.1.4 [two servers setup as Master/Slave streaming replication]
- pgPool.conf:
---
# ----------------------------
# pgPool-II configuration file
# ----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# Whitespace may be used. Comments are introduced with "#" anywhere on a line.
# The complete list of parameter names and allowed values can be found in the
# pgPool-II documentation.
#
# This file is read on server startup and when the server receives a SIGHUP
# signal. If you edit the file on a running system, you have to SIGHUP the
# server for the changes to take effect, or use "pgpool reload". Some
# parameters, which are marked below, require a server shutdown and restart to
# take effect.
#


#------------------------------------------------------------------------------
# CONNECTIONS
#------------------------------------------------------------------------------

# - pgpool Connection Settings -

listen_addresses = '*'
                                   # Host name or IP address to listen on:
                                   # '*' for all, '' for no TCP/IP connections
                                   # (change requires restart)
port = 9999
                                   # Port number
                                   # (change requires restart)
socket_dir = '/tmp'
                                   # Unix domain socket path
                                   # (change requires restart)


# - pgpool Communication Manager Connection Settings -

pcp_port = 9898
                                   # Port number for pcp
                                   # (change requires restart)
pcp_socket_dir = '/tmp'
                                   # Unix domain socket path for pcp
                                   # (change requires restart)

# - Backend Connection Settings -

backend_hostname0 = 'localhost'
backend_port0 = 5432
backend_weight0 = 1
backend_data_directory0 = '/var/lib/pgsql/data'
backend_flag0 = 'ALLOW_TO_FAILOVER'

#backend_hostname0 = 'host1'
                                   # Host name or IP address to connect to for backend 0
#backend_port0 = 5432
                                   # Port number for backend 0
#backend_weight0 = 1
                                   # Weight for backend 0 (only in load balancing mode)
#backend_data_directory0 = '/data'
                                   # Data directory for backend 0
#backend_flag0 = 'ALLOW_TO_FAILOVER'
                                   # Controls various backend behavior
                                   # ALLOW_TO_FAILOVER or DISALLOW_TO_FAILOVER
backend_hostname1 = '10.178.233.83'
backend_port1 = 5432
backend_weight1 = 1
backend_data_directory1 = '/var/lib/pgsql/data'
backend_flag1 = 'ALLOW_TO_FAILOVER'

# - Authentication -

enable_pool_hba = off
                                   # Use pool_hba.conf for client authentication
authentication_timeout = 60
                                   # Delay in seconds to complete client authentication
                                   # 0 means no timeout.

# - SSL Connections -

ssl = off
                                   # Enable SSL support
                                   # (change requires restart)
#ssl_key = './server.key'
                                   # Path to the SSL private key file
                                   # (change requires restart)
#ssl_cert = './server.cert'
                                   # Path to the SSL public certificate file
                                   # (change requires restart)
#ssl_ca_cert = ''
                                   # Path to a single PEM format file
                                   # containing CA root certificate(s)
                                   # (change requires restart)
#ssl_ca_cert_dir = ''
                                   # Directory containing CA root certificate(s)
                                   # (change requires restart)


#------------------------------------------------------------------------------
# POOLS
#------------------------------------------------------------------------------

# - Pool size -

num_init_children = 64
                                   # Number of pools
                                   # (change requires restart)
max_pool = 4
                                   # Number of connections per pool
                                   # (change requires restart)

# - Life time -

child_life_time = 300
                                   # Pool exits after being idle for this many seconds
child_max_connections = 0
                                   # Pool exits after receiving that many connections
                                   # 0 means no exit
connection_life_time = 0
                                   # Connection to backend closes after being idle for this many seconds
                                   # 0 means no close
client_idle_limit = 0
                                   # Client is disconnected after being idle for that many seconds
                                   # (even inside an explicit transactions!)
                                   # 0 means no disconnection


#------------------------------------------------------------------------------
# LOGS
#------------------------------------------------------------------------------

# - Where to log -

log_destination = 'syslog'
                                   # Where to log
                                   # Valid values are combinations of stderr,
                                   # and syslog. Default to stderr.

# - What to log -

print_timestamp = on
                                   # Print timestamp on each line
                                   # (change requires restart)

log_connections = on
                                   # Log connections
log_hostname = on
                                   # Hostname will be shown in ps status
                                   # and in logs if connections are logged
log_statement = on
                                   # Log all statements
log_per_node_statement = on
                                   # Log all statements
                                   # with node and backend informations
log_standby_delay = 'none'
                                   # Log standby delay
                                   # Valid values are combinations of always,
                                   # if_over_threshold, none

# - Syslog specific -

syslog_facility = 'LOCAL0'
                                   # Syslog local facility. Default to LOCAL0
syslog_ident = 'pgpool'
                                   # Syslog program identification string
                                   # Default to 'pgpool'

# - Debug -

debug_level = 1
                                   # Debug message verbosity level
                                   # 0 means no message, 1 or more mean verbose


#------------------------------------------------------------------------------
# FILE LOCATIONS
#------------------------------------------------------------------------------

pid_file_name = '/var/run/pgpool/pgpool.pid'
                                   # PID file name
                                   # (change requires restart)
logdir = '/var/log/pgpool'
                                   # Directory of pgPool status file
                                   # (change requires restart)


#------------------------------------------------------------------------------
# CONNECTION POOLING
#------------------------------------------------------------------------------

connection_cache = on
                                   # Activate connection pools
                                   # (change requires restart)

                                   # Semicolon separated list of queries
                                   # to be issued at the end of a session
                                   # The default is for 8.3 and later
reset_query_list = 'ABORT; DISCARD ALL'
                                   # The following one is for 8.2 and before
#reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'


#------------------------------------------------------------------------------
# REPLICATION MODE
#------------------------------------------------------------------------------

replication_mode = off
                                   # Activate replication mode
                                   # (change requires restart)
replicate_select = off
                                   # Replicate SELECT statements
                                   # when in replication or parallel mode
                                   # replicate_select is higher priority than
                                   # load_balance_mode.

insert_lock = on
                                   # Automatically locks a dummy row or a table
                                   # with INSERT statements to keep SERIAL data
                                   # consistency
                                   # Without SERIAL, no lock will be issued
lobj_lock_table = ''
                                   # When rewriting lo_creat command in
                                   # replication mode, specify table name to
                                   # lock

# - Degenerate handling -

replication_stop_on_mismatch = off
                                   # On disagreement with the packet kind
                                   # sent from backend, degenerate the node
                                   # which is most likely "minority"
                                   # If off, just force to exit this session

failover_if_affected_tuples_mismatch = off
                                   # On disagreement with the number of affected
                                   # tuples in UPDATE/DELETE queries, then
                                   # degenerate the node which is most likely
                                   # "minority".
                                   # If off, just abort the transaction to
                                   # keep the consistency


#------------------------------------------------------------------------------
# LOAD BALANCING MODE
#------------------------------------------------------------------------------

load_balance_mode = on
                                   # Activate load balancing mode
                                   # (change requires restart)
ignore_leading_white_space = on
                                   # Ignore leading white spaces of each query
white_function_list = ''
                                   # Comma separated list of function names
                                   # that don't write to database
                                   # Regexp are accepted
black_function_list = 'nextval,setval,currval,lastval'
                                   # Comma separated list of function names
                                   # that write to database
                                   # Regexp are accepted


#------------------------------------------------------------------------------
# MASTER/SLAVE MODE
#------------------------------------------------------------------------------

master_slave_mode = on
                                   # Activate master/slave mode
                                   # (change requires restart)
master_slave_sub_mode = 'stream'
                                   # Master/slave sub mode
                                   # Valid values are combinations slony or
                                   # stream. Default is slony.
                                   # (change requires restart)

# - Streaming -

sr_check_period = 0
                                   # Streaming replication check period
                                   # Disabled (0) by default
sr_check_user = 'sr_user'
                                   # Streaming replication check user
                                   # This is necessary even if you disable
                                   # streaming replication delay check with
                                   # sr_check_period = 0
sr_check_password = ''
                                   # Password for streaming replication check user
delay_threshold = 0
                                   # Threshold before not dispatching query to standby node
                                   # Unit is in bytes
                                   # Disabled (0) by default

# - Special commands -

follow_master_command = ''
                                   # Executes this command after master failover
                                   # Special values:
                                   # %d = node id
                                   # %h = host name
                                   # %p = port number
                                   # %D = database cluster path
                                   # %m = new master node id
                                   # %H = hostname of the new master node
                                   # %M = old master node id
                                   # %P = old primary node id
                                   # %r = new master port number
                                   # %R = new master database cluster path
                                   # %% = '%' character


#------------------------------------------------------------------------------
# PARALLEL MODE
#------------------------------------------------------------------------------

parallel_mode = off
                                   # Activates parallel query mode
                                   # (change requires restart)
pgpool2_hostname = ''
                                   # Set pgpool2 hostname
                                   # (change requires restart)

# - System DB info -

system_db_hostname = 'localhost'
                                   # (change requires restart)
system_db_port = 5432
                                   # (change requires restart)
system_db_dbname = 'pgpool'
                                   # (change requires restart)
system_db_schema = 'pgpool_catalog'
                                   # (change requires restart)
system_db_user = 'pgpool'
                                   # (change requires restart)
system_db_password = ''
                                   # (change requires restart)


#------------------------------------------------------------------------------
# HEALTH CHECK
#------------------------------------------------------------------------------

health_check_period = 0
                                   # Health check period
                                   # Disabled (0) by default
health_check_timeout = 20
                                   # Health check timeout
                                   # 0 means no timeout
health_check_user = 'nobody'
                                   # Health check user
health_check_password = ''
                                   # Password for health check user
health_check_max_retries = 0
                                   # Maximum number of times to retry a failed health check before giving up.
health_check_retry_delay = 1
                                   # Amount of time to wait (in seconds) between retries.


#------------------------------------------------------------------------------
# FAILOVER AND FAILBACK
#------------------------------------------------------------------------------

failover_command = ''
                                   # Executes this command at failover
                                   # Special values:
                                   # %d = node id
                                   # %h = host name
                                   # %p = port number
                                   # %D = database cluster path
                                   # %m = new master node id
                                   # %H = hostname of the new master node
                                   # %M = old master node id
                                   # %P = old primary node id
                                   # %r = new master port number
                                   # %R = new master database cluster path
                                   # %% = '%' character
failback_command = ''
                                   # Executes this command at failback.
                                   # Special values:
                                   # %d = node id
                                   # %h = host name
                                   # %p = port number
                                   # %D = database cluster path
                                   # %m = new master node id
                                   # %H = hostname of the new master node
                                   # %M = old master node id
                                   # %P = old primary node id
                                   # %r = new master port number
                                   # %R = new master database cluster path
                                   # %% = '%' character

fail_over_on_backend_error = on
                                   # Initiates failover when reading/writing to the
                                   # backend communication socket fails
                                   # If set to off, pgpool will report an
                                   # error and disconnect the session.


#------------------------------------------------------------------------------
# ONLINE RECOVERY
#------------------------------------------------------------------------------

recovery_user = 'nobody'
                                   # Online recovery user
recovery_password = ''
                                   # Online recovery password
recovery_1st_stage_command = ''
                                   # Executes a command in first stage
recovery_2nd_stage_command = ''
                                   # Executes a command in second stage
recovery_timeout = 90
                                   # Timeout in seconds to wait for the
                                   # recovering node's postmaster to start up
                                   # 0 means no wait
client_idle_limit_in_recovery = 0
                                   # Client is disconnected after being idle
                                   # for that many seconds in the second stage
                                   # of online recovery
                                   # 0 means no disconnection
                                   # -1 means immediate disconnection


#------------------------------------------------------------------------------
# WATCHDOG
#------------------------------------------------------------------------------
use_watchdog = off
                                    # Activates watchdog
trusted_servers = ''
                                    # trusted server list which are used
                                    # to confirm network connection
                                    # (hostA,hostB,hostC,...)
delegate_IP = ''
                                    # delegate IP address
wd_hostname = ''
                                    # Host name or IP address of this watchdog
wd_port = 9000
                                    # port number for watchdog service
wd_interval = 10
                                    # lifecheck interval (sec) > 0
ping_path = '/bin'
                                    # ping command path
ifconfig_path = '/sbin'
                                    # ifconfig command path
if_up_cmd = 'ifconfig eth0:0 inet $_IP_$ netmask 255.255.255.0'
                                    # startup delegate IP command
if_down_cmd = 'ifconfig eth0:0 down'
                                    # shutdown delegate IP command

arping_path = '/usr/sbin' # arping command path

arping_cmd = 'arping -U $_IP_$ -w 1'
                                    # arping command
wd_life_point = 3
                                    # lifecheck retry times
wd_lifecheck_query = 'SELECT 1'
                                    # lifecheck query to pgpool from watchdog
# Other pgpool Connection Settings

#other_pgpool_hostname0 = 'host0'
                                    # Host name or IP address to connect to for other pgpool 0
#other_pgpool_port0 = 5432
                                    # Port number for othet pgpool 0
#other_wd_port0 = 9000
                                    # Port number for othet watchdog 0
#other_pgpool_hostname1 = 'host1'
#other_pgpool_port1 = 5432
#other_wd_port1 = 9000


#------------------------------------------------------------------------------
# OTHERS
#------------------------------------------------------------------------------
relcache_expire = 0
                                   # Life time of relation cache in seconds.
                                   # 0 means no cache expiration(the default).
                                   # The relation cache is used for cache the
                                   # query result against PostgreSQL system
                                   # catalog to obtain various information
                                   # including table structures or if it's a
                                   # temporary table or not. The cache is
                                   # maintained in a pgpool child local memory
                                   # and being kept as long as it survives.
                                   # If someone modify the table by using
                                   # ALTER TABLE or some such, the relcache is
                                   # not consistent anymore.
                                   # For this purpose, cache_expiration
                                   # controls the life time of the cache.

relcache_size = 256
                                   # Number of relation cache
                                   # entry. If you see frequently:
                                   # "pool_search_relcache: cache replacement happend"
                                   # in the pgpool log, you might want to increate this number.

check_temp_table = on
                                   # If on, enable temporary table check in SELECT statements.
                                   # This initiates queries against system catalog of primary/master
                                   # thus increases load of master.
                                   # If you are absolutely sure that your system never uses temporary tables
                                   # and you want to save access to primary/master, you could turn this off.
                                   # Default is on.


#------------------------------------------------------------------------------
# ON MEMORY QUERY MEMORY CACHE
#------------------------------------------------------------------------------
memory_cache_enabled = on
                                   # If on, use the memory cache functionality, off by default
memqcache_method = 'shmem'
                                   # Cache storage method. either 'shmem'(shared memory) or
                                   # 'memcached'. 'shmem' by default
memqcache_memcached_host = 'localhost'
                                   # Memcached host name or IP address. Mandatory if
                                   # memqcache_method = 'memcached'.
                                   # Defaults to localhost.
memqcache_memcached_port = 11211
                                   # Memcached port number. Mondatory if memqcache_method = 'memcached'.
                                   # Defaults to 11211.
memqcache_total_size = 67108864
                                   # Total memory size in bytes for storing memory cache.
                                   # Mandatory if memqcache_method = 'shmem'.
                                   # Defaults to 64MB.
memqcache_max_num_cache = 1000000
                                   # Total number of cache entries. Mandatory
                                   # if memqcache_method = 'shmem'.
                                   # Each cache entry consumes 48 bytes on shared memory.
                                   # Defaults to 1,000,000(45.8MB).
memqcache_expire = 0
                                   # Memory cache entry life time specified in seconds.
                                   # 0 means infinite life time. 0 by default.
memqcache_auto_cache_invalidation = on
                                   # If on, invalidation of query cache is triggered by corresponding
                                   # DDL/DML/DCL(and memqcache_expire). If off, it is only triggered
                                   # by memqcache_expire. on by default.
memqcache_maxcache = 409600
                                   # Maximum SELECT result size in bytes.
                                   # Must be smaller than memqcache_cache_block_size. Defaults to 400KB.
memqcache_cache_block_size = 1048576
                                   # Cache block size in bytes. Mandatory if memqcache_method = 'shmem'.
                                   # Defaults to 1MB.
memqcache_oiddir = '/var/log/pgpool/oiddir'
                                      # Temporary work directory to record table oids
white_memqcache_table_list = ''
                                   # Comma separated list of table names to memcache
                                   # that don't write to database
                                   # Regexp are accepted
black_memqcache_table_list = 'rr_logged_events,rr_pending_changes,rr_running_flags'
                                   # Comma separated list of table names not to memcache
                                   # that don't write to database
                                   # Regexp are accepted
---

* here is the logged messages in pgpool.log:
---
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 1
Aug 27 11:56:13 ii pgpool[15086]: do_query: 1 complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 2
Aug 27 11:56:13 ii pgpool[15086]: do_query: 2 complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 3
Aug 27 11:56:13 ii pgpool[15086]: do_query: Close complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: T
Aug 27 11:56:13 ii pgpool[15086]: num_fileds: 1
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: C
Aug 27 11:56:13 ii pgpool[15086]: do_query: Command complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 3
Aug 27 11:56:13 ii pgpool[15086]: do_query: Close complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: Z
Aug 27 11:56:13 ii pgpool[15086]: do_query: Ready for query
Aug 27 11:56:13 ii pgpool[15086]: make_table_name_from_rangevar: tablename:pg_catalog.pg_attrdef
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: SELECT oid FROM pg_class WHERE relname = 'pg_catalog.pg_attrdef'
Aug 27 11:56:13 ii pgpool[15086]: do_query: extended:1 query:SELECT oid FROM pg_class WHERE relname = 'pg_catalog.pg_attrdef'
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 1
Aug 27 11:56:13 ii pgpool[15086]: do_query: 1 complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 2
Aug 27 11:56:13 ii pgpool[15086]: do_query: 2 complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 3
Aug 27 11:56:13 ii pgpool[15086]: do_query: Close complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: T
Aug 27 11:56:13 ii pgpool[15086]: num_fileds: 1
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: C
Aug 27 11:56:13 ii pgpool[15086]: do_query: Command complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 3
Aug 27 11:56:13 ii pgpool[15086]: do_query: Close complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: Z
Aug 27 11:56:13 ii pgpool[15086]: do_query: Ready for query
Aug 27 11:56:13 ii pgpool[15086]: make_table_name_from_rangevar: tablename:pg_catalog.pg_description
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: SELECT oid FROM pg_class WHERE relname = 'pg_catalog.pg_description'
Aug 27 11:56:13 ii pgpool[15086]: do_query: extended:1 query:SELECT oid FROM pg_class WHERE relname = 'pg_catalog.pg_description'
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 1
Aug 27 11:56:13 ii pgpool[15086]: do_query: 1 complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 2
Aug 27 11:56:13 ii pgpool[15086]: do_query: 2 complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 3
Aug 27 11:56:13 ii pgpool[15086]: do_query: Close complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: T
Aug 27 11:56:13 ii pgpool[15086]: num_fileds: 1
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: C
Aug 27 11:56:13 ii pgpool[15086]: do_query: Command complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 3
Aug 27 11:56:13 ii pgpool[15086]: do_query: Close complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: Z
Aug 27 11:56:13 ii pgpool[15086]: do_query: Ready for query
Aug 27 11:56:13 ii pgpool[15086]: make_table_name_from_rangevar: tablename:pg_catalog.pg_class
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: SELECT oid FROM pg_class WHERE relname = 'pg_catalog.pg_class'
Aug 27 11:56:13 ii pgpool[15086]: do_query: extended:1 query:SELECT oid FROM pg_class WHERE relname = 'pg_catalog.pg_class'
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 1
Aug 27 11:56:13 ii pgpool[15086]: do_query: 1 complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 2
Aug 27 11:56:13 ii pgpool[15086]: do_query: 2 complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 3
Aug 27 11:56:13 ii pgpool[15086]: do_query: Close complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: T
Aug 27 11:56:13 ii pgpool[15086]: num_fileds: 1
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: C
Aug 27 11:56:13 ii pgpool[15086]: do_query: Command complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 3
Aug 27 11:56:13 ii pgpool[15086]: do_query: Close complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: Z
Aug 27 11:56:13 ii pgpool[15086]: do_query: Ready for query
Aug 27 11:56:13 ii pgpool[15086]: make_table_name_from_rangevar: tablename:pg_catalog.pg_namespace
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: SELECT oid FROM pg_class WHERE relname = 'pg_catalog.pg_namespace'
Aug 27 11:56:13 ii pgpool[15086]: do_query: extended:1 query:SELECT oid FROM pg_class WHERE relname = 'pg_catalog.pg_namespace'
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 1
Aug 27 11:56:13 ii pgpool[15086]: do_query: 1 complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 2
Aug 27 11:56:13 ii pgpool[15086]: do_query: 2 complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 3
Aug 27 11:56:13 ii pgpool[15086]: do_query: Close complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: T
Aug 27 11:56:13 ii pgpool[15086]: num_fileds: 1
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: C
Aug 27 11:56:13 ii pgpool[15086]: do_query: Command complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: 3
Aug 27 11:56:13 ii pgpool[15086]: do_query: Close complete received
Aug 27 11:56:13 ii pgpool[15086]: do_query: kind: Z
Aug 27 11:56:13 ii pgpool[15086]: do_query: Ready for query
Aug 27 11:56:13 ii pgpool[15086]: pool_has_insertinto_or_locking_clause: returns 0
Aug 27 11:56:13 ii pgpool[15086]: non_immutable_function_call_walker: function name: row_number
Aug 27 11:56:13 ii pgpool[15086]: is_immutable_function: search result:1
Aug 27 11:56:13 ii pgpool[15086]: non_immutable_function_call_walker: function name: pg_get_expr
Aug 27 11:56:13 ii pgpool[15086]: is_immutable_function: search result:0
Aug 27 11:56:13 ii pgpool[15086]: pool_has_non_immutable_function_call: 1
Aug 27 11:56:13 ii pgpool[15086]: pool_has_insertinto_or_locking_clause: returns 0
Aug 27 11:56:13 ii pgpool[15086]: send_to_where: 2 query: SELECT * FROM (SELECT n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,dsc.description,t.typbasetype,t.typtype FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0 AND NOT a.attisdropped AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' ) c WHERE true ORDER BY nspname,c.relname,attnum
Aug 27 11:56:13 ii pgpool[15086]: Parse: waiting for master completing the query
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: Parse: SELECT * FROM (SELECT n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,dsc.description,t.typbasetype,t.typtype FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0 AND NOT a.attisdropped AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' ) c WHERE true ORDER BY nspname,c.relname,attnum
Aug 27 11:56:13 ii pgpool[15086]: wait_for_query_response: waiting for backend 0 completing the query
Aug 27 11:56:13 ii pgpool[15086]: detect_error: kind: 1
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: 1 from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend 1 NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: 1
Aug 27 11:56:13 ii pgpool[15086]: pool_add_sent_message: prepared statement "" already exists
Aug 27 11:56:13 ii pgpool[15086]: can_query_context_destroy: query context 0x255ce40 is still used. query:SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME, CASE n.nspname ~ '^pg_' OR n.nspname = 'information_schema' WHEN true THEN CASE WHEN n.nspname = 'pg_catalog' OR n.nspname = 'information_schema' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TABLE' WHEN 'v' THEN 'SYSTEM VIEW' WHEN 'i' THEN 'SYSTEM INDEX' ELSE NULL END WHEN n.nspname = 'pg_toast' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TOAST TABLE' WHEN 'i' THEN 'SYSTEM TOAST INDEX' ELSE NULL END ELSE CASE c.relkind WHEN 'r' THEN 'TEMPORARY TABLE' WHEN 'i' THEN 'TEMPORARY INDEX' WHEN 'S' THEN 'TEMPORARY SEQUENCE' WHEN 'v' THEN 'TEMPORARY VIEW' ELSE NULL END END WHEN false THEN CASE c.relkind WHEN 'r' THEN 'TABLE' WHEN 'i' THEN 'INDEX' WHEN 'S' THEN 'SEQUENCE' WHEN 'v' THEN 'VIEW' WHEN 'c' THEN 'TYPE' ELSE NULL END ELSE NULL END AS TABLE_TYPE, d.description AS REMARKS FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_description d ON (c.oid = d.objoid AND d.objsubid = 0) LEFT JOIN pg_catalog.pg_class dc ON (d.classoid=dc.oid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dn.oid=dc.relnamespace AND dn.nspname='pg_catalog') WHERE c.relnamespace = n.oid AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' AND (false OR ( c.relkind = 'r' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema' ) OR ( c.relkind = 'v' AND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema' ) ) ORDER BY TABLE_TYPE,TABLE_SCHEM,TABLE_NAME
Aug 27 11:56:13 ii pgpool[15086]: can_query_context_destroy: query context 0x255ce40 is still used. query:SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME, CASE n.nspname ~ '^pg_' OR n.nspname = 'information_schema' WHEN true THEN CASE WHEN n.nspname = 'pg_catalog' OR n.nspname = 'information_schema' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TABLE' WHEN 'v' THEN 'SYSTEM VIEW' WHEN 'i' THEN 'SYSTEM INDEX' ELSE NULL END WHEN n.nspname = 'pg_toast' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TOAST TABLE' WHEN 'i' THEN 'SYSTEM TOAST INDEX' ELSE NULL END ELSE CASE c.relkind WHEN 'r' THEN 'TEMPORARY TABLE' WHEN 'i' THEN 'TEMPORARY INDEX' WHEN 'S' THEN 'TEMPORARY SEQUENCE' WHEN 'v' THEN 'TEMPORARY VIEW' ELSE NULL END END WHEN false THEN CASE c.relkind WHEN 'r' THEN 'TABLE' WHEN 'i' THEN 'INDEX' WHEN 'S' THEN 'SEQUENCE' WHEN 'v' THEN 'VIEW' WHEN 'c' THEN 'TYPE' ELSE NULL END ELSE NULL END AS TABLE_TYPE, d.description AS REMARKS FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_description d ON (c.oid = d.objoid AND d.objsubid = 0) LEFT JOIN pg_catalog.pg_class dc ON (d.classoid=dc.oid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dn.oid=dc.relnamespace AND dn.nspname='pg_catalog') WHERE c.relnamespace = n.oid AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' AND (false OR ( c.relkind = 'r' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema' ) OR ( c.relkind = 'v' AND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema' ) ) ORDER BY TABLE_TYPE,TABLE_SCHEM,TABLE_NAME
Aug 27 11:56:13 ii pgpool[15086]: can_query_context_destroy: query context 0x255ce40 is still used for 2 times.
Aug 27 11:56:13 ii pgpool[15086]: pool_set_command_success: done
Aug 27 11:56:13 ii pgpool[15086]: pool_unset_query_in_progress: done
Aug 27 11:56:13 ii pgpool[15086]: ProcessFrontendResponse: kind from frontend B(42)
Aug 27 11:56:13 ii pgpool[15086]: pool_unset_doing_extended_query_message: done
Aug 27 11:56:13 ii pgpool[15086]: pool_set_doing_extended_query_message: done
Aug 27 11:56:13 ii pgpool[15086]: pool_set_query_in_progress: done
Aug 27 11:56:13 ii pgpool[15086]: pool_has_insertinto_or_locking_clause: returns 0
Aug 27 11:56:13 ii pgpool[15086]: send_to_where: 2 query: SELECT * FROM (SELECT n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,dsc.description,t.typbasetype,t.typtype FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0 AND NOT a.attisdropped AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' ) c WHERE true ORDER BY nspname,c.relname,attnum
Aug 27 11:56:13 ii pgpool[15086]: Bind: waiting for master completing the query
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: B message
Aug 27 11:56:13 ii pgpool[15086]: wait_for_query_response: waiting for backend 0 completing the query
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: 2 from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend 2 NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: 2
Aug 27 11:56:13 ii pgpool[15086]: pool_add_sent_message: portal "" already exists
Aug 27 11:56:13 ii pgpool[15086]: can_query_context_destroy: query context 0x255ce40 is still used. query:SELECT NULL AS TABLE_CAT, n.nspname AS TABLE_SCHEM, c.relname AS TABLE_NAME, CASE n.nspname ~ '^pg_' OR n.nspname = 'information_schema' WHEN true THEN CASE WHEN n.nspname = 'pg_catalog' OR n.nspname = 'information_schema' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TABLE' WHEN 'v' THEN 'SYSTEM VIEW' WHEN 'i' THEN 'SYSTEM INDEX' ELSE NULL END WHEN n.nspname = 'pg_toast' THEN CASE c.relkind WHEN 'r' THEN 'SYSTEM TOAST TABLE' WHEN 'i' THEN 'SYSTEM TOAST INDEX' ELSE NULL END ELSE CASE c.relkind WHEN 'r' THEN 'TEMPORARY TABLE' WHEN 'i' THEN 'TEMPORARY INDEX' WHEN 'S' THEN 'TEMPORARY SEQUENCE' WHEN 'v' THEN 'TEMPORARY VIEW' ELSE NULL END END WHEN false THEN CASE c.relkind WHEN 'r' THEN 'TABLE' WHEN 'i' THEN 'INDEX' WHEN 'S' THEN 'SEQUENCE' WHEN 'v' THEN 'VIEW' WHEN 'c' THEN 'TYPE' ELSE NULL END ELSE NULL END AS TABLE_TYPE, d.description AS REMARKS FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_description d ON (c.oid = d.objoid AND d.objsubid = 0) LEFT JOIN pg_catalog.pg_class dc ON (d.classoid=dc.oid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dn.oid=dc.relnamespace AND dn.nspname='pg_catalog') WHERE c.relnamespace = n.oid AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' AND (false OR ( c.relkind = 'r' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema' ) OR ( c.relkind = 'v' AND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema' ) ) ORDER BY TABLE_TYPE,TABLE_SCHEM,TABLE_NAME
Aug 27 11:56:13 ii pgpool[15086]: pool_unset_query_in_progress: done
Aug 27 11:56:13 ii pgpool[15086]: pool_set_query_in_progress: done
Aug 27 11:56:13 ii pgpool[15086]: pool_set_command_success: done
Aug 27 11:56:13 ii pgpool[15086]: pool_unset_query_in_progress: done
Aug 27 11:56:13 ii pgpool[15086]: ProcessFrontendResponse: kind from frontend D(44)
Aug 27 11:56:13 ii pgpool[15086]: pool_unset_doing_extended_query_message: done
Aug 27 11:56:13 ii pgpool[15086]: pool_set_doing_extended_query_message: done
Aug 27 11:56:13 ii pgpool[15086]: pool_set_query_in_progress: done
Aug 27 11:56:13 ii pgpool[15086]: pool_has_insertinto_or_locking_clause: returns 0
Aug 27 11:56:13 ii pgpool[15086]: send_to_where: 2 query: SELECT * FROM (SELECT n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,dsc.description,t.typbasetype,t.typtype FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0 AND NOT a.attisdropped AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' ) c WHERE true ORDER BY nspname,c.relname,attnum
Aug 27 11:56:13 ii pgpool[15086]: Describe: waiting for master completing the query
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: D message
Aug 27 11:56:13 ii pgpool[15086]: wait_for_query_response: waiting for backend 0 completing the query
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: T from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend T NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: T
Aug 27 11:56:13 ii pgpool[15086]: pool_unset_query_in_progress: done
Aug 27 11:56:13 ii pgpool[15086]: ProcessFrontendResponse: kind from frontend E(45)
Aug 27 11:56:13 ii pgpool[15086]: pool_unset_doing_extended_query_message: done
Aug 27 11:56:13 ii pgpool[15086]: pool_set_doing_extended_query_message: done
Aug 27 11:56:13 ii pgpool[15086]: pool_set_query_in_progress: done
Aug 27 11:56:13 ii pgpool[15086]: Execute: portal name <>
Aug 27 11:56:13 ii pgpool[15086]: Execute: query string = <SELECT * FROM (SELECT n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,dsc.description,t.typbasetype,t.typtype FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0 AND NOT a.attisdropped AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' ) c WHERE true ORDER BY nspname,c.relname,attnum >
Aug 27 11:56:13 ii pgpool[15086]: encode_key: username choozonii
Aug 27 11:56:13 ii pgpool[15086]: encode_key: database_name choozonz
Aug 27 11:56:13 ii pgpool[15086]: encode_key: query SELECT * FROM (SELECT n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,dsc.description,t.typbasetype,t.typtype FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0 AND NOT a.attisdropped AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' ) c WHERE true ORDER BY nspname,c.relname,attnum 00000000
Aug 27 11:56:13 ii pgpool[15086]: encode_key: `choozoniiSELECT * FROM (SELECT n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,dsc.description,t.typbasetype,t.typtype FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0 AND NOT a.attisdropped AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' ) c WHERE true ORDER BY nspname,c.relname,attnum 00000000choozonz' -> `09bf8f1594c9d1a7f1007912811d1940'
Aug 27 11:56:13 ii pgpool[15086]: pool_fetch_cache: search key ==09bf8f1594c9d1a7f1007912811d1940==
Aug 27 11:56:13 ii pgpool[15086]: pool_fetch_cache: cache not found on shmem
Aug 27 11:56:13 ii pgpool[15086]: pool_has_insertinto_or_locking_clause: returns 0
Aug 27 11:56:13 ii pgpool[15086]: send_to_where: 2 query: SELECT * FROM (SELECT n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,dsc.description,t.typbasetype,t.typtype FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0 AND NOT a.attisdropped AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' ) c WHERE true ORDER BY nspname,c.relname,attnum
Aug 27 11:56:13 ii pgpool[15086]: DB node id: 0 backend pid: 15612 statement: Execute: SELECT * FROM (SELECT n.nspname,c.relname,a.attname,a.atttypid,a.attnotnull,a.atttypmod,a.attlen,row_number() OVER (PARTITION BY a.attrelid ORDER BY a.attnum) AS attnum, pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,dsc.description,t.typbasetype,t.typtype FROM pg_catalog.pg_namespace n JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid) JOIN pg_catalog.pg_attribute a ON (a.attrelid=c.oid) JOIN pg_catalog.pg_type t ON (a.atttypid = t.oid) LEFT JOIN pg_catalog.pg_attrdef def ON (a.attrelid=def.adrelid AND a.attnum = def.adnum) LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid) LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class') LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') WHERE a.attnum > 0 AND NOT a.attisdropped AND n.nspname LIKE 'public' AND c.relname LIKE 'tbl_offer' ) c WHERE true ORDER BY nspname,c.relname,attnum
Aug 27 11:56:13 ii pgpool[15086]: wait_for_query_response: waiting for backend 0 completing the query
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:13 ii pgpool[15086]: ProcessBackendResponse: kind from backend: D
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: kind: D from 0 th backend
Aug 27 11:56:13 ii pgpool[15086]: read_kind_from_backend: read kind from 0 th backend D NUM_BACKENDS: 2
Aug 27 11:56:17 ii pgpool[15045]: reap_handler called
Aug 27 11:56:17 ii pgpool[15045]: reap_handler: call wait3
Aug 27 11:56:17 ii pgpool[15045]: Child process 15086 was terminated by segmentation fault
---

 need anything else?

exto

2012-08-28 00:17

reporter   ~0000057

I will try to create a backtrace. The other information:

- pgpool.conf

#------------------------------------------------------------------------------
# CONNECTIONS
#------------------------------------------------------------------------------

# - pgpool Connection Settings -

listen_addresses = 'localhost'
                                   # Host name or IP address to listen on:
                                   # '*' for all, '' for no TCP/IP connections
                                   # (change requires restart)
port = 5432
                                   # Port number
                                   # (change requires restart)
socket_dir = '/tmp'
                                   # Unix domain socket path
                                   # The Debian package defaults to
                                   # /var/run/postgresql
                                   # (change requires restart)


# - pgpool Communication Manager Connection Settings -

pcp_port = 9898
                                   # Port number for pcp
                                   # (change requires restart)
pcp_socket_dir = '/tmp'
                                   # Unix domain socket path for pcp
                                   # The Debian package defaults to
                                   # /var/run/postgresql
                                   # (change requires restart)

# - Backend Connection Settings -

backend_hostname0 = 'xxxx.xx'
                                   # Host name or IP address to connect to for backend 0
backend_port0 = 5432
                                   # Port number for backend 0
backend_weight0 = 1
                                   # Weight for backend 0 (only in load balancing mode)
backend_data_directory0 = '/export/pgsql.data'
                                   # Data directory for backend 0
backend_flag0 = 'DISALLOW_TO_FAILOVER'
                                   # Controls various backend behavior
                                   # ALLOW_TO_FAILOVER or DISALLOW_TO_FAILOVER

backend_hostname1 = 'xxxx.xx'
backend_port1 = 5432
backend_weight1 = 1
backend_data_directory1 = '/export/pgsql.data'
backend_flag1 = 'ALLOW_TO_FAILOVER'

# - Authentication -

enable_pool_hba = off
                                   # Use pool_hba.conf for client authentication
authentication_timeout = 60
                                   # Delay in seconds to complete client authentication
                                   # 0 means no timeout.

# - SSL Connections -

ssl = off
                                   # Enable SSL support
                                   # (change requires restart)
#ssl_key = './server.key'
                                   # Path to the SSL private key file
                                   # (change requires restart)
#ssl_cert = './server.cert'
                                   # Path to the SSL public certificate file
                                   # (change requires restart)
#ssl_ca_cert = ''
                                   # Path to a single PEM format file
                                   # containing CA root certificate(s)
                                   # (change requires restart)
#ssl_ca_cert_dir = ''
                                   # Directory containing CA root certificate(s)
                                   # (change requires restart)


#------------------------------------------------------------------------------
# POOLS
#------------------------------------------------------------------------------

# - Pool size -

num_init_children = 32
                                   # Number of pools
                                   # (change requires restart)
max_pool = 4
                                   # Number of connections per pool
                                   # (change requires restart)

# - Life time -

child_life_time = 300
                                   # Pool exits after being idle for this many seconds
child_max_connections = 0
                                   # Pool exits after receiving that many connections
                                   # 0 means no exit
connection_life_time = 0
                                   # Connection to backend closes after being idle for this many seconds
                                   # 0 means no close
client_idle_limit = 0
                                   # Client is disconnected after being idle for that many seconds
                                   # (even inside an explicit transactions!)
                                   # 0 means no disconnection


#------------------------------------------------------------------------------
# LOGS
#------------------------------------------------------------------------------

# - Where to log -

log_destination = 'stderr'
                                   # Where to log
                                   # Valid values are combinations of stderr,
                                   # and syslog. Default to stderr.

# - What to log -

print_timestamp = on
                                   # Print timestamp on each line
                                   # (change requires restart)

log_connections = off
                                   # Log connections
log_hostname = off
                                   # Hostname will be shown in ps status
                                   # and in logs if connections are logged
log_statement = off
                                   # Log all statements
log_per_node_statement = off
                                   # Log all statements
                                   # with node and backend informations
log_standby_delay = 'if_over_threshold'
                                   # Log standby delay
                                   # Valid values are combinations of always,
                                   # if_over_threshold, none

# - Syslog specific -

syslog_facility = 'LOCAL0'
                                   # Syslog local facility. Default to LOCAL0
syslog_ident = 'pgpool'
                                   # Syslog program identification string
                                   # Default to 'pgpool'

# - Debug -

debug_level = 0
                                   # Debug message verbosity level
                                   # 0 means no message, 1 or more mean verbose


#------------------------------------------------------------------------------
# FILE LOCATIONS
#------------------------------------------------------------------------------

pid_file_name = '/var/run/pgpool/pgpool.pid'
                                   # PID file name
                                   # (change requires restart)
logdir = '/tmp'
                                   # Directory of pgPool status file
                                   # (change requires restart)


#------------------------------------------------------------------------------
# CONNECTION POOLING
#------------------------------------------------------------------------------

connection_cache = on
                                   # Activate connection pools
                                   # (change requires restart)

                                   # Semicolon separated list of queries
                                   # to be issued at the end of a session
                                   # The default is for 8.3 and later
reset_query_list = 'ABORT; DISCARD ALL'
                                   # The following one is for 8.2 and before
#reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'


#------------------------------------------------------------------------------
# REPLICATION MODE
#------------------------------------------------------------------------------

replication_mode = off
                                   # Activate replication mode
                                   # (change requires restart)
replicate_select = off
                                   # Replicate SELECT statements
                                   # when in replication or parallel mode
                                   # replicate_select is higher priority than
                                   # load_balance_mode.

insert_lock = off
                                   # Automatically locks a dummy row or a table
                                   # with INSERT statements to keep SERIAL data
                                   # consistency
                                   # Without SERIAL, no lock will be issued
lobj_lock_table = ''
                                   # When rewriting lo_creat command in
                                   # replication mode, specify table name to
                                   # lock

# - Degenerate handling -

replication_stop_on_mismatch = off
                                   # On disagreement with the packet kind
                                   # sent from backend, degenerate the node
                                   # which is most likely "minority"
                                   # If off, just force to exit this session

failover_if_affected_tuples_mismatch = off
                                   # On disagreement with the number of affected
                                   # tuples in UPDATE/DELETE queries, then
                                   # degenerate the node which is most likely
                                   # "minority".
                                   # If off, just abort the transaction to
                                   # keep the consistency


#------------------------------------------------------------------------------
# LOAD BALANCING MODE
#------------------------------------------------------------------------------

load_balance_mode = on
                                   # Activate load balancing mode
                                   # (change requires restart)
ignore_leading_white_space = on
                                   # Ignore leading white spaces of each query
white_function_list = ''
                                   # Comma separated list of function names
                                   # that don't write to database
                                   # Regexp are accepted
black_function_list = 'currval,lastval,nextval,setval'
                                   # Comma separated list of function names
                                   # that write to database
                                   # Regexp are accepted


#------------------------------------------------------------------------------
# MASTER/SLAVE MODE
#------------------------------------------------------------------------------

master_slave_mode = on
                                   # Activate master/slave mode
                                   # (change requires restart)
master_slave_sub_mode = 'stream'
                                   # Master/slave sub mode
                                   # Valid values are combinations slony or
                                   # stream. Default is slony.
                                   # (change requires restart)

# - Streaming -

sr_check_period = 10
                                   # Streaming replication check period
                                   # Disabled (0) by default
sr_check_user = 'xx'
                                   # Streaming replication check user
                                   # This is neccessary even if you disable streaming
                                   # replication delay check by sr_check_period = 0
sr_check_password = 'xx'
                                   # Password for streaming replication check user
delay_threshold = 10000000
                                   # Threshold before not dispatching query to standby node
                                   # Unit is in bytes
                                   # Disabled (0) by default

# - Special commands -

follow_master_command = ''
                                   # Executes this command after master failover
                                   # Special values:
                                   # %d = node id
                                   # %h = host name
                                   # %p = port number
                                   # %D = database cluster path
                                   # %m = new master node id
                                   # %H = hostname of the new master node
                                   # %M = old master node id
                                   # %P = old primary node id
                                   # %r = new master port number
                                   # %R = new master database cluster path
                                   # %% = '%' character


#------------------------------------------------------------------------------
# PARALLEL MODE
#------------------------------------------------------------------------------

parallel_mode = off
                                   # Activates parallel query mode
                                   # (change requires restart)
pgpool2_hostname = ''
                                   # Set pgpool2 hostname
                                   # (change requires restart)

# - System DB info -

#system_db_hostname = 'localhost'
                                   # (change requires restart)
#system_db_port = 5432
                                   # (change requires restart)
#system_db_dbname = 'pgpool'
                                   # (change requires restart)
#system_db_schema = 'pgpool_catalog'
                                   # (change requires restart)
#system_db_user = 'pgpool'
                                   # (change requires restart)
#system_db_password = ''
                                   # (change requires restart)


#------------------------------------------------------------------------------
# HEALTH CHECK
#------------------------------------------------------------------------------

health_check_period = 0
                                   # Health check period
                                   # Disabled (0) by default
health_check_timeout = 20
                                   # Health check timeout
                                   # 0 means no timeout
health_check_user = 'nobody'
                                   # Health check user
health_check_password = ''
                                   # Password for health check user
health_check_max_retries = 0
                                   # Maximum number of times to retry a failed health check before giving up.
health_check_retry_delay = 1
                                   # Amount of time to wait (in seconds) between retries.


#------------------------------------------------------------------------------
# FAILOVER AND FAILBACK
#------------------------------------------------------------------------------

failover_command = ''
                                   # Executes this command at failover
                                   # Special values:
                                   # %d = node id
                                   # %h = host name
                                   # %p = port number
                                   # %D = database cluster path
                                   # %m = new master node id
                                   # %H = hostname of the new master node
                                   # %M = old master node id
                                   # %P = old primary node id
                                   # %r = new master port number
                                   # %R = new master database cluster path
                                   # %% = '%' character
failback_command = ''
                                   # Executes this command at failback.
                                   # Special values:
                                   # %d = node id
                                   # %h = host name
                                   # %p = port number
                                   # %D = database cluster path
                                   # %m = new master node id
                                   # %H = hostname of the new master node
                                   # %M = old master node id
                                   # %P = old primary node id
                                   # %r = new master port number
                                   # %R = new master database cluster path
                                   # %% = '%' character

fail_over_on_backend_error = on
                                   # Initiates failover when reading/writing to the
                                   # backend communication socket fails
                                   # If set to off, pgpool will report an
                                   # error and disconnect the session.


#------------------------------------------------------------------------------
# ONLINE RECOVERY
#------------------------------------------------------------------------------

recovery_user = 'nobody'
                                   # Online recovery user
recovery_password = ''
                                   # Online recovery password
recovery_1st_stage_command = ''
                                   # Executes a command in first stage
recovery_2nd_stage_command = ''
                                   # Executes a command in second stage
recovery_timeout = 90
                                   # Timeout in seconds to wait for the
                                   # recovering node's postmaster to start up
                                   # 0 means no wait
client_idle_limit_in_recovery = 0
                                   # Client is disconnected after being idle
                                   # for that many seconds in the second stage
                                   # of online recovery
                                   # 0 means no disconnection
                                   # -1 means immediate disconnection


#------------------------------------------------------------------------------
# WATCHDOG
#------------------------------------------------------------------------------
use_watchdog = off
                                    # Activates watchdog
trusted_servers = ''
                                    # trusted server list which are used
                                    # to confirm network connection
                                    # (hostA,hostB,hostC,...)
delegate_IP = ''
                                    # delegate IP address
wd_hostname = ''
                                    # Host name or IP address of this watchdog
wd_port = 9000
                                    # port number for watchdog service
wd_interval = 10
                                    # lifecheck interval (sec) > 0
ping_path = '/bin'
                                    # ping command path
ifconfig_path = '/sbin'
                                    # ifconfig command path
if_up_cmd = 'ifconfig eth0:0 inet $_IP_$ netmask 255.255.255.0'
                                    # startup delegate IP command
if_down_cmd = 'ifconfig eth0:0 down'
                                    # shutdown delegate IP command

arping_path = '/usr/sbin' # arping command path

arping_cmd = 'arping -U $_IP_$ -w 1'
                                    # arping command
wd_life_point = 3
                                    # lifecheck retry times
wd_lifecheck_query = 'SELECT 1'
                                    # lifecheck query to pgpool from watchdog
# Other pgpool Connection Settings

#other_pgpool_hostname0 = 'host0'
                                    # Host name or IP address to connect to for other pgpool 0
#other_pgpool_port0 = 5432
                                    # Port number for othet pgpool 0
#other_wd_port0 = 9000
                                    # Port number for othet watchdog 0
#other_pgpool_hostname1 = 'host1'
#other_pgpool_port1 = 5432
#other_wd_port1 = 9000


#------------------------------------------------------------------------------
# OTHERS
#------------------------------------------------------------------------------
relcache_expire = 0
                                   # Life time of relation cache in seconds.
                                   # 0 means no cache expiration(the default).
                                   # The relation cache is used for cache the
                                   # query result against PostgreSQL system
                                   # catalog to obtain various information
                                   # including table structures or if it's a
                                   # temporary table or not. The cache is
                                   # maintained in a pgpool child local memory
                                   # and being kept as long as it survives.
                                   # If someone modify the table by using
                                   # ALTER TABLE or some such, the relcache is
                                   # not consistent anymore.
                                   # For this purpose, cache_expiration
                                   # controls the life time of the cache.
relcache_size = 256
                                   # Number of relation cache
                                   # entry. If you see frequently:
                                   # "pool_search_relcache: cache replacement happend"
                                   # in the pgpool log, you might want to increate this number.

check_temp_table = on
                                   # If on, enable temporary table check in SELECT statements.
                                   # This initiates queries against system catalog of primary/master
                                   # thus increases load of master.
                                   # If you are absolutely sure that your system never uses temporary tables
                                   # and you want to save access to primary/master, you could turn this off.
                                   # Default is on.


#------------------------------------------------------------------------------
# ON MEMORY QUERY MEMORY CACHE
#------------------------------------------------------------------------------
memory_cache_enabled = on
                                   # If on, use the memory cache functionality, off by default
memqcache_method = 'shmem'
                                   # Cache storage method. either 'shmem'(shared memory) or
                                   # 'memcached'. 'shmem' by default
memqcache_memcached_host = 'localhost'
                                   # Memcached host name or IP address. Mandatory if
                                   # memqcache_method = 'memcached'.
                                   # Defaults to localhost.
memqcache_memcached_port = 11211
                                   # Memcached port number. Mondatory if memqcache_method = 'memcached'.
                                   # Defaults to 11211.
memqcache_total_size = 67108864
                                   # Total memory size in bytes for storing memory cache.
                                   # Mandatory if memqcache_method = 'shmem'.
                                   # Defaults to 64MB.
memqcache_max_num_cache = 1000000
                                   # Total number of cache entries. Mandatory
                                   # if memqcache_method = 'shmem'.
                                   # Each cache entry consumes 48 bytes on shared memory.
                                   # Defaults to 1,000,000(45.8MB).
memqcache_expire = 0
                                   # Memory cache entry life time specified in seconds.
                                   # 0 means infinite life time. 0 by default.
memqcache_auto_cache_invalidation = on
                                   # If on, invalidation of query cache is triggered by corresponding
                                   # DDL/DML/DCL(and memqcache_expire). If off, it is only triggered
                                   # by memqcache_expire. on by default.
memqcache_maxcache = 409600
                                   # Maximum SELECT result size in bytes.
                                   # Must be smaller than memqcache_cache_block_size. Defaults to 400KB.
memqcache_cache_block_size = 1048576
                                   # Cache block size in bytes. Mandatory if memqcache_method = 'shmem'.
                                   # Defaults to 1MB.
memqcache_oiddir = '/var/log/pgpool/oiddir'
                                      # Temporary work directory to record table oids
white_memqcache_table_list = ''
                                   # Comma separated list of table names to memcache
                                   # that don't write to database
                                   # Regexp are accepted
black_memqcache_table_list = ''
                                   # Comma separated list of table names not to memcache
                                   # that don't write to database
                                   # Regexp are accepted

- the query you executed

Not one query. Also the same query most of the times succeeds but once in a while causes a segfault.

- strict version of pgpool-II (3.2 STABLE? 3.2 beta? 3.2 RC? etc.)

3.2 STABLE

exto

2012-08-28 00:24

reporter   ~0000058

Maybe this helps too:

dmesg output:

[4678835.879121] pgpool[19323]: segfault at bfb75000 ip b7602b36 sp bfb6bc54 error 4 in libc-2.12.so (deleted)[b74ce000+190000]
[4678839.205692] pgpool[19258]: segfault at bfb75000 ip b7602b3f sp bfb6bc54 error 4 in libc-2.12.so (deleted)[b74ce000+190000]
[4678955.324605] pgpool[19073]: segfault at c04ed19c ip 080923b7 sp bfb6df20 error 5 in pgpool[8048000+dd000]
[4679131.857481] pgpool[20049]: segfault at 7e0bd19 ip 080923b7 sp bfb6df20 error 4 in pgpool[8048000+dd000]
[4679139.561262] pgpool[19164]: segfault at a3355054 ip 080923b7 sp bfb6df20 error 4 in pgpool[8048000+dd000]
[4679614.075140] pgpool[28382]: segfault at bfc3e000 ip b762798f sp bfc35634 error 4 in libc-2.12.so[b74f3000+190000]
[4679614.609733] pgpool[28863]: segfault at bfc3e000 ip b7627b3f sp bfc355d4 error 4 in libc-2.12.so[b74f3000+190000]
[4679615.130407] pgpool[28406]: segfault at bfc3e000 ip b7627686 sp bfc35634 error 4 in libc-2.12.so[b74f3000+190000]
[4679615.830470] pgpool[28385]: segfault at bfc3e000 ip b762756f sp bfc35634 error 4 in libc-2.12.so[b74f3000+190000]
[4679617.706351] pgpool[28392]: segfault at bfc3e000 ip b7627131 sp bfc35638 error 4 in libc-2.12.so[b74f3000+190000]
[4679648.514833] pgpool[28394]: segfault at bfc3e000 ip b762732f sp bfc35634 error 4 in libc-2.12.so[b74f3000+190000]
[4679661.829942] pgpool[28869]: segfault at bfc3e000 ip b7627746 sp bfc355d4 error 4 in libc-2.12.so[b74f3000+190000]
[4680006.421692] pgpool[29093]: segfault at bfbb9dac ip 080923b7 sp bf9cba20 error 4 in pgpool[8048000+dd000]
[4680045.286395] pgpool[29102]: segfault at bfbb9dac ip 080923b7 sp bf9cba20 error 4 in pgpool[8048000+dd000]
[4680061.377539] pgpool[29099]: segfault at bfbb9dac ip 080923b7 sp bf9cba20 error 4 in pgpool[8048000+dd000]



Aug 23 15:06:50 exto-web01 pgpool[25977]: pool_delete_item_shmem_cache: item 374 was deleted
Aug 23 15:06:50 exto-web01 pgpool[25977]: pool_delete_item_shmem_cache: item 627 was deleted
Aug 23 15:06:58 exto-web01 pgpool[25966]: Child process 25977 was terminated by segmentation fault

Aug 23 15:28:37 exto-web01 pgpool[3393]: pool_delete_item_shmem_cache: item 692 was deleted
Aug 23 15:28:37 exto-web01 pgpool[3393]: pool_delete_item_shmem_cache: item 736 was deleted
Aug 23 15:28:50 exto-web01 pgpool[3393]: pool_send_and_wait: Error or notice message from backend: : DB node id: 0 backend pid: 7431 statement: INSERT INTO stats_traffic_sourc
Aug 23 15:28:50 exto-web01 pgpool[3393]: pool_reuse_block: blockid: 3
Aug 23 15:28:55 exto-web01 kernel: [4668961.014345] pgpool[3393]: segfault at a31bfdcc ip 080923b7 sp bfb6df80 error 4 in pgpool[8048000+dd000]


Aug 23 15:45:29 exto-web01 pgpool[9517]: pool_delete_item_shmem_cache: item 111 was deleted
Aug 23 15:45:29 exto-web01 pgpool[9517]: pool_delete_item_shmem_cache: item 112 was deleted
Aug 23 15:45:29 exto-web01 pgpool[9517]: pool_delete_item_shmem_cache: item 113 was deleted
Aug 23 15:45:29 exto-web01 rsyslogd-2177: imuxsock begins to drop messages from pid 9517 due to rate-limiting
Aug 23 15:45:36 exto-web01 rsyslogd-2177: imuxsock lost 7 messages from pid 9517 due to rate-limiting
Aug 23 15:45:36 exto-web01 pgpool[9517]: pool_delete_item_shmem_cache: item 406 was deleted
Aug 23 15:45:36 exto-web01 pgpool[9517]: pool_delete_item_shmem_cache: item 406 was deleted
Aug 23 15:45:37 exto-web01 pgpool[3409]: pool_reuse_block: blockid: 19
Aug 23 15:45:40 exto-web01 pgpool[3388]: Child process 9517 was terminated by segmentation fault

WIll try tonight with shmem cache switched off, maybe that is the problem.

exto

2012-08-28 04:22

reporter   ~0000059

No more segfaults after disabling the cache (memory_cache_enabled = off) so far.

qthiab

2012-08-28 17:05

reporter   ~0000064

The same here, no more segfault after disabling query caching. It seems there is a problem with the query caching, and as 'exto' said, it does not happen for any specific query.

exto

2012-08-31 00:53

reporter   ~0000071

segfaults also occur when using memcached as memqcache_method.

exto

2012-08-31 18:29

reporter   ~0000072

I managed to create core file and backtrace:

(gdb) bt
#0 0x08092617 in Execute (frontend=0x8520d60, backend=0x85166d8, len=5, contents=0x8516ef0 "") at pool_proto_modules.c:743
0000001 0x080939ad in ProcessFrontendResponse (frontend=0x8520d60, backend=0x85166d8) at pool_proto_modules.c:2426
0000002 0x0806356c in pool_process_query (frontend=0x8520d60, backend=0x85166d8, reset_request=0) at pool_process_query.c:216
0000003 0x08052537 in do_child (unix_fd=5, inet_fd=6) at child.c:362
0000004 0x0804b7af in fork_a_child (unix_fd=5, inet_fd=6, id=18) at main.c:1242
0000005 0x0804ebe6 in main (argc=2, argv=0xbfaa8f54) at main.c:657

nagata

2012-09-05 20:06

developer   ~0000079

Thanks for providing backtrace.

A buffer overrun was fixed.
Would you please try the latest V3_2_STALBE version?

You can download it from here, by clicking "snapshot" of the top row.
http://git.postgresql.org/gitweb/?p=pgpool2.git;a=shortlog;h=refs/heads/V3_2_STABLE

exto

2012-09-05 22:42

reporter   ~0000081

Segfaults are solved, thanks!

I still had to disable the memory caching due to a lot of CPU usage. I will try to get more information about that and open a new issue.

anilth

2012-10-16 21:40

reporter   ~0000105

I am having similar issue here.

I have pgpool-II version 3.2.1 (namameboshi) installed in my Centos6. I have two postgres 9.2 backend server. And, following postgres92 packages are installed in pgpool server.

postgresql92-libs-9.2.1-1PGDG.rhel6.x86_64
postgresql92-devel-9.2.1-1PGDG.rhel6.x86_64
postgresql92-9.2.1-1PGDG.rhel6.x86_64

In pgpool.conf I have only configured the replication and loadbalancing set to on, rest is default.

Every now and then I get message in log :
Oct 15 12:53:52 server1 kernel: pgpool[4432] general protection ip:46f02d sp:7ffff8641260 error:0 in pgpool[400000+ef000]
Oct 15 12:57:26 server1 kernel: pgpool[2123] general protection ip:46f02d sp:7ffff86412a0 error:0 in pgpool[400000+ef000]
Oct 15 13:12:39 server1 kernel: pgpool[2223] general protection ip:46f02d sp:7ffff86412a0 error:0 in pgpool[400000+ef000]
Oct 15 14:01:51 server1 kernel: pgpool[4490]: segfault at 20 ip 000000000046f02d sp 00007ffff8641260 error 4 in pgpool[400000+ef000]
Oct 15 14:11:33 server1 kernel: pgpool[4474]: segfault at 20 ip 000000000046f02d sp 00007ffff8641260 error 4 in pgpool[400000+ef000]
Oct 15 14:34:28 server1 kernel: pgpool[4591] general protection ip:46f02d sp:7ffff8641260 error:0 in pgpool[400000+ef000]
Oct 15 14:54:47 server1 kernel: pgpool[4577] general protection ip:46f02d sp:7ffff8641260 error:0 in pgpool[400000+ef000]
Oct 15 14:59:25 server1 kernel: pgpool[4545] general protection ip:46f02d sp:7ffff8641260 error:0 in pgpool[400000+ef000]
Oct 15 15:45:14 server1 kernel: pgpool[1953]: segfault at 20 ip 000000000046f02d sp 00007ffff86412a0 error 4 in pgpool[400000+ef000]

Then, when this happens, my webinterface(PHP) stops and says connection timeout. After few refresh in the browser it comes back again.

nagata

2012-10-17 10:50

developer   ~0000106

This issue was moved to 0000028.

http://www.pgpool.net/mantisbt/view.php?id=28

Issue History

Date Modified Username Field Change
2012-08-24 03:57 exto New Issue
2012-08-24 10:35 administrator Assigned To => nagata
2012-08-24 10:35 administrator Status new => assigned
2012-08-24 10:50 nagata Note Added: 0000050
2012-08-24 15:11 exto Note Added: 0000051
2012-08-27 15:35 exto Note Added: 0000054
2012-08-27 18:21 nagata Note Added: 0000055
2012-08-27 22:40 qthiab Note Added: 0000056
2012-08-27 22:45 qthiab Note Edited: 0000056
2012-08-28 00:17 exto Note Added: 0000057
2012-08-28 00:24 exto Note Added: 0000058
2012-08-28 04:22 exto Note Added: 0000059
2012-08-28 17:05 qthiab Note Added: 0000064
2012-08-31 00:53 exto Note Added: 0000071
2012-08-31 18:29 exto Note Added: 0000072
2012-09-05 20:06 nagata Note Added: 0000079
2012-09-05 22:42 exto Note Added: 0000081
2012-10-16 21:40 anilth Note Added: 0000105
2012-10-17 10:50 nagata Note Added: 0000106
2012-10-17 10:50 nagata Assigned To nagata =>
2012-11-26 15:59 t-ishii Assigned To => nagata
2012-12-18 16:46 nagata Status assigned => closed
2012-12-18 16:46 nagata Resolution open => fixed