pgpool2.git
12 years agoAdd ssl_ca_cert and ssl_ca_cert_dir descriptions to the japanese document.
Yugo Nagata [Fri, 5 Jul 2013 05:57:27 +0000 (14:57 +0900)]
Add ssl_ca_cert and ssl_ca_cert_dir descriptions to the japanese document.

12 years agoMove ssl_ca_cert and ssl_ca_cert_dir descriptons to the SSL section
Yugo Nagata [Thu, 4 Jul 2013 04:06:15 +0000 (13:06 +0900)]
Move ssl_ca_cert and ssl_ca_cert_dir descriptons to the SSL section

12 years agoFix compile error on Mac OS/X
Tatsuo Ishii [Wed, 3 Jul 2013 07:00:37 +0000 (16:00 +0900)]
Fix compile error on Mac OS/X

Patch contributed by Muhammad Usama.

12 years agoFix execute() in memory allocation logic when memqcache enabled.
Tatsuo Ishii [Tue, 2 Jul 2013 08:13:10 +0000 (17:13 +0900)]
Fix execute() in memory allocation logic when memqcache enabled.

When very long query string (>1024) supplied in extended query with
bind parameters, it fails to allocate enough memory.

12 years agoAdd a tess for the previous commit
Yugo Nagata [Tue, 2 Jul 2013 05:50:10 +0000 (14:50 +0900)]
Add a tess for the previous commit

12 years agoFix segmentation fault of child that occurs when startup packet has
Yugo Nagata [Tue, 2 Jul 2013 02:12:20 +0000 (11:12 +0900)]
Fix segmentation fault of child that occurs when startup packet has
no PostgreSQL user information.

When a startup packet has no PostgreSQL user specified, pgpool-II
terminated abnormally. You can reproduce it by

 $ psql -p 9999 -U ''

If enable_pool_hba is on, a child process terminates by segmentation
fault. Otherwise if enable_pool_hba is off, the error message is

 ERROR: pool_discard_cp: cannot get connection pool for user (null) database (null)

In both cases, psql terminates with no message on frontend.

To resolve it, if PostgreSQL user is not specified in startup packet,
the message as following is output to both log and frontend. This is
the same behavior as PostgreSQL.

 FATAL: no PostgreSQL user name specified in startup packet

12 years agoAdd regression test for bug#63.
Tatsuo Ishii [Sun, 30 Jun 2013 08:25:45 +0000 (17:25 +0900)]
Add regression test for bug#63.

12 years agoFix memqcache segfaults reported in bug#63.
Tatsuo Ishii [Sun, 30 Jun 2013 08:05:04 +0000 (17:05 +0900)]
Fix memqcache segfaults reported in bug#63.

When a query executes and the query result is too large,
query_context->temp_cache is discarded the query result is not
committed to cache storage when the query completed. In extended query
mode, it is possible that the same query context is used for
subsequent bind/execute cycle through reusing the portal. Problem is,
query_context->temp_cache is already gone and a segfault is caused by
accessing the pointer. To fix this, when query_context->temp_cache is
discarded, set the pointer to NULL and whenever access
query_context->temp_cache, check it is NULL or not.

12 years agoFix pg_md5 command crash.
Tatsuo Ishii [Sat, 29 Jun 2013 09:21:33 +0000 (18:21 +0900)]
Fix pg_md5 command crash.

Fix contributed by Muhammad Usama(from [pgpool-hackers: 302])

While looking at the pgpool-II code I found a potential crash or stack
smash in pg_md5 utility.
The problem is update_pool_passwd() calls pg_md5_encrypt() function to get
the md5 password, and the password format generated by pg_md5_encrypt()
function is
"md5" followed by 32-hex digits, which sums up to 35 characters while the
host variable defined in update_pool_passwd() function to hold this
password can contain maximum 32 characters.

12 years agoAdd new regression test.
Tatsuo Ishii [Wed, 26 Jun 2013 09:50:01 +0000 (18:50 +0900)]
Add new regression test.

12 years agoFix comment.
Tatsuo Ishii [Wed, 26 Jun 2013 09:48:23 +0000 (18:48 +0900)]
Fix comment.

12 years agoFix pgpool -m f stop" hang.
Tatsuo Ishii [Wed, 26 Jun 2013 09:17:11 +0000 (18:17 +0900)]
Fix pgpool -m f stop" hang.

