pgpool2.git
14 years agoFix timestamp test so that it works.
Toshihiro Kitagawa [Mon, 5 Sep 2011 09:05:50 +0000 (09:05 +0000)]
Fix timestamp test so that it works.

14 years agoPrepare 3.1-RC1. V3_1_0_RC1
Toshihiro Kitagawa [Sun, 4 Sep 2011 06:54:45 +0000 (06:54 +0000)]
Prepare 3.1-RC1.

14 years agoAdd French version of documents.
Toshihiro Kitagawa [Sat, 3 Sep 2011 14:48:48 +0000 (14:48 +0000)]
Add French version of documents.
Contributed by Jean-Paul Argudo.

14 years agoFix double free in rewrite_timestamp_insert().
Toshihiro Kitagawa [Sat, 3 Sep 2011 09:52:31 +0000 (09:52 +0000)]
Fix double free in rewrite_timestamp_insert().
This caused the failure in trigger of regression test.

14 years agoChange directive name in pool_status. flag -> backend_flag.
Toshihiro Kitagawa [Wed, 31 Aug 2011 10:27:17 +0000 (10:27 +0000)]
Change directive name in pool_status. flag -> backend_flag.

14 years agoFix crash of pgpool child when frontend connects if in raw mode,
Toshihiro Kitagawa [Wed, 31 Aug 2011 08:31:23 +0000 (08:31 +0000)]
Fix crash of pgpool child when frontend connects if in raw mode,
enable_hba=off and more than 2 backends.

14 years agoFix memory leak in discard_persistent_db_connection()
Toshihiro Kitagawa [Tue, 30 Aug 2011 11:28:57 +0000 (11:28 +0000)]
Fix memory leak in discard_persistent_db_connection()

14 years agoFix memory leak in string_register_func().
Toshihiro Kitagawa [Tue, 30 Aug 2011 11:02:11 +0000 (11:02 +0000)]
Fix memory leak in string_register_func().

14 years agoFix invalid memory write in add_regex_pattern().
Toshihiro Kitagawa [Mon, 29 Aug 2011 13:03:46 +0000 (13:03 +0000)]
Fix invalid memory write in add_regex_pattern().

14 years agoFix memory leak in free_select_result().
Toshihiro Kitagawa [Mon, 29 Aug 2011 12:44:33 +0000 (12:44 +0000)]
Fix memory leak in free_select_result().

14 years agoChange the handling of sequence functions(nextval, setval) so that they
Toshihiro Kitagawa [Mon, 29 Aug 2011 07:09:50 +0000 (07:09 +0000)]
Change the handling of sequence functions(nextval, setval) so that they
completely obey setting of black/white_function_list.
They were always handled as write functions before. The checking whether
it is a sequence function was verbosity.

14 years agoUpdate pgpool.conf so that pgpoolAdmin could work
Guillaume Lelarge [Thu, 25 Aug 2011 21:04:43 +0000 (21:04 +0000)]
Update pgpool.conf so that pgpoolAdmin could work

14 years agoAdd the current state of the German translation of the manual, should
markus [Wed, 24 Aug 2011 11:24:08 +0000 (11:24 +0000)]
Add the current state of the German translation of the manual, should
match revision 1.100 of pgpool-en.html.

14 years agoPrepare 3.1-beta2. V3_1_0_BETA2
Toshihiro Kitagawa [Tue, 23 Aug 2011 09:39:43 +0000 (09:39 +0000)]
Prepare 3.1-beta2.

14 years agoPrepare 3.1-beta2.
Toshihiro Kitagawa [Tue, 23 Aug 2011 09:25:58 +0000 (09:25 +0000)]
Prepare 3.1-beta2.

14 years agoFix segfault in following scenario:
Tatsuo Ishii [Tue, 23 Aug 2011 04:36:57 +0000 (04:36 +0000)]
Fix segfault in following scenario:
- Add new node in pgpool.conf.
- Reload pgpool.conf. At this point new is in down status.
- Connect using psql and do some query.
- Failback the new node.
- Do another query and pgpool child segfaults.
- Worker child segfaults

