Tatsuo Ishii [Sun, 11 Jul 2010 13:53:28 +0000 (13:53 +0000)]
Allow load balancing even in an explicit trasaction.
Tatsuo Ishii [Sun, 11 Jul 2010 13:52:10 +0000 (13:52 +0000)]
Fix main so that pool_config debug out is enabled by command line
optioin -d.
Tatsuo Ishii [Sun, 11 Jul 2010 04:09:06 +0000 (04:09 +0000)]
Now transaction state is managed per backend.
Tatsuo Ishii [Sat, 10 Jul 2010 11:18:28 +0000 (11:18 +0000)]
Now transaction state is per backend.
Change TSTATE macro.
Add new INTERNAL_TRANSACTION_STARTED macro.
Made appropreate changes to other modules.
Tatsuo Ishii [Sat, 10 Jul 2010 11:13:21 +0000 (11:13 +0000)]
Add ifdef not to declare unnessary variable(int dist_num;).
Tatsuo Ishii [Sat, 10 Jul 2010 11:10:35 +0000 (11:10 +0000)]
Add md5 checking in pool_hba.conf.
Also add description about pg_md5's md5 support.
Toshihiro Kitagawa [Fri, 9 Jul 2010 01:14:28 +0000 (01:14 +0000)]
Fix rewrite_timestamp() so that it use PreparedStatement instead of Portal.
Toshihiro Kitagawa [Fri, 9 Jul 2010 01:08:51 +0000 (01:08 +0000)]
Change pool_process_query.c, pool_proto_modules.c and child.c so that
they use session_context and query_context.
Toshihiro Kitagawa [Wed, 30 Jun 2010 00:31:55 +0000 (00:31 +0000)]
Add structures: PreparedStatement, Portal, PreparedStatementList and PortalList.
Add functions to operate these structures.
Toshihiro Kitagawa [Wed, 30 Jun 2010 00:12:11 +0000 (00:12 +0000)]
Add extended query protocol support to pool_send_and_wait().
Toshihiro Kitagawa [Mon, 28 Jun 2010 10:15:33 +0000 (10:15 +0000)]
Fix description about immediate mode of --help.
Toshihiro Kitagawa [Mon, 28 Jun 2010 10:08:58 +0000 (10:08 +0000)]
Forgot to add README.online-recovery.
Tatsuo Ishii [Mon, 28 Jun 2010 09:14:36 +0000 (09:14 +0000)]
Fix bug with session context initialization. To reproduce the bug:
num_init_children = 1
connect as a user
connect as another user and you get a segfault.
Tatsuo Ishii [Sun, 27 Jun 2010 23:18:11 +0000 (23:18 +0000)]
Forgot to add pool_passwd.c pool_passwd.h.
Modulaize pool_passwd update function.
Tatsuo Ishii [Sun, 27 Jun 2010 22:39:34 +0000 (22:39 +0000)]
Add missing header file.
Tatsuo Ishii [Sun, 27 Jun 2010 13:02:57 +0000 (13:02 +0000)]
Implement md5 authentication using pool_passwd.
Still need to rewrite documents and pgpool.config samples.
Tatsuo Ishii [Mon, 21 Jun 2010 05:54:22 +0000 (05:54 +0000)]
Forgot to add new files.
Tatsuo Ishii [Mon, 21 Jun 2010 05:46:57 +0000 (05:46 +0000)]
First cut of standby server lag checking in streaming replication
mode. New directive delay_threshold and log_standby_delay added.
See docs for more details.
Tatsuo Ishii [Sun, 20 Jun 2010 10:31:03 +0000 (10:31 +0000)]
Fix pool_where_to_send in case of SELECT+transaction case.
Tatsuo Ishii [Sun, 20 Jun 2010 07:41:14 +0000 (07:41 +0000)]
Add pool_worker_child.c which implements new worker process
for checking standby lagging in streaming replication.
Also remove unnecessary variables in child.c.
Tatsuo Ishii [Sat, 19 Jun 2010 01:56:11 +0000 (01:56 +0000)]
Remove unnecessary variable.
Tweak comments.
Tatsuo Ishii [Thu, 17 Jun 2010 09:11:17 +0000 (09:11 +0000)]
Add proper header comments.
Use getopt_long, rather than homebrew command analysis routine.
Add --md5auth argument(just a mock up)
Tatsuo Ishii [Mon, 14 Jun 2010 05:29:54 +0000 (05:29 +0000)]
Change next version no. from 2.4-current to 3.0-dev.
Tatsuo Ishii [Sun, 13 Jun 2010 23:53:25 +0000 (23:53 +0000)]
Add description of client_idle_limit_in_recover = -1 case.
Tatsuo Ishii [Fri, 11 Jun 2010 09:24:23 +0000 (09:24 +0000)]
Master/slave + Streaming Replicaton first cut.
Tatsuo Ishii [Fri, 11 Jun 2010 07:07:16 +0000 (07:07 +0000)]
Call pool_query_context_destroy instead of
pool_unset_query_in_progress in ReadyForQuery.
Tatsuo Ishii [Fri, 11 Jun 2010 07:05:11 +0000 (07:05 +0000)]
Make start_load_balance and end_load_balance to empty functions.
Tatsuo Ishii [Fri, 11 Jun 2010 03:46:16 +0000 (03:46 +0000)]
Remove unnessary global variables.
Tatsuo Ishii [Thu, 10 Jun 2010 10:05:32 +0000 (10:05 +0000)]
Fix MASTER* macros not to use global variable in_load_balance.
Tatsuo Ishii [Thu, 10 Jun 2010 06:47:26 +0000 (06:47 +0000)]
Forgot to commit delivered files.
Tatsuo Ishii [Thu, 10 Jun 2010 06:46:37 +0000 (06:46 +0000)]
Unbrake SimpleQuery(). Now it handles master/slave mode correctly.
Tatsuo Ishii [Thu, 10 Jun 2010 06:45:57 +0000 (06:45 +0000)]
Remove unnessary statement. It's now in VALIAD_BACKEND macro.
Tatsuo Ishii [Thu, 10 Jun 2010 06:44:03 +0000 (06:44 +0000)]
Change definition of REPLICATION/MASTER_SLAVE
Do not refer to pool_config->replication_enabled, master_slave_enabled
Tatsuo Ishii [Thu, 10 Jun 2010 06:42:31 +0000 (06:42 +0000)]
Change definition of REPLICATION/MASTER_SLAVE
Do not refer to pool_config->replication_enabled, master_slave_enabled
Tatsuo Ishii [Thu, 10 Jun 2010 01:54:42 +0000 (01:54 +0000)]
Fix comment: pool_status -> pgpool_status
Tatsuo Ishii [Wed, 9 Jun 2010 11:33:48 +0000 (11:33 +0000)]
Fix typo in help message from main program.
Add description about --discard-status to docs.
Fix description about replication_stop_on_mismatch.
Tatsuo Ishii [Wed, 9 Jun 2010 02:03:15 +0000 (02:03 +0000)]
Add -D (--discard-status) argument not to restore previous down status.
Toshihiro Kitagawa [Tue, 8 Jun 2010 08:34:26 +0000 (08:34 +0000)]
Refactor pool_proto_modules.c.
Now it is divided into pool_proto_modules.c and pool_proto2.c.
pool_proto2.c has functions that correspond to protocol 2.0.
Toshihiro Kitagawa [Tue, 8 Jun 2010 05:39:22 +0000 (05:39 +0000)]
Fix pgpool.conf boolean variables to take the same range of string
values as postgresql.conf.
Tatsuo Ishii [Mon, 7 Jun 2010 08:29:44 +0000 (08:29 +0000)]
Add master_slave_sub_mode
Tatsuo Ishii [Sun, 6 Jun 2010 11:14:18 +0000 (11:14 +0000)]
Remove in_progress global variable.
Tatsuo Ishii [Sun, 6 Jun 2010 10:17:32 +0000 (10:17 +0000)]
To avoid direct access to stream buffer from abstraction point of
view, add two macros:
#define pool_read_buffer_is_empty(connection)
#define pool_discard_read_buffer(connection)
Tatsuo Ishii [Fri, 4 Jun 2010 07:39:42 +0000 (07:39 +0000)]
Add query context module.
Tatsuo Ishii [Thu, 3 Jun 2010 05:48:46 +0000 (05:48 +0000)]
MAX_CONNECTION_SLOTS should be equal to MAX_NUM_BACKENDS.
Tatsuo Ishii [Wed, 2 Jun 2010 10:06:51 +0000 (10:06 +0000)]
Refactoring simpleQuery part 1. Move some parallel query processing
to pool_rewrite_query.c.
Also fix sloppy coding (no "#ifdef...") of pool_rewrite_query.h.
Tatsuo Ishii [Wed, 2 Jun 2010 10:04:37 +0000 (10:04 +0000)]
Fix typo.
Tatsuo Ishii [Wed, 2 Jun 2010 09:23:22 +0000 (09:23 +0000)]
Remove LocalSessionId, which is not neccessary any more.
Tatsuo Ishii [Wed, 2 Jun 2010 08:51:19 +0000 (08:51 +0000)]
Add session context module.
Tatsuo Ishii [Wed, 2 Jun 2010 06:52:34 +0000 (06:52 +0000)]
Introduce process context module
Tatsuo Ishii [Wed, 2 Jun 2010 02:05:48 +0000 (02:05 +0000)]
Make system DB connection initialize process to static function.
Refactoring effort.
Tatsuo Ishii [Tue, 1 Jun 2010 09:25:37 +0000 (09:25 +0000)]
Change ProcessInfo pids -> ProcessInfo process_info.
The former name was too generic.
Tatsuo Ishii [Tue, 1 Jun 2010 09:03:00 +0000 (09:03 +0000)]
Create pool_config.h and move pool_config.l related declarations there.
Tatsuo Ishii [Mon, 31 May 2010 07:08:30 +0000 (07:08 +0000)]
Add pool_stream,h
Move function declarations of pool_stream.c to pool_stream.h
Tatsuo Ishii [Mon, 31 May 2010 06:58:29 +0000 (06:58 +0000)]
Fix to add linking neccesary libraries when SSL enabled.
Tatsuo Ishii [Sun, 30 May 2010 03:42:25 +0000 (03:42 +0000)]
Fix to add linking neccesary libraries when SSL enabled.
Tatsuo Ishii [Thu, 27 May 2010 06:17:56 +0000 (06:17 +0000)]
Add C test program
Tatsuo Ishii [Wed, 26 May 2010 07:59:58 +0000 (07:59 +0000)]
Remove following unsed entry.
int current_slot; /* current backend slot # */
Tatsuo Ishii [Wed, 26 May 2010 06:32:34 +0000 (06:32 +0000)]
Improve documentation about num_init_children.
Tatsuo Ishii [Wed, 26 May 2010 06:21:25 +0000 (06:21 +0000)]
Refactoring pool.h
- Remove long standing comment out lines
- Move pool_relcache.c pool_lobj extern declarations to separate
header files
Tatsuo Ishii [Mon, 24 May 2010 07:25:35 +0000 (07:25 +0000)]
Fix bug with pcp_check_fd()'s timeout handling.
Per erboles.
Subject: [Pgpool-general] question about pcp_check_fd
Date: Sun, 23 May 2010 18:21:41 -0500
To: pgpool <pgpool-general@pgfoundry.org>
Tatsuo Ishii [Wed, 19 May 2010 19:08:43 +0000 (19:08 +0000)]
Fix SSL connection sometimes hung if lots of data read from backend.
This is caused by the buffering in OpenSSL layer. To fix the problem,
we check the buffer has any pending data by using SSL_pending() before
calling select(2).
See thread [Pgpool-general] Fwd: PGPOOL II 2.3.3 hang in ssl mode for
more details.
Guillaume Lelarge [Sun, 16 May 2010 12:37:53 +0000 (12:37 +0000)]
Add support for long options.
Tatsuo Ishii [Sun, 16 May 2010 08:38:16 +0000 (08:38 +0000)]
Subject: Re: [Pgpool-general] pg_terminate_backend triggers failover on pgpool when used as standalone pool
From: Tatsuo Ishii
Date: Wed, 12 May 2010 22:08:31 +0900 (JST)
It seems the problem occurs when there's only one DB node.
1) it tries to failover to non existing node
2) it makes the node into down status which might not what you want.
#1 is purely a bug. I fix this and for #2 I'm leaning to change
existing behavior.
- In row mode and if there's only one DB node, if a problem occurs
with the DB node, it will be brought to down status. However if the
DB node goes into good condition again, you can use the DB node
without restarting pgpool.
- In other mode the behavior is not changed.
Tatsuo Ishii [Wed, 12 May 2010 09:02:22 +0000 (09:02 +0000)]
Fix typo for supporting debug_level
Tatsuo Ishii [Wed, 12 May 2010 04:58:13 +0000 (04:58 +0000)]
Add new directive "debug_level" to be able to turn on/off debug
messages on the fly. Although it is possible to assign 1 more integer
to specify vervosity, currently there is no infrastracture to make it
reality. Probably we will add new api pool_debug2, pool_debug3... for
this purpose later on.
Also I make the debug message control global variable "debug" for pcp
commands only. This means pgpool -d does not show debug messages from
pcp anymore. This is neccessary to prevengt from generating
meaningless, annoying debug messages by pcp when health checking is
turned on. It might be worth to add another command option to pgpool
so that pcp generates debug messages, but I'm not sure.
Toshihiro Kitagawa [Mon, 10 May 2010 09:35:45 +0000 (09:35 +0000)]
Fix SimpleForwardToFrontend() so that it reset select_in_transaction flag
and execute_select flag when bind error occurred while executing SELECT.
Tatsuo Ishii [Fri, 23 Apr 2010 06:53:19 +0000 (06:53 +0000)]
Add missing file
Tatsuo Ishii [Thu, 22 Apr 2010 08:10:38 +0000 (08:10 +0000)]
Fix compiler warnings. Patch contributed by Takahiro Itagaki.
Tatsuo Ishii [Tue, 20 Apr 2010 04:43:13 +0000 (04:43 +0000)]
Prepare 2.3.3
Tatsuo Ishii [Sun, 18 Apr 2010 13:43:36 +0000 (13:43 +0000)]
Allow to use -1 for client_idle_limit_in_recovery. This forces to
immediately disconnect clients even if they are not idle before
entering online recovery second stage. This is usefull for busy
systems.
Tatsuo Ishii [Sat, 17 Apr 2010 08:56:57 +0000 (08:56 +0000)]
Version 2.4-CURRENT
Toshihiro Kitagawa [Fri, 16 Apr 2010 04:16:44 +0000 (04:16 +0000)]
parallel_mode requires replication_mode or load_balance_mode turned on.
This fix is consistent with the description of manual.
Tatsuo Ishii [Tue, 13 Apr 2010 04:14:08 +0000 (04:14 +0000)]
Fix long standing bug which causes segfault of pgpool child process.
This was caused buy miscalculation of shmem size in pgpool parent.
The bug appears in at least following sequence in 64bit linux
platform:
1) set max_pool = 1 and num_init_children = 30
2) connect to the pgpool child which was forked lastly
3) let pgpool child die by SIGQUIT and fork (i.e. failover,
child_life_time timeout etc.)
4) if tries to connect to #3 child, it segfaults
This bug has been there since pgpool-II 1.0 was born.
Bug analysis by Toshihiro Kitagawa.
Toshihiro Kitagawa [Mon, 5 Apr 2010 07:34:02 +0000 (07:34 +0000)]
Add restriction for parallel mode.
This is the same description as the manual of V2_2_STABLE.
- The Natural Join is not supported.
- The USING CLAUSE is converted to ON CLAUSE by query rewrite process.
Toshihiro Kitagawa [Thu, 25 Mar 2010 04:24:09 +0000 (04:24 +0000)]
parallel_mode requires replication_mode or load_balance_mode turned on.
This fix is consistent with the description of manual.
Toshihiro Kitagawa [Fri, 19 Mar 2010 12:55:57 +0000 (12:55 +0000)]
Fix possible crash during rewriting JOIN syntax that have USING
in parallel query mode.
This fix is supporting such as following JOIN syntax.
example:
- SELECT * FROM a JOIN b USING (aid) JOIN c USING (cid);
- SELECT * FROM a JOIN b USING (aid) JOIN c USING (cid) JOIN d USING (did);
etc.
Toshihiro Kitagawa [Fri, 19 Mar 2010 12:24:43 +0000 (12:24 +0000)]
Fix getInsertRule() so that it can parse INSERT statements that
have current_time before a partitioning key column.
See [pgpool-general-jp: 712] for more details.
Toshihiro Kitagawa [Fri, 19 Mar 2010 11:53:00 +0000 (11:53 +0000)]
parallel_mode requires replication_mode turned on.
See [pgpool-general-jp: 719] for more details.
Toshihiro Kitagawa [Fri, 19 Mar 2010 11:39:36 +0000 (11:39 +0000)]
Fix SimpleForwardToBackend() so that pgpool doesn't keep waiting
for reply from a backend, when clients using the extended query
protocol cause a command error such as bind error.
This bug occur in raw mode or connection pool mode.
This fix is, sending SYNC message to recover error after command error.
Tatsuo Ishii [Fri, 19 Mar 2010 07:31:19 +0000 (07:31 +0000)]
Fix SIGINT/SIGQUIT is ignored if pgpool child is in select(). In this
case pgpool retries select() thus the signal is ignored. See following
thread for more details.
Subject: [Pgpool-general] The Unplugged wire
From: Daniel Codina
To: pgpool-general@pgfoundry.org
Date: Mon, 1 Mar 2010 15:19:00 +0100
Tatsuo Ishii [Fri, 19 Mar 2010 07:23:44 +0000 (07:23 +0000)]
Fix typo in comment.
Tatsuo Ishii [Tue, 9 Mar 2010 06:18:59 +0000 (06:18 +0000)]
Change default value for insert_lock to false since there's no point
in turning this on in master/slave mode. Fix suggested by Fujii Masao.
Tatsuo Ishii [Sat, 6 Mar 2010 12:54:01 +0000 (12:54 +0000)]
Fix connect_inet_domain_socket_by_port/
connect_unix_domain_socket_by_port so that they check if
SIGTERM/SIGINT/SIGQUIT signal has been delivered.
Per bug report from Daniel Codina. See:
Subject: Re: [Pgpool-general] The Unplugged wire
Date: Thu, 4 Mar 2010 15:20:37 +0100
Toshihiro Kitagawa [Fri, 5 Mar 2010 06:49:53 +0000 (06:49 +0000)]
Fix possible crash during creating "kind mismatch" error message.
This used to work but was broken in 2.3.2.
Tatsuo Ishii [Wed, 3 Mar 2010 00:31:39 +0000 (00:31 +0000)]
Fix bug with healh checking. If a network problem such as unplugged
wire happens while calling connect(), health checking does not work
since connect_unix_domain_socket()/connect_inet_domain_socket() do
retry if connect() is interrupted by ALARM signal. Added new retry
argument which controls the retrying behavior to those functions.
Per bug report and problem analysis by Daniel Codina.
See following message for more details.
Subject: [Pgpool-general] The Unplugged wire
Date: Mon, 1 Mar 2010 15:19:00 +0100
Tatsuo Ishii [Tue, 2 Mar 2010 15:31:43 +0000 (15:31 +0000)]
Fix enbug in 2.3.2.2 with time stamp rewriting in
SimpleForwardToBackend. Per bug report from Bugtrack #
1010771.
Report from Peter Pramberge.
Tatsuo Ishii [Tue, 2 Mar 2010 15:25:35 +0000 (15:25 +0000)]
Fix comment.
Toshihiro Kitagawa [Tue, 2 Mar 2010 09:55:36 +0000 (09:55 +0000)]
Import patch at revision 1.15.2.4.
Fix rewriting "*" in paralell query.
Patch conributed by sho-san.
Tatsuo Ishii [Sun, 28 Feb 2010 12:39:02 +0000 (12:39 +0000)]
Internal document for online recovery
Tatsuo Ishii [Sun, 28 Feb 2010 09:22:22 +0000 (09:22 +0000)]
Fix typo.
Tatsuo Ishii [Sat, 27 Feb 2010 04:21:12 +0000 (04:21 +0000)]
Fix connect_inet_domain_socket_by_port() so that it print out error
message by using hstrerror(), rather than strerror().
Tatsuo Ishii [Mon, 22 Feb 2010 05:20:11 +0000 (05:20 +0000)]
Prepare for 2.3.2.2.
Tatsuo Ishii [Mon, 22 Feb 2010 05:18:09 +0000 (05:18 +0000)]
prepare for 2.3.2.2.
Tatsuo Ishii [Mon, 22 Feb 2010 04:49:43 +0000 (04:49 +0000)]
Prepare 2.3.2.2
Tatsuo Ishii [Mon, 22 Feb 2010 03:53:11 +0000 (03:53 +0000)]
Fix parse(). When rewriting timestamp query, it allocated less than
what it actually needed.
Tatsuo Ishii [Wed, 17 Feb 2010 14:00:14 +0000 (14:00 +0000)]
Fix bind_rewrite_timestamp. It crashes if param length is -1, that
indicates NULL.
Tatsuo Ishii [Sat, 13 Feb 2010 11:23:55 +0000 (11:23 +0000)]
Fix read_status_file so that if all nodes were marked down status,
it is regarded that this file is bogus. This will prevent "all
node down" syndrome.
Tatsuo Ishii [Thu, 11 Feb 2010 09:40:12 +0000 (09:40 +0000)]
Prepare 2.3.2.1
Tatsuo Ishii [Thu, 11 Feb 2010 09:40:11 +0000 (09:40 +0000)]
Prepare 2.3.2.1
Tatsuo Ishii [Thu, 11 Feb 2010 09:29:15 +0000 (09:29 +0000)]
Prepare 2.3.2.1