This is caused by unmanaged pgpool children remaining.  This could
happen if multiple PostgreSQL are going down (or even starting pgpool,
without starting PostgreSQL can easily trigger this).  Child calls
degenerate_backend_set() and it tries to aquire semaphore to write a
failover request. In this case the signal mask is set as well, thus
signals are never received. To fix this, kill pgpool children before
forking them.

12 years agoFix failover.sh to not cause shell error in certain cases.
Tatsuo Ishii [Wed, 26 Jun 2013 05:49:26 +0000 (14:49 +0900)]
Fix failover.sh to not cause shell error in certain cases.

If not all arguments are supplied (this could happen if no available
backend exists, for example), the script could fail.

12 years agoFix comment in create_failover_script() and create_follow_master_script().
Tatsuo Ishii [Wed, 26 Jun 2013 05:34:58 +0000 (14:34 +0900)]
Fix comment in create_failover_script() and create_follow_master_script().

12 years agoAdd regression test case for postgres_fdw.
Tatsuo Ishii [Tue, 25 Jun 2013 07:48:47 +0000 (16:48 +0900)]
Add regression test case for postgres_fdw.

12 years agoRegister pgpool_regclass in pg_catalog schema. This is necessary to
Tatsuo Ishii [Tue, 25 Jun 2013 05:50:31 +0000 (14:50 +0900)]
Register pgpool_regclass in pg_catalog schema.  This is necessary to
deal with clients which restricts schema search path to pg_catalog
only. Postgres_fdw is such a client.

12 years agoMerge branch 'master' of ssh://git.postgresql.org/pgpool2
Tatsuo Ishii [Tue, 25 Jun 2013 05:08:13 +0000 (14:08 +0900)]
Merge branch 'master' of ssh://git.postgresql.org/pgpool2

12 years agoFix to include rpm_installer into tar ball.
Yugo Nagata [Mon, 24 Jun 2013 09:08:42 +0000 (18:08 +0900)]
Fix to include rpm_installer into tar ball.

12 years agoRemove unnecessary file copy
Yugo Nagata [Mon, 24 Jun 2013 08:57:31 +0000 (17:57 +0900)]
Remove unnecessary file copy

12 years agoFix paramater's name in pgpool.conf.sample*
Yugo Nagata [Mon, 24 Jun 2013 08:56:17 +0000 (17:56 +0900)]
Fix paramater's name in pgpool.conf.sample*

12 years agotrivial fix of document
Yugo Nagata [Mon, 24 Jun 2013 03:00:07 +0000 (12:00 +0900)]
trivial fix of document

12 years agoFix spelling error in debug message.
Tatsuo Ishii [Sun, 23 Jun 2013 09:39:54 +0000 (18:39 +0900)]
Fix spelling error in debug message.

12 years agoautoreconf V3_3_0_BETA1
Yugo Nagata [Fri, 21 Jun 2013 12:45:24 +0000 (21:45 +0900)]
autoreconf

12 years agoPrepare 3.3.0-beta1
Yugo Nagata [Fri, 21 Jun 2013 12:43:09 +0000 (21:43 +0900)]
Prepare 3.3.0-beta1

12 years agoFix documents about the previous commit.
Yugo Nagata [Fri, 21 Jun 2013 10:20:05 +0000 (19:20 +0900)]
Fix documents about the previous commit.

12 years agoFix not to bring up virtual IP when delegate_IP parameter is emply.
Yugo Nagata [Fri, 21 Jun 2013 10:14:55 +0000 (19:14 +0900)]
Fix not to bring up virtual IP when delegate_IP parameter is emply.

12 years agoMerge branch 'master' of ssh://git.postgresql.org/pgpool2
Yugo Nagata [Fri, 21 Jun 2013 07:53:36 +0000 (16:53 +0900)]
Merge branch 'master' of ssh://git.postgresql.org/pgpool2

12 years agoPrepare 3.3.0-beta1
Yugo Nagata [Fri, 21 Jun 2013 07:52:45 +0000 (16:52 +0900)]
Prepare 3.3.0-beta1

12 years agoFix not to check pgpools in down status in watchdog life checking
Yugo Nagata [Fri, 21 Jun 2013 05:57:49 +0000 (14:57 +0900)]
Fix not to check pgpools in down status in watchdog life checking

