Masaya Kawamoto [Wed, 4 Aug 2021 02:29:42 +0000 (02:29 +0000)]
Fix pcp_unix_domain_path.patch error.
Masaya Kawamoto [Tue, 3 Aug 2021 02:42:12 +0000 (02:42 +0000)]
Prepare 3.7.20
Masaya Kawamoto [Tue, 3 Aug 2021 02:15:44 +0000 (02:15 +0000)]
Add release notes.
Bo Peng [Wed, 14 Jul 2021 14:05:16 +0000 (23:05 +0900)]
Doc: Fix documentation typos.
Tatsuo Ishii [Wed, 7 Jul 2021 04:03:59 +0000 (13:03 +0900)]
Fix query cache to not cache SQLValueFunctions (CURRENT_TIME, CURRENT_USER etc.).
Checking SQLValueFunctions was missed whether to be cached or not and
they were regarded as non function objects. As a result they were
cached.
Also add more test cases.
Tatsuo Ishii [Tue, 6 Jul 2021 23:44:03 +0000 (08:44 +0900)]
Doc: fix typo in in memory query cache document.
Tatsuo Ishii [Thu, 1 Jul 2021 04:41:34 +0000 (13:41 +0900)]
Fix sending invalid message in SI mode.
When a query is aborted by specific reason like serialization error,
Pgpool-II sends error query to abort transactions running on non main
nodes. The message length of the query was incorrect and it caused
"invalid string in message" error on backend.
Tatsuo Ishii [Mon, 28 Jun 2021 05:59:06 +0000 (14:59 +0900)]
Fix rsync parameter in pgpool_setup.
It did not exclude "log" directory, which is the default logging
directory in recent PostgreSQL versions. This made hard to examine
PostgreSQL log, since it is copied from primary server.
Bo Peng [Tue, 22 Jun 2021 02:10:28 +0000 (11:10 +0900)]
Fix indent.
Tatsuo Ishii [Mon, 21 Jun 2021 01:25:49 +0000 (10:25 +0900)]
Fix 031.connection_life_time.
The test script executed pcp_recovery_node but it always failed
because it tried to connect to UNIX domain socket.
Tatsuo Ishii [Thu, 17 Jun 2021 23:03:21 +0000 (08:03 +0900)]
Update Copyright year.
Tatsuo Ishii [Tue, 15 Jun 2021 08:10:54 +0000 (17:10 +0900)]
Fix pgpool_setup in creating base backup script.
Masaya Kawamoto [Wed, 2 Jun 2021 07:53:21 +0000 (07:53 +0000)]
Doc: fix wd_life_point description
The description of the default value was lacked in the Japanese doc.
Tatsuo Ishii [Sat, 29 May 2021 08:32:38 +0000 (17:32 +0900)]
Enhance watchdog_setup script.
shutdownall script generated by watchdog_setup shutdowns in the node
number order i.e.: 0, 1, 2... This causes PostgreSQL backend shutdown
when pgpool0 node went down and node 1, 2... trigger failover event,
which is not necessary in the whole shutdown sequence. Shutting down
in the reverse order (...2, 1, 0) should prevent this and shorten the
whole shutdown sequence.
Also this should prevent occasional 018.detach_primary and
028.watchdog_enable_consensus_with_half_votes test timeout (they use
watchdog_setup).
Tatsuo Ishii [Thu, 27 May 2021 10:15:46 +0000 (19:15 +0900)]
Fix maximum length of hostnames including domain name.
The maximum length of hostnames was 128, which is not incorrect.
Moreover there were multiple places where the maximum length of hostname is defined.
So create unified definition of it in libpcp_ext.h.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2021-May/003904.html
Tatsuo Ishii [Fri, 21 May 2021 23:00:05 +0000 (08:00 +0900)]
Fix watchdog communication race condition.
Watchdog sends information from the watchdog process to the Pgpool-II
main process using SIGUSR1. To pass detailed messages it uses shared
memory area. First it sets a message to the shared memory area then
sends SIGUSR1 to the main process. The main process received the
signal and the signal handler sets a global variable so that
sigusr1_interrupt_processor() processes it. However it is possible
that while sigusr1_interrupt_processor() is running new signal
arrives. In this case the new signal is caught but the global variable
is set to 0 after sigusr1_interrupt_processor() returns. This means
that the new message is not processed until new signal arrives, which
could cause significant delay before the message was processed.
To fix the problem, sigusr1_interrupt_processor() is repeatedly called
until there's no pending message.
Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2021-May/003901.html
Muhammad Usama [Thu, 20 May 2021 12:30:02 +0000 (17:30 +0500)]
Fix for bug:684: Watchdog node status not updating after rebooting.
A node should broadcast its status to the whole cluster after
joining the cluster as standby.
Bo Peng [Wed, 19 May 2021 13:11:46 +0000 (22:11 +0900)]
Prepare 3.7.19.
Bo Peng [Wed, 19 May 2021 12:53:05 +0000 (21:53 +0900)]
Add release notes.
Tatsuo Ishii [Tue, 18 May 2021 02:23:26 +0000 (11:23 +0900)]
Doc: fix typo.
Tatsuo Ishii [Tue, 11 May 2021 05:35:19 +0000 (14:35 +0900)]
Doc: update copyright year.
Tatsuo Ishii [Tue, 11 May 2021 05:26:24 +0000 (14:26 +0900)]
Doc: fix description about heartbeat_device.
It did not mention the parameter can only be used if Pgpool-II started
as root.
Tatsuo Ishii [Wed, 5 May 2021 00:26:58 +0000 (09:26 +0900)]
Fix watchdog_setup to not fail when -n is not specified.
watchdog_setup failed if -n (number of PostgreSQL clusters) is not
specified. Now if -n is not specified, assume "-n = 2", which is same
as in pgpool_setup.
Tatsuo Ishii [Tue, 4 May 2021 21:56:13 +0000 (06:56 +0900)]
Doc: fix typo.
Tatsuo Ishii [Mon, 3 May 2021 07:47:24 +0000 (16:47 +0900)]
Fix pgpool_setup to not show an error.
In the streaming replication mode pgpool_setup showed error:
:
:
recovery node 2...pcp_recovery_node -- Command Successful
done.
creating follow primary script
psql: error: server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
shutdown all
:
:
While creating followers, pgpool_setup confirmed using
wait_for_pgpool_startup that pgpool comes up online except the last
node. This is unnecessary and it should confirm that pgpool comes up
even in the last node.
Tatsuo Ishii [Fri, 30 Apr 2021 10:49:35 +0000 (19:49 +0900)]
Fix watchdog_setup.
watchdog_setup creates database cluster entity under pgpool0. In other
pgpool nodes's pgpool.conf just has the port number for PostgreSQL in
pgpool0. But backend_data_directory remains their own PostgreSQL
cluster. For example:
backend_data_directory0 = '/home/t-ishii/work/Pgpool-II/current/x/pgpool2/data0'
This is fine until online recovery runs. If it referrers to the
database cluster directory, which is not correct of course. Fix this
by replacing database cluster directories with symlinks to
pgppol/data0 and so on. This will reduce disk space.
Tatsuo Ishii [Tue, 20 Apr 2021 04:44:29 +0000 (13:44 +0900)]
Doc: fix compile error.
Tatsuo Ishii [Tue, 20 Apr 2021 00:31:52 +0000 (09:31 +0900)]
Doc: enhance client authentication document.
Mention that pg_md5 command requires --config-file option.
Tatsuo Ishii [Wed, 14 Apr 2021 09:42:09 +0000 (18:42 +0900)]
Revert "Fix regression test 074."
This reverts commit
4c6d044b912e4a5bf459fda9b6154921fc67f59c.
Revert "Add new regression test 074.bug700_memqcache_bug_segfault_at_close_complete which was missed in the previous commit."
This reverts commit
2ad3b9286d9e7f0c9fae3f86b92a26a0f16b880e.
Since V3_7_STABLE does not have pgproto, test 074 which uses pgproto
should not be added.
Tatsuo Ishii [Tue, 13 Apr 2021 04:28:38 +0000 (13:28 +0900)]
Doc: enhance show pool_cache manual.
Add note that not all columns shows meaningful values when cache
storage is memcached.
Tatsuo Ishii [Mon, 12 Apr 2021 03:07:05 +0000 (12:07 +0900)]
Fix regression test 074.
In the test pgproto is used. However the script forgot to specify the
path to the command.
Tatsuo Ishii [Sun, 11 Apr 2021 05:25:31 +0000 (14:25 +0900)]
Add new regression test 074.bug700_memqcache_bug_segfault_at_close_complete which was missed in the previous commit.
The test was missed in commit:
a531e783c90a88ab429d0de83fadb7e41c787a92
Tatsuo Ishii [Fri, 9 Apr 2021 10:32:56 +0000 (19:32 +0900)]
Fix pgpool crash when query cache enabled.
Pgpool-II crashed upon receiving CloseComplete.
This only happened in other than streaming and logical replication mode.
The minimum test case is as follows:
'P' "S1" "SELECT 1" 0
'B' "P1" "S1" 0 0 0
'E' "P1" 0
'C' 'P' "P1"
'B' "P2" "S1" 0 0 0
'E' "P2" 0
'C' 'P' "P2"
'S'
'Y'
'X'
A query statement S1 is bound to portal P1 and P1 is closed. When
CommandComplete message arrives, CloseComplete() discard temp query
cache buffer corresponding to the query context. Unfortunately it
forgot to set NULL to query_context->temp_cache. So whnen next time
other portal P2 which was also bound to S1 is closed, CloseComplete()
tries to free memory which was already freed by previous
CloseComplete. This leads to a segfault.
Fix is set NULL to query_context->temp_cache when the CloseComplete()
is called.
The reason why in streaming and logical replication this does occur
is, unlike other mode, in these mode query_context->temp_cache is
already freed and set to NULL when CommandComplete arrives.
Also new regression test
074.bug700_memqcache_bug_segfault_at_close_complete is added.
Per bug 700.
Tatsuo Ishii [Mon, 5 Apr 2021 02:03:06 +0000 (11:03 +0900)]
Fix that query cache is not created in other than streaming and logical replication mode.
We used to create query cache in ReadyForQuery() in extended query
mode in other than streaming and logical replication mode. However if
following message sequence is sent from frontend, the query cache was
never created because pool_is_cache_safe() returns false in
pool_handle_query_cache(). Why? Because pool_is_cache_safe() examines
the current query context, and the current query context is for "END"
message.
'P' "" "BEGIN" 0
'B' "" "" 0 0 0
'E' "" 0
'P' "S1" "SELECT 1" 0
'B' "S1" "S1" 0 0 0
'E' "S1" 0
'P' "" "END" 0
'B' "" "" 0 0 0
'E' "" 0
'S'
'Y'
'X'
So this commit changes CommandComplete() so that
pool_handle_query_cache() gets called in not only streaming and
logical replication mode. pool_handle_query_cache() will create a
temporary query cache and it will be processed when next time
ReadyForQuery() is called for an END message.
I found the bug while taking care of:
https://www.pgpool.net/mantisbt/view.php?id=700
Note that if the transaction is ended by a simple query message "END",
the bug does not appear because extended query SELECT messages will be
followed by a SYNC message, which will produce a Ready for query
message, and ReadyForQuery() will happily register query cache since
this time pool_is_cache_safe() returns true.
I think this is a long standing bug. The reason why this was not found
earlier is, despite the similar message sequence is created by the JDBC
driver, CommandComplete() already handles in the way described above.
Tatsuo Ishii [Tue, 16 Mar 2021 01:27:22 +0000 (10:27 +0900)]
Enhance debug message upon receiving startup packet.
While processing a startup packet, database name, user name and
application name are printed in DEBUG1, but other guc variables (if
any) were not printed. This is not helpful when studying errors like
"connection exists but startup packet length is not identical" problem
(see https://www.pgpool.net/mantisbt/view.php?id=696). With this
commit guc variables are now printed something like:
2021-03-16 10:21:32: child pid 5155: DEBUG: reading startup packet
2021-03-16 10:21:32: child pid 5155: DETAIL: guc name: client_encoding value: UTF8
Tatsuo Ishii [Sat, 20 Feb 2021 00:49:14 +0000 (09:49 +0900)]
Merge branch 'V3_7_STABLE' of ssh://git.postgresql.org/pgpool2 into V3_7_STABLE
Tatsuo Ishii [Sat, 20 Feb 2021 00:45:16 +0000 (09:45 +0900)]
Doc: enhance pcp_detach_node manual.
Add more detailed description when the command is executed.
Bo Peng [Wed, 17 Feb 2021 09:24:37 +0000 (18:24 +0900)]
Prepare 3.7.18.
Bo Peng [Wed, 17 Feb 2021 03:56:54 +0000 (12:56 +0900)]
Add release note.
Tatsuo Ishii [Sun, 14 Feb 2021 01:17:08 +0000 (10:17 +0900)]
Doc: fix example in pgpool_adm pcp_node_info().
Per commit: https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commit;h=
caf5215479ee7a5b55c1dcdeb00a2fccf0ed7133
Tatsuo Ishii [Sun, 14 Feb 2021 00:41:15 +0000 (09:41 +0900)]
Fix pcp_node_info() in pgpool_adm extension.
The weight info was mistakenly handled by Float8GetDatum although the
function prototype is float4. The oversight made the weight value to 0
or certain insane value. Change it to Float4GetDatum. It is amazing
that nobody (including me) did not notice it until today.
Tatsuo Ishii [Mon, 8 Feb 2021 11:30:18 +0000 (20:30 +0900)]
Fix watchdog leader sync process to start health check process.
When watchdog receives status change request from other watchdog node
and calls sync_backend_from_watchdog() to sync with status of leader
node, it forgot to start health check process. For example,
1) initial pgpool_status file indicates DB node 1 is down.
2) pgpool starts up but only starts health check process for DB node 0
because node 1 is in down status.
3) pcp_attach_node is issued to other than leader pgpool node.
4) leader node updates the node status for DB node 1 and other node
syncs the status. Since sync_backend_from_watchdog() does not start
health check process, only on pgpool leader node starts health
check process but other nodes do not.
To fix this starts health check process if necessary in
sync_backend_from_watchdog().
Tatsuo Ishii [Thu, 4 Feb 2021 02:28:57 +0000 (11:28 +0900)]
Fix that DB cluster path was not correct in watchdog_setup installation.
In the watchdog_setup installation generated path to DB clusters did
not correctly point to pgpool0/data0 etc. Correct them by using sed
command.
Tatsuo Ishii [Wed, 3 Feb 2021 08:01:23 +0000 (17:01 +0900)]
Fix typos in message emitted by sync_backend_from_watchdog().
Tatsuo Ishii [Tue, 2 Feb 2021 14:12:37 +0000 (23:12 +0900)]
Enhance pgpool_setup.
"shutdownall" script unconditionally waited for the pgpool.pid file is
gone after "pgpool stop". But if invalid pgpool.pid file exists, it
waits forever. To avoid this check the exit status of "pgpool stop"
and only wait if the exit status is 0.
Bo Peng [Mon, 1 Feb 2021 15:50:43 +0000 (00:50 +0900)]
Doc: update failover command parameter order.
Tatsuo Ishii [Sun, 24 Jan 2021 02:55:12 +0000 (11:55 +0900)]
Fix pgpool_setup so that it creates separate archive directory for each DB node.
pgpool_setup created single archive directory for all PostgreSQL
nodes. This only works with streaming replication because only the
primary node produces archive log. However for native replication and
snapshot isolation mode this does not work as each node produces WAL.
In this fix dedicated archive directories like archivedir/data0
archivedir/data1 and so on are created.
Tatsuo Ishii [Fri, 22 Jan 2021 04:33:07 +0000 (13:33 +0900)]
Fix pgpool_recovery_pitr generation pgpool_setup.
It generated redundant psql definition line.
Tatsuo Ishii [Thu, 14 Jan 2021 10:38:35 +0000 (19:38 +0900)]
Fix to use proper data type for shared memory size.
pool_shared_memory_create() should use data type size_t for a variable
to store shared memory size. The data type used was int and it would
overflow if the size is big.
Tatsuo Ishii [Wed, 13 Jan 2021 09:49:51 +0000 (18:49 +0900)]
Fix error while allocating shared memory.
If num_init_children * max_pool is huge, pool_coninfo_size() failed to
calculate the size of required shared memory because the data type
used for the variable to store shared memory size was int and it
overflows for too large shared memory size. To fix this change
pool_coninfo_size() to size_t and use appropriate size_t for the
variable used within the function.
Also fix to use proper format qualifier in
pool_shared_memory_create().
Tatsuo Ishii [Fri, 1 Jan 2021 02:29:04 +0000 (11:29 +0900)]
Fix bug child_max_connections is not respected if ERROR occurs.
When frontend aborts, the counter for child_max_connections is rewound
because ereport(ERROR) issues long jump. Fix is declaring the variable
with volatile qualifier. This is a long standing bug, probably since
child_max_connections was introduced.
Bo Peng [Sun, 27 Dec 2020 12:44:00 +0000 (21:44 +0900)]
Doc: fix typos.
Bo Peng [Sun, 27 Dec 2020 12:24:54 +0000 (21:24 +0900)]
Doc: fix typos in docs.
Tatsuo Ishii [Sat, 26 Dec 2020 05:46:31 +0000 (14:46 +0900)]
Doc: fix a few typos in Japanese release notes.
Muhammad Usama [Fri, 25 Dec 2020 18:25:10 +0000 (23:25 +0500)]
Doc: few typo fixes.
Tatsuo Ishii [Tue, 15 Dec 2020 10:38:04 +0000 (19:38 +0900)]
Fix segfault when ALWAYS_PRIMARY is set but DISALLOW_TO_FAILOVER.
If a primary node (for example node 0) has ALWAYS_PRIMARY but does
have DISALLOW_TO_FAILOVER, segfault happens in following step:
1) node 0 stops
2) failover happens. all children restart. The primary node is still 0
because ALWAYS_PRIMARY is set.
2) node 0 starts and it becomes online by using pcp_attach_node.
3) failback process is executed but child process do not restart.
4) child process accesses node 0 because Req_info->primary_node_id is
0 but connection to node 0 does not exist and this causes segfault.
To fix this, do additional check to make sure that failback node is
not former primary node. If it is, do full restart of child process.
Per bug 672.
Tatsuo Ishii [Sun, 13 Dec 2020 02:29:36 +0000 (11:29 +0900)]
Fix segfault in child pgpool process in certain failback case.
When previous primary node id is 0 and then it went down, restarted,
re-attached without promotion. Then existing child process loses
connection slot to node 0 and keeps on using it when node 0 comes
back. This could result in segfault later on in the child process
because there's no connection to node id 0. In summary we need to
restart all pgppol children in this case.
Per bug 672.
Muhammad Usama [Tue, 8 Dec 2020 10:15:50 +0000 (15:15 +0500)]
Delete any pre-existing watchdog command socket file at startup
Abnormal termination of Pgpool leaves behind the dangling socket files
and prevent Pgpool-II from starting up.
The solution is to delete any pre-existing watchdog command socket
file before binding a watchdog command socket.
Patch provided by Masaya Kawamoto
Tatsuo Ishii [Fri, 4 Dec 2020 08:04:30 +0000 (17:04 +0900)]
Fix compiler error on FreeBSD.
Per bug report 670.
https://www.pgpool.net/mantisbt/view.php?id=670
Patch provided by ajs.
Bo Peng [Tue, 24 Nov 2020 05:19:48 +0000 (14:19 +0900)]
Fix pgpool_setup to extract correct PostgreSQL version.
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
Bo Peng [Wed, 18 Nov 2020 05:11:51 +0000 (14:11 +0900)]
Prepare 3.7.17.
Bo Peng [Wed, 18 Nov 2020 05:07:54 +0000 (14:07 +0900)]
Doc: update doc version.
Bo Peng [Tue, 17 Nov 2020 08:23:53 +0000 (17:23 +0900)]
Doc: add release note.
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.
Bo Peng [Tue, 17 Nov 2020 02:11:19 +0000 (11:11 +0900)]
Doc: update "Aurora Configuration Example".
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.
Tatsuo Ishii [Sat, 3 Oct 2020 01:29:30 +0000 (10:29 +0900)]
Doc: mention that GSSAPI is not supported.
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.
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
Bo Peng [Wed, 16 Sep 2020 08:20:46 +0000 (17:20 +0900)]
Doc: add more release note.
Bo Peng [Wed, 16 Sep 2020 08:29:04 +0000 (17:29 +0900)]
Doc: fix the incorrect description regarding the running modes of Pgpoo-II in which online recovery is available.
Bo Peng [Wed, 16 Sep 2020 02:04:53 +0000 (11:04 +0900)]
Prepare 3.7.16.
Bo Peng [Wed, 16 Sep 2020 01:46:37 +0000 (10:46 +0900)]
Doc: Add relesae note 3.5.27 - 4.1.4.
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
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.
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.
Tatsuo Ishii [Tue, 1 Sep 2020 03:40:18 +0000 (12:40 +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
Bo Peng [Mon, 31 Aug 2020 01:56:30 +0000 (10:56 +0900)]
Add .gitignore file.
Tatsuo Ishii [Sun, 30 Aug 2020 02:35:14 +0000 (11:35 +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.
Bo Peng [Mon, 24 Aug 2020 12:39:38 +0000 (21:39 +0900)]
Replace "PGBIN" and "LPATH" in pgpool_setup and watchdog_setup using PostgreSQL's bin path and lib path.
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.
Bo Peng [Thu, 20 Aug 2020 05:51:05 +0000 (14:51 +0900)]
Fix pcp_unix_domain_path.patch error.
Bo Peng [Wed, 19 Aug 2020 15:24:29 +0000 (00:24 +0900)]
Fix pgpool.spec.
Bo Peng [Wed, 19 Aug 2020 12:47:08 +0000 (21:47 +0900)]
Prepare 3.7.15.
Bo Peng [Tue, 18 Aug 2020 02:07:46 +0000 (11:07 +0900)]
Doc: add release note.
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.
Bo Peng [Mon, 17 Aug 2020 07:46:10 +0000 (16:46 +0900)]
Doc: fix indent.
Bo Peng [Mon, 17 Aug 2020 05:58:41 +0000 (14:58 +0900)]
Doc: change repository rpm urls.
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.
Bo Peng [Sun, 16 Aug 2020 04:15:56 +0000 (13:15 +0900)]
Fix pgpool_setup to get correct PostgreSQL version.
Tatsuo Ishii [Sat, 15 Aug 2020 09:14:11 +0000 (18:14 +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.
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.
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.
Bo Peng [Fri, 14 Aug 2020 02:18:25 +0000 (11:18 +0900)]
Fix 031.connection_life_time regression test failure.
Bo Peng [Thu, 13 Aug 2020 06:35:34 +0000 (15:35 +0900)]
Before running regression test clean the remaining processes and sockets.
Tatsuo Ishii [Wed, 12 Aug 2020 11:17:44 +0000 (20:17 +0900)]
Doc: mention that ssl_ciphers only affects to TLS 1.2 and lower.
The changes are imported from PostgreSQL manual.
Bo Peng [Wed, 12 Aug 2020 07:07:04 +0000 (16:07 +0900)]
At pgpool startup, if pid file exists, truncate pid file to zero length before writing.
Patch is created by maliangzhu.
Bo Peng [Tue, 11 Aug 2020 14:58:51 +0000 (23:58 +0900)]
Doc: fix failback_command documetation error.
Bo Peng [Tue, 11 Aug 2020 09:40:34 +0000 (18:40 +0900)]
Make RPMs to include pcp.conf and pool_hba.conf sample files.