Tatsuo Ishii [Sat, 26 Mar 2016 22:49:53 +0000 (07:49 +0900)]
Fix pgpool_setup to not confuse log output
Before it simply redirects the stdout and stderr of pgpool process to
a log file. This could cause log contents being garbled or even
missed because of race condition caused by multiple process being
writing concurrently. I and Usama found this while investigating the
regression failure of 004.watchdog.
To fix this, pgpool_setup now generates startall script so that pgpool
now sends stdout/stderr to cat command and cat writes to the log file
(It seems the race condition does not occur when writing to a pipe).
Tatsuo Ishii [Sat, 19 Mar 2016 02:05:26 +0000 (11:05 +0900)]
Fix installation procedure.
With PostgreSQL 9.4 or later, installing pgpool_regclass is not
needed.
Tatsuo Ishii [Wed, 16 Mar 2016 00:28:38 +0000 (09:28 +0900)]
Change description of backend_flag.
It is pointed out that restarting pgpool-II is not
necessary. [pgpool-general-jp: 1394].
Tatsuo Ishii [Mon, 14 Mar 2016 23:11:36 +0000 (08:11 +0900)]
Fix typo in configure
Patch provided by Thomas Munro.
Muhammad Usama [Mon, 22 Feb 2016 11:42:03 +0000 (16:42 +0500)]
Yet another reset query stuck problem fix. [pgpool-general: 4265]
The solution is to report FRONTEND_ERROR instead of simple ERROR when
pool_flush on front-end socket fails
The patch is generated by me and Pawel Ufnalewski<archon@foap.com> and
Gerhard Wiesinger <lists@wiesinger.com> helped to verify and test the fix
Yugo Nagata [Wed, 17 Feb 2016 08:24:54 +0000 (17:24 +0900)]
Fix previous bronken commit
The following commit was broken and regress test 001 failed.
- Fix memorry leak reported by Coverity (CID
1350095)
Muhammad Usama [Fri, 12 Feb 2016 12:30:10 +0000 (17:30 +0500)]
Fixing pgpool-recovery module compilation issue with PostgreSQL 9.6
Incorporating the change of function signature for GetConfigOption..()
functions in PostgreSQL 9.6
Yugo Nagata [Fri, 12 Feb 2016 06:41:39 +0000 (15:41 +0900)]
Fix memorry leak reported by Coverity (CID
1350095)
Yugo Nagata [Wed, 10 Feb 2016 08:46:05 +0000 (17:46 +0900)]
Fix test/regression/clean.sh to remove binary files of 010.rewrite_timestamp test
Yugo Nagata [Fri, 5 Feb 2016 06:17:33 +0000 (15:17 +0900)]
Prepare 3.4.4
Muhammad Usama [Wed, 3 Feb 2016 12:03:47 +0000 (17:03 +0500)]
Fix a compile issue on freebsd, added missing include files
Yugo Nagata [Tue, 2 Feb 2016 01:36:06 +0000 (10:36 +0900)]
Allow timeout value to be specified by the command option
Yugo Nagata [Mon, 1 Feb 2016 08:58:12 +0000 (17:58 +0900)]
Fix regression test to check timeout of each test
Yugo Nagata [Mon, 1 Feb 2016 06:51:12 +0000 (15:51 +0900)]
Add some warning messages for wd_authkey hash calculation failure
Sometimes wd_authkey calculation fails for some reason other than
authkey mismatch. The additional messages make these distingushable
for each other.
Muhammad Usama [Fri, 29 Jan 2016 04:51:46 +0000 (09:51 +0500)]
Fix for [pgpool-II
0000165]: Performance degradation(x250) while using ipv6
Missing TCP_NODELAY option for ipV6 socket was the reason.
Yugo Nagata [Wed, 27 Jan 2016 08:23:03 +0000 (17:23 +0900)]
Fix regression test 008 & 009 failure in debug mode
Tatsuo Ishii [Wed, 27 Jan 2016 06:32:21 +0000 (15:32 +0900)]
Fix reset query stuck problem.
When pool_read fails to read from frontend or pool_flush fails to
write to the frontend, report FRONTEND_ERROR, rather than ERROR to
disconnect and terminate pgpool child process to prevent the query
stuck problem.
Patch for pool_read by Usama, for pool_flush by Tatsuo.
Yugo Nagata [Thu, 21 Jan 2016 02:16:28 +0000 (11:16 +0900)]
Add test of white/black_memqcache_table_list to regress #006
Tatsuo Ishii [Sun, 17 Jan 2016 12:11:31 +0000 (21:11 +0900)]
Fix bug#156: problem with reloading.
While reloading pgpool.conf, the number of DB nodes is tentatively set
to 0, then counted up until reaching to the actual number of backends
by the pgpool main process. Unfortunately the variable is on the
shared memory and it confuses pgpool child process if they are using
the variable. To solve the problem, a local variable is used to count
up the number of backend. After finishing the counting, the value of
the local variable is assigned to the variable on the shared memory.
I will explain why we don't need interlocking:
1) If the number of backend has not changed before/after the loop,
it's obviously fine.
2) If the number of backend has increased after the loop, the new
backend is recognized as "CON_UNUSED" because all the status for
each backend is set to "CON_UNUSED" beforehand.
3) If the number of backend has decreased after the loop, failover
should have happened and child process should have restarted.
However, we should be careful so that the assignment of the variable
should happen in an atomic manner. For this purpose I change the data
type of the variable from int to sig_atomic_t.
Yugo Nagata [Thu, 14 Jan 2016 04:33:14 +0000 (13:33 +0900)]
Fix white/black_memqcache_table_list not require quotaion
The tables and schemas name specified in *_memqcache_table_list
were needed to be quoted by double quotation since commit
43ff7d3de9db4c8a1143258f4ffff98682dab560. This is fixed
by stripping quote from table name before pattern matching.
Patch contributed by Dang Minh Huong.
Per [pgpool-hackers: 1323]
Yugo Nagata [Wed, 6 Jan 2016 04:08:45 +0000 (13:08 +0900)]
Fix regression test 003.failover for rhel7 postgresql rpm
The expected result of 'show pool_nodes' is fixed to use
PGSOCKET_DIR in hostname column.
Muhammad Usama [Tue, 5 Jan 2016 18:19:21 +0000 (23:19 +0500)]
Fixing the logic issue in get_backends_status() function
get_backends_status () function counts the number of current valid and down
backend nodes. The issue with the function logic was, it assumes the node is
also invalid when its connection status is down, that is not always right.
The commit also fix some log messages
Yugo Nagata [Tue, 5 Jan 2016 08:42:02 +0000 (17:42 +0900)]
Add missing \n in help messages
Yugo Nagata [Mon, 4 Jan 2016 05:29:30 +0000 (14:29 +0900)]
Fix to use saved errno for erreport instead of the direct value
Some system calls are called in errmsg() and errhint(), and
it isn't safe to pass errno directly as an argument. This caused
the confusable log message as below.
DETAIL: connect() reports failure "Success"
Yugo Nagata [Mon, 28 Dec 2015 02:18:08 +0000 (11:18 +0900)]
doc: Add restriction about starting multiple pgpool simultaneously
Tatsuo Ishii [Fri, 25 Dec 2015 08:40:51 +0000 (17:40 +0900)]
Fix to show wrong error.
connect_with_timeout() does not show proper error info when
getsockopt(SO_ERROR) reports an error. Pointed out in bug#159.
Yugo Nagata [Fri, 25 Dec 2015 05:46:46 +0000 (14:46 +0900)]
Fix to use timeout command to handle time out of regress test 062
Yugo Nagata [Tue, 22 Dec 2015 08:47:46 +0000 (17:47 +0900)]
Remove comments for the function that doesn't exist
The source file was imported from postgresql but this
function was removed in pgpool and only the comments remained.
Tatsuo Ishii [Wed, 2 Dec 2015 10:37:14 +0000 (19:37 +0900)]
Fix bug with "SET TRANSACTION READ ONLY".
Pgpool-II remembers that non read only queries (including SET) were
executed in an explicit transaction and adds a "writing transaction"
mark to the transaction. The mark affects the query routing behavior
of pgpool-II while running in streaming replication mode. Pgpool-II
starts sending queries to the primary after the mark is set. Because
the effect of writing queries may appear on standbys after some delay
in streaming replication mode, it is safer to route read queries to
the primary after the mark is set.
However there's oversight here. "SET TRANSACTION READ ONLY" does no
data modification and should be treated as an exception.
Per bug #157.
Muhammad Usama [Wed, 25 Nov 2015 08:11:18 +0000 (13:11 +0500)]
Fix
0000151: Error message has typo - "md5 authentication failed"
Muhammad Usama [Wed, 18 Nov 2015 13:53:01 +0000 (18:53 +0500)]
Fixing [pgpool-II
0000139]: broken arping_cmd
wd_chk_setuid() function was bailing out with the NOTICE message as soon as it
finds the setuid bit is not set on any configured network command and was
ignoring the rest of configurations.
wd_chk_setuid() function name is also changed to wd_check_network_command_configurations()
Muhammad Usama [Wed, 18 Nov 2015 13:31:20 +0000 (18:31 +0500)]
Fixing reset query stuck problem [pgpool-hackers: 1097]
The issue is already fixed in older branches by the
commit id "
cb735f22441001b6afdbb5bac72808db66094ca9", and this fix adopts the
same solution used by 3.3 branch, i.e. closing the backend connection
when client idle limit is reached.
Yugo Nagata [Wed, 11 Nov 2015 07:00:36 +0000 (16:00 +0900)]
Fix previous commit for regression test 055
Yugo Nagata [Tue, 10 Nov 2015 12:28:52 +0000 (21:28 +0900)]
Fix regression test 055 for rhel7 rpm
Yugo Nagata [Mon, 9 Nov 2015 10:32:40 +0000 (19:32 +0900)]
Fix a bug of regress.sh option handling
Yugo Nagata [Mon, 9 Nov 2015 05:20:50 +0000 (14:20 +0900)]
Add missing descriptions about default values to documents
Yugo Nagata [Thu, 5 Nov 2015 17:29:28 +0000 (02:29 +0900)]
Fix the previous commit's echo missing redirect to conf file
Yugo Nagata [Wed, 4 Nov 2015 09:30:20 +0000 (18:30 +0900)]
Add option to regress.sh and pgpool_setup for unix domain socket directory
The new option of regress.sh is -s to specivy unix domain socket
directory. Default is /tmp. And environment variable PGSOCKET_DIR
is added for pgpool_setup
Yugo Nagata [Wed, 4 Nov 2015 07:28:23 +0000 (16:28 +0900)]
Fix pgpool_setup to use DEFAULT_PGSOCKET_DIR in pg_config_manual.h
Some Postgresql rpms define DEFAULT_PGSOCKET_DIR as /tmp, others as
/var/run/postgresql. This affects not only PostgreSQL server but
also libpq and psql.
This is a workaround for regression test. We might have to fix
pgpool-II code to control default value of backend_hostname*.
Yugo Nagata [Wed, 4 Nov 2015 04:56:27 +0000 (13:56 +0900)]
Force pgpool_setup to set unix_socket_directories to '/tmp'
This is a workaround for PostgreSQL RHEL7 RPM, which sets
it to '/var/run/postgresql'.
Tatsuo Ishii [Sat, 31 Oct 2015 00:29:13 +0000 (09:29 +0900)]
Unbreak "make dist".
While removing some directories under src/test, Makefile.am was left
unchaged and "make dist" has been broken since then.
Yugo Nagata [Fri, 30 Oct 2015 09:11:24 +0000 (18:11 +0900)]
Fix possible hang-up of regression test 054.postgres_fdw
In this test, psql acceses foreign table through backend node #1
like folowings:
node #1 (PostgreSQL)-> pgpool -> node #0 (PostgreSQL)
For this purpose, node #1 should be detached from pgpool
to avoid closed loop. However, the node might not be detached yet
just after pcp_detach_node command. This caused the hang-up.
To fix this, sleep 1 is inserted after pcp_detach_node.
Tatsuo Ishii [Thu, 29 Oct 2015 04:23:17 +0000 (13:23 +0900)]
Fix regression test 065.
The path to JDBC driver was explicitly defined. This is wrong. This
should be inherited from JDBC_DRIVER environment variable.
Tatsuo Ishii [Wed, 21 Oct 2015 05:07:30 +0000 (14:07 +0900)]
Add comments to clarify what are the requirements for the script.
Also add "-c" option to rsync to allow check sum checking.
Tatsuo Ishii [Mon, 19 Oct 2015 03:42:41 +0000 (12:42 +0900)]
Fix in memory query cache bug reported in bug#152.
If extended query protocol is used and a bind/execute message arrives
which uses a statement created by prior parse message, the temp_cache
is not initialized by a parse messages. Thus messages are added to pre
existing temp cache buffer which causes the trouble (when the cached
result returns, Data Row message and Command Complete message appeared
*twice*).
Also new regression test is added to check the bug.
Tatsuo Ishii [Fri, 16 Oct 2015 09:18:09 +0000 (18:18 +0900)]
Fix bug reported in bug#145.
The problem occurs when all the condition below are met:
1) pgpool-II 3.4 or later
2) streaming replication mode
3) primary node is also load balance node
4) extended protocol is used
5) client_idle_limit reached
After the extended protocol query finished, the client stays idle. When
client_idle_limit is reached, reset_query_list() is called to send
reset query but it is only sent to the primary node. CommandComplete
message is returned from the primary node. Because
doing_extended_query_message flag remains on, ProcessBackendResponse()
happily resets query_in_progress flag. The ReadyForQuery message
arrives and pgpool-II tries to read the message not only from the
primary but the standby because there's no query context (remember that
the query_in_progress flags is off). Since the standby did not receive
the reset query, it does not respond and pgpool-II hangs here.
The fix is, resetting doing_extended_query_message flag in
reset_query_list().
Note that pgpool-II 3.3 or before does not have the problem since it
disconnects connections to backend right after client_idle_limit is
reached.
Tatsuo Ishii [Fri, 16 Oct 2015 06:06:30 +0000 (15:06 +0900)]
Remove restriction section regarding on disk query cache.
Accidentaly left when on disk query cache was removed.
Tatsuo Ishii [Fri, 16 Oct 2015 06:01:53 +0000 (15:01 +0900)]
Add caution about JDBC driver version regarding app_name_redirect_preference_list.
Tatsuo Ishii [Fri, 16 Oct 2015 05:32:24 +0000 (14:32 +0900)]
Update copyright year.
Yugo Nagata [Thu, 15 Oct 2015 02:48:08 +0000 (11:48 +0900)]
Fix segfalut that occurs when function is used in FROM clause
When a function is used in FROM, the parser makes a RangeFunction
node whose functions member is a list whose last element is NIL.
This caused segfault in foreach loop in _outList().
PRPARE statements in streaming-reaplication mode and INSERT/UPDATE
with SELECT in native-replication mode were affected. For example:
- prepare p as select * from generate_series(1,1);
- insert into tbl select now(), * from generate_series(1,1);
Tatsuo Ishii [Wed, 14 Oct 2015 02:25:51 +0000 (11:25 +0900)]
Fix bugs with data modifying WITH clause reported in bug#153.
pgpool-II does not recognize the data modifying WITH clause despite
pgpool-II 3.3 or after has SQL parser which recognizes it. The bug has
been fixed in pgpool-II 3.5 (having PostgreSQL 9.5 parser).
Data modifying WITH clause was introduced in PostgreSQL 9.1. Since
pgpool-II 3.3 has 9.2 parser and pgpool-II 3.4 has 9.4 parser, the fix
is back ported to pgpool-II 3.3 and 3.4.
Yugo Nagata [Fri, 4 Sep 2015 05:10:39 +0000 (14:10 +0900)]
Fix wrong description in documents about log_standby_delay
Tatsuo Ishii [Thu, 3 Sep 2015 01:28:29 +0000 (10:28 +0900)]
Fix ancient bug of pool_push() and friends.
It allocates buffer using realloc and uses the pointer
returned. However it does the pointer calculation *before* realloc
gets called. So the calculation uses the old pointer value, which
causes various problems including segfault later. It is surprising
that this bug was not found earlier because the bug was there since
the function was added. This is probably due to the fact that actual
pointer moving does not happen until certain amount of memory.
Also there were other problems with it. The buffer pointer and buffer
size variable is not initialized. The buffer is not freed by
pool_close. Typo in debugging message (3.4 or later only). They are
fixed as well.
Tatsuo Ishii [Thu, 27 Aug 2015 04:07:35 +0000 (13:07 +0900)]
Fix regression test driver.
In pgpool-II 3.5, libpcp.a is not compatible with previous ones. This
results in segfault when pcp_recovery_node gets executed if the
command links to older version of the library. Solution is, set
${PGPOOL_INSTALL_DIR}/lib to LD_LIBRARY_PATH so that the command links
proper version of library.
Tatsuo Ishii [Mon, 24 Aug 2015 02:48:59 +0000 (11:48 +0900)]
Fix compiler warning.
Since memqcache_total_size is 64bit integer, the format string should
be %ld, rather than %d.
Yugo Nagata [Fri, 21 Aug 2015 06:39:41 +0000 (15:39 +0900)]
Remove rpm_installer directory
Codes of RPM building and installer are maintained by GitHub.
Yugo Nagata [Fri, 21 Aug 2015 06:05:05 +0000 (15:05 +0900)]
Remove tests directory which are incorporated into regression test
Yugo Nagata [Fri, 21 Aug 2015 04:35:35 +0000 (13:35 +0900)]
Fix typo in Document
Yugo Nagata [Fri, 21 Aug 2015 04:33:33 +0000 (13:33 +0900)]
Fix untranslated sentence in Japanese document
Yugo Nagata [Thu, 20 Aug 2015 06:29:52 +0000 (15:29 +0900)]
Add forgotten Makefile to rewrite-timestamp regress test
Yugo Nagata [Thu, 20 Aug 2015 03:05:55 +0000 (12:05 +0900)]
Add unit test of timestamp rewrite into regession test suite
Yugo Nagata [Wed, 19 Aug 2015 09:53:59 +0000 (18:53 +0900)]
Fix complication error and segfault of timestamp rewrite test
Yugo Nagata [Wed, 19 Aug 2015 08:29:57 +0000 (17:29 +0900)]
Remove a test code
Yugo Nagata [Wed, 19 Aug 2015 07:13:00 +0000 (16:13 +0900)]
Fix inconsistency of sequence values in replication mode
Due to the following commit, table names were always quoted
in queries to check needs for insert lock, whether this is
view, wheter this has default value of timestamp etc. However,
when schema name was provided, table name was quoted wrongly as
like "public.tbl" instead of "public"."tbl". So, pool_regclass
and to_regclass couldn't find right talbe oid and insert lock
was never executed. This caused inconsistency between DB nodes.
In previous codes, quotation marks "" are once remove from
table name returnd by nodeToString, and re-quoted in issued
query. Instead, fixed codes don't remove and use directy in
pgpool_regclass or to_regclass. make_table_from_rangevar()
are also fixed to return table name including quotation marks.
However, when neither pgool_regclass or to_regclass is available,
quotation marks and schema name are removed from table name,
because pg_class.relname is used in this case.
In addition, fix to use to_regclass in insert lock functions
if available.
Yugo Nagata [Wed, 19 Aug 2015 04:11:25 +0000 (13:11 +0900)]
Fix regress test to sleep after pgpool_reload
Some regression tests test behaviors after pgpool-II configuration
is modified and reloaded. However, sometimes these modification
were not applied to pgpool just after reloading.
It was observed after the following commit.
commit
ba24a708ed61d6a5fa296451b194c4b448ed5966
Author: Tatsuo Ishii <ishii@postgresql.org>
Date: Thu Aug 6 13:02:42 2015 +0900
Issue fsync() when writing pgpool_status.
This ensures that pgpool_status is saved to permanent storage and
allow to survive after system crash.
It seem to be because fsync() takes a time before SIGHUP is sent
to child processes in reload_config().
Fix is to add sleep to wait for applying modification after
pgpool_reload.
In addition, some messages are added to test for debugging.
Yugo Nagata [Tue, 18 Aug 2015 10:31:03 +0000 (19:31 +0900)]
Fix broken regression test for native replication
Test for insert lock didn't work.
Yugo Nagata [Tue, 18 Aug 2015 10:25:30 +0000 (19:25 +0900)]
Fix false alert of regression tset 062
Sleep before timedout was too short.
Muhammad Usama [Tue, 18 Aug 2015 12:20:37 +0000 (17:20 +0500)]
Fix reset query stuck problem. (Porting the solution from older branches)
It is reported that reset query (DISCARD ALL etc.) occasionally does not finish
and pgpool child remain waiting for reply from the backend thus client cannot
connect to pgpool (for example http://www.pgpool.net/mantisbt/view.php?id=107).
The cause of problem is not identified yet but if client suddenly closes
connection to pgpool in the middle of query processing, backend may not accept
the reset queries because they are not ready for query.
The fix is to keep track of the status of frontend socket state and not caching
the PostgreSQL connection if the connection to frontend was not properly terminated.
Tatsuo Ishii [Thu, 6 Aug 2015 04:02:42 +0000 (13:02 +0900)]
Issue fsync() when writing pgpool_status.
This ensures that pgpool_status is saved to permanent storage and
allow to survive after system crash.
Tatsuo Ishii [Wed, 5 Aug 2015 06:19:44 +0000 (15:19 +0900)]
Fix misinformation regarding load balancing in docs.
In streaming replication mode, DECLARE, FETCH, CLOSE and SHOW are sent
to primary node only. Pointed out in [pgpool-general-jp: 1378].
Yugo Nagata [Fri, 24 Jul 2015 05:25:58 +0000 (14:25 +0900)]
Prepare 3.4.3
Muhammad Usama [Thu, 9 Jul 2015 11:45:52 +0000 (16:45 +0500)]
Code cleanup: Removing the commented out code line.
Tatsuo Ishii [Thu, 9 Jul 2015 04:13:00 +0000 (13:13 +0900)]
Save pgpool_status to disk each time when it is changed.
Currently pgpool-II does not save pgpool_status file when it's
changed. Instead it saves when pgpool-II explicitly is going
shutdown. This is fine in most cases and it saves slight CPU cycles.
But what if pgpool-II killed abnormally? Or the system forces
pgpool-II to go down by OOM killer? In these cases next pgpool-II
restarting could load obsolete status file.
This fix is a guard against such that situation by saving the
pgpool_status file each time when it's changed.
Tatsuo Ishii [Sun, 21 Jun 2015 09:51:34 +0000 (18:51 +0900)]
Do not send a query for checking insert lock in non replication mode with extended query
This unnecessary code was there since day 0.
Tatsuo Ishii [Sat, 20 Jun 2015 10:03:22 +0000 (19:03 +0900)]
Allow to use in memory query cache size > 4GB
This should have been allowed since in memory query cache was born.
Tatsuo Ishii [Fri, 19 Jun 2015 17:07:30 +0000 (02:07 +0900)]
Add regression test for previous commit.
Tatsuo Ishii [Fri, 19 Jun 2015 16:39:44 +0000 (01:39 +0900)]
Fix the case when user table includes spaces.
For example if table names including space are used (of course using
delimited identifier), pgpool-II cannot be handled correctly by the
internal functions which access system catalogs and it results in SQL
errors. Solution is, to always use delimited identifier. Per bug#136.
Also see [pgpool-general: 3818].
Tatsuo Ishii [Thu, 28 May 2015 23:03:52 +0000 (08:03 +0900)]
Fix "select() system call interrupted" error.
The health check process complains above then
ERROR: failed to make persistent db connection
DETAIL: connection to host:"x.x.x.x:5432 failed
But the healthchek does not trigger fail over nor retrying (if the
retry parameter is configured). So except the annoying message above
everything goes well.
I guess this is caused by SIGCHLD interrupt while select(2) waiting
for completion of connect(2) call. It is likely that pgpool child dies
because of child_life_time. The directive is triggered if child is
idle for specified period. Since this happens independently among each
child process, if num_init_children is big (in the reported case, it
is 2000). So the case could occur more easily if 1) num_init_children
is big and 2) pgpool children go into idle state (no query arrived
from client for child_life_time seconds).
We suppose a system call interruption could occur by SIGALRM which is
set by pgpool to detect time of the connect(2) call if
health_check_timeout is non 0. However we did not think about the case
above.
The fix is, if select(2) is interrupted by a system call, check
health_check_timeout variable and it is not set, we can assume that
the interruption is caused by other than SIGALRM and retries the
select(2).
Original bug report is [pgpool-general: 3756] Connection Interrupted.
Patch created by me. Enhancement from Usama.
Also I got similar report (but on 3.3) from another user. So I will
make similar commit to 3.3 stable tree as well.
Muhammad Usama [Thu, 28 May 2015 12:17:35 +0000 (17:17 +0500)]
Fixing a problem in elog.c when forwarding a message to frontend clients.
Error while forwarding the message to the frontend client can potentially cause
the infinite recursion and terminate the child with ERRORDATA_STACK_SIZE exceeded error.
Fix is to check the recursion depth of send_message_to_frontend() function
and pulling the plug if it is more than two levels deep.
Muhammad Usama [Wed, 27 May 2015 09:14:13 +0000 (14:14 +0500)]
Fixing the misplaced code and rephrasing the log message.
Thanks to Tatsuo for catching the code mistake
Tatsuo Ishii [Wed, 13 May 2015 01:29:14 +0000 (10:29 +0900)]
Fix outdated limitation description about load balancing using JDBC driver.
Even if autocommit is false, load balancing is possible in certain conditions.
Tatsuo Ishii [Mon, 11 May 2015 06:48:26 +0000 (15:48 +0900)]
Clarify description of pcp_promote_node.
It does not actually promote PostgreSQL standby.
Tatsuo Ishii [Mon, 11 May 2015 06:33:15 +0000 (15:33 +0900)]
Clarify load balancing condition.
Muhammad Usama [Thu, 7 May 2015 14:15:06 +0000 (19:15 +0500)]
Downgrading the error level for EOF on backend connection for main process.
Throwing the FATAL error when EOF is encountered with backend is very harsh in
pgpool main process and can cause undesirable behavior.
Downgrading it to simple ERROR.
Tatsuo Ishii [Sat, 2 May 2015 01:46:39 +0000 (10:46 +0900)]
Add debug info to show how much shared memory is allcated.
Muhammad Usama [Thu, 30 Apr 2015 12:26:30 +0000 (17:26 +0500)]
pgpool-II should only use the local definition of snprintf functions if they are not provided by OS.
Fixing a small oversight in the code which was causing the pgpool-II to always
use the local definition of snprintf functions even when the functions are
provided by the host OS.
Muhammad Usama [Wed, 29 Apr 2015 14:13:58 +0000 (19:13 +0500)]
Passing empty string parameters in failover command when pgpool-II does not have a value for any particular parameter
Instead of omitting the values for the parameters when pgpool-II does not have
any value for a particular parameter, It now passes an empty string instead to
the failover command, This makes sure that failover script will always receive
the exact number of expected parameters.
Muhammad Usama [Thu, 23 Apr 2015 10:55:48 +0000 (15:55 +0500)]
Fixing problem with memory cache invalidation
[pgpool-general: 3643] Error in pgpool memory cache invalidation
The internal buffer for storing the table oids needs to be homed in
long living memory context as it has to survive throughout the child life.
Muhammad Usama [Thu, 9 Apr 2015 17:38:59 +0000 (22:38 +0500)]
Fixing "cannot find xlog functions" error in pgpool-recovery
The argument data type of PG's pg_xlogfile_name() function has been changed from
text to pg_lsn since PostgreSQL 9.4. And pgpool-recovery was still trying to
locate the function by old signature.
Yugo Nagata [Wed, 8 Apr 2015 07:51:47 +0000 (16:51 +0900)]
Prepare 3.4.2
Muhammad Usama [Tue, 7 Apr 2015 15:14:26 +0000 (20:14 +0500)]
Fixing a problem with pcp_detach_node, When graceful node detach is requested
gracefully detaching a node by pcp_detach_node should check if it is allowed to
process detach_node command on the particular node before blocking the incoming
connections and closing the existing connections.
Yugo Nagata [Tue, 7 Apr 2015 08:02:45 +0000 (17:02 +0900)]
Update table and flowchart of where a query should be sent
Yugo Nagata [Mon, 30 Mar 2015 07:16:56 +0000 (16:16 +0900)]
Move a test script from test/regression/... to src/test/regression/...
Yugo Nagata [Mon, 30 Mar 2015 07:10:29 +0000 (16:10 +0900)]
Add a regression test for SELECT error hangs bug
The fix commit is:
commit
41ee68c0696bb484d0a68bbc72677b80a15d4410
Author: Yugo Nagata <nagata@sraoss.co.jp>
Date: Mon Mar 30 15:23:32 2015 +0900
Fix a hang when an error occurs in a transaction block with replication mode
Yugo Nagata [Mon, 30 Mar 2015 06:23:32 +0000 (15:23 +0900)]
Fix a hang when an error occurs in a transaction block with replication mode
When an error occurs at a backend node in a transaction block with
replication mode, pgpool-II sends an invalid query to other
backends to sync transaction states. However, previously, this was
not sent to master node, and pgpool-II was waiting for master's
response forever.
This bug is caused to a specification change since 3.3.0 that load
balance is allowed in a transaction block with replication mode.
To fix this, pgpool sends the invalid query to all backends,
including master, except the node which the original query was sent.
Muhammad Usama [Thu, 26 Mar 2015 11:44:58 +0000 (16:44 +0500)]
Fix for segfault, When the pgpool-II child process is reused after
previous session for the same child had exited because of some ERROR.
Thanks to Tatsuo for catching this.
Muhammad Usama [Wed, 25 Mar 2015 14:59:50 +0000 (19:59 +0500)]
Fix for pgpool-II emits a fatal error message when clear text password auth is used.
The problem was introduced in pgpool-II after inclusion of exception manager.
EOF on the frontend connection during client authentication should not be treated
as an error when the password authentication method is used. psql disconnects
from the server in such case to get the password from the terminal,
reconnects and sends the read password to server.
The check-in also enhances the error messages for authentication failures
by concatenating backend errors to pgpool error report.
Tatsuo Ishii [Sat, 21 Mar 2015 00:54:08 +0000 (09:54 +0900)]
Use to_regclass if available in time stamp rewriting in replication mode.
Newer pgpool-II supposed to use to reg_class, but this was
accidentally left.
Muhammad Usama [Wed, 18 Mar 2015 10:21:31 +0000 (15:21 +0500)]
Support SSL certificate chains in the certificate file for incoming frontend connections.
Yugo Nagata [Fri, 6 Mar 2015 08:47:05 +0000 (17:47 +0900)]
Update document of condition for load balancig
Load balancing is possible in an explicit transaction block
even in replication mode since 3.3.0.