12 years agoAdd info about fix commit.
Tatsuo Ishii [Fri, 21 Jun 2013 02:24:21 +0000 (11:24 +0900)]
Add info about fix commit.

12 years agoMerge branch 'master' of ssh://git.postgresql.org/pgpool2
Yugo Nagata [Thu, 20 Jun 2013 04:46:29 +0000 (13:46 +0900)]
Merge branch 'master' of ssh://git.postgresql.org/pgpool2

12 years agoFix a typo
Yugo Nagata [Thu, 20 Jun 2013 04:45:48 +0000 (13:45 +0900)]
Fix a typo

12 years agoAdd regression test suit.
Tatsuo Ishii [Wed, 19 Jun 2013 06:26:52 +0000 (15:26 +0900)]
Add regression test suit.

This is just a starting point of tests and more tests should be added.

12 years agoMerge branch 'master' of ssh://git.postgresql.org/pgpool2
Tatsuo Ishii [Tue, 18 Jun 2013 06:11:56 +0000 (15:11 +0900)]
Merge branch 'master' of ssh://git.postgresql.org/pgpool2

12 years agoAllow to load balancing in an explicit transaction in replication mode.
Tatsuo Ishii [Tue, 18 Jun 2013 06:03:51 +0000 (15:03 +0900)]
Allow to load balancing in an explicit transaction in replication mode.

The condition to allow the load balancing is as follows:
1) replicate_select is off
2) writing functions are used
3) transaction isolation level is not serializable
4) no DML/DDL are issued in the transaction

12 years agoChinese Manual for pgpool-II 3.3 is ready. Changed a lot about watchdog configuration.
Bambo Huang [Mon, 17 Jun 2013 09:12:19 +0000 (17:12 +0800)]
Chinese Manual for pgpool-II 3.3 is ready. Changed a lot about watchdog configuration.

12 years agoFix to igonre heatbeat signals from pgpool-II in down.
Yugo Nagata [Mon, 17 Jun 2013 08:08:17 +0000 (17:08 +0900)]
Fix to igonre heatbeat signals from pgpool-II in down.

pgpool-II which is already in down should not send heatbeat
signals to other pgpools.

12 years agoFix not to bind sockets to network devices when pgpool-II doesn't has
Yugo Nagata [Mon, 17 Jun 2013 07:28:25 +0000 (16:28 +0900)]
Fix not to bind sockets to network devices when pgpool-II doesn't has
root privilege.

SO_BINDTODEVICE socket option is used for binding sockets to network
devices and requires root privilege. However, this is not essential
for the lifecheck mechanism itself, so we use this function only when
pgpool-II has root privilege.

If pgpool-II has root privilege, log message says like;

    wd_create_hb_recv_socket: bind receive socket to device :eth0

otherwise,

    is_usable_bindtodevice: setsockopt(SO_BINDTODEVICE) requires root privilege
    wd_create_hb_recv_socket: couldn't bind receive socket to device :eth0

12 years agoRemove a unused variable
Yugo Nagata [Mon, 17 Jun 2013 00:52:19 +0000 (09:52 +0900)]
Remove a unused variable

12 years agoAdd configuration of heartbeat_destination_port0.
Yugo Nagata [Mon, 17 Jun 2013 00:47:16 +0000 (09:47 +0900)]
Add configuration of heartbeat_destination_port0.

12 years agoMerge branch 'master' of ssh://git.postgresql.org/pgpool2
Yugo Nagata [Mon, 17 Jun 2013 00:05:11 +0000 (09:05 +0900)]
Merge branch 'master' of ssh://git.postgresql.org/pgpool2

12 years agoFix to allow tow pgpool-II exist in a host when watchdog enabled
Yugo Nagata [Sun, 16 Jun 2013 23:07:40 +0000 (08:07 +0900)]
Fix to allow tow pgpool-II exist in a host when watchdog enabled

New parameter heartbeat_destination_port0 is added. This is a
destination port number for sending heartbeat signals, and usually
the same value of wd_heartbeat_port. If the port number is unusable
, for example, because there are two pgpool-IIs in a host,
heatbeat_destination_port0 must be defferent than wd_heartbeat_port.

12 years agoMerge branch 'master' of ssh://git.postgresql.org/pgpool2
Tatsuo Ishii [Sun, 16 Jun 2013 03:44:54 +0000 (12:44 +0900)]
Merge branch 'master' of ssh://git.postgresql.org/pgpool2