To fix this,

- Initialize private_backend_status with MAX_NUM_BACKENDS, rather than
  NUM_BACKENDS.

- Add signal handler to worker process and pcp child process. When a
  failback event occurs, pgpool main sends SIGUSR1 to those processes.

- Those processes set restart request flag and restart whenever
  convenient.

Fix suggested by Gurjeet Singh.

14 years agoFix typo.
Toshihiro Kitagawa [Mon, 22 Aug 2011 07:35:07 +0000 (07:35 +0000)]
Fix typo.

14 years agoRemove "Installing pgpool_walrecrunning" section of pgpool-II manuals.
Toshihiro Kitagawa [Mon, 22 Aug 2011 07:27:51 +0000 (07:27 +0000)]
Remove "Installing pgpool_walrecrunning" section of pgpool-II manuals.
Fix typo.

14 years agoAdd judgement of unlogged table to flow chart.
Toshihiro Kitagawa [Mon, 22 Aug 2011 07:10:47 +0000 (07:10 +0000)]
Add judgement of unlogged table to flow chart.

14 years agoFix send_to_where() so that it correctly recognizes FOR SHARE/UPDATE
Tatsuo Ishii [Thu, 18 Aug 2011 01:27:45 +0000 (01:27 +0000)]
Fix send_to_where() so that it correctly recognizes FOR SHARE/UPDATE
clause even if it's in subquery. Before it only recognized
when the clause was in top level of SELECT. For this new function
pool_has_insertinto_or_locking_clause() is added.

Make pattern_compare() to static since it's not used anywhere outside
of pool_select_walker.c

14 years agoAllow to issue SELECT to unlogged tables in master/slave mode.
Toshihiro Kitagawa [Wed, 17 Aug 2011 12:15:55 +0000 (12:15 +0000)]
Allow to issue SELECT to unlogged tables in master/slave mode.

14 years agoUpdate comments for PostgreSQL 9.1.
Toshihiro Kitagawa [Wed, 17 Aug 2011 09:00:35 +0000 (09:00 +0000)]
Update comments for PostgreSQL 9.1.
is_temp_table() has already supported PostgreSQL 9.1.

14 years agoFix bug which rewriting timestamp of default value fails in PREPARE
Toshihiro Kitagawa [Wed, 17 Aug 2011 07:44:38 +0000 (07:44 +0000)]
Fix bug which rewriting timestamp of default value fails in PREPARE
(non extended protocol case). This used to work but was broken in 3.0.

14 years agoAdd simplified Chinese version of documents.
Tatsuo Ishii [Wed, 17 Aug 2011 04:27:52 +0000 (04:27 +0000)]
Add simplified Chinese version of documents.
Contributed by Huang Jian and Sun Peng.

14 years agoFix typo in a comment.
Tatsuo Ishii [Mon, 15 Aug 2011 02:09:40 +0000 (02:09 +0000)]
Fix typo in a comment.

14 years agoPrepare 3.1-beta1. V3_1_0_BETA1
Toshihiro Kitagawa [Fri, 12 Aug 2011 17:43:05 +0000 (17:43 +0000)]
Prepare 3.1-beta1.

14 years agoFix compiler warnings.
Toshihiro Kitagawa [Fri, 12 Aug 2011 17:40:57 +0000 (17:40 +0000)]
Fix compiler warnings.

14 years agoPrepare 3.1-beta1.
Toshihiro Kitagawa [Fri, 12 Aug 2011 17:18:54 +0000 (17:18 +0000)]
Prepare 3.1-beta1.

14 years agoFix the location which gets the parse tree because it is used after
Toshihiro Kitagawa [Fri, 12 Aug 2011 16:37:22 +0000 (16:37 +0000)]
Fix the location which gets the parse tree because it is used after
the block. This fix is the following continuances:

[Pgpool-committers] pgpool - pgpool-II: It appears that the last commit
 below has problem

