pgpool2.git
4 years agoPrepare 4.2.0. V4_2_0 V4_2_0_RPM
Bo Peng [Thu, 26 Nov 2020 01:10:28 +0000 (10:10 +0900)]
Prepare 4.2.0.

4 years agoDoc: update release-note.
Bo Peng [Thu, 26 Nov 2020 00:55:23 +0000 (09:55 +0900)]
Doc: update release-note.

4 years agoDoc: update image files.
Bo Peng [Wed, 25 Nov 2020 16:19:34 +0000 (01:19 +0900)]
Doc: update image files.

4 years agoDoc: add documentation of "Pgpool-II on Kubernetes".
Bo Peng [Wed, 25 Nov 2020 15:55:55 +0000 (00:55 +0900)]
Doc: add documentation of "Pgpool-II on Kubernetes".

4 years agoRemoving strerror() call from ereports.
Muhammad Usama [Tue, 24 Nov 2020 16:39:26 +0000 (21:39 +0500)]
Removing strerror() call from ereports.

Call to ereport() resets the errno value and using the "strerror(errno)"
emmits the wrong error message. The right way is to use
%m format specifier instead.
 

4 years agoFix pgpool_setup to extract correct PostgreSQL version.
Bo Peng [Tue, 24 Nov 2020 05:19:48 +0000 (14:19 +0900)]
Fix pgpool_setup to extract correct PostgreSQL version.

4 years agoDoc: fix log_standy_delay description.
Tatsuo Ishii [Fri, 20 Nov 2020 01:10:45 +0000 (10:10 +0900)]
Doc: fix log_standy_delay description.

The description failed to explain actual behavior when
log_standy_delay = always is set. In fact it does not log if the
streaming delay is not greater than 0. Also added that 'none' is the
compiled default. Removed duplicate description in Japanese doc.

Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2020-November/003849.html

4 years agoDoc: add release note.
Bo Peng [Tue, 17 Nov 2020 08:23:53 +0000 (17:23 +0900)]
Doc: add release note.

4 years agoFix query rewrite syntax error of "INSERT ... ON CONFLICT" in native replication...
Bo Peng [Tue, 17 Nov 2020 03:45:37 +0000 (12:45 +0900)]
Fix query rewrite syntax error of "INSERT ... ON CONFLICT" in native replication mode.

per bug 654.

4 years agoDoc: update "Aurora Configuration Example".
Bo Peng [Mon, 16 Nov 2020 15:04:53 +0000 (00:04 +0900)]
Doc: update "Aurora Configuration Example".

4 years agoSuppress a Coverity complain.
Tatsuo Ishii [Thu, 12 Nov 2020 06:23:17 +0000 (15:23 +0900)]
Suppress a Coverity complain.

Cid = 1395058 (Unused value).

4 years agoDoc: fix missing description of pgpool.conf samples.
Bo Peng [Sun, 8 Nov 2020 13:28:25 +0000 (22:28 +0900)]
Doc: fix missing description of pgpool.conf samples.

4 years agoFix connection count when query is canceled.
Tatsuo Ishii [Thu, 29 Oct 2020 20:59:23 +0000 (05:59 +0900)]
Fix connection count when query is canceled.

Connection counter was not counted down when a query is canceled.

Per bug 656.

4 years agoPrepare 4.2beta1. V4_2_0_BETA1 V4_2_0_BETA1_RPM
Bo Peng [Tue, 27 Oct 2020 05:32:09 +0000 (14:32 +0900)]
Prepare 4.2beta1.

4 years agoUpdate Makefile.
Bo Peng [Tue, 27 Oct 2020 05:24:27 +0000 (14:24 +0900)]
Update Makefile.

4 years agoDoc: update release note.
Bo Peng [Tue, 27 Oct 2020 05:04:47 +0000 (14:04 +0900)]
Doc: update release note.

4 years agoDoc: add escalation.sh sample script that is executed by wd_escalation_command.
Bo Peng [Tue, 27 Oct 2020 04:55:46 +0000 (13:55 +0900)]
Doc: add escalation.sh sample script that is executed by wd_escalation_command.

Patch is created by Kawamoto Masaya.

4 years agoUse list_delete_cell instead of list_delete_ptr in some places.
Bo Peng [Mon, 26 Oct 2020 11:08:08 +0000 (20:08 +0900)]
Use list_delete_cell instead of list_delete_ptr in some places.

