1 $Header: /cvsroot/pgpool/pgpool-II/TODO,v 1.18.2.1 2009/08/24 04:36:10 t-ishii Exp $
5 Subject: [Pgpool-general] Bug when using Pgpool and PQprepare
6 From: denis@edistar.com
7 To: pgpool-general@pgfoundry.org
8 Date: Wed, 26 Aug 2009 18:23:20 +0200
10 #0 ReadyForQuery (frontend=0x810bb50, backend=0x810b310, send_ready=1)
11 at pool_proto_modules.c:1202
12 #1 0x080586e4 in SimpleForwardToFrontend (kind=69 'E', frontend=0x810bb50,
13 backend=0x810b310) at pool_process_query.c:1871
14 #2 0x08058d58 in SimpleForwardToBackend (kind=66 'B', frontend=0x810bb50,
15 backend=0x810b310) at pool_process_query.c:2069
16 #3 0x08078f61 in ProcessFrontendResponse (frontend=0x810bb50,
17 backend=0x810b310) at pool_proto_modules.c:1505
18 #4 0x080551d2 in pool_process_query (frontend=0x810bb50, backend=0x810b310,
19 connection_reuse=0, first_ready_for_query_received=0)
20 at pool_process_query.c:308
21 #5 0x0804d935 in do_child (unix_fd=3, inet_fd=4) at child.c:427
22 #6 0x0804b62a in fork_a_child (unix_fd=3, inet_fd=4, id=0) at main.c:836
23 #7 0x0804cc93 in reaper () at main.c:1625
24 #8 0x0804d11d in pool_sleep (second=0) at main.c:1824
25 #9 0x0804ab73 in main (argc=6, argv=0xbf869a04) at main.c:588
28 Preparing the statement...
31 To backend> "INSERT INTO test_table (a) VALUES ($1)"
34 To backend> Msg complete, length 51
36 To backend> Msg complete, length 5
41 To backend> Msg complete, length 10
43 To backend> Msg complete, length 5
51 From backend> "invalid input syntax for integer: "123.5""
53 From backend> "numutils.c"
57 From backend> "pg_atoi"
66 message type 0x6e arrived from server while idle (n)
69 message type 0x49 arrived from server while idle (I: EmptyQueryResponse)
72 message type 0x5a arrived from server while idle (Z)
73 Error executing the statement...
75 Error Message:ERROR: invalid input syntax for integer: "123.5"
82 To backend> Msg complete, length 12
91 Preparing the statement...
94 To backend> "INSERT INTO test_table (a) VALUES ($1)"
97 To backend> Msg complete, length 51
99 To backend> Msg complete, length 5
107 Executing the statement...
117 To backend> Msg complete, length 24
121 To backend> Msg complete, length 7
125 To backend> Msg complete, length 10
127 To backend> Msg complete, length 5
129 From backend (#4)> 88
131 From backend> "ERROR"
133 From backend> "22P02"
135 From backend> "invalid input syntax for integer: "123.5""
137 From backend> "numutils.c"
141 From backend> "pg_atoi"
148 Error executing the statement...
150 Error Message:ERROR: invalid input syntax for integer: "123.5"
152 To backend> Msg complete, length 5
155 - Add backend id to statement log so that we can know if pgpool does
156 replication correctly
158 - Show PostgreSQL backend process ids in process status
160 - Prepare for changing postgresql.conf directives which produce 'S'
161 message. Othewise we get:
163 pool_process_query: 1 th kind S does not match with master or majority
166 ERROR: pid 26122: kind mismatch
167 among backends. Possible last query was: "UPDATE branches SET bbalance
168 = bbalance + -3820 WHERE bid = 1;" kind details are: 0[C] 1[S]
170 It seems PostgreSQL sends following parameter status at the *first* pgpool.conf reload only.
172 2009-02-23 23:06:21 LOG: pid 5611: name: is_superuser value: on
173 2009-02-23 23:06:31 LOG: pid 5627: name: DateStyle value: ISO, MDY
174 2009-02-23 23:06:31 LOG: pid 5626: name: DateStyle value: ISO, MDY
175 2009-02-23 23:06:31 LOG: pid 5622: name: DateStyle value: ISO, MDY
177 (this item was resolved in 2.2)
179 - drop table should be in a transactin block? It is judged here:
180 (this item was resolved in 2.2)
182 POOL_STATUS start_internal_transaction(POOL_CONNECTION_POOL *backend, Node *node)
186 /* if we are not in a transaction block,
187 * start a new transaction
189 if (TSTATE(backend) == 'I' &&
190 (IsA(node, InsertStmt) || IsA(node, UpdateStmt) ||
191 IsA(node, DeleteStmt) || IsA(node, SelectStmt)))
195 2009-01-09 00:22:20 JST t-ishii test 853 LOG: statement: begin;
196 2009-01-09 00:22:23 JST t-ishii test 853 LOG: statement: lock table t1;
197 2009-01-09 00:22:23 JST t-ishii test 853 LOG: unexpected EOF on client connection
198 2009-01-09 00:22:45 JST t-ishii test 860 LOG: statement: drop table t1;
199 2009-01-09 00:22:46 JST t-ishii test 860 LOG: unexpected EOF on client connection
200 2009-01-09 00:22:49 JST t-ishii test 877 LOG: statement: drop table t1;
201 2009-01-09 00:22:49 JST t-ishii test 877 ERROR: table "t1" does not exist
202 2009-01-09 00:22:49 JST t-ishii test 877 STATEMENT: drop table t1;
206 2009-01-09 00:22:23 JST t-ishii test 854 LOG: unexpected EOF on client connection
207 2009-01-09 00:22:46 JST t-ishii test 861 LOG: statement: drop table t1;
208 2009-01-09 00:22:46 JST t-ishii test 861 ERROR: cache lookup failed for constraint 1857934
209 2009-01-09 00:22:46 JST t-ishii test 861 STATEMENT: drop table t1;
210 2009-01-09 00:22:46 JST t-ishii test 861 LOG: could not send data to client: ???????????
211 2009-01-09 00:22:46 JST t-ishii test 861 LOG: unexpected EOF on client connection
212 2009-01-09 00:22:49 JST t-ishii test 878 LOG: statement: drop table t1;
213 2009-01-09 00:22:49 JST t-ishii test 878 ERROR: cache lookup failed for constraint 1857934
214 2009-01-09 00:22:49 JST t-ishii test 878 STATEMENT: drop table t1;
215 2009-01-09 00:25:51 JST t-ishii test 878 LOG: statement: create table t1(i int);
216 2009-01-09 00:25:52 JST t-ishii test 878 ERROR: relation "t1" already exists
217 2009-01-09 00:25:52 JST t-ishii test 878 STATEMENT: create table t1(i int);
218 2009-01-09 00:25:52 JST t-ishii test 878 LOG: could not send data to client: ???????????
219 2009-01-09 00:25:52 JST t-ishii test 878 LOG: unexpected EOF on client connection
221 - BEGIN; BEGIN; causes:
222 (this item was resolved in 2.2)
224 ERROR: kind mismatch among backends 0[N] 1[E]
226 detect_error() checks following NOTICE(ERRRO¤Î25001 means /* SET
227 TRANSACTION ISOLATION LEVEL must be called before any query */)
229 WARNING: 25001: there is already a transaction in progress
231 this will send an error query to abort a transaction.
233 - regression failres:
236 test sanity_check ... FAILED
240 largeobject ... FAILED
241 test tablespace ... FAILED
243 ========================
244 7 of 114 tests failed.
245 ========================
247 this happens when replication true, insert_lock true, replicate_select false,
250 if replicate_select is true, prepared_xacts fails(because \d fails)
251 and prepared transactio remain, which keep a lock on pg_class in
252 access share mode. And alter table pg_class cannot obtain exclusive
253 lock, which causes all SELECTs suspend and regression cannot contiunue.
255 - Allow client encoding conversion. This was possible in pgpool-I
257 - Allow special comment such as "/* STRICT */". This was possible in pgpool-I
259 - Allow multi statement
261 - Sometimes query is sent to a DB node despite its weight is 0
263 - Avoid cross pgpool process deadlock situation. This is a long
264 standing problem since pgpool-II was born (pgpool-I avoids this by
267 - Allow to stop PostgeSQL from pgpoolAdmin to make the on-line
268 recovery more convenient. This requires something like
269 pgpool_remote_stop to be specified in pgpool.conf.
271 - If DISCARD ALL is specified in the reset_query_list and transaction
272 is not closed when client disconnects, automatically issue ABORT
273 before issuing DISCARD ALL
277 - Allow to specify queries issued when starting sessions
279 - Audit functionality?
283 - Graceful shutdown, attach, detach
287 - Enhance DROP DATABASE handling (not disconnect all idle connections)
291 - Allow per table replication
293 - Allow per session level and query level load balancing
295 - Allow replication of SEQUENCE
297 - Allow replication of OID
299 - Allow to specify functions to be replicated other than nextval(), setval()
303 - Allow recovery_1st_stage_command to get PostgreSQL listen port,
304 database cluster directory etc. info
312 - Performance enhance for more complex queries
314 - Allow to handle transaction
316 - Allow to handle extended queries
318 - process alias in FROM clause
320 db=# select * from data1 as d1 inner join data2 as d2 on d1.id=d2.id;
322 DETAIL: ERROR: missing FROM-clause entry for table "d1"
323 LINE 1: SELECT pool_parallel("SELECT d1.id, d1.aaaa, d1.bbbb...
325 2008-03-11 10:28:17 LOG: pid 6186: statement: SELECT pool_parallel("SELECT d1.id, d1.aaaa, d1.bbbb, a.cccc FROM data1")
327 - process USING clause in JOIN
331 - Write libpcp API docs