We have setup one master and one slave which was created by taking base backup. We did not setup the slave to be as standby, that means, this server also can run write queries. Then we followed the tutorial to setup Parallel Query. We enabled Load balancing and Parallel query mode and disabled rest of the modes. Did everything what the pgpool tutorial suggests. We did change one thing though. We modified dist_def_pgbench.sql because we had only 2 nodes. Here is the diff:
< SELECT CASE WHEN $1 > 0 AND $1 <= 100000 THEN 0 < WHEN $1 > 100000 AND $1 <= 200000 THEN 1 < ELSE 2 --- > SELECT CASE WHEN $1 > 0 AND $1 <= 150000 THEN 0 > ELSE 1 Now, in the end when I execute "SELECT * FROM pgbench_accounts bench_parallel" using all 3 ports (2 dbservers and 1 pgpool), I found that the query using pgpool takes a longer time than the two ports of the dbservers. I guess it should infact take less time, right? Please let me if I have done anything wrong. Thanks for your help. ________________________________ From: Alessandro Candini <[email protected]> To: [email protected] Sent: Mon, January 31, 2011 5:04:28 PM Subject: [Pgpool-general] Parallel SELECT retrieve only half of the results Hi, I have configured pgpool-II-3.0.1 with postgresql-9.0.2 for parallel queries: 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 = 0 connection_life_time = 0 child_max_connections = 0 client_idle_limit = 0 authentication_timeout = 60 logdir = '/var/log/pgpool' pid_file_name = '/var/log/pgpool/pgpool.pid' replication_mode = true load_balance_mode = false replication_stop_on_mismatch = false failover_if_affected_tuples_mismatch = false replicate_select = true reset_query_list = 'ABORT; DISCARD ALL' white_function_list = '' black_function_list = 'nextval,setval' print_timestamp = true master_slave_mode = false master_slave_sub_mode = 'stream' delay_threshold = 100 log_standby_delay = 'if_over_threshold' connection_cache = true health_check_timeout = 10 health_check_period = 10 health_check_user = 'postgis' failover_command = '/usr/lib/pgpool-II/3.0.1/bin/failover.sh %h %H /tmp/trigger_file0' failback_command = '/usr/lib/pgpool-II/3.0.1/bin/failback.sh %h %M /tmp/trigger_file0 %m' fail_over_on_backend_error = false insert_lock = true ignore_leading_white_space = false log_statement = false log_per_node_statement = false log_connections = false log_hostname = false parallel_mode = true enable_query_cache = false pgpool2_hostname = '' system_db_hostname = '192.168.0.128' system_db_port = 5433 system_db_dbname = 'pgpool' system_db_schema = 'pgpool_catalog' system_db_user = 'pgpool' system_db_password = '' backend_hostname0 = '192.168.0.128' backend_port0 = 5433 backend_weight0 = 1 backend_data_directory0 = '/home/database/9.0.2/data' backend_hostname1 = '192.168.0.125' backend_port1 = 5433 backend_weight1 = 1 backend_data_directory1 = '/home/database/9.0.2/data' enable_pool_hba = false recovery_user = 'postgis' recovery_password = 'gispost' recovery_1st_stage_command = 'basebackup.sh' recovery_2nd_stage_command = '' recovery_timeout = 60 client_idle_limit_in_recovery = 0 lobj_lock_table = 'pgpool_lobj_lock' ssl = false debug_level = 0 I have splitted the same db on the two machines 192.168.0.128 (the System DB) and 192.168.0.125, but when I perform something like "SELECT COUNT(*) FROM mytable" it retrieves only the data on the system DB... I expected to obtain the sum of data on the two nodes. Where am I wrong? _______________________________________________ Pgpool-general mailing list [email protected] http://pgfoundry.org/mailman/listinfo/pgpool-general
_______________________________________________ Pgpool-general mailing list [email protected] http://pgfoundry.org/mailman/listinfo/pgpool-general