Patch is created by Hou, Zhijie.

4 years agoDoc: fix incorrect description about load balancing.
Tatsuo Ishii [Sun, 25 Oct 2020 13:12:48 +0000 (22:12 +0900)]
Doc: fix incorrect description about load balancing.

5 years agoDoc: fix typo in release 4.2 doc.
Tatsuo Ishii [Wed, 7 Oct 2020 10:32:07 +0000 (19:32 +0900)]
Doc: fix typo in release 4.2 doc.

Also change supposed-to-be-released month from October to November
because it is more likely to happen.

5 years agoPrepare 4.2alpha1. V4_2_0_ALPHA1
Bo Peng [Tue, 6 Oct 2020 06:09:20 +0000 (15:09 +0900)]
Prepare 4.2alpha1.

5 years agoDisable AM_MAINTAINER_MODE.
Bo Peng [Tue, 6 Oct 2020 05:45:48 +0000 (14:45 +0900)]
Disable AM_MAINTAINER_MODE.

5 years agoDoc: update 4.2 release note.
Bo Peng [Tue, 6 Oct 2020 05:10:44 +0000 (14:10 +0900)]
Doc: update 4.2 release note.

5 years agoDoc: update watchdog related documentation and remove "8.2. Watchdog Configuration...
Bo Peng [Sun, 4 Oct 2020 14:49:33 +0000 (23:49 +0900)]
Doc: update watchdog related documentation and remove "8.2. Watchdog Configuration Example".

5 years agoDoc: mention that GSSAPI is not supported.
Tatsuo Ishii [Sat, 3 Oct 2020 01:29:30 +0000 (10:29 +0900)]
Doc: mention that GSSAPI is not supported.

5 years agoDeal with GSSAPI encrypted connection request from frontend.
Tatsuo Ishii [Sat, 3 Oct 2020 00:09:41 +0000 (09:09 +0900)]
Deal with GSSAPI encrypted connection request from frontend.

If GSSAPI connection request comes from frontend, Pgpool-II responded
in inappropriate way.  For example,

psql: error: could not connect to server: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.