14 years agoFix pcp_attach_node command so that it emits error message while
Toshihiro Kitagawa [Fri, 12 Aug 2011 16:27:49 +0000 (16:27 +0000)]
Fix pcp_attach_node command so that it emits error message while
doing failover.

14 years agoFix bug which cannot use the cursors of JDBC driver on standby node.
Toshihiro Kitagawa [Fri, 12 Aug 2011 06:46:04 +0000 (06:46 +0000)]
Fix bug which cannot use the cursors of JDBC driver on standby node.

In master/slave mode, the transaction commands come to be sent to
all nodes by this fix because the cursors of JDBC driver cannot use
without transactions.

But if the transaction command is "BEGIN READ WRITE" or "START TRANSACTION
READ WRITE", pgpool-II sends "BEGIN" instead of it to standby node.
The reason is because standby nodes disallow "READ WRITE" option.

14 years agoRemove unnecessary function arguments.
Toshihiro Kitagawa [Fri, 12 Aug 2011 04:23:21 +0000 (04:23 +0000)]
Remove unnecessary function arguments.

14 years agoEnhance release notes.
Tatsuo Ishii [Thu, 11 Aug 2011 01:48:01 +0000 (01:48 +0000)]
Enhance release notes.

14 years agoEnhance NEWS.
Tatsuo Ishii [Thu, 11 Aug 2011 01:47:41 +0000 (01:47 +0000)]
Enhance NEWS.

14 years agoFix description about backend_weight.
Tatsuo Ishii [Thu, 11 Aug 2011 00:15:12 +0000 (00:15 +0000)]
Fix description about backend_weight.
It can be changed by reloading pgpool.conf.

14 years agoFix typo.
Toshihiro Kitagawa [Mon, 8 Aug 2011 07:08:10 +0000 (07:08 +0000)]
Fix typo.

14 years agoFix insert_lock so that it works correctly even if the table definition
Toshihiro Kitagawa [Mon, 8 Aug 2011 04:24:22 +0000 (04:24 +0000)]
Fix insert_lock so that it works correctly even if the table definition
such as the following:

