[Pgpool-general] pgpool behing cursors?

Mike Axiak mike at axiak.net
Mon Nov 3 03:57:37 UTC 2008


Hello,

I've been trying to make pgpool-II working with master_slave_mode = true. It
works if I use psql with no cursor.
However, with the application I'm trying to run this on, I get the
following:
    server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.

Whenever I try to perform any query with a cursor. It seems to be calling
read_kind_from_backend and I get this at the end of a query:
....
2008-11-03 03:48:24 DEBUG: pid 31882: read_kind_from_backend: read kind from
1 th backend Z NUM_BACKENDS: 2
2008-11-03 03:48:24 DEBUG: pid 31882: pool_process_query: kind from backend:
Z
2008-11-03 03:48:24 DEBUG: pid 31882: pool_read_message_length: slot: 0
length: 5
2008-11-03 03:48:24 DEBUG: pid 31882: pool_read_message_length: slot: 1
length: 5
2008-11-03 03:48:24 DEBUG: pid 31882: ReadyForQuery: message length: 5
--> 2008-11-03 03:48:24 ERROR: pid 31882: pool_read_kind: kind does not
match between master(84) slot[1] (73) <--

Could you help me figure out what's wrong? My /etc/pgpool.conf is attached
below.

What I'm trying to do is this:

             +------------+
App -->   | PGPool |   --- Read query--> | localhost |
             +------------+    +-Write query -->| master pg server |

The servers trust all connections, and I can connect/query using psql fine.
It's only when I use my application that uses cursors that it seems to be
failing.

Thanks for your help in the matter!

Cheers,
Mike

/etc/pgpool.conf
========================================
# pgpool-II configuration file

listen_addresses = 'localhost'
port = 5433

pcp_port = 9898
socket_dir = '/var/run/postgresql'
pcp_socket_dir = '/var/run/postgresql'
pcp_timeout = 10
num_init_children = 32
max_pool = 4
child_life_time = 300
connection_life_time = 0
child_max_connections = 0

authentication_timeout = 60
logdir = '/var/run/postgresql'

replication_mode = false
replication_strict = false
replication_timeout = 5000
load_balance_mode = true
replication_stop_on_mismatch = false
replicate_select = false

# Semicolon separated list of queries to be issued at the end of a session
reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'
print_timestamp = true
master_slave_mode = true

connection_cache = true
health_check_timeout = 20
health_check_period = 0
health_check_user = 'nobody'

insert_lock = false

ignore_leading_white_space = false
log_statement = false
log_connections = false
log_hostname = false
parallel_mode = false
enable_query_cache = false

#set pgpool2 hostname
pgpool2_hostname = ''

# system DB info
system_db_hostname = 'localhost'
system_db_port = 5432
system_db_dbname = 'pgpool'
system_db_schema = 'pgpool_catalog'
system_db_user = 'pgpool'
system_db_password = ''

# backend_hostname, backend_port, backend_weight
backend_hostname0 = 'xxxxxx'
backend_port0 = 5432
backend_weight0 = 0
backend_hostname1 = 'localhost'
backend_port1 = 5432
backend_weight1 = 1

enable_pool_hba = true
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pgfoundry.org/pipermail/pgpool-general/attachments/20081102/679f6cc3/attachment.html 


More information about the Pgpool-general mailing list