or even:
FATAL:  client authentication failed
DETAIL:  no pool_hba.conf entry for host "x.x.x.x", user "", database "", SSL off
(https://www.pgpool.net/pipermail/pgpool-general/2020-September/007353.html)

With this commit Pgpool-II responds better. i.e. replies back to
frontend with "we don't support GSSAPI" and expects that the frontend
falls back to SSL connection (if frontend's param: gssencmode=prefer
(default) and SSL is configure when Pgpool-II was built) or fals back
to non-SSL connection.

Patch by me, reviewed and tested by Umar Hayat.

5 years agoAdd validation for pgpool_node_id file.
Bo Peng [Thu, 1 Oct 2020 05:22:32 +0000 (14:22 +0900)]
Add validation for pgpool_node_id file.

5 years agoFix test 032.dml_adaptive_load_balance failure.
Bo Peng [Wed, 30 Sep 2020 07:20:35 +0000 (16:20 +0900)]
Fix test 032.dml_adaptive_load_balance failure.

5 years agoDoc: fix index dupication.
Tatsuo Ishii [Wed, 30 Sep 2020 05:10:51 +0000 (14:10 +0900)]
Doc: fix index dupication.

This is caused by former slony mode was written as "native replication
mode".  This is obviously a mistake. Now we use the term "main replica
mode" (slony mode).

5 years agoDoc: fix usable versions of PostgreSQL.
Tatsuo Ishii [Wed, 30 Sep 2020 04:44:20 +0000 (13:44 +0900)]
Doc: fix usable versions of PostgreSQL.

Make usable versions of PostgreSQL to be 7.4 or later.

Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2020-September/003836.html

5 years agoDoc: more language cleanup.
Tatsuo Ishii [Wed, 30 Sep 2020 01:47:36 +0000 (10:47 +0900)]
Doc: more language cleanup.

Replace "マスター" with "メイン".

5 years agoDoc: more language cleanup.
Tatsuo Ishii [Wed, 30 Sep 2020 01:37:28 +0000 (10:37 +0900)]
Doc: more language cleanup.

Replace "フォローマスター" with "フォロープライマリ".

5 years agoFix some language cleanup mistakes.
Tatsuo Ishii [Wed, 30 Sep 2020 00:45:00 +0000 (09:45 +0900)]
Fix some language cleanup mistakes.

5 years agotest case for dml object level load balance support
Muhammad Usama [Tue, 29 Sep 2020 18:31:54 +0000 (23:31 +0500)]
test case for dml object level load balance support

5 years agoFixing for an issue in dml object level load balance support
Muhammad Usama [Tue, 29 Sep 2020 18:30:10 +0000 (23:30 +0500)]
Fixing for an issue in dml object level load balance support

The comparison of objects should be done case insensitive 

5 years agoLogging sample scripts to pgpool stdout
Bo Peng [Fri, 25 Sep 2020 08:12:35 +0000 (17:12 +0900)]
Logging sample scripts to pgpool stdout

5 years agoMore language cleanup.
Tatsuo Ishii [Wed, 23 Sep 2020 09:33:04 +0000 (18:33 +0900)]
More language cleanup.

Patch contributed by Umar Hayat.

5 years agoDoc: update "Pgpool-II + Watchdog Setup Example".
Bo Peng [Tue, 22 Sep 2020 14:02:37 +0000 (23:02 +0900)]
Doc: update "Pgpool-II + Watchdog Setup Example".

5 years agoDoc: update "Pgpool-II + Watchdog Setup Example" and sample scripts.
Bo Peng [Tue, 22 Sep 2020 13:08:18 +0000 (22:08 +0900)]
Doc: update "Pgpool-II + Watchdog Setup Example" and sample scripts.

5 years agoDoc: update 4.2 release notes.
Tatsuo Ishii [Tue, 22 Sep 2020 02:30:33 +0000 (11:30 +0900)]
Doc: update 4.2 release notes.

Add language cleanup and wd_cli. Also fixes are from 4.1.4, rather
than 4.1.3 because 4.1.4 has been released.

5 years agoFix sample config files error.
Bo Peng [Mon, 21 Sep 2020 09:25:59 +0000 (18:25 +0900)]
Fix sample config files error.

5 years agoApply language cleanup mega patch.
Tatsuo Ishii [Thu, 17 Sep 2020 04:41:44 +0000 (13:41 +0900)]
Apply language cleanup mega patch.

black/white_function_list -> write_function_list, read_only_function_list
black_query_pattern -> primay_routing_query_pattern
black/white_memqcache_table_list -> cache_unsafe/cache_safe_table_list

Watchdog: replace master to 'leader' for 'master' watchdog nodes

ALWAYS_MASTER flag is changed to ALWAYS_PRIMARY.

Replace relcache_query_target option 'master' to 'primary'.

Replace Master Node with Main node ( node id with 0 or youngest live ).

Replace follow_master with follow_primary with parameters.

Replace some remaining occurrences of master with primary/main/leader

Patch contributed by: Umar Hayat
Reviewed by me:

5 years agoAdd wd_cli Japanese doc.
Tatsuo Ishii [Wed, 16 Sep 2020 23:44:06 +0000 (08:44 +0900)]
Add wd_cli Japanese doc.

Also small tweaks to English doc.

5 years agoDocumentation update for wd_cli utility
Muhammad Usama [Wed, 16 Sep 2020 13:41:16 +0000 (18:41 +0500)]
Documentation update for wd_cli utility

Few typo fixes are also part of the commit

5 years agoDoc: add more release note.
Bo Peng [Wed, 16 Sep 2020 08:20:46 +0000 (17:20 +0900)]
Doc: add more release note.

5 years agoDoc: fix the incorrect description regarding the running modes of Pgpoo-II in which...
Bo Peng [Wed, 16 Sep 2020 08:01:33 +0000 (17:01 +0900)]
Doc: fix the incorrect description regarding the running modes of Pgpoo-II in which online recovery is available.

5 years agoRefactor show pool_version and pool_processes.
Tatsuo Ishii [Wed, 16 Sep 2020 06:04:26 +0000 (15:04 +0900)]
Refactor show pool_version and pool_processes.

Refactoring by using send_row_description_and_data_rows().

5 years agoRefactor show pool_heath_check_stats.
Tatsuo Ishii [Wed, 16 Sep 2020 05:28:17 +0000 (14:28 +0900)]
Refactor show pool_heath_check_stats.

Refactoring by using send_row_description_and_data_rows().

5 years agoDoc: Add relesae note 3.5.27 - 4.1.4.
Bo Peng [Wed, 16 Sep 2020 01:46:37 +0000 (10:46 +0900)]
Doc: Add relesae note 3.5.27 - 4.1.4.

5 years agoFix coverity issues.
Bo Peng [Tue, 15 Sep 2020 12:53:44 +0000 (21:53 +0900)]
Fix coverity issues.

5 years agoFix compiler warning.
Bo Peng [Mon, 14 Sep 2020 02:46:40 +0000 (11:46 +0900)]
Fix compiler warning.

5 years agoFix Coverity issues.
Bo Peng [Mon, 14 Sep 2020 02:39:04 +0000 (11:39 +0900)]
Fix Coverity issues.

5 years agoFix double free problem in send_row_description_and_data_rows().
Tatsuo Ishii [Mon, 14 Sep 2020 08:14:44 +0000 (17:14 +0900)]
Fix double free problem in send_row_description_and_data_rows().

Pointed out by Coverity.

5 years agoRemove unnecessary checks in some code path.
Tatsuo Ishii [Sun, 13 Sep 2020 23:09:18 +0000 (08:09 +0900)]
Remove unnecessary checks in some code path.

Patch contributed by Hou, Zhijie.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2020-September/003805.html

5 years agoFollow the guide line of PostgreSQL 12.4 regarding extensions.
Tatsuo Ishii [Sun, 13 Sep 2020 11:14:42 +0000 (20:14 +0900)]
Follow the guide line of PostgreSQL 12.4 regarding extensions.

CREATE OR REPLACE FUNCTION should be avoided. Use CREATE FUNCTION instead.

5 years agoDoc: remove unnecessary SQL parser additions in 4.2 release notes.
Tatsuo Ishii [Sun, 13 Sep 2020 06:06:57 +0000 (15:06 +0900)]
Doc: remove unnecessary SQL parser additions in 4.2 release notes.

5 years agoDoc: fix English comment in the 4.2 Japanese release note.
Tatsuo Ishii [Sat, 12 Sep 2020 12:14:35 +0000 (21:14 +0900)]
Doc: fix English comment in the 4.2 Japanese release note.

5 years agoDoc: fix more typo in 4.2 English release note.
Tatsuo Ishii [Sat, 12 Sep 2020 12:13:01 +0000 (21:13 +0900)]
Doc: fix more typo in 4.2 English release note.

5 years agoDoc: fix typo in release notes.
Tatsuo Ishii [Sat, 12 Sep 2020 12:00:56 +0000 (21:00 +0900)]
Doc: fix typo in release notes.

5 years agoAdd Pgpool-II 4.2 English release notes.
Tatsuo Ishii [Sat, 12 Sep 2020 11:52:04 +0000 (20:52 +0900)]
Add Pgpool-II 4.2 English release notes.

5 years agoDoc: Pgpool-II 4.2 release note (Japanese) almost done.
Tatsuo Ishii [Fri, 11 Sep 2020 07:15:03 +0000 (16:15 +0900)]
Doc: Pgpool-II 4.2 release note (Japanese) almost done.

5 years agoUpdate SPEC file to 4.2.
Bo Peng [Thu, 10 Sep 2020 08:49:21 +0000 (17:49 +0900)]
Update SPEC file to 4.2.

5 years agoFix compiler error on some platforms.
Bo Peng [Thu, 10 Sep 2020 05:59:26 +0000 (14:59 +0900)]
Fix compiler error on some platforms.

5 years agoAdd AC_PROG_CC_C99 in configure.ac file and fix build error introduced by commit...
Bo Peng [Wed, 9 Sep 2020 11:43:07 +0000 (20:43 +0900)]
Add AC_PROG_CC_C99 in configure.ac file and fix build error introduced by commit a8cc1e26cc204a49bea47eea05c711a981c17484.

5 years agoFix for coverity issue CID:1430581 Resource leak
Muhammad Usama [Tue, 8 Sep 2020 08:21:03 +0000 (13:21 +0500)]
Fix for coverity issue CID:1430581 Resource leak

5 years agoDoc: add dml-adaptive Japanese doc.
Tatsuo Ishii [Tue, 8 Sep 2020 02:06:45 +0000 (11:06 +0900)]
Doc: add dml-adaptive Japanese doc.

5 years agoDoc: in progress work on 4.2 release note.
Tatsuo Ishii [Mon, 7 Sep 2020 06:25:06 +0000 (15:25 +0900)]
Doc: in progress work on 4.2 release note.

Finish to add enhancements from git log (English).

5 years agoFeature: Import PostgreSQL 13 beta3 new parser.
Bo Peng [Mon, 7 Sep 2020 00:45:29 +0000 (09:45 +0900)]
Feature: Import PostgreSQL 13 beta3 new parser.

Major changes of PostgreSQL 13 parser include:

- Remove an object's dependency on an extension

  ALTER TRIGGER ... NO DEPENDS ON EXTENSION ...
  ALTER FUNCTION ... NO DEPENDS ON EXTENSION ...

- Allow FETCH FIRST to use WITH TIES

  FETCH FIRST ... WITH TIES

- Add ALTER TABLE clause DROP EXPRESSION

  ALTER TABLE ... DROP EXPRESSION

- Allow setting statistics target for extended statistics

  ALTER STATISTICS ... SET STATISTICS

- Allow ALTER VIEW to rename view columns

  ALTER VIEW ... RENAME COLUMN ... TO ...

- Add CREATE DATABASE clause LOCALE option

  CREATE DATABASE ... LOCALE

- Add DROP DATABASE clause WITH FORCE option

  DROP DATABASE ... WITH (force)

- Add VACUUM clause PARALLEL option

  VACUUM (PARALLEL 1) ...

5 years agoFix relcache query sometimes sent to other than primary.
Tatsuo Ishii [Sun, 6 Sep 2020 10:52:56 +0000 (19:52 +0900)]
Fix relcache query sometimes sent to other than primary.

In streaming replication mode, relcache queries are supposed to be
sent to the primary node.  But actually they were not sent the primary
node if primary node was not the master node. Typically this could
happen when the primary is not node 0.

5 years agoDoc: Add "Migration to 4.2" section to 4.2 release note.
Tatsuo Ishii [Fri, 4 Sep 2020 06:10:17 +0000 (15:10 +0900)]
Doc: Add "Migration to 4.2" section to 4.2 release note.

5 years agoDoc: fix 4.1.0 release date.
Tatsuo Ishii [Fri, 4 Sep 2020 04:41:24 +0000 (13:41 +0900)]
Doc: fix 4.1.0 release date.

5 years agoDoc: start to create 4.2 release note.
Tatsuo Ishii [Fri, 4 Sep 2020 04:29:07 +0000 (13:29 +0900)]
Doc: start to create 4.2 release note.

5 years agoDoc: add Pgpool-II/PostgreSQL start/stop etc. documents.
Tatsuo Ishii [Tue, 1 Sep 2020 08:15:14 +0000 (17:15 +0900)]
Doc: add Pgpool-II/PostgreSQL start/stop etc. documents.

5 years agoRemove obsolete use of master_slave_sub_mode.
Tatsuo Ishii [Tue, 1 Sep 2020 07:12:14 +0000 (16:12 +0900)]
Remove obsolete use of master_slave_sub_mode.

Eventually we should remove it from pool_config_variable.c etc. as
well.

5 years agoFix connection_life_time not working when serialize_accept is enabled.
Tatsuo Ishii [Tue, 1 Sep 2020 03:21:50 +0000 (12:21 +0900)]
Fix connection_life_time not working when serialize_accept is enabled.

If serialize_accept is enabled, pgpool child process tries to acquire
semaphore locking so that there's only one process which can issue
accept(2). Unfortunately if connection_life_time is enabled, an alarm
is set right before the semaphore locking. So when the alarm fires,
nothing happened because the process was in acquiring semaphore lock
loop by using pool_semaphore_lock().

To fix this new pool_semaphore_lock_allow_interrupt() is introduced,
which immediately returns if interrupted by a signal. The caller:
wait_for_new_connections() checks whether connection_life_time alarm
is fired. If so, call backend_timer() to close expired backend
connection cache.

Discussion: https://www.pgpool.net/pipermail/pgpool-general/2020-August/007233.html

5 years agoAdd .gitignore files.
Bo Peng [Mon, 31 Aug 2020 01:54:11 +0000 (10:54 +0900)]
Add .gitignore files.

5 years agoDisplay more informative error message in authentication process.
Tatsuo Ishii [Sun, 30 Aug 2020 02:12:09 +0000 (11:12 +0900)]
Display more informative error message in authentication process.

When backends offers mistakenly different authentication methods,
pgpool just showed:

"unable to read message length"
"message length (%d) in slot %d does not match with slot 0(%d)", length, i, length0)));