12 years agoAdd to create pgpool_reload script.
Tatsuo Ishii [Sun, 16 Jun 2013 03:43:23 +0000 (12:43 +0900)]
Add to create pgpool_reload script.

12 years agoChinese manual for watchdog up to date.
Bambo Huang [Sat, 15 Jun 2013 11:19:14 +0000 (19:19 +0800)]
Chinese manual for watchdog up to date.

12 years agoAdd Chinese tutorial for watchdog.
Bambo Huang [Sat, 15 Jun 2013 05:33:10 +0000 (13:33 +0800)]
Add Chinese tutorial for watchdog.

12 years agoAdd Chinese tutorial for memqcache
Bambo Huang [Sat, 15 Jun 2013 03:22:23 +0000 (11:22 +0800)]
Add Chinese tutorial for memqcache

12 years agoTutorial for Chinese update to date.
Bambo Huang [Sat, 15 Jun 2013 01:30:30 +0000 (09:30 +0800)]
Tutorial for Chinese update to date.

12 years agoMerge branch 'master' of ssh://git.postgresql.org/pgpool2
Bambo Huang [Fri, 14 Jun 2013 08:38:33 +0000 (16:38 +0800)]
Merge branch 'master' of ssh://git.postgresql.org/pgpool2

12 years agoUpdate Chinese manual to 3.3
Bambo Huang [Fri, 14 Jun 2013 08:37:40 +0000 (16:37 +0800)]
Update Chinese manual to 3.3

12 years agodelete the file
Yugo Nagata [Fri, 14 Jun 2013 07:45:23 +0000 (16:45 +0900)]
delete the file

12 years agoRemove unnecessary sources.
Yugo Nagata [Fri, 14 Jun 2013 07:40:06 +0000 (16:40 +0900)]
Remove unnecessary sources.

12 years agoMerge branch 'master' of ssh://git.postgresql.org/pgpool2
Yugo Nagata [Fri, 14 Jun 2013 07:30:34 +0000 (16:30 +0900)]
Merge branch 'master' of ssh://git.postgresql.org/pgpool2

12 years agoFix bugs in installer including the following:
Yugo Nagata [Fri, 14 Jun 2013 07:05:03 +0000 (16:05 +0900)]
Fix bugs in installer including the following:
 - wrong watchdog settings
 - wrong permission settings
 - missing netmask information in pg_hba.conf
 - missing comma in pgpool.conf

Fix to install pgpool to both of node 0 and node 1.
 - install.sh must be executed in both nodes.
 - This is nesessary for installing pgpool_regclass and
   pgpool_recovery to both nodes.
 - In installation on node 1, configuration information on node 0
   is reused. The information is copied using scp. So, users need
   not input the same information.
 - Passwordless access over ssh is setup in install.sh automatically.
   postgres user must exist in both server before installation.

12 years agoAdd "--no-stop" option.
Tatsuo Ishii [Thu, 13 Jun 2013 05:03:55 +0000 (14:03 +0900)]
Add "--no-stop" option.

This disables shutdown after completing setting up. Usefull when we
want to access right after pgpool_setup. Without this, we need to
execute startall and wait for pgpool-II comes up, which will take
several seconds.

12 years agoFix bug #58, fails to invalidate query cache.
Tatsuo Ishii [Wed, 12 Jun 2013 10:18:20 +0000 (19:18 +0900)]
Fix bug #58, fails to invalidate query cache.

CREATE TABLE t1(i INTEGER);
CREATE TABLE t2(i INTEGER);
SELECT * FROM t1;
BEGIN;
DELETE FROM t2 WHERE i = 0;
INSERT INTO t1(i) VALUES(1);
COMMIT;

SELECT * FROM t1;

At commit pgpool tries to delete cache for t2 but failes because
there's no oid table entry for t2. Problem is, it fails to check oid
table for t1. So cahce for t1 remains and the last SELECT incorrectly
returns cached data. Fix is, continuing to check oid table entries.

12 years agoUpdate copyright year.
Tatsuo Ishii [Mon, 10 Jun 2013 04:57:54 +0000 (13:57 +0900)]
Update copyright year.

