[Pgpool-general] Pgpool-II - replication problems
nir osovsky
nosovsky1 at gmail.com
Sun Nov 9 20:10:10 UTC 2008
Thank you, Jaume.
Attached my pg_hba.conf (identical in 2 servers) and pgpool.conf. I
appreciate if you can let me know if I need to change something.
pg_hba.conf
=========
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 192.168.158.38/32 trust
host all all 192.168.158.39/32 trust
# IPv6 local connections:
host all all ::1/128 trust
pgpool.conf
=========
listen_addresses = '*'
port = 9999
pcp_port = 9898
socket_dir = '/tmp'
pcp_socket_dir = '/tmp'
backend_socket_dir = '/tmp'
pcp_timeout = 10
num_init_children = 32
max_pool = 4
child_life_time = 300
connection_life_time = 0
child_max_connections = 0
client_idle_limit = 0
authentication_timeout = 60
logdir = '/tmp'
# Replication mode
replication_mode = true
replication_timeout = 9000
load_balance_mode = true
replication_stop_on_mismatch = false
replicate_select = false
reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT'
print_timestamp = true
master_slave_mode = false
connection_cache = true
health_check_timeout = 20
health_check_period = 0
health_check_user = 'nobody'
failover_command = ''
failback_command = ''
insert_lock = false
ignore_leading_white_space = true
log_statement = false
log_connections = false
log_hostname = false
parallel_mode = false
enable_query_cache = false
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 = ''
backend_hostname0 = 'localhost'
backend_port0 = 5432
backend_weight0 = 1
backend_data_directory0 = '/usr/local/pgsql/data'
backend_hostname1 = '192.168.158.39'
backend_port1 = 5432
backend_weight1 = 1
backend_data_directory1 = '/usr/local/pgsql/data'
# - HBA -
#enable_pool_hba = false
enable_pool_hba = true
recovery_user = 'nobody'
recovery_password = ''
recovery_1st_stage_command = ''
recovery_2nd_stage_command = ''
Thanks,
Nir
On Sun, Nov 9, 2008 at 3:34 AM, Jaume Sabater <jsabater at linuxsilo.net>wrote:
> nir osovsky wrote:
>
> > My questions are:
> > 1. Why the above insert command failed?
>
> Have you properly set up the users in pg_hba.conf in both pgsql servers?
>
> > 2. What do I need to configure in order for any change to the testdb on
> > dev1 to replicate automaticly to testdb on dev2?
>
> In your pgpool.conf file, you need to have this directive:
>
> replication_mode = true
>
> And also you need to configure these:
>
> backend_hostname
> backend_port
> backend_weight
> backend_data_directory
>
> Optionally, you may also want to enable this one:
>
> load_balance_mode = true
>
> But it does not have anything to do with replicating information. Other
> parameters may need to be adjusted from their default values depending
> on your specific configuration.
>
> Check these two for more information and examples:
>
> http://pgpool.projects.postgresql.org/
> http://www.pgcon.org/2008/schedule/attachments/66_pgpool-II-demo.pdf
>
> --
> Jaume Sabater
> http://linuxsilo.net/
>
> "Ubi sapientas ibi libertas"
>
> _______________________________________________
> Pgpool-general mailing list
> Pgpool-general at pgfoundry.org
> http://pgfoundry.org/mailman/listinfo/pgpool-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://pgfoundry.org/pipermail/pgpool-general/attachments/20081109/f7777f2a/attachment.html
More information about the Pgpool-general
mailing list