because pool_read_message_length() called ereport(ERROR) in this
case. Actually the caller pool_do_auth() prepared more informative
message:

ereport(ERROR,
(errmsg("invalid authentication packet from backend"),
 errdetail("failed to get the authentication packet length"),
 errhint("This is likely caused by the inconsistency of auth method among DB nodes. \
Please check the previous error messages (hint: length field) \
from pool_read_message_length and recheck the pg_hba.conf settings.")));

Change ereport(ERROR) to ereport(LOG) in pool_read_message_length() so
that the informative message actually shows up.

5 years agoAdd changes to src/config/pool_config.l and regenerate src/config/pool_config.c.
Bo Peng [Sat, 29 Aug 2020 23:29:38 +0000 (08:29 +0900)]
Add changes to src/config/pool_config.l and regenerate src/config/pool_config.c.
That is missed in previous commit a840ecb2c0aa15448f7fc63a7b0bb46949a9c24f.

5 years agoAdd log_disconnections parameter
Takuma Hoshiai [Mon, 24 Aug 2020 02:09:32 +0000 (11:09 +0900)]
Add log_disconnections parameter

Add log_disconnections parameter like as postgresql. If it enable,
pgpool can log client disconnection and session time.

5 years agoFix occasional 073.pg_terminate_backend test failure.
Tatsuo Ishii [Fri, 21 Aug 2020 23:25:52 +0000 (08:25 +0900)]
Fix occasional 073.pg_terminate_backend test failure.