12 years agoReplace sleep with psql loop to reduce wait time.
Tatsuo Ishii [Fri, 7 Jun 2013 12:39:14 +0000 (21:39 +0900)]
Replace sleep with psql loop to reduce wait time.

12 years agoPrevious commit broke replication mode case.
Tatsuo Ishii [Fri, 7 Jun 2013 08:29:05 +0000 (17:29 +0900)]
Previous commit broke replication mode case.

12 years agoSpeed up a little bit.
Tatsuo Ishii [Fri, 7 Jun 2013 05:41:16 +0000 (14:41 +0900)]
Speed up a little bit.

Instead of createing all of DB nodes initially, create data0 at first
start pgool. Then add standys to pgpool.conf and reload it. This
avoids sleeping after first failover(was 20 seconds).

12 years agoUpdate copyright year.
Tatsuo Ishii [Fri, 7 Jun 2013 04:20:16 +0000 (13:20 +0900)]
Update copyright year.

12 years agoAdd license section.
Tatsuo Ishii [Wed, 5 Jun 2013 05:42:02 +0000 (14:42 +0900)]
Add license section.

12 years agoFix copyright year of license section.
Tatsuo Ishii [Wed, 5 Jun 2013 05:41:33 +0000 (14:41 +0900)]
Fix copyright year of license section.

12 years agoFix bug with do_query which causes hung in extended protocol.
Tatsuo Ishii [Thu, 30 May 2013 05:49:05 +0000 (14:49 +0900)]
Fix bug with do_query which causes hung in extended protocol.

When insert lock is enabled and pgpool_catalog.insert_lock exists,
pgpool-II looks for the row which matches the oid of the target
table. If non, pgpool-II will insert the row to obtain a row lock.
The bug was in the process looking for the row. If extended protocol
is used, pgpool-II was waiting for the row data forever which will
never come because there's no such a row in the table. The fix is when
"command complete" received, let pgpool-II regards as if "data row"
received. The bug was introduced when 3.2.1 was released. A
reproducable test case is provided by Karsten Düsterloh.  See
[pgpool-general: 1684] for more details.

12 years agoFix unnecessary degeneration caused by error on commit.
Tatsuo Ishii [Sun, 2 Jun 2013 11:35:21 +0000 (20:35 +0900)]
Fix unnecessary degeneration caused by error on commit.

A commit could fail by certain condition including deferred
triggers. If the trigger is related to DML, only the primary fails
because standbys never gets executed such DML in streaming replication
mode. This lead to "kind mismatch error", which causes failover or
session close. This is reported in bug #60, and the reporter claims
that it should not trigger the failover or the session close, rather
continue the session and just report the error on the primary. I think
his complain is fair since in replication mode, such error does not
cause failover or session close. So I make read_kind_from_backend() a
little smarter to not cause failover or session close if only primary
fails on commit in streaming replication mode.

12 years agoTypo fix in the docs
Guillaume Lelarge [Sat, 1 Jun 2013 11:57:34 +0000 (13:57 +0200)]
Typo fix in the docs

12 years agoAdd licence to pgpool docs.
Guillaume Lelarge [Sat, 1 Jun 2013 06:07:20 +0000 (08:07 +0200)]
Add licence to pgpool docs.

12 years agoMerge branch 'master' of ssh://git.postgresql.org/pgpool2
Yugo Nagata [Fri, 31 May 2013 08:20:31 +0000 (17:20 +0900)]
Merge branch 'master' of ssh://git.postgresql.org/pgpool2

12 years agoFix possible deadlock during faiover when using three pgpools with watchdog.
Yugo Nagata [Fri, 31 May 2013 08:11:31 +0000 (17:11 +0900)]
Fix possible deadlock during faiover when using three pgpools with watchdog.

- In interlocking of failover command, wait for contactable master pgpool
  befor assuming lock holder (= command executor) because master pgpool
  decide who should become the lock holder.
- Reject failover request from other pgpool if failover has started alread.

12 years agoAdd new parameter "search_primary_node_timeout".
Tatsuo Ishii [Tue, 28 May 2013 14:23:01 +0000 (23:23 +0900)]
Add new parameter "search_primary_node_timeout".

The parameter specifies the maximum amount of time in seconds to
search for a primary node when a failover scenario occurs. Patch
contributed by Muhammad Usama.  Japanese doc and slight editing of
English doc by Tatsuo Ishii.

