[pgpool-general: 317] pgpool and postgres streaming replication

Евгений Селявка evg.selyavka at gmail.com
Wed Mar 28 22:12:58 JST 2012


Dear users,

I have 3 backend, and one balancer, this is config of my balancer:

listen_addresses = '*'
port = 5433
socket_dir = '/tmp'
pcp_port = 9898
pcp_socket_dir = '/tmp'
backend_hostname0 = '10.2.141.54'
backend_port0 = 5432
backend_weight0 = 0.499
backend_data_directory0 = '/var/lib/postgresql/9.1/main'
backend_hostname1 = '10.2.141.55'
backend_port1 = 5432
backend_weight1 = 0.499
backend_data_directory1 = '/var/lib/postgresql/9.1/main'
backend_hostname2 = '10.2.141.53'
backend_port2 = 5432
backend_weight2 = 0.002
backend_data_directory2 = '/var/lib/postgresql/9.1/main'
enable_pool_hba = off
authentication_timeout = 60
ssl = off
num_init_children = 120
max_pool = 2
child_life_time = 64800
child_max_connections = 1000
connection_life_time = 300
client_idle_limit = 64800
log_destination = 'stderr'
print_timestamp = on
log_connections = off
log_hostname = on
log_statement = off
log_per_node_statement = off
log_standby_delay = 'if_over_threshold'
syslog_facility = 'LOCAL0'
syslog_ident = 'pgpool'
debug_level = 0
pid_file_name = '/var/run/pgpool/pgpool.pid'
logdir = '/tmp'
connection_cache = on
reset_query_list = 'ABORT; DISCARD ALL'
replication_mode = off
replicate_select = off
insert_lock = off
lobj_lock_table = ''
replication_stop_on_mismatch = off
failover_if_affected_tuples_mismatch = off
load_balance_mode = on
ignore_leading_white_space = on
white_function_list = ''
black_function_list = 'nextval,setval'
master_slave_mode = on
master_slave_sub_mode = 'stream'
sr_check_period = 10
sr_check_user = 'sr_check'
sr_check_password = 'sr_check1'
delay_threshold = 100
follow_master_command = '/etc/pgpool.d/follow_master_command.sh %d %h %p %D
%m %H %M %P'
parallel_mode = off
enable_query_cache = off
pgpool2_hostname = ''
system_db_hostname  = 'localhost'
system_db_port = 5432
system_db_dbname = 'pgpool'
system_db_schema = 'pgpool_catalog'
system_db_user = 'pgpool'
system_db_password = ''
health_check_period = 5
health_check_timeout = 20
health_check_user = 'health_check'
health_check_password = 'health_check1'
failover_command = '/etc/pgpool.d/failover.sh %d %h %p %D %m %H %M %P'
failback_command = '/etc/pgpool.d/failback_command.sh %d %h %p %D %m %H %M
%P'
fail_over_on_backend_error = on
recovery_user = 'postgres'
recovery_password = 'postgres'
recovery_1st_stage_command = 'copy_base_backup'
recovery_2nd_stage_command = ''
recovery_timeout = 90
client_idle_limit_in_recovery = 0
relcache_expire = 5

Client use PgAdmin to connect to pool and sometimes DML go to the slave
server, and i see this error in pgpool.log:

2012-03-28 14:48:41 ERROR: pid 18767: read_kind_from_backend: 0 th kind C
does not match with master or majority connection kind E
2012-03-28 14:48:41 ERROR: pid 18767: kind mismatch among backends.
Possible last query was: "set role muvi;
/* Newsletter subject and body templates with boundaries imposed by body
markup */
CREATE TABLE NewsletterTemplate (
  newsletter_template_uid uuid DEFAULT uuid_generate_v1() NOT NULL, /*
Template id */

  subject_template_path varchar (255) NOT NULL,                     /*
Unique name of message subject velocity template */
  body_template_path varchar (255) NOT NULL,                        /*
Unique name of message body velocity template */

  free_content text,                                                /* Free
text content */

  /* Limits of how many digest items of each type can fit into template
body */
  recent_friends_limit integer DEFAULT 0 NOT NULL,                  /*
Recent friends limit */
  recommendations_limit integer DEFAULT 0 NOT NULL                  /*
Recommendations limit */
);

COMMENT ON TABLE NewsletterTemplate
    IS 'Newsletter subject and body templates with boundaries imposed by
body markup'
;
COMMENT ON COLUMN NewsletterTemplate.newsletter_template_uid
    IS " kind details are: 0[C] 1[E: cannot execute CREATE TABLE in a
read-only transaction] 2[E: cannot execute CREATE TABLE in a read-only
transaction]
2012-03-28 14:48:41 LOG:   pid 18767: do_child: exits with status 1 due to
error


Replication is organize by native Postgresql streaming replication. My
version Postgresql - 9.1.3 and my version pgpool-II version 3.1.2

-- 
С уважением Селявка Евгений
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20120328/c44601d7/attachment.html>


More information about the pgpool-general mailing list