The test occasionally fails with native replication mode. Let the sleep
before checking connection count a little bit longer to ensure that
the count is properly collected. Also emit timestamp of the counting
so that it actually should collect proper data.

5 years agoFix sefault in pgpool child process in certain case.
Tatsuo Ishii [Fri, 21 Aug 2020 10:51:04 +0000 (19:51 +0900)]
Fix sefault in pgpool child process in certain case.

When all backend go down, pgpool refuses to accept connection from
clients and try to send a message in
validate_backend_connectivity(). For this purpose it connects to the
client and try to read the startup packet. This is done in a PG_TRY
block. The startup packet is read in memory pointed to by "sp", which
is declared as "StartupPacket *volatile". This is fine. But it was
forgotten to initialize the value with NULL. As a result, if reading
startup packet fails, sp would be garbage a pointer and segfaults later
in pool_free_startup_packet(sp).

Fix is, initialize "sp" with NULL.

I have found this accidentally in following way:

1) shutdown all backends.

2) connect to pgpool with invalid client. I have used pcp_attach_node
with pgpool's port number, not pcp's.

5 years agoFix pgpool.spec.
Bo Peng [Wed, 19 Aug 2020 15:26:29 +0000 (00:26 +0900)]
Fix pgpool.spec.

5 years agoAdd missing files by provious commit.
Bo Peng [Wed, 19 Aug 2020 12:38:40 +0000 (21:38 +0900)]
Add missing files by provious commit.