12 years agoUpdate for pgpool-II 3.3
Nozomi Anzai [Tue, 28 May 2013 01:49:29 +0000 (10:49 +0900)]
Update for pgpool-II 3.3

12 years agoAdd shell scripts to install pgpool-II and pgpoolAdmin by RPM.
Nozomi Anzai [Tue, 28 May 2013 01:29:23 +0000 (10:29 +0900)]
Add shell scripts to install pgpool-II and pgpoolAdmin by RPM.

To make the installer package execute getsources.sh, and the directory
named "work" will be created. And you rpmbuild each spec files in work/,
put RPMs into work/installer and make tar ball of work/installer.
The installer does not only install RPMs but also edit postgresql.conf,
pgpool.conf, pg_hba.conf, recovery.conf and scripts for failover and
online recovery.

12 years agoFix a bug that wattchdog can use only one network device for heartbeat.
Yugo Nagata [Thu, 23 May 2013 23:29:41 +0000 (08:29 +0900)]
Fix a bug that wattchdog can use only one network device for heartbeat.

12 years agoFix typos.
Yugo Nagata [Thu, 23 May 2013 23:19:06 +0000 (08:19 +0900)]
Fix typos.

12 years agoFix typos of comments & log messages.
Yugo Nagata [Thu, 23 May 2013 06:55:01 +0000 (15:55 +0900)]
Fix typos of comments & log messages.

12 years agoautoreconf V3_3_0_ALPHA1
Yugo Nagata [Fri, 17 May 2013 13:36:14 +0000 (22:36 +0900)]
autoreconf

12 years agoAdd releas note for 3.3.0 alpha1
Yugo Nagata [Fri, 17 May 2013 13:22:10 +0000 (22:22 +0900)]
Add releas note for 3.3.0 alpha1

12 years agoFix typo
Yugo Nagata [Fri, 17 May 2013 07:28:13 +0000 (16:28 +0900)]
Fix typo

12 years agoMerge branch 'master' of ssh://git.postgresql.org/pgpool2
Yugo Nagata [Fri, 17 May 2013 07:25:30 +0000 (16:25 +0900)]
Merge branch 'master' of ssh://git.postgresql.org/pgpool2

12 years agoAdd description about that heartbeat mode is recommended and query mode is deprecated.
Yugo Nagata [Fri, 17 May 2013 07:23:57 +0000 (16:23 +0900)]
Add description about that heartbeat mode is recommended and query mode is deprecated.

12 years agoAdd mention about installing pgpool_regclass using EXTENSION.
Tatsuo Ishii [Fri, 17 May 2013 07:02:11 +0000 (16:02 +0900)]
Add mention about installing pgpool_regclass using EXTENSION.

12 years agoFix typo of documents.
Yugo Nagata [Fri, 17 May 2013 05:54:59 +0000 (14:54 +0900)]
Fix typo of documents.

12 years agoModify release note in pgpool-ja.html
Yugo Nagata [Fri, 17 May 2013 04:49:19 +0000 (13:49 +0900)]
Modify release note in pgpool-ja.html

12 years agoFix typo
Yugo Nagata [Fri, 17 May 2013 04:06:17 +0000 (13:06 +0900)]
Fix typo

12 years agoMerge branch 'master' of ssh://git.postgresql.org/pgpool2
Yugo Nagata [Fri, 17 May 2013 03:11:20 +0000 (12:11 +0900)]
Merge branch 'master' of ssh://git.postgresql.org/pgpool2

12 years agoFix possible deadlock during failover with watchdog enabled
Yugo Nagata [Fri, 17 May 2013 02:56:07 +0000 (11:56 +0900)]
Fix possible deadlock during failover with watchdog enabled

After backend DB failure is detected, degenerate_backend_set() sends a failover
request signal within a semaphore lock. In addition, when watchdog enabled, this
function also sends packets to other pgpools to propagate the failover request.
However, if the other pgpool does the same simultaneously , a deadlock occurs,
because the failover request have to wait for the lock of each other . Responses
of the packets never return, so both pgpools are blocked.

If there are lots of client, the deadlock will occur more frequently because a
lots of simultaneous failover requests and locks will occur.

To resolve it, return the response packet before the failover request is signaled.
Once the response is returned the semaphore is unlocked soon, and deadlock can be
avoided.