CREATE TABLE login_log (id integer
    DEFAULT nextval(('"login_log_id_seq"'::text)::regclass) NOT NULL

14 years agoRemove unnecessary log.
Tatsuo Ishii [Sun, 7 Aug 2011 11:05:39 +0000 (11:05 +0000)]
Remove unnecessary log.

14 years agoAdd sr_check_period, sr_check_user and sr_check_password.
Tatsuo Ishii [Sun, 7 Aug 2011 09:52:47 +0000 (09:52 +0000)]
Add sr_check_period, sr_check_user and sr_check_password.
These are used for streaming replication delay checking
and determining primary server.
Also fix get_config() which forget about health_check_password.

14 years agoUpdate and sync those documents.
Tatsuo Ishii [Fri, 5 Aug 2011 10:53:55 +0000 (10:53 +0000)]
Update and sync those documents.

14 years agoAllow to compile against PostgreSQL 9.1.
Tatsuo Ishii [Thu, 28 Jul 2011 07:19:40 +0000 (07:19 +0000)]
Allow to compile against PostgreSQL 9.1.

14 years agoAdd debug info.
Toshihiro Kitagawa [Wed, 27 Jul 2011 04:03:43 +0000 (04:03 +0000)]
Add debug info.
Fix typo in error messages.

14 years agoFix bug with the handling of empty query.
Toshihiro Kitagawa [Wed, 27 Jul 2011 03:32:13 +0000 (03:32 +0000)]
Fix bug with the handling of empty query.

JBoss sends empty queries for checking connections. We decided to replace
the empty query with dummy SELECT command not to affect load balance.
Empty query has been replaced with dummy DELETE command till now.
Note: The dummy command is not sent to backends.
See the following thread for more details:
[Pgpool-general] Confused about JDBC and load balancing

14 years agoAdd Simplified Chinese version of tutorial document
Tatsuo Ishii [Fri, 22 Jul 2011 12:20:47 +0000 (12:20 +0000)]
Add Simplified Chinese version of tutorial document
(doc/tutorial-zh_cn.html)
Contributed by Huang Bambo.

14 years agoUpdate copyright year.
Tatsuo Ishii [Fri, 22 Jul 2011 11:06:41 +0000 (11:06 +0000)]
Update copyright year.

14 years agoSimplified Chinese version of tutorial document.
Tatsuo Ishii [Fri, 22 Jul 2011 11:01:36 +0000 (11:01 +0000)]
Simplified Chinese version of tutorial document.
Contributed by Huang Bambo.

14 years agoFix "Parse: Unable to parse the query:" log message so that it emits
Toshihiro Kitagawa [Fri, 22 Jul 2011 08:53:11 +0000 (08:53 +0000)]
Fix "Parse: Unable to parse the query:" log message so that it emits
the query. It has emitted the prepared statement name till now.

14 years agoMore fix suggested by Huang Bambo.
Tatsuo Ishii [Fri, 22 Jul 2011 00:22:33 +0000 (00:22 +0000)]
More fix suggested by Huang Bambo.

14 years agoIt appears that the last commit below has problem with the case
Tatsuo Ishii [Thu, 21 Jul 2011 23:19:32 +0000 (23:19 +0000)]
It appears that the last commit below has problem with the case
PREPARE(non extended protocol case) raises error, pointed out by
Toshihiro Kitagawa. ReadyForQuery() is changed to call
pool_unset_query_in_progress() whenver query_in_progress is set
(before it was only called when command_success is set).

Subject: [Pgpool-committers] pgpool - pgpool-II: Fix ProcessBackendResponse() so that it calls
From: t-ishii@pgfoundry.org (User T-ishii)
To: pgpool-committers@pgfoundry.org
Date: Wed, 20 Jul 2011 10:41:10 +0000 (UTC)

Log Message:
-----------
Fix ProcessBackendResponse() so that it calls pool_unset_command_success()
rather than pool_set_command_success() when received Error Response.

Modified Files:
--------------
    pgpool-II:
        pool_proto_modules.c (r1.99 -> r1.100)
        (http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pgpool/pgpool-II/pool_proto_modules.c?r1=1.99&r2=1.100)

14 years agoMore fix suggested by Huang Bambo.
Tatsuo Ishii [Thu, 21 Jul 2011 23:01:41 +0000 (23:01 +0000)]
More fix suggested by Huang Bambo.

14 years agoEnhance wording.
Tatsuo Ishii [Thu, 21 Jul 2011 09:16:54 +0000 (09:16 +0000)]
Enhance wording.

14 years agoFix ProcessBackendResponse() so that it calls pool_unset_command_success()
Tatsuo Ishii [Wed, 20 Jul 2011 10:41:10 +0000 (10:41 +0000)]
Fix ProcessBackendResponse() so that it calls pool_unset_command_success()
rather than pool_set_command_success() when received Error Response.

14 years agoMake is_sequence_query, is_start_transaction_query,
Tatsuo Ishii [Mon, 18 Jul 2011 07:33:43 +0000 (07:33 +0000)]
Make is_sequence_query, is_start_transaction_query,
is_strict_query to bool.
These functions have been already treated as bool
from callers and leaving these as int is sloppy.
So I changed these function prototypes.

Rename is_commit_query to is_commit_or_rollback_query.  This is more
appropreate.  Add is_commit_query(returns true if commit query) and
is_rollback_query(returns true if rollback query).

14 years agoPrepare 3.1-alpha3. V3_1_0_ALPHA3
Toshihiro Kitagawa [Wed, 13 Jul 2011 06:10:33 +0000 (06:10 +0000)]
Prepare 3.1-alpha3.

14 years agoPrepare 3.1-alpha3.
Toshihiro Kitagawa [Wed, 13 Jul 2011 04:24:55 +0000 (04:24 +0000)]
Prepare 3.1-alpha3.

14 years agoPrepare 3.1-alpha3.
Toshihiro Kitagawa [Fri, 8 Jul 2011 05:54:01 +0000 (05:54 +0000)]
Prepare 3.1-alpha3.

14 years agoRestructure samples of pgpool.conf.
Toshihiro Kitagawa [Thu, 7 Jul 2011 02:15:37 +0000 (02:15 +0000)]
Restructure samples of pgpool.conf.

- separate "ONLINE RECOVERY" section from "REPLICATION MODE" section
  Because online recovery is used with streaming replication too.
- separate "HEALTH CHECK" and "FAILOVER AND FAILBACK" section from
  "MASTER/SLAVE MODE" section
  Because they are mode-independent.
- add backend_flagN directive.
- add "OTHERS" section for relcache_expire directive.
- rename "CONNECTION POOLING MODE" section to "CONNECTION POOLING"
- rename "PARALLEL AND QUERY CACHE MODE" section to
  "PARALLEL MODE AND QUERY CACHE"
- replace "false" with "off" in comment.

14 years agoAdd health_check_password directive.
Tatsuo Ishii [Wed, 6 Jul 2011 14:00:22 +0000 (14:00 +0000)]
Add health_check_password directive.
Enhance check_replication_time_lag() error message.
Patch contributed by Nicolas Thauvin.

His message:

We are currently not able to specify the password of the health check
user, which is needed at least for streaming replication lag.  So I
added the possibility to specify it in the configuration file, in the
attached patch.

Also, I find the error message in check_replication_time_lag()
(pool_worker_child.c) not friendly :

pool_error("check_replication_time_lag: DB node is valid but no
persistent connection");

What about sending this error message to the debug level and adding a
second message on the error level?  Fro example:

pool_error("check_replication_time_lag: could not connect to DB node %d,
check health check configuration", i);

14 years agoAdd uninstall SQL files to sql/. Patch contributed by
Tatsuo Ishii [Tue, 5 Jul 2011 23:26:02 +0000 (23:26 +0000)]
Add uninstall SQL files to sql/. Patch contributed by
Nicolas Thauvin. Comments from him:

Please find attached uninstall_* SQL files for pgpool-recovery,
pgpool-regclass and pgpool-walrecrunning with the patch for the
Makefiles (against HEAD) needed to add them to PostgreSQL's contrib
directory.

14 years agoAllow to show all process info using pcp_process_info, show pool_pools.
Tatsuo Ishii [Tue, 5 Jul 2011 09:11:00 +0000 (09:11 +0000)]
Allow to show all process info using pcp_process_info, show pool_pools.

  * it refactor "pcp processes info" related code to return all processes
  * info from backend, similar to the "show pool_pools" query
  * add pgpool process PID and backend id fields
  * add the ability to show all these informations from pcp_proc_info
  * command
  * no change to the pcp_proc_info command default behavior
  * new fields are added as last fields in the proc_info command only with
  * the -a switch (both verbose or not)

Patch contributed by Jehan-Guillaume (ioguix) de Rorthais

14 years agoUpdate configure.
Toshihiro Kitagawa [Tue, 5 Jul 2011 05:56:23 +0000 (05:56 +0000)]
Update configure.
It was created in conventional development environment(Vine Linux).

14 years agoFix uninitialized variable in failover() brought by previous commit.
Tatsuo Ishii [Mon, 4 Jul 2011 01:32:59 +0000 (01:32 +0000)]
Fix uninitialized variable in failover() brought by previous commit.

14 years agoFix insert_lock so that it locks pgpool_catalog.insert_lock because
Toshihiro Kitagawa [Fri, 1 Jul 2011 10:47:14 +0000 (10:47 +0000)]
Fix insert_lock so that it locks pgpool_catalog.insert_lock because
new PostgreSQL disallows a row lock against the sequence relation.
Add options for compatibility in configure script:
--enable-sequence-lock  insert_lock compatible with pgpool-II 3.0 series
                        (until 3.0.4)
--enable-table-lock     insert_lock compatible with pgpool-II 2.2 and 2.3
                        series

See following thread for more details:
[Pgpool-hackers] Alternative to locking sequences

14 years agoAdd new per backend directive "flag".
Tatsuo Ishii [Wed, 29 Jun 2011 02:44:13 +0000 (02:44 +0000)]
Add new per backend directive "flag".
This controls per backend behavior. Currently "ALLOW_TO_FAILOVER" or
"DISALLOW_TO_FAILOVER" are allowed.

14 years agoAllow time stamp rewriting to work with arbitrary expression in default
Tatsuo Ishii [Tue, 28 Jun 2011 23:07:41 +0000 (23:07 +0000)]
Allow time stamp rewriting to work with arbitrary expression in default
value of a column. Before we detected anything including now() then
simply replaced it to now(). This will lead to wrong rewriting of
default value. for example, timezone('utc'::text, now()).
Note that, however, this only adopts to simple queries. Extended protocols
(for example Java, PHP PDO) or sql "PREPARE" still remain same.

14 years agoAllow time stamp rewriting to work with arbitrary expression in default
Tatsuo Ishii [Tue, 28 Jun 2011 22:48:26 +0000 (22:48 +0000)]
Allow time stamp rewriting to work with arbitrary expression in default
value of a column. Before we detected anything including now() then
simply replaced it to now(). This will lead to wrong rewriting of
default value. for example, timezone('utc'::text, now()).
Note that, however, this only adopts to simple queries. Extended protocols
(for example Java, PHP PDO) or sql "PREPARE" still remain same.

14 years agopgpool in raw mode is mistaken on alive nodes
Guillaume Lelarge [Tue, 28 Jun 2011 12:31:47 +0000 (12:31 +0000)]
pgpool in raw mode is mistaken on alive nodes

VALID_BACKEND macro in raw mode should not be used. So, we add a specific
check when pgpool is running in raw mode.

14 years ago* add <a name> tags in the release note section
Haruka harukat [Mon, 27 Jun 2011 03:05:47 +0000 (03:05 +0000)]
* add <a name> tags in the release note section

14 years agoAdd pgpool_adm functions. Contributed by Jehan-Guillaume (ioguix) de Rorthais.
Tatsuo Ishii [Thu, 23 Jun 2011 06:38:33 +0000 (06:38 +0000)]
Add pgpool_adm functions. Contributed by Jehan-Guillaume (ioguix) de Rorthais.

14 years agoFix wrong log message of degenerate_backend_set(). Someone forgot to change
Tatsuo Ishii [Wed, 22 Jun 2011 08:40:49 +0000 (08:40 +0000)]
Fix wrong log message of degenerate_backend_set(). Someone forgot to change
the message when doing copy and paste.

14 years agoFix bug which does not rewrite timestamp.
Toshihiro Kitagawa [Tue, 21 Jun 2011 07:24:00 +0000 (07:24 +0000)]
Fix bug which does not rewrite timestamp.
Fix rewrite_timestamp_walker so that it can process 2 cell list.
This used to work but was broken in 3.1.0 alpha2 using 9.0 parser.

Change history of functions to create lists in gram.y:
                SystemFuncName()  SystemTypeName()
8.1.3 original  list_make2()      list_make2()
8.1 import      list_make1()      list_make1()
8.3 import      list_make1()      list_make1()
8.4 import      list_make1()      list_make2()
9.0 import      list_make2()      list_make2()

14 years agoFix comments.
Tatsuo Ishii [Sun, 19 Jun 2011 08:56:38 +0000 (08:56 +0000)]
Fix comments.

14 years agoFix typo.
Toshihiro Kitagawa [Wed, 15 Jun 2011 01:31:27 +0000 (01:31 +0000)]
Fix typo.

14 years agoAdd --username(or -u) option to pg_md5. This allows to manage users
Tatsuo Ishii [Sun, 12 Jun 2011 09:20:33 +0000 (09:20 +0000)]
Add --username(or -u) option to pg_md5. This allows to manage users
which do not have UNIX accounts. Patch contributed by Nicolas Thauvin.
Japanese doc change by Tatsuo Ishii.

14 years agoChange "do_md5: read_password_packet failed" message into debug level.
Toshihiro Kitagawa [Wed, 8 Jun 2011 11:14:26 +0000 (11:14 +0000)]
Change "do_md5: read_password_packet failed" message into debug level.
This error message is emitted if frontends(psql etc.) authenticate
a password, because they might reconnect at the time.

Reason for change:
- PostgreSQL does not emit error messages at the time.
- pgpool-II does not emit error messages when using the other
  authentication methods.

14 years agoFix typo.
Toshihiro Kitagawa [Mon, 6 Jun 2011 08:18:55 +0000 (08:18 +0000)]
Fix typo.

14 years agoRefactor ReadyForQuery(). Create close_standby_transactions() mainly
Tatsuo Ishii [Sun, 5 Jun 2011 23:03:06 +0000 (23:03 +0000)]
Refactor ReadyForQuery(). Create close_standby_transactions() mainly
for cosmetic reason.

14 years agoFix log_per_node_statement so that it prints statements in the extended
Toshihiro Kitagawa [Thu, 26 May 2011 05:37:25 +0000 (05:37 +0000)]
Fix log_per_node_statement so that it prints statements in the extended
query protocol. This used to work but was broken in 3.0.

14 years agoFix typo
Guillaume Lelarge [Wed, 25 May 2011 17:14:24 +0000 (17:14 +0000)]
Fix typo

14 years agoDon't check replication lag if health check is disabled.
Guillaume Lelarge [Mon, 23 May 2011 19:44:00 +0000 (19:44 +0000)]
Don't check replication lag if health check is disabled.

14 years agoFix bug with initializing pool_password in daemon mode.
Tatsuo Ishii [Mon, 23 May 2011 10:55:36 +0000 (10:55 +0000)]
Fix bug with initializing pool_password in daemon mode.
Patch from Nicolas Thauvin.

To: pgpool-hackers@pgfoundry.org
Date: Tue, 17 May 2011 17:08:56 +0200
------------------------------------------------------------------------
When in daemon mode, connection hangs when using md5 authentication
method. The child process in charge of the client goes into an infinite
loop in pool_get_passwd() while trying to read the pool_passwd file.

The cause of the problem comes from the daemonize() function that closes
all file descriptors starting from 3, including the file descriptor of
the pool_passwd file. When pgpool gets to pool_get_passwd, the null
checks on the passwd_fd variable fail because the variable was not reset
to a NULL value.

14 years agobackend status variable name was wrong. Replace the space with a _
Guillaume Lelarge [Mon, 23 May 2011 09:35:01 +0000 (09:35 +0000)]
backend status variable name was wrong. Replace the space with a _

14 years agoFix incorrect error message in pool_process_query().
Tatsuo Ishii [Fri, 13 May 2011 06:53:05 +0000 (06:53 +0000)]
Fix incorrect error message in pool_process_query().
It emits an error message that it timeouted in online recovery
even it is not in online recovery.

14 years agoAdd currval() and lastval() to black_function_list. If they are load
Tatsuo Ishii [Wed, 11 May 2011 01:51:36 +0000 (01:51 +0000)]
Add currval() and lastval() to black_function_list.  If they are load
balanced, currval() or lastval() may be called before the result of
nextval() or setval() is propagated to slaves.

14 years agoFix cancel_request() so that it adopts the change made for 3.1
Tatsuo Ishii [Mon, 9 May 2011 23:37:14 +0000 (23:37 +0000)]
Fix cancel_request() so that it adopts the change made for 3.1
regarding UNIX domain socket name. Before we thought backend_port = ""
meant we should use UNIX domain socket, but now backend_port = "/"
means UNIX domain socket.

14 years agoOops. I removed too much.
Tatsuo Ishii [Fri, 6 May 2011 23:43:26 +0000 (23:43 +0000)]
Oops. I removed too much.

14 years agoRemove unnecessary logging at the end of parsing.
Tatsuo Ishii [Fri, 6 May 2011 22:33:32 +0000 (22:33 +0000)]
Remove unnecessary logging at the end of parsing.

14 years agoFix incorrect calculation of LSN in bytes.
Tatsuo Ishii [Thu, 5 May 2011 02:39:14 +0000 (02:39 +0000)]
Fix incorrect calculation of LSN in bytes.

Change pg_last_xlog_receive_location() to
pg_last_xlog_replay_location() because the latter respects actually
replayed location which will give less chance for clients to have
stale data in standby.

Fix suggested by Anton Yuzhaninov.

14 years agoPrepare 3.1-alpha2. V3_1_0_ALPHA2
Toshihiro Kitagawa [Tue, 3 May 2011 12:19:55 +0000 (12:19 +0000)]
Prepare 3.1-alpha2.

14 years agoPrepare 3.1-alpha2.
Toshihiro Kitagawa [Tue, 3 May 2011 09:18:01 +0000 (09:18 +0000)]
Prepare 3.1-alpha2.

14 years agoEnhance online recovery in streaming replication mode.
Tatsuo Ishii [Mon, 2 May 2011 13:31:25 +0000 (13:31 +0000)]
Enhance online recovery in streaming replication mode.
Now restarting pgpool-II children is avoided when recovery finished.
So existing sessions can be continued while doing online recovery.
For this VALID_BACKEND macro is modified. pgpool-II main looks into
status in shared memory are as it were. pgpool-II child now looks
into local cache space. Pgpool-II child recognizes same number of
backends before failback util existing session ends. Then the
process exits with status 1, so that new process starts, which will
recognizes failback node. For this purpose "need_to_restart" flag
added to ProcessInfo structure.

14 years agoFix failover() so that it does not cause "kind does not match" error.
Toshihiro Kitagawa [Mon, 2 May 2011 12:45:03 +0000 (12:45 +0000)]
Fix failover() so that it does not cause "kind does not match" error.
Add ifdef not to check pgpool_walrecrunning().
Adjust error messages.

14 years agoEnhance online recovery documents in streaming replication.
Tatsuo Ishii [Sun, 1 May 2011 09:41:48 +0000 (09:41 +0000)]
Enhance online recovery documents in streaming replication.

14 years ago- add <a name="..."> tags into all parameter in the pgpool-ii user manual.
Haruka harukat [Tue, 26 Apr 2011 11:33:19 +0000 (11:33 +0000)]
- add <a name="..."> tags into all parameter in the pgpool-ii user manual.

14 years agoAdd pool_process_reporting.h to be installed.
Toshihiro Kitagawa [Tue, 26 Apr 2011 00:44:36 +0000 (00:44 +0000)]
Add pool_process_reporting.h to be installed.

14 years agoFix bug with start_recoery().
Tatsuo Ishii [Mon, 25 Apr 2011 22:58:04 +0000 (22:58 +0000)]
Fix bug with start_recoery().
It calls connect_backend() and then calls PQfinish(NULL) if
connect_backend() returns NULL, which is apparently wrong usage of
PQfinish(). Actually PQfinish() has been called in connect_backend()
in this case.
Also fix typo and enhance error message.

14 years agoAdd libpcp_ext.h to be installed.
Tatsuo Ishii [Mon, 25 Apr 2011 13:56:46 +0000 (13:56 +0000)]
Add libpcp_ext.h to be installed.

14 years agoPrepare 3.1-alpha2.
Toshihiro Kitagawa [Mon, 25 Apr 2011 11:43:02 +0000 (11:43 +0000)]
Prepare 3.1-alpha2.

14 years agoForgot to add pool_process_reporting.h, pcp/pcp_pool_status.c.
Toshihiro Kitagawa [Mon, 25 Apr 2011 11:33:37 +0000 (11:33 +0000)]
Forgot to add pool_process_reporting.h, pcp/pcp_pool_status.c.

14 years agoPrepare 3.1-alpha2.
Toshihiro Kitagawa [Mon, 25 Apr 2011 06:29:36 +0000 (06:29 +0000)]
Prepare 3.1-alpha2.