5 years agoReplace "PGBIN" and "LPATH" in pgpool_setup and watchdog_setup using PostgreSQL's...
Bo Peng [Wed, 19 Aug 2020 12:05:11 +0000 (21:05 +0900)]
Replace "PGBIN" and "LPATH" in pgpool_setup and watchdog_setup using PostgreSQL's bin path and lib path.

5 years agoDoc: add release note.
Bo Peng [Tue, 18 Aug 2020 02:07:46 +0000 (11:07 +0900)]
Doc: add release note.

5 years agoDoc: update pgpool_setup's example session.
Tatsuo Ishii [Tue, 18 Aug 2020 04:56:09 +0000 (13:56 +0900)]
Doc: update pgpool_setup's example session.

5 years agoDoc: mention that pgpool_setup needs to configure ssh log into localhost without...
Tatsuo Ishii [Tue, 18 Aug 2020 03:05:58 +0000 (12:05 +0900)]
Doc: mention that pgpool_setup needs to configure ssh log into localhost without password.

5 years agoDoc: fix typo in show_pool_backend_stats.sgml.
Tatsuo Ishii [Tue, 18 Aug 2020 02:57:05 +0000 (11:57 +0900)]
Doc: fix typo in show_pool_backend_stats.sgml.

5 years agoFix 073.pg_terminate_backend test failure.
Tatsuo Ishii [Mon, 17 Aug 2020 08:09:42 +0000 (17:09 +0900)]
Fix 073.pg_terminate_backend test failure.