This is reported in Bug track #54 by arshu arora
ttp://www.pgpool.net/mantisbt/view.php?id=54

12 years agoMerge branch 'master' of ssh://git.postgresql.org/pgpool2
Tatsuo Ishii [Thu, 16 May 2013 04:17:39 +0000 (13:17 +0900)]
Merge branch 'master' of ssh://git.postgresql.org/pgpool2

12 years agoFix do_query() not to hang when PostgreSQL returns an error.
Tatsuo Ishii [Thu, 16 May 2013 04:08:01 +0000 (13:08 +0900)]
Fix do_query() not to hang when PostgreSQL returns an error.

The typical symptom is "I see SELECT is keep on running according to
pg_stat_activity".  To fix this pgpool-II just exits the process and
kill the existig connection.  This is not gentle but at this point I
believe this is the best solution. Here is an excerpt from source
code:
/*
 * This is fatal. Because: If we operate extended
 * query, backend would not accept subsequent commands
 * until "sync" message issued. However, if sync
 * message issued, unnamed statement/unnamed portal
 * will disappear and will cause lots of problems.  If
 * we do not operate extended query, ongoing
 * transaction is aborted, and subsequent query would
 * not accepted.  In summary there's no transparent
 * way for frontend to handle error case. The only way
 * is closing this session.
 */

12 years agoRemove watchdog/wd_udp.c
Yugo Nagata [Wed, 15 May 2013 07:18:17 +0000 (16:18 +0900)]
Remove watchdog/wd_udp.c
This is renamed to wd_heartbeat.c.

12 years agoMerge branch 'master' of ssh://git.postgresql.org/pgpool2
Yugo Nagata [Wed, 15 May 2013 07:13:52 +0000 (16:13 +0900)]
Merge branch 'master' of ssh://git.postgresql.org/pgpool2

12 years agoRename watchdog options
Yugo Nagata [Wed, 15 May 2013 07:12:58 +0000 (16:12 +0900)]
Rename watchdog options

12 years agoRearrange order of watchdog options
Yugo Nagata [Wed, 15 May 2013 07:07:07 +0000 (16:07 +0900)]
Rearrange order of watchdog options

12 years agoAdd description about watchdog's new feature.
Yugo Nagata [Wed, 15 May 2013 03:20:33 +0000 (12:20 +0900)]
Add description about watchdog's new feature.

12 years agoFix error when pgpool_regclass is not installed.
Tatsuo Ishii [Tue, 14 May 2013 22:46:44 +0000 (07:46 +0900)]
Fix error when pgpool_regclass is not installed.

The query used in pool_has_pgpool_regclass() fails if pgpool_regclass
does not exist. The bug was introduced in 3.2.4.  See [pgpool-general:
1722] for more details.

12 years agoComment out backend1 data. This should have been done before since
Tatsuo Ishii [Tue, 14 May 2013 00:47:53 +0000 (09:47 +0900)]
Comment out backend1 data. This should have been done before since
pgpool.conf.sample has already done this.

12 years agoAdd pgpool_pgctl().
Nozomi Anzai [Mon, 13 May 2013 09:00:30 +0000 (18:00 +0900)]
Add pgpool_pgctl().

12 years agoFix wd_create_send_socket() not to execute select() before connect()
Yugo Nagata [Sun, 12 May 2013 23:12:17 +0000 (08:12 +0900)]
Fix wd_create_send_socket() not to execute select() before connect()

How select() works on an unconnected socket is undefined, and differs
between platform. This returns 2 on Linux and it is eventually harmless.
However, this returns 0 on Solaris and it is indistinguishable from time
timeout.

12 years agoFix error of `make dist' about parser/Makefile.in
Yugo Nagata [Sun, 12 May 2013 23:08:31 +0000 (08:08 +0900)]
Fix error of `make dist' about parser/Makefile.in

12 years agoFix not to execute escalation when the active pgpool receives other
Yugo Nagata [Sun, 12 May 2013 22:54:41 +0000 (07:54 +0900)]
Fix not to execute escalation when the active pgpool receives other
pgpool's server down notification.

12 years agoFix to show new watchdog parameters by SHOW pool_status command.
Yugo Nagata [Sun, 12 May 2013 22:29:51 +0000 (07:29 +0900)]
Fix to show new watchdog parameters by SHOW pool_status command.