The test failed because before pg_sleep(10) finished, pgpool shut down.
As a result, connection counting did not have a chance to count down.
Adding proper sleep in the script should fix the problem.

Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2020-August/003766.html

5 years agoDoc: Change sample scripts and yum repository urls.
Bo Peng [Mon, 17 Aug 2020 05:49:12 +0000 (14:49 +0900)]
Doc: Change sample scripts and yum repository urls.

5 years agoUse pg_config to get PostgreSQL lib path and add this path to LD_LIBRARY_PATH environ...
Bo Peng [Mon, 17 Aug 2020 04:46:36 +0000 (13:46 +0900)]
Use pg_config to get PostgreSQL lib path and add this path to LD_LIBRARY_PATH environment paramater in regress.sh.

5 years agoDoc: add description to "show pool_backend_stats".
Tatsuo Ishii [Mon, 17 Aug 2020 00:09:13 +0000 (09:09 +0900)]
Doc: add description to "show pool_backend_stats".

Mention that failed commands are also counted.

5 years agoFix error count stats.
Tatsuo Ishii [Sun, 16 Aug 2020 22:47:11 +0000 (07:47 +0900)]
Fix error count stats.

Unnecessary error count stats collecting route was left in commit:
f04ef82be528c5e5e706f9e2e7231db369427eee.

5 years agoFix pgpool_setup so that native replication mode and SI mode works with PostgreSQL 12.
Tatsuo Ishii [Sat, 15 Aug 2020 09:01:38 +0000 (18:01 +0900)]
Fix pgpool_setup so that native replication mode and SI mode works with PostgreSQL 12.

In these mode, it created recovery.conf which is not allowed in
PostgreSQL 12.

5 years agoFix oversight in connection_life_time fix.
Tatsuo Ishii [Sat, 15 Aug 2020 03:37:39 +0000 (12:37 +0900)]
Fix oversight in connection_life_time fix.

Commit 39eb90fe199d03253b99bec38d85c40f66aa55ab did not consider the case
when node is down connection struct is NULL. As a result, segfault occurred.

5 years agoDoc: add Japanese manual for "show pool_backend_stats".
Tatsuo Ishii [Fri, 14 Aug 2020 12:07:05 +0000 (21:07 +0900)]
Doc: add Japanese manual for "show pool_backend_stats".

5 years agoFix error stats.
Tatsuo Ishii [Fri, 14 Aug 2020 09:00:55 +0000 (18:00 +0900)]
Fix error stats.

Error stats was only collected from Master node. It is possible that
error occurred in multiple backends (for example, in native
replication mode, INSERT is accepted by the parser but target table
does not exist).  Change the place where to collect error stats from
SimpleForwardToFrontend() to read_kind_from_backend().

5 years agoAdd error stats from backend to "show pool_backend_stats" command.
Tatsuo Ishii [Fri, 14 Aug 2020 06:42:58 +0000 (15:42 +0900)]
Add error stats from backend to "show pool_backend_stats" command.

5 years agoCheck panic or fatal error by using 'V' token if available.
Tatsuo Ishii [Fri, 14 Aug 2020 05:15:22 +0000 (14:15 +0900)]
Check panic or fatal error by using 'V' token if available.

To identify panic or fatal message in is_panic_or_fatal_error(), 'S'
token was used.  However 'S' could be localized and simply comparing
"PANIC" or "FATAL" with the message may not work. Instead 'V' should be
used if possible because it's not localized.

5 years agoAdd new show command "show pool_backend_stats".
Tatsuo Ishii [Fri, 14 Aug 2020 04:53:57 +0000 (13:53 +0900)]
Add new show command "show pool_backend_stats".

The new command shows the number SQL commands executed since Pgpool-II
started.

Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2020-July/003754.html