1 Release Notes 2 3=============================================================================== 43.6 Series (201x/xx/xx - ) 5=============================================================================== 6 7 3.6.0 (subaruboshi) 201x/xx/xx 8 9* Version 3.6.0 10 11 This is the first version of pgpool-II 3.6 series. 12 That is, a "major version up" from 3.5 series. 13 14* Overview 15 16 Major enhancements in Pgpool-II 3.6 include: 17 18 - Improve the behavior of fail-over. In the steaming replication mode, 19 client sessions will not be disconnected when a fail-over occurs any 20 more if the session does not use the failed standby server. If the 21 primary server goes down, still all sessions will be disconnected. 22 Also it is possible to connect to Pgpool-II even if it is doing health 23 checking retries. Before all attempt of connecting to Pgpool-II failed 24 while doing health checking retries. 25 26 - New PGPOOL SET command has been introduced. Certain configuration 27 parameters now can be changed on the fly in a session. 28 29 - Watchdog is significantly enhanced. It becomes more reliable than 30 previous releases. 31 32 - Handling of extended query protocol (e.g. used by Java applications) 33 in streaming replication mode speeds up if many rows are returned 34 in a result set. 35 36 - Import parser of PostgreSQL 9.6. 37 38 - In some cases pg_terminate_backend() now does not trigger a fail-over. 39 40 - Change documentation format from raw HTML to SGML. 41 42 The above items are explained in more detail in the sections below. 43 44* Major Enhancements 45 46 - Improve the behavior of fail-over. (Tatsuo Ishii) 47 48 In the steaming replication mode, client sessions will not be 49 disconnected when a fail-over occurs any more if the session 50 does not use the failed standby server. If the primary server 51 goes down, still all sessions will be disconnected. Health check 52 timeout case will also cause the full session disconnection. 53 Other health check error, including retry over case does not 54 trigger full session disconnection. 55 56 For user's convenience, "show pool_nodes" command shows the session 57 local load balance node info since this is important for users in 58 case of fail-over. If the load balance node is not the failed node, 59 the session will not be affected by fail-over. 60 61 Also now it is possible to connect to Pgpool-II even if it is doing 62 health checking retries. Before all attempt of connecting to Pgpool-II 63 failed while doing health checking retries. Before any attempt to 64 connect to Pgpool-II fails if it is doing a health check against 65 failed node even if fail_over_on_backend_error is off because Pgpool-II 66 child first tries to connect to all backend including the failed one and 67 exits if it fails to connect to a backend (of course it fails). This is 68 a temporary situation and will be resolved before pgpool executes fail-over. 69 However if the health check is retrying, the temporary situation keeps longer 70 depending on the setting of health_check_max_retries and health_check_retry_ 71 delay. This is not good. Attached patch tries to mitigate the problem: 72 73 When an attempt to connect to backend fails, give up connecting to 74 the failed node and skip to other node, rather than exiting the process 75 if operating in streaming replication mode and the node is not primary node. 76 77 Mark the local status of the failed node to "down". This will let the primary 78 node be selected as a load balance node and every queries will be sent to the 79 primary node. If there's other healthy standby nodes, one of them will be 80 chosen as the load balance node. 81 82 After the session is over, the child process will suicide to not retain 83 the local status. 84 85 - Add PGPOOL SHOW, PGPOOL SET and PGPOOL RESET commands. (Muhammad Usama) 86 87 These are similar to the PostgreSQL's SET and SHOW commands for GUC 88 variables, adding the functionality in Pgpool-II to set and reset 89 the value of config parameters for the current session, and for 90 that it adds a new syntax in Pgpool-II which is similar to PostgreSQL's 91 SET and RESET variable syntax with an addition of PGPOOL keyword at the start. 92 93 Currently supported configuration parameters by PGPOOL SHOW/SET/RESET are: 94 log_statement, log_per_node_statement, check_temp_table, check_unlogged_ 95 table, allow_sql_comments, client_idle_limit, log_error_verbosity, 96 client_min_messages, log_min_messages, client_idle_limit_in_recovery. 97 98 - Sync inconsitent status of PostgreSQL nodes in Pgpool-II instances 99 after restart. (Muhammad Usama) 100 101 - At the Pgpool-II startup, the status of each configured backend node 102 is loaded from the backend status file or otherwise initialized by 103 querying the backend nodes. This technique works fine in stand alone mode 104 and also with the watchdog enabled as long as the status of backend nodes 105 remains consistent until all Pgpool-II nodes got up and running. But since 106 Pgpool-II does not sync the backend node status from the watchdog cluster 107 at startup time, so in some cases the Pgpool-II nodes participating in the 108 watchdog cluster may get a different status for the same backend, 109 especially if the Pgpool-II nodes part of the watchdog cluster starts 110 at different times and between that time an unavailable backend 111 PostgreSQL node had become available again. 112 113 So to solve this, the commit implements the new startup procedure 114 for the standby Pgpool-II, And now the standby Pgpool-II will load the 115 backend status of all configured PostgreSQL nodes from the watchdog 116 master/coordinator node at the time of startup. 117 118 - Enhance performance of SELECT when lots of rows involved. (Tatsuo Ishii) 119 120 Pgpool-II flushes data to network (calling write(2)) every time it 121 sends a row data ("Data Row" message) to frontend. For example, if 10,000 122 rows needed to be transfer, 10,000 times write()s are issued. This is 123 pretty expensive. Since after repeating to send row data, "Command Complete" 124 message is sent, it's enough to issue a write() with the command complete 125 message. Also there are unnecessary flushing are in handling the command 126 complete message. 127 128 Quick testing showed that from 47% to 62% performance enhancements 129 were achieved in some cases. 130 131 Unfortunately, performance in workloads where transferring few rows, 132 will not be enhanced since such rows are needed to flush to network anyway. 133 134 - Import PostgreSQL 9.6's SQL parser. (Bo Peng) 135 136 This allows Pgpool-II to fully understand the newly added SQL syntax 137 such as COPY INSERT RETURNING. 138 139 - In some cases pg_terminate_backend() now does not trigger a fail-over. (Muhammad Usama) 140 141 Since the pg_terminate_backend function in PostgreSQL is used to terminate 142 the backend connection, So what happens is, when this function kills a PostgreSQL 143 backend that is connected to the Pgpool-II, This disconnection of backend by 144 pg_terminate_backend function is appeared as a backend node failure to the 145 Pgpool-II. But the problem here is, PostgreSQL does not give any information 146 to the client program that the connection is going to be killed because of 147 the pg_terminate_backend call and on the client side, it looks similar to 148 the backend node failure. 149 150 Now to solve this in Pgpool-II we need two things. First is to 151 identify the pg_terminate_backend function in the query and the 152 Pgpool-II child process that hosts the particular backend connection 153 which will be killed by that pg_terminate_backend function call, 154 so that we get a heads up in advance about the backend termination, 155 and secondly the routing of the query containing pg_terminate_backend 156 also needs a new logic so that the query should be sent to the correct 157 PostgreSQL node that hosts the backend with the PID referred by 158 the pg_terminate_bakend() 159 160 So how does this commit handles pg_terminate_backend()?? 161 In the SimpleQuery() function which is the work horse of simple query 162 processing in the Pgpool-II we start with the search of the 163 pg_terminate_backend() function call in the query parse tree and if 164 the search comes out to be successful, the next step is to locate 165 the Pgpool-II child process and a backend node of that connection 166 whose PID is specified in pg_terminate_backend function's argument. 167 Once the connection and the Pgpool-II child process is identified, 168 we just set the swallow_termination flag(added by this commit in 169 ConnectionInfo structure) for that connection in the shared memory, 170 and also set the query destination node to the backend node that 171 hosts that particular connection and does not call pool_where_to_send() 172 for this query so that the query should be sent to the correct 173 backend node. 174 175 Now when the query is routed to the correct node and consequently 176 the backend gets killed, that results in the communication error on 177 Pgpool-II side, the Pgpool-II already knows that this disconnection 178 is due the pg_terminate_backend and not because of node failure as 179 the swallow_termination flag is already set for the connection. 180 181 Some works are still remaining. 182 183 pg_terminate_backend is not handled with extended query protocol. 184 185 Currently we only support pg_terminate_backend(constant number) 186 function calls. If the expression or sub query is used in the 187 argument of pg_terminate_backend then it would not be handled e.g 188 189 pgpool=# select pg_terminate_backend(1025); -- Supported 190 pgpool=# select pg_terminate_backend( 2 +1); -- NOT SUPPORTED 191 pgpool=# select pg_terminate_backend((select 1)); -- NOT SUPPORTED 192 193 Currently only one pg_terminate_backend call in a query is handled. 194 195 - HTML documents are now generated from SGML documents. 196 (Muhammad Usama, Tatsuo Ishii, Bo Peng) 197 198 It is intended to have better construction, contents and 199 maintainability. However, still there's tremendous room to 200 enhance the SGML documents. Please help us! 201 202* Other Enhancements 203 204 - Make authentication error message more user friendly. (Tatsuo Ishii) 205 206 When attempt to connect to backend (including health checking), 207 emit error messages from backend something like "sorry, 208 too many clients already" instead of "invalid authentication 209 message response type, Expecting 'R' and received '%c'" 210 211 - Tighten up health check timer expired condition in pool_check_fd(). 212 (Muhammad Usama) 213 214 Check if the signal was actually the health check timer expire to 215 make sure that we do not declare the timer expire due to some other 216 signal arrived while waiting for data for health check in pool_check_fd(). 217 218 - Add new script called "watchdog_setup". (Tatstuo Ishii) 219 220 watchdog_setup is a command to create a temporary installation 221 of Pgpool-II clusters with watchdog for mainly testings. 222 223 Add "-pg" option to pgpool_setup. (Tatsuo Ishii) 224 225 This is useful when you want to assign specific port numbers to 226 PostgreSQL while using pgpool_setup. Also now pgpool_setup is 227 installed in the standard bin directory which is same as pgpool. 228 229 - Add "replication delay" column to "show pool_nodes". (Tatsuo Ishii) 230 231 This column shows the replication delay value in bytes if operated 232 in streaming replication mode. 233 234 - Do not update status file if all backend nodes are in down 235 status. (Chris Pacejo, Tatsuo Ishii) 236 237 This commit tries to remove the data inconsitency in replication 238 mode found in [pgpool-general: 3918] by not recording the status file 239 when all backend nodes are in down status. This surprisingly simple 240 but smart solution was provided by Chris Pacejo. 241 242 - Allow to use multiple SSL cipher protocols. (Multiple Usama) 243 244 By replacing TLSv1_method() with SSLv23_method() while initializing 245 the SSL session, we can use more protocols than TLSv1 protocol. 246 247 Allow to use arbitrary number of items in the 248 black_function_list/white_function_list. (Muhammad Usama) 249 250 Previously there were fixed limits for those. 251 252 - Properly process empty queries (all comments). (Tatsuo Ishii) 253 254 Pgpool-II now recognizes an empty query consisted of all comments 255 (for example "/* DBD::Pg ping test v3.5.3 */") (note that no ';') 256 as an empty query. 257 258 Before such that query was recognized an error. 259 260 Add some warning messages for wd_authkey hash calculation 261 failure. (Yugo Nagata) 262 263 Sometimes wd_authkey calculation fails for some reason other 264 than authkey mismatch. The additional messages make these distinguishable 265 for each other. 266 267* Changes 268 269 - Change the default value of search_primary_node_timeout from 10 to 270 300. (Tatstuo Ishii) 271 272 Prior default value 10 seconds is sometimes too short for a standby 273 to be promoted. 274 275 - Change the Makefile under directory src/sql/, that is proposed by 276 [pgpool-hackers: 1611]. (Bo Peng) 277 278 - Change the PID length of pcp_proc_count command output to 6 279 characters long. (Bo Peng) 280 281 If the Pgpool-II process ID are over 5 characters, the 6th character 282 of each process ID will be removed. This commit changes the process ID 283 length of pcp_proc_count command output to 6 characters long. 284 285 - Redirect all user queries to primary server. (Tatsuo Ishii) 286 287 Up to now some user queries are sent to other than the primary 288 server even if load_balance_mode = off. This commit changes the 289 behavior: if load_balance_mode = off in streaming replication mode, 290 now all the user queries are sent to the primary server only. 291 292* Bug fixes 293 294 - Fix the case when all backends are down then 1 node attached. (Tatsuo Ishii) 295 296 When all backends are down, no connection is accepted. Then 1 297 PostgreSQL becomes up, and attach the node using pcp_attach_node. 298 It successfully finishes. However, when a new connection arrives, 299 still the connection is refused becausePgpool-II child process 300 looks into the cached status, in which the recovered node is 301 still in down status if mode is streaming replication mode 302 (native replication and other modes are fine). Solution is, 303 if all nodes are down, force to restart all pgpool child. 304 305 - Fix for avoiding downtime when Pgpool-II changes require a 306 restart. (Muhammad Usama) 307 308 To fix this, The verification mechanism of configuration 309 parameter values is reversed, previously the standby nodes used 310 to verify their parameter values against the respective values 311 on the master Pgpool-II node and when the inconsistency was 312 found the FATAL error was thrown, now with this commit the 313 verification responsibility is delegated to the master Pgpool-II 314 node. Now the master node will verify the configuration parameter 315 values of each joining standby node against its local values and 316 will produce a WARNING message instead of an error in case of a 317 difference. This way the nodes having the different configurations 318 will also be allowed to join the watchdog cluster and the user 319 has to manually look out for the configuration inconsistency 320 warnings in the master Pgpool-II log to avoid the surprises at 321 the time of Pgpool-II master switch over. 322 323 - Fix a problem with the watchdog failover_command locking mechanism. (Muhammad Usama) 324 325 From Pgpool-II 3.5 watchdog was using the separate individual 326 locks for each node-failover command (failover, failback and follow-master) 327 and the lock was acquired just before executing the respective failover 328 script and was released as soon as the script execution finishes. 329 This technique although was very efficient but also had a problem. 330 If the failover_command takes a very little time and gets finished 331 before the lock request from other Pgpool-II node arrives, the other 332 node is also granted a lock, since the lock was already released by 333 the first node at that time. Consequently, both nodes ends up executing 334 the failover script. So to fix this we are reverting back to the tested 335 failover interlocking design used prior to Pgpool-II 3.5 where all the 336 commands gets locked at the failover start by the node that becomes a 337 lock-holder and each command lock is released after its execution 338 finishes. And only the lock-holder node is allowed to acquire/release 339 the individual command lock. That way the lock-holder node keeps the 340 lock-holder status throughout the span of the failover execution and 341 the system becomes less time sensitive. 342 343 - Disable strict aliasing optimization. (Tatsuo Ishii) 344 345 flatten_set_variable_args() was imported from PostgreSQL in Pgpool-II 3.5. 346 To make the code work, a compiler flag -fno-strict-aliasing is necessary 347 (PostgreSQL does so). Unfortunately when the function was imported, the 348 compiler flag was not added. To fix this, configure.ac was modified. 349 350 - Do not use random() while generating MD5 salt. (Tatsuo Ishii) 351 352 random() should not be used in security related applications. 353 To replace random(), import PostmasterRandom() from PostgreSQL. 354 Also store current time at the start up of Pgpool-II main process 355 for later use. 356 357 - Don't ignore sync message from frontend when query cache is enabled. (Tatsuo Ishii) 358 359 While returning cached query result, sync message sent from frontend 360 is discarded. This is harmless because "ready for query" messages is 361 sent to frontend afterward. Problem is, AccessShareLock held by previous 362 parse message processing is not released until sync message is received 363 by the backend. Fix is, forwarding the sync message to backend and discarding 364 "ready for query" message returned from backend. 365 366 - Fix bug that Pgpool-II fails to start if listen_addresses is 367 empty string. (bug 237) (Muhammad Usama) 368 369 The socket descriptor array (fds[]) was not getting the array 370 end marker when TCP listen addresses are not used. 371 372 - Create regression log directory if it does not exist yet. (Tatsuo Ishii) 373 374 - Fixing the error messages when the socket operation fails. (Muhammad Usama) 375 376 When some socket operation fails, we issue close socket before throwing 377 an error which causes the errno value to be overwritten and consequently 378 the error log does not print the correct failure reason. The solution is 379 to save the errno before closing the socket and use the saved value to 380 print error description. 381 382 - Fix regression failure of 003.failover. (Tatsuo Ishii) 383 384 Update expected data to reflect the changes made to show pool_nodes. 385 Also fix show pool_nodes to proper use "_" instead of space for the 386 column name. 387 388 - Fix hang when portal suspend received. (bug 230) (Tatsuo Ishii) 389 390 When portal suspend message is received, it's not enough to forward it 391 to the client. Since backend expects to receive execute message, trying 392 to read further more messages from backend will never succeed. 393 To fix this, turn off the query in progress flag, which will pole 394 incoming message from the client. 395 396 - Fix pgpool doesn't de-escalate IP in case network restored. (bug 228) (Muhammad Usama) 397 398 set_state function is made to de-escalate, when it is changing the 399 local node's state from the coordinator state to some other state. 400 401 - SIGUSR1 signal handler should be installed before watchdog 402 initialization. (Muhammad Usama) 403 404 Since there can be a case where a failover request from other 405 watchdog nodes arrive at the same time when the watchdog has just 406 been initialized, and if we wait any longer to install a SIGUSR1 407 signal handler, it can result in a potential crash 408 409 - Fix for bug of inconsistent status of PostgreSQL nodes in 410 Pgpool-II instances after restart. (bug 218) (Muhammad Usama) 411 412 Watchdog does not synchronize status. Currently at the Pgpool-II 413 startup, The status of each configured backend node is loaded from the 414 backend status file or otherwise initialized by querying the backend 415 nodes. This technique works fine in stand alone mode and also with 416 the watchdog enabled as long as the status of backend nodes remains 417 consistent until all Pgpool-II nodes got up and running. But since 418 Pgpool-II does not sync the backend node status from the watchdog 419 cluster at startup time, so in some cases the pgpool-II nodes 420 participating in the watchdog cluster may get a different status 421 for the same backend, especially if the Pgpool-II nodes part of 422 the watchdog cluster starts at different times and between that 423 time an unavailable backend PostgreSQL node had become available 424 again. 425 426 So to solve this, the commit implements the new startup procedure 427 for the standby Pgpool-II, And now the standby Pgpool-II will 428 load the backend status of all configured PostgreSQL nodes from 429 the watchdog master/coordinator node at the time of startup. 430 431 - Fix Pgpool-II doesn't escalate ip in case of another node 432 inavailability. (bug 215) (Muhammad Usama) 433 434 The heartbeat receiver fails to identify the heartbeat sender watchdog 435 node when the heartbeat destination is specified in terms of an IP address 436 while wd_hostname is configured as a hostname string or vice versa. 437 438 - Fixing a coding mistake in watchdog code. (Muhammad Usama) 439 440 wd_issue_failover_lock_command() function is supposed to forward 441 command type passed in as an argument to the wd_send_failover_sync_command() 442 function instead it was passing the NODE_FAILBACK_CMD command type. 443 444 The commit also contains some log message enhancements. 445 446 - Display human readable output for backend node status. (Muhammad Usama) 447 448 Changed the output of pcp_node_info utility and show commands display 449 human readable backend status string instead of internal status code. 450 451 - Replace "MAJOR" macro to prevent occasional failure. (Tatsuo Ishii) 452 453 The macro calls pool_virtual_master_db_node_id() and then access 454 backend->slots[id]->con using the node id returned. In rare cases, 455 it could point to 0 (in case when the DB node is not connected), 456 which gives access to con->major, then it causes a segfault. 457 458 - Fix "kind mismatch" error message in Pgpool-II. (Muhammad Usama) 459 460 Many of "kind mismatch..." errors are caused by notice/warning messages 461 produced by one or more of the DB nodes. In this case now Pgpool-II forwards 462 the messages to frontend, rather than throwing the "kind mismatch..." error. 463 This would reduce the chance of "kind mismatch..." errors. 464 465 - Fix handling of pcp_listen_addresses config parameter. (Muhammad Usama) 466 467 - Save and restore errno in each signal handler. (Tatsuo Ishii) 468 469 - Fix usage of wait(2) in pgpool main process. (Tatsuo Ishii) 470 471 When child process dies, SIGCHLD signal is raised and wait(2) knows 472 the event. However, multiple child death does not necessarily creates exact 473 same number of SIGCHLD signal as the number of dead children and wait(2) 474 could wait for an event which never happens in this case. I Actually 475 encountered this situation while testing Pgpool-II. Solution is, 476 to use waitpid(2) instead of wait(2). 477 478 - Fix confusing error messages. (Tatsuo Ishii) 479 480 pool_read() does not emit error messages when read(2) returns -1 481 if fail_over_on_backend_error is off. In any case the cause of error 482 should be emitted. I do not back port this because it's a too trivial 483 enhancement. 484 485 - Fix buffer over run problem in "show pool_nodes". (Tatsuo Ishii) 486 487 While processing "show pool_nodes", the buffer for hostname was too short. 488 It should be same size as the buffer used for pgpool.conf. Problem reported 489 by a twitter user who is using pgpool on AWS (which could have very long hostname). 490 491 - Fix [pgpool-hackers: 1638] pgpool-II does not use default configuration. (Muhammad Usama) 492 493 Configuration file not found should just throw a WARNING message 494 instead of ERROR or FATAL. 495 496 - Fix bug with load balance node id info on shmem. (Tatsuo Ishii) 497 498 There are few places where the load balance node was mistakenly 499 put on wrong place. It should be placed on: 500 501 ConnectionInfo *con_info[child id, connection pool_id, backend id].load_balancing_node]. 502 503 In fact it was placed on: 504 505 *con_info[child id, connection pool_id, 0].load_balancing_node]. 506 507 508 As long as the backend id in question is 0, it is ok. However while 509 testing Pgpool-II 3.6's enhancement regarding failover, 510 if primary node is 1 (which is the load balance node) and standby 511 is 0, a client connecting to node 1 is disconnected when failover 512 happens on node 0. This is unexpected and the bug was revealed. 513 514 It seems the bug was there since long time ago but it had 515 not found until today by the reason above. 516 517 - Fix for bug that pgpool hangs connections to database. (bug 197) (Muhammad Usama) 518 519 The client connection was getting stuck when backend node and 520 remote Pgpool-II node becomes unavailable at the same time. 521 The reason was a missing command timeout handling in the function 522 that sends the IPC commands to watchdog. 523 524 - Fix a posible hang during health checking. (bug 204) (Yugo Nagata) 525 526 Helath checking was hang when any data wasn't sent from 527 backend after connect(2) succeeded. To fix this, pool_check_fd() 528 returns 1 when select(2) exits with EINTR due to SIGALRM while 529 health checkking is performed. 530 531 - Deal with the case when the primary is not node 0 in streaming 532 replication mode. (Tatsuo Ishii) 533 534 http://www.pgpool.net/mantisbt/view.php?id=194#c837 reported that 535 if primary is not node 0, then statement timeout could occur even 536 after bug194-3.3.diff was applied. After some investigation, 537 it appeared that MASTER macro could return other than primary 538 or load balance node, which was not supposed to happen, 539 thus do_query() sends queries to wrong node (this is not clear 540 from the report but I confirmed it in my investigation). 541 542 pool_virtual_master_db_node_id(), which is called in MASTER macro 543 returns query_context->virtual_master_node_id if query context exists. 544 This could return wrong node if the variable has not been set yet. 545 To fix this, the function is modified: if the variable is not either 546 load balance node or primary node, the primary node id is returned. 547 548 For master and 3.5-stable, additional fixes/enhancements are made: 549 pool_extended_send_and_wait() now issues flush message if the request 550 is 'E' (execute). 551 Before it was issued outside (in Execute), but this makes the logic to 552 determine to which node the flush message to be sent unnecessary complex. 553 554 A debug message in pool_write is enhanced by adding backend node id. 555 556 - If statement timeout is enabled on backend and do_query() sends a query to 557 primary node, and all of following user queries are sent to standby, 558 it is possible that the next command, for example END, could cause a statement 559 timeout error on the primary, and a kind mismatch error on pgpool-II is 560 raised. (bug 194) (Tatsuo Ishii) 561 562 This fix tries to mitigate the problem by sending sync message instead of 563 flush message in do_query(), expecting that the sync message reset the 564 statement timeout timer if we are in an explicit transaction. 565 We cannot use this technique for implicit transaction case, because 566 the sync message removes the unnamed portal if there's any. 567 568 Plus, pg_stat_statement will no longer show the query issued 569 by do_query() as "running". 570 571 - Fix extended protocol handling in raw mode. (Tatsuo Ishii) 572 573 Bug152 reveals that extended protocol handling in raw mode 574 (actually other than in stream mode) was wrong in Describe() 575 and Close(). Unlike stream mode, they should wait for backend response. 576 577 - Fix confusing comments in pgpool.conf. (Tatsuo Ishii) 578 579 - Fix Japanese and Chinese documetation bug about raw mode. (Yugo Nagata, Bo Peng) 580 581 Connection pool is avalilable in raw mode. 582 583 - Fix is_set_transaction_serializable() when 584 SET default_transaction_isolation TO 'serializable'. (bug 191) (Bo Peng) 585 586 SET default_transaction_isolation TO 'serializable' is sent to not only 587 primary but also to standby server in streaming replication mode, 588 and this causes an error. Fix is, in streaming replication mode, 589 SET default_transaction_isolation TO 'serializable' is sent only to 590 the primary server. 591 592 - Fix extended protocol hang with empty query. (bug 190) (Tatsuo Ishii) 593 594 The fixes related to extended protocol cases in 3.5.1 broke the case of 595 empty query. In this case backend replies with "empty query response" 596 which is same meaning as a command complete message. Problem is, when 597 empty query response is received, pgpool does not reset the query in progress 598 flag thus keeps on waiting for backend. However, backend will not send the 599 ready for query message until it receives a sync message. Fix is, 600 resetting the in progress flag after receiving the empty query response 601 and reads from frontend expecting it sends a sync message. 602 603 - Fix for [pgpool-general: 4569] Pgpool-II 3.5 : segfault. (Muhammad Usama) 604 605 PostgreSQL's memory and exception manager APIs adopted by the Pgpool-II 3.4 606 are not thread safe and are causing the segmentation fault in the watchdog 607 lifecheck process, as it uses the threads to ping configured trusted hosts for 608 checking the upstream connections. Fix is to remove threads and use the child 609 process approach instead. 610 611 - Validating the PCP packet length. (Muhammad Usama) 612 613 Without the validation check, a malformed PCP packet can crash the 614 PCP child and/or can run the server out of memory by sending the packet 615 with a very large data size. 616 617 - Fix Pgpool-II hang bug (bug 167). (Tatsuo Ishii) 618 619 Pgpool-II 3.5 or after in streaming replication mode does not 620 wait for response from each phase such parse, bind anymore. 621 However, if do_query is called, it sends flush message to retrieve 622 the result of system catalog look up. This is only sent to primary node 623 which may results in retrieving previous message results, for example 624 parse complete. If standby is assigned to load balance node, the node 625 does not return parse complete message, which will cause a problem 626 in bug167 case, because parse message for "BEGIN" was sent to both the 627 primary and the standby. Fix is, send flush message in do_query if the 628 load balance node is one of standbys. 629 630 - Fix pgpool_setup to not confuse log output. (Tatsuo Ishii) 631 632 Before it simply redirects the stdout and stderr of pgpool process 633 to a log file. This could cause log contents being garbled or even 634 missed because of race condition caused by multiple process being 635 writing concurrently. I and Usama found this while investigating 636 the regression failure of 004.watchdog. To fix this, pgpool_setup 637 now generates startall script so that pgpool now sends stdout/stderr 638 to cat command and cat writes to the log file (It seems the race 639 condition does not occur when writing to a pipe). 640 641 - Fix for [pgpool-general: 4519] Worker Processes Exit and 642 Are Not Re-spawned. (Muhammad Usama) 643 644 The problem was due to a logical mistake in the code for checking 645 the exiting child process type when the watchdog is enabled. 646 I have also changed the severity of the message from FATAL to LOG, 647 emitted for child exits due to max connection reached. 648 649 - Fix pgpool hung after receiving error state from backend. (bug #169) (Tatsuo Ishii) 650 651 This could happend if we execute an extended protocol query 652 and it fails. After an error is received the "ignore till sync flag" 653 is set and remained even if sync message was actually received. 654 Thus any subsequent query (in the case above "DEALLOCATE message") 655 is not procesed and pgpool waits for message from frontend and backend, 656 and pgpool stucks here because no message will arrive from both side. 657 658 To fix this, unconditionally reset the "ignore till sync flag" 659 in ReadyforQuery(). This is safe because apparently we already 660 received the ready for query message. 661 662 - Fix query stack problems in extended protocol case. (bug 167, 168) (Tatstuo Ishii) 663 664 - Fix [pgpool-hackers: 1440] yet another reset query stuck problem. (Tatsuo Ishii) 665 666 After receiving X message from frontend, if Pgpool-II detects EOF 667 on the connection before sending reset query, Pgpool-II could wait for 668 backend which had not received the reset query. To fix this, 669 if EOF received, treat this as FRONTEND_ERROR, rather than ERROR. 670 671 - Fix for [pgpool-general: 4265] another reset query stuck problem. (Muhammad Usama) 672 673 The solution is to report FRONTEND_ERROR instead of simple ERROR 674 when pool_flush on front-end socket fails. 675 676 - Fixing pgpool-recovery module compilation issue with PostgreSQL 9.6. (Muhammad Usama) 677 678 Incorporating the change of function signature for GetConfigOption() 679 functions in PostgreSQL 9.6 680 681 - Fix compile issue on freebsd. (Muhammad Usama) 682 683 Add missing include files. The patch is contributed by the bug 684 reporter and enhanced a little by me. 685 686 - Fix regression test to check timeout of each test. (Yugo Nagata) 687 688 - Add some warning messages for wd_authkey hash calculation failure. (Yugo Nagata) 689 690 Sometimes wd_authkey calculation fails for some reason other 691 than authkey mismatch. The additional messages make these distingushable 692 for each other. 693 694=============================================================================== 6953.5 Series (2016/01/29 - ) 696=============================================================================== 697 698 3.5.4 (ekieboshi) 2016/08/31 699 700* Version 3.5.4 701 702 This is a bugfix release against pgpool-II 3.5.3. 703 704 __________________________________________________________________ 705 706* Bug fixes 707 708 - Fix buffer over run problem in "show pool_nodes". (Tatsuo Ishii) 709 710 While processing "show pool_nodes", the buffer for hostname was too 711 short. It should be same size as the buffer used for pgpool.conf. 712 Problem reported by a twitter user who is using pgpool on AWS (which 713 could have very long hostname). 714 715 - Fix usage of wait(2) in pgpool main process. (Tatsuo Ishii) 716 717 The usage of wait(2) in pgpool main could cause infinite wait in the 718 system call. Solution is, to use waitpid(2) instead of wait(2). 719 720 - Save and restore errno in each signal handler. (Tatsuo Ishii) 721 722 - Fix handling of pcp_listen_addresses config parameter. (Muhammad Usama) 723 724 - Fix "kind mismatch" error message in pgpool. (Muhammad Usama) 725 726 Many of "kind mismatch..." errors are caused by notice/warning 727 messages produced by one or more of the DB nodes. In this case now 728 Pgpool-II forwards the messages to frontend, rather than throwing the 729 "kind mismatch..." error. This would reduce the chance of "kind 730 mismatch..." errors. 731 732 See [pgpool-hackers: 1501] for more details. 733 734 - Replace "MAJOR" macro to prevent occasional failure. (Tatsuo Ishii) 735 736 The macro calls pool_virtual_master_db_node_id() and then access 737 backend->slots[id]->con using the node id returned. In rare cases, it 738 could point to 0 (in case when the DB node is not connected), which 739 gives access to con->major, then it causes a segfault. 740 741 See bug 225 for related info. 742 743 - Fixing a coding mistake in watchdog code. (Muhammad Usama) 744 745 wd_issue_failover_lock_command() function is supposed to forward command type 746 passed in as an argument to the wd_send_failover_sync_command() function instead 747 it was passing the NODE_FAILBACK_CMD command type. 748 749 The commit also contains some log message enhancements. 750 751 - doc : Fixing a typo in english doc (Muhammad Usama) 752 753 - Fix for bun 215 that pgpool doesn't escalate ip in case of another node inavailability. 754 (Muhammad Usama) 755 756 The heartbeat receiver fails to identify the heartbeat sender watchdog node when 757 the heartbeat destination is specified in terms of an IP address while 758 wd_hostname is configured as a hostname string or vice versa. 759 760 See bug 215 for related info. 761 762 - Fix for bug of inconsistent status of Postgresql nodes in Pgpool instances 763 after restart.(Muhammad Usama) 764 765 Watchdog does not synchronize status. 766 767 See bug 218 for related info. 768 769 - SIGUSR1 signal handler should be installed before watchdog initialization. 770 (Muhammad Usama) 771 772 Since there can be a case where a failover request from other watchdog nodes 773 arrive at the same time when the watchdog has just been initialized, 774 and if we wait any longer to install a SIGUSR1 signal handler, it can 775 result in a potential crash. 776 777 - Fix for bug 228 that pgpool doesn't de-escalate IP in case network restored. 778 (Muhammad Usama) 779 780 See bug 228 for related info. 781 782 - Fix hang when portal suspend received. (Tatsuo Ishii) 783 784 See bug 230 for related info. 785 786 - test : Add regression test for bug 230. (Tatsuo Ishii) 787 788 - Fixing a typo in the log message. (Muhammad Usama) 789 790 - Fixing the error messages when the socket operation fails. (Muhammad Usama) 791 792 - Tighten up health check timer expired condition in pool_check_fd(). (Muhammad Usama) 793 794 - doc : Add comment to the document about connection_cache. (Tatsuo Ishii) 795 796 - Fix Handling of pcp_socket_dir was missing from pool_get_config(). (Muhammad Usama) 797 798 - doc : Fix Japanese document typo. (Bo Peng) 799 800 - Fix "out of memory" by using "pg_md5 -m".(Muhammad Usama) 801 802 See bug 236 for related info. 803 804 - Fix for 237 that Pgpool-II fails to start if listen_addresses is empty string. 805 (Muhammad Usama) 806 807 The socket descriptor array (fds[]) was not getting the array end marker 808 when TCP listen addresses are not used. 809 810 See bug 237 for related info. 811 812=============================================================================== 813 814 3.5.3 (ekieboshi) 2016/06/17 815 816* Version 3.5.3 817 818 This is a bugfix release against pgpool-II 3.5.2. 819 820 __________________________________________________________________ 821 822* New features 823 824 - Allow to access to pgpool while doing health checking (Tatsuo Ishii) 825 826 Currently any attempt to connect to pgpool fails if pgpool is doing 827 health check against failed node even if fail_over_on_backend_error is 828 off because pgpool child first tries to connect to all backend 829 including the failed one and exits if it fails to connect to a backend 830 (of course it fails). This is a temporary situation and will be 831 resolved before pgpool executes failover. However if the health check 832 is retrying, the temporary situation keeps longer depending on the 833 setting of health_check_max_retries and health_check_retry_delay. This 834 is not good. Attached patch tries to mitigate the problem: 835 836 - When an attempt to connect to backend fails, give up connecting to 837 the failed node and skip to other node, rather than exiting the 838 process if operating in streaming replication mode and the node is 839 not primary node. 840 841 - Mark the local status of the failed node to "down". 842 843 - This will let the primary node be selected as a load balance node 844 and every queries will be sent to the primary node. If there's other 845 healthy standby nodes, one of them will be chosen as the load 846 balance node. 847 848 - After the session is over, the child process will suicide to not 849 retain the local status. 850 851 Per [pgpool-hackers: 1531]. 852 853* Bug fixes 854 855 - Fix is_set_transaction_serializable() when 856 SET default_transaction_isolation TO 'serializable'. (Bo Peng) 857 858 SET default_transaction_isolation TO 'serializable' is sent to 859 not only primary but also to standby server in streaming replication mode, 860 and this causes an error. Fix is, in streaming replication mode, 861 SET default_transaction_isolation TO 'serializable' is sent only to the 862 primary server. 863 864 See bug 191 for related info. 865 866 - Fix Chinese documetation bug about raw mode (Yugo Nagata, Bo Peng) 867 Connection pool is avalilable in raw mode. 868 869 - Fix confusing comments in pgpool.conf (Tatsuo Ishii) 870 871 - Fix extended protocol handling in raw mode (Tatsuo Ishii) 872 873 Bug152 reveals that extended protocol handling in raw mode (actually 874 other than in stream mode) was wrong in Describe() and Close(). 875 Unlike stream mode, they should wait for backend response. 876 877 See bug 152 for related info. 878 879 - Permit pgpool to support multiple SSL cipher protocols (Muhammad Usama) 880 881 Currently TLSv1_method() is used to initialize the SSL context, that puts an 882 unnecessary limitation to allow only TLSv1 protocol for SSL communication. 883 While postgreSQL supports other ciphers protocols as well. The commit changes 884 the above and initializes the SSLSession using the SSLv23_method() 885 (same is also used by PostgreSQL). Because it can negotiate the use of the 886 highest mutually supported protocol version and remove the limitation of one 887 specific protocol version. 888 889 - If statement timeout is enabled on backend and do_query() sends a (Tatsuo Ishii) 890 query to primary node, and all of following user queries are sent to 891 standby, it is possible that the next command, for example END, could 892 cause a statement timeout error on the primary, and a kind mismatch 893 error on pgpool-II is raised. 894 895 This fix tries to mitigate the problem by sending sync message instead 896 of flush message in do_query(), expecting that the sync message reset 897 the statement timeout timer if we are in an explicit transaction. We 898 cannot use this technique for implicit transaction case, because the 899 sync message removes the unnamed portal if there's any. 900 901 Plus, pg_stat_statement will no longer show the query issued by 902 do_query() as "running". 903 904 See bug 194 for related info. 905 906 - Deal with the case when the primary is not node 0 in streaming replication mode. 907 (Tatsuo Ishii) 908 909 http://www.pgpool.net/mantisbt/view.php?id=194#c837 reported that if 910 primary is not node 0, then statement timeout could occur even after 911 bug194-3.3.diff was applied. After some investigation, it appeared 912 that MASTER macro could return other than primary or load balance 913 node, which was not supposed to happen, thus do_query() sends queries 914 to wrong node (this is not clear from the report but I confirmed it in 915 my investigation). 916 917 pool_virtual_master_db_node_id(), which is called in MASTER macro 918 returns query_context->virtual_master_node_id if query context 919 exists. This could return wrong node if the variable has not been set 920 yet. To fix this, the function is modified: if the variable is not 921 either load balance node or primary node, the primary node id is 922 returned. 923 924 - Fix a posible hang during health checking (Yugo Nagata) 925 926 Helath checking was hang when any data wasn't sent 927 from backend after connect(2) succeeded. To fix this, 928 pool_check_fd() returns 1 when select(2) exits with 929 EINTR due to SIGALRM while health checkking is performed. 930 931 Reported and patch provided by harukat and some modification 932 by Yugo. 933 934 See bug 204 for related info. 935 936 - change the Makefile under this directory src/sql/,that is proposed by (Bo Peng) 937 [pgpool-hackers: 1611] 938 939 - fix for 0000197: pgpool hangs connections to database.. (Muhammad Usama) 940 941 The client connection was getting stuck when backend node and remote pgpool-II 942 node becomes unavailable at the same time. The reason was a missing command 943 timeout handling in the function that sends the IPC commands to watchdog. 944 945 - Fix bug with load balance node id info on shmem (Tatsuo Ishii) 946 947 There are few places where the load balance node was mistakenly put on 948 wrong place. It should be placed on: 949 ConnectionInfo *con_info[child id, connection pool_id, backend id].load_balancing_node]. 950 In fact it was placed on: 951 *con_info[child id, connection pool_id, 0].load_balancing_node]. 952 953 As long as the backend id in question is 0, it is ok. However while 954 testing pgpool-II 3.6's enhancement regarding failover, if primary 955 node is 1 (which is the load balance node) and standby is 0, a client 956 connecting to node 1 is disconnected when failover happens on node 957 0. This is unexpected and the bug was revealed. 958 959 It seems the bug was there since long time ago but it had not found 960 until today by the reason above. 961 962 963 - Fixing coverity scan reported issues. (Muhammad Usama) 964 965=============================================================================== 966 967 3.5.2 (ekieboshi) 2016/04/26 968 969* Version 3.5.2 970 971 This is a bugfix release against pgpool-II 3.5.1. 972 973 __________________________________________________________________ 974 975* Bug fixes 976 977 - Fix for segfault during trusted_servers check (Muhammad Usama) 978 979 PostgreSQL's memory and exception manager APIs adopted by the 980 pgpool 3.4 are not thread safe and are causing the segmentation fault 981 in the watchdog lifecheck process, as it uses the threads to ping 982 configured trusted hosts for checking the upstream connections. 983 Fix is to remove threads and use the child process approach instead. 984 985 See [pgpool-general: 4569] for more details. 986 987 - Removing the limit on the maximum number of items in the 988 black_function_list and white_function_list lists (Muhammad Usama) 989 990 extract_string_tokens in pool_config uses the fixed size malloc on 991 the array to hold the black_function_list/white_function_list items. 992 This imposes a limit of maximum items in these lists. 993 The fix is to use realloc to increase the array size when it gets full. 994 995 - Fix check "PCP Directory" in "Parameter Setting" in install 996 (Nozomi Anzai) 997 998 The command "pcp_system_info" was discarded in 3.5, but pgpoolAdmin 999 still confirmed if it existed. 1000 1001 Per bug #187. 1002 1003 - Fix extended protocol hang with empty query (Tatsuo Ishii) 1004 1005 The fixes related to extended protocol cases in 3.5.1 broke the case 1006 of empty query. In this case backend replies with "empty query 1007 response" which is same meaning as a command complete message. Problem 1008 is, when empty query response is received, pgpool does not reset the 1009 query in progress flag thus keeps on waiting for backend. However, 1010 backend will not send the ready for query message until it receives a 1011 sync message. Fix is, resetting the in progress flag after receiving 1012 the empty query response and reads from frontend expecting it sends a 1013 sync message. 1014 1015 Per bug #190. 1016 1017 - Redirect all user queries to primary server (Tatsuo Ishii) 1018 1019 Up to now some user queries are sent to other than the primary server 1020 even if load_balance_mode = off. This commit changes the behavior: if 1021 load_balance_mode = off in streaming replication mode, now all the 1022 user queries are sent to the primary server only. 1023 1024 Per bug #189. 1025 1026 - Change the PID length of pcp_proc_count command result to 6 characters 1027 long (Bo Peng) 1028 1029 If the pgpool process ID are over 5 characters, the 6th character of each 1030 process ID will be removed. This commit changes the process ID length of 1031 pcp_proc_count command result to 6 characters long. 1032 1033 Per bug #188. 1034 1035=============================================================================== 1036 1037 3.5.1 (ekieboshi) 2016/04/04 1038 1039* Version 3.5.1 1040 1041 This is a bugfix release against pgpool-II 3.5.0. 1042 1043 __________________________________________________________________ 1044 1045* Bug fixes 1046 1047 - Add some warning messages for wd_authkey hash calculation failure 1048 (Yugo Nagata) 1049 1050 Sometimes wd_authkey calculation fails for some reason other than 1051 authkey mismatch. The additional messages make these distingushable 1052 for each other. 1053 1054 - test: Fix regression test to check timeout of each test (Yugo Nagata) 1055 1056 - test: Allow timeout value to be specified by the command option 1057 (Yugo Nagata) 1058 1059 - Fix compile issue on FreeBSD (Muhammad Usama) 1060 1061 Added missing include files. 1062 1063 Per bug #166. The patch is contributed by the bug reporter and 1064 enhanced a little by Usama. 1065 1066 - test: Fix test/regression/clean.sh to remove binary files of 1067 010.rewrite_timestamp test (Yugo Nagata) 1068 1069 - Fix memorry leak reported by Coverity (CID 1350095) (Yugo Nagata) 1070 1071 - Fixing pgpool-recovery module compilation issue with PostgreSQL 9.6 1072 (Muhammad Usama) 1073 1074 Incorporating the change of function signature for GetConfigOption..() 1075 functions in PostgreSQL 9.6. 1076 1077 - Fix to properly process an empty query that has only comments 1078 (Tatsuo Ishii) 1079 1080 Pgpool-II recognized an empty query, for example "/* DBD::Pg ping test 1081 v3.5.3 */" (note that it has no ';') as an error and emits message 1082 "Unable to parse the query". This is because raw_parser() cannot 1083 distinguish an empty query from an error query due to the poor API 1084 design. To fix this new out parameter "*error" added to the 1085 function. If an error occurred, the variable is set to true and caller 1086 can know the reason why raw_parser() returns NIL is because of an error 1087 query or an empty query. 1088 1089 Per bug #154. See [pgpool-hackers: 1359] for additional information. 1090 1091 - Fix a reset query stuck problem (Muhammad Usama) 1092 1093 The solution is to report FRONTEND_ERROR instead of simple ERROR when 1094 pool_flush on front-end socket fails. 1095 1096 The original report is 1097 [pgpool-general: 4265] Pgpool - connection hangs in DISCARD ALL 1098 1099 The patch was generated by Usama and Pawel Ufnalewski<archon@foap.com>, 1100 and Gerhard Wiesinger <lists@wiesinger.com> helped to verify and test 1101 the fix. 1102 1103 - Fix a reset query stuck problem (Tatsuo Ishii) 1104 1105 After receiving X message from frontend, if pgpool-II detects EOF on 1106 the connection before sending reset query, pgpool-II could wait for 1107 a response from backend which had not received the reset query. 1108 To fix this, if EOF received, treat this as FRONTEND_ERROR, rather 1109 than ERROR. 1110 1111 See "[pgpool-hackers: 1440] Yet another reset query stuck problem" 1112 for more details. 1113 1114 - Fix query stuck problems in streaming replication mode with extended 1115 protocol queries (Tatsuo Ishii) 1116 1117 This fix is for both bug #167 and #168. 1118 1119 - Fix pgpool hung after receiving error state from backend (Tatsuo Ishii) 1120 1121 This could happend if we execute an extended protocol query and it 1122 fails. 1123 1124 Per bug #169. 1125 1126 - Fix bug that child processes exit and are not re-spawned (Muhammad Usama) 1127 1128 The problem was due to a logical mistake in the code for checking the 1129 exiting child process type when the watchdog is enabled. Also the severity 1130 of the message emitted for child exits due to max connection reached 1131 from FATAL to LOG. 1132 1133 Per [pgpool-general: 4519] Worker Processes Exit and Are Not Re-spawned 1134 1135 - Fix typo in configure (Tatsuo Ishii) 1136 1137 Patch provided by Thomas Munro. 1138 1139 - doc: Change description of backend_flag (Tatsuo Ishii) 1140 1141 It is pointed out that restarting pgpool-II is not necessary. 1142 1143 Per [pgpool-general-jp: 1394]. 1144 1145 - doc: Fix installation procedure. (Tatsuo Ishii) 1146 1147 With PostgreSQL 9.4 or later, installing pgpool_regclass is not needed. 1148 1149 - test: Fix pgpool_setup to not confuse log output (Tatsuo Ishii) 1150 1151 Before it simply redirects stdout and stderr of pgpool processes to 1152 a log file. This could cause the log contents being garbled or even 1153 missed because of race condition caused by multiple process being 1154 writing concurrently. 1155 1156 To fix this, pgpool_setup now generates startall script in which pgpool 1157 sends stdout/stderr to cat command by pipe, and cat writes to the log 1158 file. 1159 1160 - Fix to validate the PCP packet length (Muhammad Usama) 1161 1162 Without the validation check, a malformed PCP packet can crash the 1163 PCP child and/or can run the server out of memory by sending the packet 1164 with a very large data size. 1165 1166=============================================================================== 1167 1168 3.5.0 (ekieboshi) 2016/01/29 1169 1170* Version 3.5.0 1171 1172 This is the first version of pgpool-II 3.5 series. 1173 That is, a "major version up" from 3.4 series. 1174 1175 __________________________________________________________________ 1176 1177* Incompatible changes 1178 1179 - Remove parallel query mode codes (Yugo Nagata) 1180 1181 There are very few users and the maintenance efforts are not worth it. 1182 Codes for system db are also removed, since this was used in only parallel 1183 query mode and old query cache on disk. 1184 1185 - Rename parameter name from ifconfig_path to if_cmd_path (Yugo Nagata) 1186 1187 ifconfig_path isn't appropriate for the parameter name because 1188 ifconfig command is obsolete and now ip command is used as default. 1189 1190 - Change the syntax of pcp commands arguments (Muhammad Usama) 1191 1192 - Change the output and the argument semantics of pcp_watchdog_info command 1193 (Muhammad Usama) 1194 1195 The command is enhanced to show watchdog information about all pgpool-II 1196 nodes in the cluster. According to this, the argument to specify node index 1197 is changed so that 0 means local pgpool-II node instead of the first remote 1198 node. 1199 1200 __________________________________________________________________ 1201 1202* New features 1203 1204 - Add new parameter "serialize_accept" (Tatsuo Ishii) 1205 1206 This parameter defines whether to serialize accept() call for incoming 1207 client connections. Default is off, which means no serializing (same 1208 behavior as pgpool-II 3.4 or before). If this is off, the kernel 1209 wakes up all of pgpool-II child process to execute accept() and one of 1210 them actually accepts the incoming connection. Problem here is, 1211 because so my child process wake up at a same time, heavy context 1212 switching occurred and the performance is affected. This phenomena is 1213 a classic problem called "the thundering herd problem". By enabling 1214 serialize_accept, only one of pgpool-II child process is woken up and 1215 executes accept() and the problem can be avoided. 1216 1217 - Import parser of PostgreSQL 9.5 (Yugo Nagata) 1218 1219 pgpool-II can understand new syntax introduced in PostgreSQL 9.5 now. 1220 Especially GROUPING SET, CUBE, ROLLUP and TABLESAMPLE can be be load 1221 balanced and can be used in query cache (except for TABLESAMPLE). 1222 1223 Also INSERT...ON CONFLICT and UPDATE tab SET (col1, col2, ...) = 1224 (SELECT ...) ... can now be properly handled in query rewriting in 1225 native replication mode. 1226 1227 - Allow to specify database for health check and streaming replication 1228 delay check. (Tatsuo Ishii) 1229 1230 For this purpose new directive "health_check_database" and 1231 "sr_check_database" are added. 1232 1233 __________________________________________________________________ 1234 1235* Enhancements 1236 1237 - Performance improvement in extened query protocol (Tatsuo Ishii) 1238 1239 Unnecessary "flush" messages which used to be sent in each step of 1240 extended protocol messages (parse, bind, describe and execute) and 1241 brought significant communication overhead are removed. For now it 1242 only affects to streaming replication mode, that is, the performance 1243 of other modes remains same. 1244 1245 - watchdog feature enhancements (Muhammad Usama, Yugo Nagata) 1246 1247 The goal of this enhancement is to address the shortcomings and problems 1248 in the pgpool watchdog and make the watchdog system more robust and 1249 adaptable. Patch created by Usama, and reviewed, tested, and debugged 1250 by Yugo. 1251 1252 -- The watchdog should consider the quorum and only elect the master/leader 1253 node if the quorum exist in the watchdog cluster. 1254 -- All the participating pgpool-II nodes in the watchdog cluster should have 1255 similar pgpool-II configurations. 1256 -- Watchdog nodes should have configurable watchdog node priority, to give 1257 users more control on which node should become a leader node. 1258 -- More options for the node health-checking, especially watchdog should allow 1259 external/3rd party node health checking system to integrate with it. 1260 -- The watchdog should keep looking for problems like split-brain syndrome and 1261 should automatically recover from it. 1262 -- Allow user to provide scripts to be executed at time of escalation and 1263 de-escalation to master/leader nodes. 1264 1265 Add these new parameters: 1266 1267 -- wd_ipc_socket_dir: 1268 This parameter is used to specify the directory where the UNIX domain 1269 socket accepting pgpool-II watchdog IPC connections will be created. 1270 1271 -- wd_priority: 1272 This new parameter can be used to elevate the current watchdog node 1273 priority in leader elections. The node with the higher wd_priority 1274 value will get selected as master/coordinator watchdog node when 1275 cluster will be electing its master node at cluster startup or in the 1276 event of old master watchdog node failure. 1277 1278 -- wd_de_escalation_command: 1279 This parameter holds the command that watchdog will execute on the 1280 master pgpool-II watchdog node when that node resigns from the master 1281 node responsibilities. 1282 1283 -- wd_monitoring_interfaces_list: 1284 This parameter holds a comma separated list of network device names to 1285 be monitored by the watchdog process for the network link state. 1286 1287 - Overhauling pcp commands (Muhammad Usama) 1288 1289 -- Improved handling of command argument: 1290 Long command line options can be used now. 1291 -- PCP password is safe: 1292 Don't pass password via command line, which causes security risks. 1293 -- Mutiple concurrent execution of pcp commands: 1294 Allow to execute a pcp command while running pcp_recovery_node 1295 which takes sometime to finish. 1296 1297 - SELECT count statics in "show pool_nodes" command results (Tatsuo Ishii) 1298 1299 show pool_nodes results which briefly describes the status of each backend 1300 now shows how many SELECTs are issued to them. So you can quickly 1301 recognize the effect of load balancing for example; 1302 1303 test=# show pool_nodes; 1304 node_id | hostname | port | status | lb_weight | role | select_cnt 1305 ---------+----------+-------+--------+-----------+---------+------------ 1306 0 | /tmp | 11002 | 2 | 0.500000 | primary | 338230 1307 1 | /tmp | 11003 | 2 | 0.500000 | standby | 163939 1308 (2 rows) 1309 1310 - Parser enhancements for query rewriting (Yugo Nagata) 1311 1312 INSERT/UPDATE/DELETE with WITH clause, writable CTE, RETURNING clause 1313 can now be properly handled in query rewriting in native replication mode. 1314 1315 - Allow to open pool_passwd file in read only mode by pgpool-II main 1316 process (Tatsuo Ishii) 1317 1318 - Allow to run pgpool in debug mode in regression tests (Tatsuo Ishii) 1319 1320 - doc:Add pgpool_adm documents (Tatsuo Ishii) 1321 1322 - doc:Update Chinese documents (Bambo Huang) 1323 1324 __________________________________________________________________ 1325 1326* Bug fixes (since 3.4.3) 1327 1328 - doc: Fix misinformation regarding load balancing in docs (Tatsuo Ishii) 1329 1330 In streaming replication mode, DECLARE, FETCH, CLOSE and SHOW are sent 1331 to primary node only. Pointed out in [pgpool-general-jp: 1378]. 1332 1333 - Issue fsync() when writing pgpool_status. (Tatsuo Ishii) 1334 1335 This ensures that pgpool_status is saved to permanent storage and 1336 allow to survive after system crash. 1337 1338 - Fix reset query stuck problem (Muhammad Usama) 1339 1340 It is reported that reset query (DISCARD ALL etc.) occasionally does 1341 not finish and pgpool child remain waiting for reply from the backend 1342 thus client cannot connect to pgpool (for example bug report #107). 1343 The cause of problem is not identified yet but if client suddenly 1344 closes connection to pgpool in the middle of query processing, backend 1345 may not accept the reset queries because they are not ready for query. 1346 1347 The fix is to keep track of the status of frontend socket state and not 1348 caching the PostgreSQL connection if the connection to frontend was not 1349 properly terminated. 1350 1351 - test: Fix false alerm of regression tset 062 (Yugo Nagata) 1352 1353 - test: Fix broken regression test for native replication (Yugo Nagata) 1354 1355 Test for insert-lock didn't work. 1356 1357 - test: Fix regress test to sleep after pgpool_reload (Yugo Nagata) 1358 1359 Some regression tests modify configuration file and reloads. However, 1360 sometimes these were not applied to pgpool just after reloading. 1361 1362 - Fix inconsistency of sequence values in replication mode (Yugo Nagata) 1363 1364 When a schema name was provided, the table name was quoted wrongly as 1365 like "public.mytbl" instead of "public"."mytbl". So, pool_regclass 1366 and to_regclass couldn't find right talbe oid and insert lock was 1367 never executed. This caused inconsistency between DB nodes. 1368 1369 - test: Fix complication error and segfault of timestamp rewrite test (Yugo Nagata) 1370 1371 - doc: Fix untranslated sentence in Japanese document (Yugo Nagata) 1372 1373 - Fix ancient bug of pool_push() and friends. (Tatsuo Ishii) 1374 1375 It allocates buffer using realloc and uses the pointer 1376 returned. However it does the pointer calculation *before* realloc 1377 gets called. So the calculation uses the old pointer value, which 1378 causes various problems including segfault later. 1379 1380 Also there were other problems with it. The buffer pointer and buffer 1381 size variable is not initialized. The buffer is not freed by 1382 pool_close. Typo in debugging message (3.4 or later only). They are 1383 fixed as well. 1384 1385 - doc: Fix wrong description in documents about log_standby_delay (Yugo Nagata) 1386 1387 - Fix segfalut that occurs when function is used in FROM clause (Yugo Nagata) 1388 1389 PRPARE statements in streaming-reaplication mode and INSERT/UPDATE 1390 with SELECT in native-replication mode were affected. For example: 1391 1392 - prepare p as select * from generate_series(1,1); 1393 - insert into tbl select now(), * from generate_series(1,1); 1394 1395 - doc: Add caution about JDBC driver version regarding app_name_redirect_preference_list 1396 (Tatsuo Ishii) 1397 1398 - Fix hang problmen reported in bug #145. (Tatsuo Ishii) 1399 1400 The problem occurs when all the condition below are met: 1401 1402 1) pgpool-II 3.4 or later 1403 2) streaming replication mode 1404 3) primary node is also load balance node 1405 4) extended protocol is used 1406 5) client_idle_limit reached 1407 1408 - Fix a in-memory query cache bug (Tatsuo Ishii) 1409 1410 If extended query protocol is used and a bind/execute message arrives 1411 which uses a statement created by prior parse message, the temp_cache 1412 is not initialized by a parse messages. Thus messages are added to pre 1413 existing temp cache buffer which causes the trouble, that is, when the 1414 cached result returns, Data Row message and Command Complete message 1415 appeared twice. 1416 1417 Per by bug #152. 1418 1419 - test: Fix regression test 065. (Tatsuo Ishii) 1420 1421 The path to JDBC driver was explicitly defined. This is wrong. This 1422 should be inherited from JDBC_DRIVER environment variable. 1423 1424 - test: Fix possible hang-up of regression test 054.postgres_fdw (Yugo Nagata) 1425 1426 - test: Add option to regress.sh and pgpool_setup for unix domain socket 1427 directory (Yugo Nagata) 1428 1429 - doc: Add missing descriptions about default values to documents 1430 (Yugo Nagata) 1431 1432 - test: Fix regression test 055 for rhel7 rpm (Yugo Nagata) 1433 1434 - Fix reset query stuck problem (Muhammad Usama) 1435 1436 The issue is already fixed in older branches and this fix adopts the 1437 same solution used by 3.3 series, i.e. closing the backend connection 1438 when client idle limit is reached. 1439 1440 - Fix bug with "SET TRANSACTION READ ONLY" (Tatsuo Ishii) 1441 1442 Pgpool-II remembers that non read only queries (including SET) were 1443 executed in an explicit transaction and adds a "writing transaction" 1444 mark to the transaction. The mark affects the query routing behavior 1445 of pgpool-II while running in streaming replication mode. Pgpool-II 1446 starts sending queries to the primary after the mark is set. Because 1447 the effect of writing queries may appear on standbys after some delay 1448 in streaming replication mode, it is safer to route read queries to 1449 the primary after the mark is set. 1450 1451 However there's oversight here. "SET TRANSACTION READ ONLY" does no 1452 data modification and should be treated as an exception. 1453 1454 Per bug #157. 1455 1456 - test: Fix to use timeout command to handle time out of regress test 062 1457 (Yugo Nagata) 1458 1459 - Fix to show wrong error (Tatsuo Ishii) 1460 1461 connect_with_timeout() does not show proper error info when 1462 getsockopt(SO_ERROR) reports an error. Pointed out in bug #159. 1463 1464 - test: Add regress.sh missing \n in help messages (Yugo Nagata) 1465 1466 - Fix the logic issue in get_backends_status() function (Muhammad Usama) 1467 1468 get_backends_status () function counts the number of current valid and down 1469 backend nodes. The function assumed that the node was also invalid when its 1470 connection status was down. However, that is not always right. 1471 1472 - Fix white/black_memqcache_table_list not to require quotaion (Yugo Nagata) 1473 1474 The tables and schemas name specified in *_memqcache_table_list 1475 were needed to be quoted by double quotation. 1476 1477 Patch contributed by Dang Minh Huong. 1478 Per [pgpool-hackers: 1323] 1479 1480 - Fix FATAL error with reloading (Tatsuo Ishii) 1481 1482 While reloading pgpool.conf, the number of DB nodes is tentatively set 1483 to 0, then counted up until reaching to the actual number of backends 1484 by the pgpool main process. Unfortunately the variable was on the 1485 shared memory and it confused pgpool child process when they were using 1486 the variable and this caused FATAL error. 1487 1488 Per bug #156 report by harukat. 1489 1490 - test: Add some tests for white/black_memqcache_table_list to regression 1491 test 006.memqcache (Yugo Nagata) 1492 1493 - Fix reset query stuck problem (Muhammad Usama, Tatsuo Ishii) 1494 1495 When pool_read fails to read from frontend or pool_flush fails to 1496 write to the frontend, report FRONTEND_ERROR, rather than ERROR to 1497 disconnect and terminate pgpool child process, to prevent the query 1498 stuck problem. 1499 1500 - test: Fix some regression tests that failed in debug mode (Yugo Nagata) 1501 1502 - Fix performance degradation while using IPv6 (Muhammad Usama) 1503 1504 Per bug #165. 1505 1506=============================================================================== 15073.4 Series (2014/11/07 - ) 1508=============================================================================== 1509 1510 3.4.8 (tataraboshi) 2016/08/31 1511 1512* Version 3.4.8 1513 1514 This is a bugfix release against pgpool-II 3.4.7. 1515 1516 __________________________________________________________________ 1517 1518* Bug fixes 1519 1520 - Fix buffer over run problem in "show pool_nodes". (Tatsuo Ishii) 1521 1522 While processing "show pool_nodes", the buffer for hostname was too 1523 short. It should be same size as the buffer used for pgpool.conf. 1524 Problem reported by a twitter user who is using pgpool on AWS (which 1525 could have very long hostname). 1526 1527 - Fix usage of wait(2) in pgpool main process. (Tatsuo Ishii) 1528 1529 The usage of wait(2) in pgpool main could cause infinite wait in the 1530 system call. Solution is, to use waitpid(2) instead of wait(2). 1531 1532 - Save and restore errno in each signal handler. (Tatsuo Ishii) 1533 1534 - Fix handling of pcp_listen_addresses config parameter. (Muhammad Usama) 1535 1536 - Fix "kind mismatch" error message in pgpool. (Muhammad Usama) 1537 1538 Many of "kind mismatch..." errors are caused by notice/warning 1539 messages produced by one or more of the DB nodes. In this case now 1540 Pgpool-II forwards the messages to frontend, rather than throwing the 1541 "kind mismatch..." error. This would reduce the chance of "kind 1542 mismatch..." errors. 1543 1544 See [pgpool-hackers: 1501] for more details. 1545 1546 - Replace "MAJOR" macro to prevent occasional failure. (Tatsuo Ishii) 1547 1548 The macro calls pool_virtual_master_db_node_id() and then access 1549 backend->slots[id]->con using the node id returned. In rare cases, it 1550 could point to 0 (in case when the DB node is not connected), which 1551 gives access to con->major, then it causes a segfault. 1552 1553 See bug 225 for related info. 1554 1555 - doc : Fixing a typo in english doc (Muhammad Usama) 1556 1557 - doc : fix Japanese document typo. (Bo Peng) 1558 1559 - Fixing a typo in the log message. (Muhammad Usama) 1560 1561 - Tighten up health check timer expired condition in pool_check_fd(). (Muhammad Usama) 1562 1563 - doc : Add comment to the document about connection_cache. (Tatsuo Ishii) 1564 1565 - Fix for 237 that Pgpool-II fails to start if listen_addresses is empty string. 1566 (Muhammad Usama) 1567 1568 The socket descriptor array (fds[]) was not getting the array end marker 1569 when TCP listen addresses are not used. 1570 1571 See bug 237 for related info. 1572 1573=============================================================================== 1574 1575 3.4.7 (tataraboshi) 2016/06/17 1576 1577* Version 3.4.7 1578 1579 This is a bugfix release against pgpool-II 3.4.6. 1580 1581 __________________________________________________________________ 1582 1583* New features 1584 1585 - Allow to access to pgpool while doing health checking (Tatsuo Ishii) 1586 1587 Currently any attempt to connect to pgpool fails if pgpool is doing 1588 health check against failed node even if fail_over_on_backend_error is 1589 off because pgpool child first tries to connect to all backend 1590 including the failed one and exits if it fails to connect to a backend 1591 (of course it fails). This is a temporary situation and will be 1592 resolved before pgpool executes failover. However if the health check 1593 is retrying, the temporary situation keeps longer depending on the 1594 setting of health_check_max_retries and health_check_retry_delay. This 1595 is not good. Attached patch tries to mitigate the problem: 1596 1597 - When an attempt to connect to backend fails, give up connecting to 1598 the failed node and skip to other node, rather than exiting the 1599 process if operating in streaming replication mode and the node is 1600 not primary node. 1601 1602 - Mark the local status of the failed node to "down". 1603 1604 - This will let the primary node be selected as a load balance node 1605 and every queries will be sent to the primary node. If there's other 1606 healthy standby nodes, one of them will be chosen as the load 1607 balance node. 1608 1609 - After the session is over, the child process will suicide to not 1610 retain the local status. 1611 1612 Per [pgpool-hackers: 1531]. 1613 1614* Bug fixes 1615 1616 - Fix is_set_transaction_serializable() when 1617 SET default_transaction_isolation TO 'serializable'. (Bo Peng) 1618 1619 SET default_transaction_isolation TO 'serializable' is sent to 1620 not only primary but also to standby server in streaming replication mode, 1621 and this causes an error. Fix is, in streaming replication mode, 1622 SET default_transaction_isolation TO 'serializable' is sent only to the 1623 primary server. 1624 1625 See bug 191 for related info. 1626 1627 - Fix Chinese documetation bug about raw mode (Yugo Nagata, Bo Peng) 1628 Connection pool is avalilable in raw mode. 1629 1630 - Fix confusing comments in pgpool.conf (Tatsuo Ishii) 1631 1632 - Permit pgpool to support multiple SSL cipher protocols (Muhammad Usama) 1633 1634 Currently TLSv1_method() is used to initialize the SSL context, that puts an 1635 unnecessary limitation to allow only TLSv1 protocol for SSL communication. 1636 While postgreSQL supports other ciphers protocols as well. The commit changes 1637 the above and initializes the SSLSession using the SSLv23_method() 1638 (same is also used by PostgreSQL). Because it can negotiate the use of the 1639 highest mutually supported protocol version and remove the limitation of one 1640 specific protocol version. 1641 1642 - If statement timeout is enabled on backend and do_query() sends a (Tatsuo Ishii) 1643 query to primary node, and all of following user queries are sent to 1644 standby, it is possible that the next command, for example END, could 1645 cause a statement timeout error on the primary, and a kind mismatch 1646 error on pgpool-II is raised. 1647 1648 This fix tries to mitigate the problem by sending sync message instead 1649 of flush message in do_query(), expecting that the sync message reset 1650 the statement timeout timer if we are in an explicit transaction. We 1651 cannot use this technique for implicit transaction case, because the 1652 sync message removes the unnamed portal if there's any. 1653 1654 Plus, pg_stat_statement will no longer show the query issued by 1655 do_query() as "running". 1656 1657 See bug 194 for related info. 1658 1659 - Fix a posible hang during health checking (Yugo Nagata) 1660 1661 Helath checking was hang when any data wasn't sent 1662 from backend after connect(2) succeeded. To fix this, 1663 pool_check_fd() returns 1 when select(2) exits with 1664 EINTR due to SIGALRM while health checkking is performed. 1665 1666 Reported and patch provided by harukat and some modification 1667 by Yugo. 1668 1669 See bug 204 for related info. 1670 1671 - change the Makefile under this directory src/sql/,that is proposed by (Bo Peng) 1672 [pgpool-hackers: 1611] 1673 1674 - Fix bug with load balance node id info on shmem (Tatsuo Ishii) 1675 1676 There are few places where the load balance node was mistakenly put on 1677 wrong place. It should be placed on: 1678 ConnectionInfo *con_info[child id, connection pool_id, backend id].load_balancing_node]. 1679 In fact it was placed on: 1680 *con_info[child id, connection pool_id, 0].load_balancing_node]. 1681 1682 As long as the backend id in question is 0, it is ok. However while 1683 testing pgpool-II 3.6's enhancement regarding failover, if primary 1684 node is 1 (which is the load balance node) and standby is 0, a client 1685 connecting to node 1 is disconnected when failover happens on node 1686 0. This is unexpected and the bug was revealed. 1687 1688 It seems the bug was there since long time ago but it had not found 1689 until today by the reason above. 1690 1691 1692 - Deal with the case when the primary is not node 0 in streaming replication mode. (Tatsuo Ishii) 1693 1694 http://www.pgpool.net/mantisbt/view.php?id=194#c837 reported that if 1695 primary is not node 0, then statement timeout could occur even after 1696 bug194-3.3.diff was applied. After some investigation, it appeared 1697 that MASTER macro could return other than primary or load balance 1698 node, which was not supposed to happen, thus do_query() sends queries 1699 to wrong node (this is not clear from the report but I confirmed it in 1700 my investigation). 1701 1702 pool_virtual_master_db_node_id(), which is called in MASTER macro 1703 returns query_context->virtual_master_node_id if query context 1704 exists. This could return wrong node if the variable has not been set 1705 yet. To fix this, the function is modified: if the variable is not 1706 either load balance node or primary node, the primary node id is 1707 returned. 1708 1709=============================================================================== 1710 1711 3.4.6 (tataraboshi) 2016/04/26 1712 1713* Version 3.4.6 1714 1715 This is a bugfix release against pgpool-II 3.4.5. 1716 1717 __________________________________________________________________ 1718 1719* Bug fixes 1720 1721 - Fix for segfault during trusted_servers check (Muhammad Usama) 1722 1723 PostgreSQL's memory and exception manager APIs adopted by the 1724 pgpool 3.4 are not thread safe and are causing the segmentation fault 1725 in the watchdog lifecheck process, as it uses the threads to ping 1726 configured trusted hosts for checking the upstream connections. 1727 Fix is to remove threads and use the child process approach instead. 1728 1729 See [pgpool-general: 4569] for more details. 1730 1731 - Removing the limit on the maximum number of items in the 1732 black_function_list and white_function_list lists. (Muhammad Usama) 1733 1734 extract_string_tokens in pool_config uses the fixed size malloc on 1735 the array to hold the black_function_list/white_function_list items. 1736 This imposes a limit of maximum items in these lists. 1737 The fix is to use realloc to increase the array size when it gets full. 1738 1739 - Redirect all user queries to primary server (Tatsuo Ishii) 1740 1741 Up to now some user queries are sent to other than the primary server 1742 even if load_balance_mode = off. This commit changes the behavior: if 1743 load_balance_mode = off in streaming replication mode, now all the 1744 user queries are sent to the primary server only. 1745 1746 Per bug #189. 1747 1748 - Change the PID length of pcp_proc_count command result to 6 characters 1749 long (Bo Peng) 1750 1751 If the pgpool process ID are over 5 characters, the 6th character of each 1752 process ID will be removed. This commit changes the process ID length of 1753 pcp_proc_count command result to 6 characters long. 1754 1755 Per bug #188. 1756 1757=============================================================================== 1758 1759 3.4.5 (tataraboshi) 2016/04/04 1760 1761* Version 3.4.5 1762 1763 This is a bugfix release against pgpool-II 3.4.4. 1764 1765 __________________________________________________________________ 1766 1767* Bug fixes 1768 1769 - test: Fix test/regression/clean.sh to remove binary files of 1770 010.rewrite_timestamp test (Yugo Nagata) 1771 1772 - Fix memorry leak reported by Coverity (CID 1350095) (Yugo Nagata) 1773 1774 - Fixing pgpool-recovery module compilation issue with PostgreSQL 9.6 1775 (Muhammad Usama) 1776 1777 Incorporating the change of function signature for GetConfigOption..() 1778 functions in PostgreSQL 9.6. 1779 1780 - Fix a reset query stuck problem (Muhammad Usama) 1781 1782 The solution is to report FRONTEND_ERROR instead of simple ERROR when 1783 pool_flush on front-end socket fails. 1784 1785 The original report is 1786 [pgpool-general: 4265] Pgpool - connection hangs in DISCARD ALL 1787 1788 The patch was generated by Usama and Pawel Ufnalewski<archon@foap.com>, 1789 and Gerhard Wiesinger <lists@wiesinger.com> helped to verify and test 1790 the fix. 1791 1792 - Fix typo in configure (Tatsuo Ishii) 1793 1794 Patch provided by Thomas Munro. 1795 1796 - doc: Change description of backend_flag (Tatsuo Ishii) 1797 1798 It is pointed out that restarting pgpool-II is not necessary. 1799 1800 Per [pgpool-general-jp: 1394]. 1801 1802 - doc: Fix installation procedure. (Tatsuo Ishii) 1803 1804 With PostgreSQL 9.4 or later, installing pgpool_regclass is not needed. 1805 1806 - test: Fix pgpool_setup to not confuse log output (Tatsuo Ishii) 1807 1808 Before it simply redirects stdout and stderr of pgpool processes to 1809 a log file. This could cause the log contents being garbled or even 1810 missed because of race condition caused by multiple process being 1811 writing concurrently. 1812 1813 To fix this, pgpool_setup now generates startall script in which pgpool 1814 sends stdout/stderr to cat command by pipe, and cat writes to the log 1815 file. 1816 1817 - Fix to validate the PCP packet length (Muhammad Usama) 1818 1819 Without the validation check, a malformed PCP packet can crash the 1820 PCP child and/or can run the server out of memory by sending the packet 1821 with a very large data size. 1822 1823=============================================================================== 1824 1825 3.4.4 (tataraboshi) 2016/02/05 1826 1827* Version 3.4.4 1828 1829 This is a bugfix release against pgpool-II 3.4.3. 1830 1831 __________________________________________________________________ 1832 1833* Bug fixes 1834 1835 - doc: Fix misinformation regarding load balancing in docs (Tatsuo Ishii) 1836 1837 In streaming replication mode, DECLARE, FETCH, CLOSE and SHOW are sent 1838 to primary node only. Pointed out in [pgpool-general-jp: 1378]. 1839 1840 - Issue fsync() when writing pgpool_status (Tatsuo Ishii) 1841 1842 This ensures that pgpool_status is saved to permanent storage and 1843 allow to survive after system crash. 1844 1845 - Fix reset query stuck problem (Muhammad Usama) 1846 1847 It is reported that reset query (DISCARD ALL etc.) occasionally does 1848 not finish and pgpool child remain waiting for reply from the backend 1849 thus client cannot connect to pgpool (for example bug report #107). 1850 The cause of problem is not identified yet but if client suddenly 1851 closes connection to pgpool in the middle of query processing, backend 1852 may not accept the reset queries because they are not ready for query. 1853 1854 The fix is to keep track of the status of frontend socket state and not 1855 caching the PostgreSQL connection if the connection to frontend was not 1856 properly terminated. 1857 1858 - test: Fix false alerm of regression tset 062 (Yugo Nagata) 1859 1860 - test: Fix broken regression test for native replication (Yugo Nagata) 1861 1862 Test for insert lock didn't work. 1863 1864 - test: Fix regress test to sleep after pgpool_reload (Yugo Nagata) 1865 1866 Some regression tests modify configuration file and reloads. However, 1867 sometimes these were not applied to pgpool just after reloading. 1868 1869 - Fix inconsistency of sequence values in replication mode (Yugo Nagata) 1870 1871 When a schema name was provided, the table name was quoted wrongly as 1872 like "public.mytbl" instead of "public"."mytbl". So, pool_regclass 1873 and to_regclass couldn't find right talbe oid and insert lock was 1874 never executed. This caused inconsistency between DB nodes. 1875 1876 - test: Fix complication error and segfault of timestamp rewrite test 1877 (Yugo Nagata) 1878 1879 - test: Add timestamp-rewrite unit test to regression test suite (Yugo Nagata) 1880 1881 - doc: Fix untranslated sentence in Japanese document (Yugo Nagata) 1882 1883 - Fix ancient bug of pool_push() and friends (Tatsuo Ishii) 1884 1885 It allocates buffer using realloc and uses the pointer 1886 returned. However it does the pointer calculation *before* realloc 1887 gets called. So the calculation uses the old pointer value, which 1888 causes various problems including segfault later. 1889 1890 Also there were other problems with it. The buffer pointer and buffer 1891 size variable is not initialized. The buffer is not freed by 1892 pool_close. Typo in debugging message (3.4 or later only). They are 1893 fixed as well. 1894 1895 - doc: Fix wrong description about log_standby_delay in the document 1896 (Yugo Nagata) 1897 1898 - doc: Add caution about JDBC driver version regarding 1899 app_name_redirect_preference_list (Tatsuo Ishii) 1900 1901 - Fix hang problem reported in bug#145 (Tatsuo Ishii) 1902 1903 The problem occurs when all the condition below are met: 1904 1905 1) pgpool-II 3.4 or later 1906 2) streaming replication mode 1907 3) primary node is also load balance node 1908 4) extended protocol is used 1909 5) client_idle_limit reached 1910 1911 - test: Fix regression test 065 (Tatsuo Ishii) 1912 1913 The path to JDBC driver was explicitly defined. This is wrong. This 1914 should be inherited from JDBC_DRIVER environment variable. 1915 1916 - test: Fix possible hang-up of regression test 054.postgres_fdw (Yugo Nagata) 1917 1918 - test: Add option to regress.sh and pgpool_setup for unix domain socket 1919 directory (Yugo Nagata) 1920 1921 - doc: Add missing descriptions about default values to documents (Yugo Nagata) 1922 1923 - test: Fix a bug of regress.sh option handling (Yugo Nagata) 1924 1925 - test: Fix regression test 055.backend_all_down to use PGSOCKET_DIR for 1926 PostgreSQL rhel7 rpm (Yugo Nagata) 1927 1928 - Fix reset query stuck problem (Muhammad Usama) 1929 1930 The issue is already fixed in older branches and this fix adopts the 1931 same solution used by 3.3 series, i.e. closing the backend connection 1932 when client idle limit is reached. 1933 1934 - Fix bug with "SET TRANSACTION READ ONLY" (Tatsuo Ishii) 1935 1936 Pgpool-II remembers that non read only queries (including SET) were 1937 executed in an explicit transaction and adds a "writing transaction" 1938 mark to the transaction. The mark affects the query routing behavior 1939 of pgpool-II while running in streaming replication mode. Pgpool-II 1940 starts sending queries to the primary after the mark is set. Because 1941 the effect of writing queries may appear on standbys after some delay 1942 in streaming replication mode, it is safer to route read queries to 1943 the primary after the mark is set. 1944 1945 However there's oversight here. "SET TRANSACTION READ ONLY" does no 1946 data modification and should be treated as an exception. 1947 1948 Per bug #157. 1949 1950 - test: Fix to use timeout command to handle time out of regress test 062 1951 (Yugo Nagata) 1952 1953 - Fix to show wrong error (Tatsuo Ishii) 1954 1955 connect_with_timeout() does not show proper error info when 1956 getsockopt(SO_ERROR) reports an error. Pointed out in bug #159. 1957 1958 - test: Add missing \n in help messages (Yugo Nagata) 1959 1960 - Fixing the logic issue in get_backends_status() function (Muhammad Usama) 1961 1962 get_backends_status () function counts the number of current valid and down 1963 backend nodes. The function assumed that the node was also invalid when its 1964 connection status was down. However, that is not always right. 1965 1966 - test: Fix regression test 003.failover for rhel7 postgresql rpm (Yugo Nagata) 1967 1968 The expected result of 'show pool_nodes' is fixed to use 1969 PGSOCKET_DIR in hostname column. 1970 1971 - Fix white/black_memqcache_table_list not require quotaion (Yugo Nagata) 1972 1973 The tables and schemas name specified in *_memqcache_table_list 1974 were needed to be quoted by double quotation. 1975 1976 Patch contributed by Dang Minh Huong. 1977 Per [pgpool-hackers: 1323] 1978 1979 - Fix FATAL error with reloading (Tatsuo Ishii) 1980 1981 While reloading pgpool.conf, the number of DB nodes is tentatively set 1982 to 0, then counted up until reaching to the actual number of backends 1983 by the pgpool main process. Unfortunately the variable was on the 1984 shared memory and it confused pgpool child process when they were using 1985 the variable and this caused FATAL error. 1986 1987 Per bug #156 report by harukat. 1988 1989 - test: Add some tests for white/black_memqcache_table_list to regression 1990 test 006.memqcache (Yugo Nagata) 1991 1992 - Fix reset query stuck problem (Muhammad Usama, Tatsuo Ishii) 1993 1994 When pool_read fails to read from frontend or pool_flush fails to 1995 write to the frontend, report FRONTEND_ERROR, rather than ERROR to 1996 disconnect and terminate pgpool child process, to prevent the query 1997 stuck problem. 1998 1999 - test: Fix regression test 008 & 009 failure in debug mode (Yugo Nagata) 2000 2001 - Fix performance degradation while using IPv6 (Muhammad Usama) 2002 2003 Per bug #165. 2004 2005 - Add some warning messages for wd_authkey hash calculation failure 2006 (Yugo Nagata) 2007 2008 Sometimes wd_authkey calculation fails for some reason other than 2009 authkey mismatch. The additional messages make these distingushable 2010 for each other. 2011 2012 - test: Fix regression test to check timeout of each test (Yugo Nagata) 2013 2014 - test: Allow timeout value to be specified by the command option (Yugo Nagata) 2015 2016 - Fix bugs with data modifying WITH clause. (Tatsuo Ishii) 2017 2018 pgpool-II did not recognize the data modifying WITH clause despite 2019 pgpool-II 3.3 or after has SQL parser which recognizes it. The bug has 2020 been fixed in pgpool-II 3.5 (having PostgreSQL 9.5 parser), and the fix 2021 is back ported to pgpool-II 3.3 and 3.4. 2022 2023 Per bug #153. 2024 2025 - Fix segfalut that occurs when function is used in FROM clause (Yugo Nagata) 2026 2027 PRPARE statements in streaming-reaplication mode and INSERT/UPDATE 2028 with SELECT in native-replication mode were affected. For example: 2029 2030 - prepare p as select * from generate_series(1,1); 2031 - insert into tbl select now(), * from generate_series(1,1); 2032 2033 - Fix broken arping_cmd configuration check(Muhammad Usama) 2034 2035 wd_chk_setuid() function was bailing out with the NOTICE message as soon 2036 as it finds the setuid bit is not set on any configured network command 2037 and was ignoring the rest of configurations. 2038 2039 Per bug #139. 2040 2041 - doc: Add restriction about starting multiple pgpool simultaneously 2042 (Yugo Nagata) 2043 2044 - Fix to use saved errno for erreport instead of the direct value 2045 (Yugo Nagata) 2046 2047 Some system calls are called in errmsg() and errhint(), and 2048 it isn't safe to pass errno directly as an argument. This caused 2049 the confusable log message as below. 2050 2051 DETAIL: connect() reports failure "Success" 2052 2053 - Fix a in-memory query cache bug (Tatsuo Ishii) 2054 2055 If extended query protocol is used and a bind/execute message arrives 2056 which uses a statement created by prior parse message, the temp_cache 2057 is not initialized by a parse messages. Thus messages are added to pre 2058 existing temp cache buffer which causes the trouble, that is, when the 2059 cached result returns, Data Row message and Command Complete message 2060 appeared twice. 2061 2062 Per by bug #152. 2063 2064 - Fix a compile issue on freebsd, added missing include files (Muhammad Usama) 2065 2066=============================================================================== 2067 2068 3.4.3 (tataraboshi) 2015/07/24 2069 2070* Version 3.4.3 2071 2072 This is a bugfix release against pgpool-II 3.4.2. 2073 2074 __________________________________________________________________ 2075 2076* Bug fixes 2077 2078 - Fix "cannot find xlog functions" error in pgpool-recovery 2079 (Muhammad Usama) 2080 2081 The argument data type of PostgreSQL's pg_xlogfile_name() function 2082 has been changed from text to pg_lsn since PostgreSQL 9.4. And 2083 pgpool-recovery was still trying to locate the function by old 2084 signature. 2085 2086 - Fix problem with memory cache invalidation (Muhammad Usama) 2087 2088 The internal buffer for storing the table oids needs to be homed in 2089 long living memory context as it has to survive throughout the child 2090 life. 2091 2092 See [pgpool-general: 3643] for details. 2093 2094 - Pass empty string parameters in failover command when pgpool-II 2095 does not have a value for any particular parameter (Muhammad Usama) 2096 2097 Instead of omitting the values for the parameters when pgpool-II does 2098 not have any value for a particular parameter, it now passes an empty 2099 string to the failover command. This makes sure that failover script 2100 will always receive the exact number of expected parameters. 2101 2102 - pgpool-II should use the local definition of snprintf functions only 2103 if they are not provided by OS (Muhammad Usama) 2104 2105 - Add debug info to show how much shared memory is allocated 2106 (Tatsuo Ishii) 2107 2108 - Downgrading the error level for EOF on backend connection for main 2109 process (Muhammad Usama) 2110 2111 Throwing the FATAL error when EOF is encountered with backend is very 2112 harsh in pgpool main process and can cause undesirable behavior. 2113 Downgrading it to simple ERROR. 2114 2115 - doc: Clarify load balancing condition (Tatsuo Ishii) 2116 2117 - doc: Clarify description of pcp_promote_node (Tatsuo Ishii) 2118 2119 It does not actually promote PostgreSQL standby. 2120 2121 - doc: Fix outdated limitation description about load balancing using 2122 JDBC driver (Tatsuo Ishii) 2123 2124 Even if autocommit is false, load balancing is possible in certain 2125 conditions. 2126 2127 - Fix a misplaced code which makes a log code unreachable and rephrase 2128 the log message (Muhammad Usama) 2129 2130 - Fix a problem in elog.c when forwarding a message to frontend clients 2131 (Muhammad Usama) 2132 2133 Error while forwarding the message to the frontend client can 2134 potentially cause the infinite recursion and terminate the child with 2135 ERRORDATA_STACK_SIZE exceeded error. 2136 2137 Fix is to check the recursion depth of send_message_to_frontend() 2138 function and pulling the plug if it is more than two levels deep. 2139 2140 - Fix "select() system call interrupted" error (Tatsuo Ishii) 2141 2142 The health check process complains above and then: 2143 2144 ERROR: failed to make persistent db connection 2145 DETAIL: connection to host:"x.x.x.x:5432 failed 2146 2147 However, the healthchek triggers neither fail over nor retrying. So, 2148 except the annoying messages above, everything goes well. This could 2149 occur more easily if 1) num_init_children is big and 2) pgpool 2150 children go into idle state (no query arrived from client for 2151 child_life_time seconds). 2152 2153 Original bug report is [pgpool-general: 3756] Connection Interrupted. 2154 Patch created by Tatsuo Ishii. Enhancement from Usama. 2155 2156 - Fix the case when user table includes spaces (Tatsuo Ishii) 2157 2158 For example if table names including spaces are used, pgpool-II cannot 2159 be handled correctly by the internal functions which access system 2160 catalogs and it results in SQL errors. Solution is, to always use 2161 delimited identifier. 2162 2163 Per bug #136. 2164 http://www.pgpool.net/mantisbt/view.php?id=136 2165 2166 Also see [pgpool-general: 3818]. 2167 2168 - Allow to use in-memory query cache size more than 4GB (Tatsuo Ishii) 2169 2170 This should have been allowed since in memory query cache was born. 2171 2172 - Do not send a query for checking insert lock in non replication mode 2173 with extended query (Tatsuo Ishii) 2174 2175 - Save pgpool_status to disk each time when it is changed 2176 (Tatsuo Ishii) 2177 2178 Previously, pgpool-II saves pgpool_status file when pgpool-II 2179 explicitly is going shutdown. This is fine in most cases and it saves 2180 slight CPU cycles. But if pgpool-II killed abnormally or the system 2181 forces pgpool-II to go down by OOM killer, next pgpool-II restarting 2182 could load obsolete status file. 2183 2184=============================================================================== 2185 2186 3.4.3 (tataraboshi) 2015/07/24 2187 2188* Version 3.4.3 2189 2190 This is a bugfix release against pgpool-II 3.4.2. 2191 2192 __________________________________________________________________ 2193 2194* Bug fixes 2195 2196 - Fix "cannot find xlog functions" error in pgpool-recovery 2197 (Muhammad Usama) 2198 2199 The argument data type of PostgreSQL's pg_xlogfile_name() function 2200 has been changed from text to pg_lsn since PostgreSQL 9.4. And 2201 pgpool-recovery was still trying to locate the function by old 2202 signature. 2203 2204 - Fix problem with memory cache invalidation (Muhammad Usama) 2205 2206 The internal buffer for storing the table oids needs to be homed in 2207 long living memory context as it has to survive throughout the child 2208 life. 2209 2210 See [pgpool-general: 3643] for details. 2211 2212 - Pass empty string parameters in failover command when pgpool-II 2213 does not have a value for any particular parameter (Muhammad Usama) 2214 2215 Instead of omitting the values for the parameters when pgpool-II does 2216 not have any value for a particular parameter, it now passes an empty 2217 string to the failover command. This makes sure that failover script 2218 will always receive the exact number of expected parameters. 2219 2220 - pgpool-II should use the local definition of snprintf functions only 2221 if they are not provided by OS (Muhammad Usama) 2222 2223 - Add debug info to show how much shared memory is allocated 2224 (Tatsuo Ishii) 2225 2226 - Downgrading the error level for EOF on backend connection for main 2227 process (Muhammad Usama) 2228 2229 Throwing the FATAL error when EOF is encountered with backend is very 2230 harsh in pgpool main process and can cause undesirable behavior. 2231 Downgrading it to simple ERROR. 2232 2233 - doc: Clarify load balancing condition (Tatsuo Ishii) 2234 2235 - doc: Clarify description of pcp_promote_node (Tatsuo Ishii) 2236 2237 It does not actually promote PostgreSQL standby. 2238 2239 - doc: Fix outdated limitation description about load balancing using 2240 JDBC driver (Tatsuo Ishii) 2241 2242 Even if autocommit is false, load balancing is possible in certain 2243 conditions. 2244 2245 - Fix a misplaced code which makes a log code unreachable and rephrase 2246 the log message (Muhammad Usama) 2247 2248 - Fix a problem in elog.c when forwarding a message to frontend clients 2249 (Muhammad Usama) 2250 2251 Error while forwarding the message to the frontend client can 2252 potentially cause the infinite recursion and terminate the child with 2253 ERRORDATA_STACK_SIZE exceeded error. 2254 2255 Fix is to check the recursion depth of send_message_to_frontend() 2256 function and pulling the plug if it is more than two levels deep. 2257 2258 - Fix "select() system call interrupted" error (Tatsuo Ishii) 2259 2260 The health check process complains above and then: 2261 2262 ERROR: failed to make persistent db connection 2263 DETAIL: connection to host:"x.x.x.x:5432 failed 2264 2265 However, the healthchek triggers neither fail over nor retrying. So, 2266 except the annoying messages above, everything goes well. This could 2267 occur more easily if 1) num_init_children is big and 2) pgpool 2268 children go into idle state (no query arrived from client for 2269 child_life_time seconds). 2270 2271 Original bug report is [pgpool-general: 3756] Connection Interrupted. 2272 Patch created by Tatsuo Ishii. Enhancement from Usama. 2273 2274 - Fix the case when user table includes spaces (Tatsuo Ishii) 2275 2276 For example if table names including spaces are used, pgpool-II cannot 2277 be handled correctly by the internal functions which access system 2278 catalogs and it results in SQL errors. Solution is, to always use 2279 delimited identifier. 2280 2281 Per bug #136. 2282 http://www.pgpool.net/mantisbt/view.php?id=136 2283 2284 Also see [pgpool-general: 3818]. 2285 2286 - Allow to use in-memory query cache size more than 4GB (Tatsuo Ishii) 2287 2288 This should have been allowed since in memory query cache was born. 2289 2290 - Do not send a query for checking insert lock in non replication mode 2291 with extended query (Tatsuo Ishii) 2292 2293 - Save pgpool_status to disk each time when it is changed 2294 (Tatsuo Ishii) 2295 2296 Previously, pgpool-II saves pgpool_status file when pgpool-II 2297 explicitly is going shutdown. This is fine in most cases and it saves 2298 slight CPU cycles. But if pgpool-II killed abnormally or the system 2299 forces pgpool-II to go down by OOM killer, next pgpool-II restarting 2300 could load obsolete status file. 2301 2302=============================================================================== 2303 2304 3.4.2 (tataraboshi) 2015/04/08 2305 2306* Version 3.4.2 2307 2308 This is a bugfix release against pgpool-II 3.4.1. 2309 2310 __________________________________________________________________ 2311 2312* Bug fixes 2313 2314 - rpm: Fix %tmpfiles_create to not be executed in RHEL/CentOS 6 2315 (Nozomi Anzai) 2316 2317 - Fix to reset on_exit call back functions in exec_if_cmd and exec_ping 2318 worker processes (Muhammad Usama) 2319 2320 exec_if and exec_ping child processes were inheriting the parent exit 2321 callback functions which could result in undesired behavior if one of 2322 these commands fails. Fixed by adding on_exit_reset() at child start-up 2323 in both processes. 2324 2325 - Fix to use void * type for receiving return value of thread function 2326 (Yugo Nagata) 2327 2328 Previously int type was used and this could occur stack buffer 2329 overflow. This caused an infinity loop of ping error at bringing 2330 up or down VIP. 2331 2332 - Fix to set SIGCHLD to SIG_DFL instead of SIG_IGN in watchdog processes 2333 (Yugo Nagata) 2334 2335 When using waitpid, it isn't necessary to set SIGCHLD to SIG_IGN. 2336 Rather, it is harmful, and due to this it was regarded that ping 2337 command exited abnormally in error even when this succeeded. 2338 2339 - Fix to use waitpid instead of wait in exec_ifconifg (Yugo Nagata) 2340 2341 - Remove an unnecessary include directive (Yugo Nagata) 2342 2343 - Enlarge POOLCONFIG_MAXDESCLEN to 80 (Tatsuo Ishii) 2344 2345 This is used in show pool_status command and limits the length of 2346 parameter description. Unfortunately recovery_timeout description is 2347 64 chars, which is 1 byte longer than former definition of the macro. 2348 2349 - doc: Update document of condition for load balancig (Yugo Nagata) 2350 2351 Load balancing is possible in an explicit transaction block 2352 even in replication mode since 3.3.0. 2353 2354 - Support SSL certificate chains in the certificate file for incoming 2355 frontend connections (Muhammad Usama) 2356 2357 - Use to_regclass if available in time stamp rewriting in replication 2358 mode (Tatsuo Ishii) 2359 2360 - Fix to not emits a fatal error message when clear text password auth 2361 is used (Muhammad Usama) 2362 2363 The problem was introduced in pgpool-II after inclusion of exception 2364 manager. EOF on the frontend connection during client authentication 2365 should not be treated as an error when the password authentication 2366 method is used. psql disconnects from the server in such case to get 2367 the password from the terminal, reconnects and sends the read password 2368 to server. 2369 2370 - previous session for the same child had exited because of some ERROR. 2371 (Muhammad Usama) 2372 2373 - Fix a hang when an error occurs in a transaction block with 2374 replication mode (Yugo Nagata) 2375 2376 When an error occurs at a backend node in a transaction block with 2377 replication mode, pgpool-II sends an invalid query to other 2378 backends to sync transaction states. However, previously, this was 2379 not sent to master node, and pgpool-II was waiting for master's 2380 response forever. 2381 2382 - Fix a problem with pcp_detach_node about graceful node detach (Muhammad Usama) 2383 2384 When graceful node detach is requested gracefully, pcp_detach_node should 2385 check if it is allowed to process detach_node command on the particular 2386 node before blocking the incoming connections and closing the existing 2387 connections. 2388 2389 - doc: Update table and flowchart of where a query should be sent to 2390 (Yugo Nagata) 2391 2392 - rpm: pgpool.spec is required only in RHEL/CentOS 7 (Nozomi Anzai) 2393 2394 - Fix a compilation issue about sighandler_t type on BSD variants 2395 (Muhammad Usama) 2396 2397=============================================================================== 2398 3.4.1 (tataraboshi) 2015/02/05 2399 2400* Version 3.4.1 2401 2402 This is a bugfix release against pgpool-II 3.4.0. 2403 2404 __________________________________________________________________ 2405 2406* Bug fixes 2407 2408 - RPM: Add to support for memcached. (Tatsuo Ishii) 2409 2410 - Fix number of parameters of pgpool_recovery from 3 to 4. (Tatsuo Ishii) 2411 2412 This really should be done before releasing 3.4.0. 2413 2414 - test: Allow pgpool_setup to set configuration file directory by setting 2415 environment variable PGPOOLDIR (Tatsuo Ishii) 2416 2417 - RPM: Rename RPM file (Yugo Nagata) 2418 2419 Rename filename to include the RHEL version number like PostgreSQL's 2420 official RPM file. (e.g. pgpool-II-pg93-3.4.0-2pgdg.rhel6.x86_64.rpm) 2421 2422 - Fix node id range check bug in trigger_failover_command(). (Tatsuo Ishii) 2423 2424 The node id should be lower than NUM_BACKENDS. Probably harmless since 2425 callers never pass node ids greater or equal to NUM_BACKENDS. 2426 2427 - Fix occasional stuck that occures when a NOTIFY message is sent from 2428 a backend. (Muhammad Usama) 2429 2430 The issue happens in master slave mode with load balancing when the 2431 client is doing extended query messaging. 2432 2433 per bug #116 2434 http://www.pgpool.net/mantisbt/view.php?id=116 2435 2436 - test: Fix failover script of pgpool_setup to use absolute path to the 2437 database cluster (Tatsuo Ishii) 2438 2439 - test: Reorganize port numbers assigned in pgpool_setup (Tatsuo Ishii) 2440 2441 Assign base port (11000 by default) to pgpool, base port + 1 to pcp, 2442 port + 2 to PostgreSQL node0, port + 3 to PostgreSQL node1 and so on. 2443 2444 - Fix a bug that pgpool-II 3.4 can't cancel query (Muhammad Usama) 2445 2446 - test: Add regression test for cancelling query (Muhammad Usama) 2447 2448 - Fix to not use non-thread-safe APIs in thread functions 2449 (Muhammad Usama) 2450 2451 pgpool-II has borrowed the Memory and Exception managers from PostgreSQL 2452 which never utilizes the threads so its APIs are not thread safe. 2453 Previously, those API functions which manipulate the global variables 2454 in thread functions, and it caused to undefined behavior or a 2455 segmentation fault. Especially, the main process could die silently. 2456 2457 - test: Add memory leak regression test (Tatsuo Ishii) 2458 2459 - Fix a memory leak with long-lived connections (Muhammad Usama) 2460 2461 Problem reporeted in [pgpool-general: 3325]. 2462 2463 - Change the log level of "Frontend Terminated" message to DEBUG1 from LOG 2464 (Muhammad Usama) 2465 2466 - Fix ill signal befavior of SIGCHLD in exec_ifconfig() (Tatsuo Ishii) 2467 2468 For some reason SIGCHLD was set to SIG_IGN *and* tries to wait 2469 child process which always fails because SIGCHLD is never delivered. 2470 Due to this "ifconfig up" fails when switching to watchdog master. 2471 2472 See "[pgpool-general: 3310] for more details. 2473 2474 - Allow $_IP_$ having address prefix in if_up_cmd and if_down_cmd 2475 (Muhammad Usama) 2476 2477 Previously, it is assumed that "$_IP_$" keyword will always have a 2478 white space at the end, and when "$_IP_$" has address prefix (e.g. 2479 $_IP_$/24), this prefix was ignored. 2480 2481 Per bug #122. 2482 http://www.pgpool.net/mantisbt/view.php?id=122 2483 2484 - Fix to not send signal to init process (Muhammad Usama) 2485 2486 This is more of a guard against a situation where a crash of the 2487 pgpool main process can make the child processes to send the signal 2488 to system's init process. 2489 2490 Per bug #119. 2491 http://www.pgpool.net/mantisbt/view.php?id=119 2492 2493 - RPM: Fix "error: Installed (but unpackaged) file(s) found" while 2494 creating RPMs for PostgreSQL 9.4 (Tatsuo Ishii) 2495 2496 - Allow "show pool_nodes" to print node ids having more than one digits 2497 (Muhammad Usama) 2498 2499 Problem reported in [pgpool-general: 3374]. 2500 2501 - Prevent "WARNING: failed to execute regex matching, pattern is NULL" 2502 message that could happen when application name is not set in the old 2503 clients (Tatsuo Ishii) 2504 2505 - Fix pgpool main process to shutdown in case of child process start-up 2506 failures (Muhammad Usama) 2507 2508 Problem rported in [pgpool-general: 3358]. 2509 2510 - Fix a segmentation fault that could happen in child process error 2511 (Muhammad Usama) 2512 2513 Problem reported in [pgpool-general: 3377]. 2514 2515 - Fix occasional failure in regression test '004.watchdog' (Yugo Nagata) 2516 2517 The patch provided by uehara in bug #127. 2518 http://www.pgpool.net/mantisbt/view.php?id=127 2519 2520 - Fix client connection leak (Tatsuo Ishii) 2521 2522 Since 3.4.0 pgpool-II child does not close the connection to client 2523 when it ends the session. This leads to serious "CLOSE_WAIT" flood, 2524 which makes pgpool-II unusable since no new connection from clients 2525 accepted. 2526 2527 Problem reported by Pablo Sanchez in [pgpool-general: 3394]. 2528 2529 - Restore SIGCHLD handler to its original after executing if_up/down_cmd 2530 (Yugo Nagata) 2531 2532 Previously SIGCHLD was set to SIGIGN always after if_up/down_cmd. 2533 This led to a incorrect error handling of ping or other commands 2534 execution, and warning messages were output to log even when the 2535 command exited successfully. 2536 2537 - RPM: Add pgpool.service for systemd in RHEL/CentOS 7 (Nozomi Anzai) 2538 2539 - Fix process termination after several reload with enabled_pool_hba 2540 (Muhammad Usama) 2541 2542 - Tighten up checking for app_name_redirect_preference_list and 2543 database_redirect_preference_list (Tatsuo Ishii) 2544 2545 Before empty application name or database name or invalid DB node 2546 number were silently accepted. Now they are strictly checked and 2547 let raise fatal error when starting up. 2548 2549 Problem reported in [pgpool-general-jp: 1337]. 2550 2551 - RPM: Change to use systemd if it is available (Nozomi Anzai) 2552 2553 - Fix the behavior of "client_min_messages" configuration parameter 2554 (Muhammad Usama) 2555 2556 This parameter controls the minimum message levels to be sent to the 2557 frontend. Previously, regardless of the value of the parameter all 2558 the messages with severity less than NOTICE level were not being 2559 forwarded to the client. 2560 2561=============================================================================== 2562 2563 3.4.0 (tataraboshi) 2014/11/07 2564 2565* Version 3.4.0 2566 2567 This is the first version of pgpool-II 3.4 series. 2568 That is, a "major version up" from 3.3 series. 2569 2570 __________________________________________________________________ 2571 2572* Incompatible changes 2573 2574 - Parallel query mode is obsoleted and is removed from 2575 pgpool.conf. This is due to the very few users using the mode 2576 (and the relatively high cost to maintain it). Actual codes for 2577 the mode are still there and users can use the mode if they 2578 specify necessary parameters in pgpool.conf. Note, however, the 2579 next version of pgpool-II (will be 3.5.0) will actually remove 2580 the code. 2581 2582 - "print_timestamp" parameter is removed. Instead new 2583 "log_line_prefix" should be used. 2584 2585 - Recovery script now accepts 4 parameters, rather than 3 (the 4th 2586 parameter is the port number of master PostgreSQL). Existing 2587 3-parameter-style recovery scripts can be used if you don't care 2588 about information provided by the 4th parameter. 2589 __________________________________________________________________ 2590 2591* New features 2592 2593 - Allow fine control of load balancing by using application name 2594 or database name. For example, if a client has particular 2595 application name, read queries can be redirect to master node, 2596 rather than to one of slave nodes (Tatsuo Ishii) 2597 2598 - Allow to print pgpool-II process names in the log output. New 2599 parameter "log_line_prefix", which is the printf-style string 2600 that is output at the beginning of each log line (Muhammad Usama) 2601 2602 - Allow to control log verbosity like PostgreSQL. For this purpose 2603 new parameters "log_error_verbosity", "client_min_messages", 2604 "log_min_messages" are added (Muhammad Usama) 2605 2606 - Allow to use SQL comments without disturbing load balancing if 2607 new parameter "allow_sql_comments" is on. If it's off, previous 2608 behavior is kept (Tatsuo Ishii) 2609 2610 - Allow to skip unlogged tables checking by using new parameter 2611 "check_unlogged_table". This reduces the number of pgpool-II's 2612 internal catalog look up queries and enhances performance 2613 (Tatsuo Ishii) 2614 2615 - Prevent listen backlog overflow by using new parameter 2616 "listen_backlog_multiplier" for very busy systems (Tatsuo Ishii) 2617 2618 - Prevent connection timeout to backend by using new parameter 2619 "connect_timeout". This is useful in unstable networks 2620 (Tatsuo Ishii) 2621 __________________________________________________________________ 2622 2623* Enhancements 2624 2625 - Builtin SQL parser is now compatible with PostgreSQL 9.4 (Muhammad Usama) 2626 2627 - Import PostgreSQL's memory manager and exception manager (Muhammad Usama) 2628 2629 - Reorganize source code tree (Muhammad Usama) 2630 2631 - The status file "pgpool_status" is now a plain ASCII file. This 2632 allows to register down PostgreSQL nodes before pgpool-II 2633 starts for example (Tatsuo Ishii) 2634 2635 - Allow to use IPv6 address for PostgreSQ (Michael Stapelberg) 2636 2637 - Allow to use IPv6 bind address for pgpool-II (Michael Stapelberg) 2638 2639 - Rename all occurrence of "on memory query cache" to "in memory 2640 query cache" because latter is more correct in English (Tatsuo Ishii) 2641 2642 - Add 4th paramter "master node port number" to recovery script 2643 (Tatsuo Ishii) 2644 2645 - Allow to handle more than 3 database nodes in pgpool_setup 2646 (Tatsuo Ishii) 2647 __________________________________________________________________ 2648 2649* Bug fixes (since 3.3.4) 2650 2651 - Fix failover deadlock problem in watchdog (Muhammad Usama). See 2652 bug #105 and [pgpool-committers: 2195] for more details. 2653 2654 - As per the PostgreSQL specification, calling close on non 2655 existing portals is not an error. So on the same footings this 2656 commit ignores all such packets and return the 'close complete' 2657 message to client with out going to backend (Muhammad Usama) 2658 2659 - Fix many issues/bugs found by Coverity (Muhammad Usama, Tatsuo Ishii) 2660 2661=============================================================================== 26623.3 Series (2013/07/30 - ) 2663=============================================================================== 2664 2665 3.3.12 (tokakiboshi) 2016/08/31 2666 2667* Version 3.3.12 2668 2669 This is a bugfix release against pgpool-II 3.3.11. 2670 2671 __________________________________________________________________ 2672 2673* Bug fixes 2674 2675 - Fix buffer over run problem in "show pool_nodes". (Tatsuo Ishii) 2676 2677 While processing "show pool_nodes", the buffer for hostname was too 2678 short. It should be same size as the buffer used for pgpool.conf. 2679 Problem reported by a twitter user who is using pgpool on AWS (which 2680 could have very long hostname). 2681 2682 - Fix usage of wait(2) in pgpool main process. (Tatsuo Ishii) 2683 2684 The usage of wait(2) in pgpool main could cause infinite wait in the 2685 system call. Solution is, to use waitpid(2) instead of wait(2). 2686 2687 - Fix "kind mismatch" error message in pgpool. (Muhammad Usama) 2688 2689 Many of "kind mismatch..." errors are caused by notice/warning 2690 messages produced by one or more of the DB nodes. In this case now 2691 Pgpool-II forwards the messages to frontend, rather than throwing the 2692 "kind mismatch..." error. This would reduce the chance of "kind 2693 mismatch..." errors. 2694 2695 See [pgpool-hackers: 1501] for more details. 2696 2697 - Replace "MAJOR" macro to prevent occasional failure. (Tatsuo Ishii) 2698 2699 The macro calls pool_virtual_master_db_node_id() and then access 2700 backend->slots[id]->con using the node id returned. In rare cases, it 2701 could point to 0 (in case when the DB node is not connected), which 2702 gives access to con->major, then it causes a segfault. 2703 2704 See bug 225 for related info. 2705 2706 - doc : Fixing a typo in english doc (Muhammad Usama) 2707 2708 - doc : fix Japanese document typo. (Bo Peng) 2709 2710 - Fixing a typo in the log message. (Muhammad Usama) 2711 2712 - doc : Add comment to the document about connection_cache. (Tatsuo Ishii) 2713 2714=============================================================================== 2715 2716 3.3.11 (tokakiboshi) 2016/06/17 2717 2718* Version 3.3.11 2719 2720 This is a bugfix release against pgpool-II 3.3.10. 2721 2722 __________________________________________________________________ 2723 2724* New features 2725 2726 - Allow to access to pgpool while doing health checking (Tatsuo Ishii) 2727 2728 Currently any attempt to connect to pgpool fails if pgpool is doing 2729 health check against failed node even if fail_over_on_backend_error is 2730 off because pgpool child first tries to connect to all backend 2731 including the failed one and exits if it fails to connect to a backend 2732 (of course it fails). This is a temporary situation and will be 2733 resolved before pgpool executes failover. However if the health check 2734 is retrying, the temporary situation keeps longer depending on the 2735 setting of health_check_max_retries and health_check_retry_delay. This 2736 is not good. Attached patch tries to mitigate the problem: 2737 2738 - When an attempt to connect to backend fails, give up connecting to 2739 the failed node and skip to other node, rather than exiting the 2740 process if operating in streaming replication mode and the node is 2741 not primary node. 2742 2743 - Mark the local status of the failed node to "down". 2744 2745 - This will let the primary node be selected as a load balance node 2746 and every queries will be sent to the primary node. If there's other 2747 healthy standby nodes, one of them will be chosen as the load 2748 balance node. 2749 2750 - After the session is over, the child process will suicide to not 2751 retain the local status. 2752 2753 Per [pgpool-hackers: 1531]. 2754 2755* Bug fixes 2756 2757 - Fix is_set_transaction_serializable() when 2758 SET default_transaction_isolation TO 'serializable'. (Bo Peng) 2759 2760 SET default_transaction_isolation TO 'serializable' is sent to 2761 not only primary but also to standby server in streaming replication mode, 2762 and this causes an error. Fix is, in streaming replication mode, 2763 SET default_transaction_isolation TO 'serializable' is sent only to the 2764 primary server. 2765 2766 See bug 191 for related info. 2767 2768 - Fix Chinese documetation bug about raw mode (Yugo Nagata, Bo Peng) 2769 Connection pool is avalilable in raw mode. 2770 2771 - Fix confusing comments in pgpool.conf (Tatsuo Ishii) 2772 2773 - Permit pgpool to support multiple SSL cipher protocols (Muhammad Usama) 2774 2775 Currently TLSv1_method() is used to initialize the SSL context, that puts an 2776 unnecessary limitation to allow only TLSv1 protocol for SSL communication. 2777 While postgreSQL supports other ciphers protocols as well. The commit changes 2778 the above and initializes the SSLSession using the SSLv23_method() 2779 (same is also used by PostgreSQL). Because it can negotiate the use of the 2780 highest mutually supported protocol version and remove the limitation of one 2781 specific protocol version. 2782 2783 - If statement timeout is enabled on backend and do_query() sends a (Tatsuo Ishii) 2784 query to primary node, and all of following user queries are sent to 2785 standby, it is possible that the next command, for example END, could 2786 cause a statement timeout error on the primary, and a kind mismatch 2787 error on pgpool-II is raised. 2788 2789 This fix tries to mitigate the problem by sending sync message instead 2790 of flush message in do_query(), expecting that the sync message reset 2791 the statement timeout timer if we are in an explicit transaction. We 2792 cannot use this technique for implicit transaction case, because the 2793 sync message removes the unnamed portal if there's any. 2794 2795 Plus, pg_stat_statement will no longer show the query issued by 2796 do_query() as "running". 2797 2798 See bug 194 for related info. 2799 2800 - Deal with the case when the primary is not node 0 in streaming replication mode. (Tatsuo Ishii) 2801 2802 http://www.pgpool.net/mantisbt/view.php?id=194#c837 reported that if 2803 primary is not node 0, then statement timeout could occur even after 2804 bug194-3.3.diff was applied. After some investigation, it appeared 2805 that MASTER macro could return other than primary or load balance 2806 node, which was not supposed to happen, thus do_query() sends queries 2807 to wrong node (this is not clear from the report but I confirmed it in 2808 my investigation). 2809 2810 pool_virtual_master_db_node_id(), which is called in MASTER macro 2811 returns query_context->virtual_master_node_id if query context 2812 exists. This could return wrong node if the variable has not been set 2813 yet. To fix this, the function is modified: if the variable is not 2814 either load balance node or primary node, the primary node id is 2815 returned. 2816 2817 - change the Makefile under the directory src/sql/, that is proposed (Bo Peng) 2818 by [pgpool-hackers: 1611] 2819 2820 - Fix a posible hang during health checking (Yugo Nagata) 2821 2822 Helath checking was hang when any data wasn't sent 2823 from backend after connect(2) succeeded. To fix this, 2824 pool_check_fd() returns 1 when select(2) exits with 2825 EINTR due to SIGALRM while health checkking is performed. 2826 2827 Reported and patch provided by harukat and some modification 2828 by Yugo. Per bug #204. 2829 2830 backported from 3.4 or later; 2831 https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=ed9f2900f1b611f5cfd52e8f758c3616861e60c0 2832 2833 - Fix bug with load balance node id info on shmem (Tatsuo Ishii) 2834 2835 There are few places where the load balance node was mistakenly put on 2836 wrong place. It should be placed on: ConnectionInfo *con_info[child 2837 id, connection pool_id, backend id].load_balancing_node]. In fact it 2838 was placed on: *con_info[child id, connection pool_id, 2839 0].load_balancing_node]. 2840 2841 As long as the backend id in question is 0, it is ok. However while 2842 testing pgpool-II 3.6's enhancement regarding failover, if primary 2843 node is 1 (which is the load balance node) and standby is 0, a client 2844 connecting to node 1 is disconnected when failover happens on node 2845 0. This is unexpected and the bug was revealed. 2846 2847 It seems the bug was there since long time ago but it had not found 2848 until today by the reason above. 2849 2850=============================================================================== 2851 2852 3.3.10 (tokakiboshi) 2016/04/26 2853 2854* Version 3.3.10 2855 2856 This is a bugfix release against pgpool-II 3.3.9. 2857 2858 __________________________________________________________________ 2859 2860* Bug fixes 2861 2862 - Removing the limit on the maximum number of items in the 2863 black_function_list and white_function_list lists. (Muhammad Usama) 2864 2865 extract_string_tokens in pool_config uses the fixed size malloc on 2866 the array to hold the black_function_list/white_function_list items. 2867 This imposes a limit of maximum items in these lists. 2868 The fix is to use realloc to increase the array size when it gets full. 2869 2870 - Redirect all user queries to primary server (Tatsuo Ishii) 2871 2872 Up to now some user queries are sent to other than the primary server 2873 even if load_balance_mode = off. This commit changes the behavior: if 2874 load_balance_mode = off in streaming replication mode, now all the 2875 user queries are sent to the primary server only. 2876 2877 Per bug #189. 2878 2879 - Change the PID length of pcp_proc_count command result to 6 characters 2880 long (Bo Peng) 2881 2882 If the pgpool process ID are over 5 characters, the 6th character of each 2883 process ID will be removed. This commit changes the process ID length of 2884 pcp_proc_count command result to 6 characters long. 2885 2886 Per bug #188. 2887 2888=============================================================================== 2889 2890 3.3.9 (tokakiboshi) 2016/04/04 2891 2892* Version 3.3.9 2893 2894 This is a bugfix release against pgpool-II 3.3.8. 2895 2896 __________________________________________________________________ 2897 2898* Bug fixes 2899 2900 - test: Fix test/regression/clean.sh to remove binary files of 2901 010.rewrite_timestamp test (Yugo Nagata) 2902 2903 - Fix memorry leak reported by Coverity (CID 1350095) (Yugo Nagata) 2904 2905 - Fixing pgpool-recovery module compilation issue with PostgreSQL 9.6 2906 (Muhammad Usama) 2907 2908 Incorporating the change of function signature for GetConfigOption..() 2909 functions in PostgreSQL 9.6. 2910 2911 - Fix typo in configure (Tatsuo Ishii) 2912 2913 Patch provided by Thomas Munro. 2914 2915 - doc: Change description of backend_flag (Tatsuo Ishii) 2916 2917 It is pointed out that restarting pgpool-II is not necessary. 2918 2919 Per [pgpool-general-jp: 1394]. 2920 2921 - doc: Fix installation procedure. (Tatsuo Ishii) 2922 2923 With PostgreSQL 9.4 or later, installing pgpool_regclass is not needed. 2924 2925 - test: Fix pgpool_setup to not confuse log output (Tatsuo Ishii) 2926 2927 Before it simply redirects stdout and stderr of pgpool processes to 2928 a log file. This could cause the log contents being garbled or even 2929 missed because of race condition caused by multiple process being 2930 writing concurrently. 2931 2932 To fix this, pgpool_setup now generates startall script in which pgpool 2933 sends stdout/stderr to cat command by pipe, and cat writes to the log 2934 file. 2935 2936 - Fix to validate the PCP packet length (Muhammad Usama) 2937 2938 Without the validation check, a malformed PCP packet can crash the 2939 PCP child and/or can run the server out of memory by sending the packet 2940 with a very large data size. 2941 2942 - Fix a reset query stuck problem (Muhammad Usama) 2943 2944 The solution is to return POOL_END_WITH_FRONTEND_ERROR instead of 2945 POOL_END when pool_flush on front-end socket fails. 2946 2947 The original report is 2948 [pgpool-general: 4265] Pgpool - connection hangs in DISCARD ALL 2949 2950=============================================================================== 2951 2952 3.3.8 (tokakiboshi) 2016/02/05 2953 2954* Version 3.3.8 2955 2956 This is a bugfix release against pgpool-II 3.3.7. 2957 2958 __________________________________________________________________ 2959 2960* Bug fixes 2961 2962 - doc: Fix misinformation regarding load balancing in docs (Tatsuo Ishii) 2963 2964 In streaming replication mode, DECLARE, FETCH, CLOSE and SHOW are sent 2965 to primary node only. Pointed out in [pgpool-general-jp: 1378]. 2966 2967 - Issue fsync() when writing pgpool_status (Tatsuo Ishii) 2968 2969 This ensures that pgpool_status is saved to permanent storage and 2970 allow to survive after system crash. 2971 2972 - test: Fix false alerm of regression tset 062 (Yugo Nagata) 2973 2974 - test: Fix broken regression test for native replication (Yugo Nagata) 2975 2976 Test for insert lock didn't work. 2977 2978 - test: Fix regress test to sleep after pgpool_reload (Yugo Nagata) 2979 2980 Some regression tests modify configuration file and reloads. However, 2981 sometimes these were not applied to pgpool just after reloading. 2982 2983 - Fix inconsistency of sequence values in replication mode (Yugo Nagata) 2984 2985 When a schema name was provided, the table name was quoted wrongly as 2986 like "public.mytbl" instead of "public"."mytbl". So, pool_regclass 2987 and to_regclass couldn't find right talbe oid and insert lock was 2988 never executed. This caused inconsistency between DB nodes. 2989 2990 - test: Fix complication error and segfault of timestamp rewrite test 2991 (Yugo Nagata) 2992 2993 - test: Add timestamp-rewrite unit test to regression test suite (Yugo Nagata) 2994 2995 - Fix ancient bug of pool_push() and friends (Tatsuo Ishii) 2996 2997 It allocates buffer using realloc and uses the pointer 2998 returned. However it does the pointer calculation *before* realloc 2999 gets called. So the calculation uses the old pointer value, which 3000 causes various problems including segfault later. 3001 3002 Also there were other problems with it. The buffer pointer and buffer 3003 size variable is not initialized. The buffer is not freed by 3004 pool_close. Typo in debugging message (3.4 or later only). They are 3005 fixed as well. 3006 3007 - doc: Fix wrong description about log_standby_delay in the document 3008 (Yugo Nagata) 3009 3010 - test: Fix regression test 065 (Tatsuo Ishii) 3011 3012 The path to JDBC driver was explicitly defined. This is wrong. This 3013 should be inherited from JDBC_DRIVER environment variable. 3014 3015 - test: Add option to regress.sh and pgpool_setup for unix domain socket 3016 directory (Yugo Nagata) 3017 3018 - doc: Add missing descriptions about default values to documents (Yugo Nagata) 3019 3020 - test: Fix a bug of regress.sh option handling (Yugo Nagata) 3021 3022 - test: Fix regression test 055.backend_all_down to use PGSOCKET_DIR for 3023 PostgreSQL rhel7 rpm (Yugo Nagata) 3024 3025 - Fix bug with "SET TRANSACTION READ ONLY" (Tatsuo Ishii) 3026 3027 Pgpool-II remembers that non read only queries (including SET) were 3028 executed in an explicit transaction and adds a "writing transaction" 3029 mark to the transaction. The mark affects the query routing behavior 3030 of pgpool-II while running in streaming replication mode. Pgpool-II 3031 starts sending queries to the primary after the mark is set. Because 3032 the effect of writing queries may appear on standbys after some delay 3033 in streaming replication mode, it is safer to route read queries to 3034 the primary after the mark is set. 3035 3036 However there's oversight here. "SET TRANSACTION READ ONLY" does no 3037 data modification and should be treated as an exception. 3038 3039 Per bug #157. 3040 3041 - test: Fix to use timeout command to handle time out of regress test 062 3042 (Yugo Nagata) 3043 3044 - test: Add missing \n in help messages (Yugo Nagata) 3045 3046 - test: Fix regression test 003.failover for rhel7 postgresql rpm (Yugo Nagata) 3047 3048 The expected result of 'show pool_nodes' is fixed to use 3049 PGSOCKET_DIR in hostname column. 3050 3051 - Fix white/black_memqcache_table_list not require quotaion (Yugo Nagata) 3052 3053 The tables and schemas name specified in *_memqcache_table_list 3054 were needed to be quoted by double quotation. 3055 3056 Patch contributed by Dang Minh Huong. 3057 Per [pgpool-hackers: 1323] 3058 3059 - Fix FATAL error with reloading (Tatsuo Ishii) 3060 3061 While reloading pgpool.conf, the number of DB nodes is tentatively set 3062 to 0, then counted up until reaching to the actual number of backends 3063 by the pgpool main process. Unfortunately the variable was on the 3064 shared memory and it confused pgpool child process when they were using 3065 the variable and this caused FATAL error. 3066 3067 Per bug #156 report by harukat. 3068 3069 - test: Add some tests for white/black_memqcache_table_list to regression 3070 test 006.memqcache (Yugo Nagata) 3071 3072 - Add some warning messages for wd_authkey hash calculation failure 3073 (Yugo Nagata) 3074 3075 Sometimes wd_authkey calculation fails for some reason other than 3076 authkey mismatch. The additional messages make these distingushable 3077 for each other. 3078 3079 - test: Fix regression test to check timeout of each test (Yugo Nagata) 3080 3081 - test: Allow timeout value to be specified by the command option (Yugo Nagata) 3082 3083 - Fix bugs with data modifying WITH clause. (Tatsuo Ishii) 3084 3085 pgpool-II did not recognize the data modifying WITH clause despite 3086 pgpool-II 3.3 or after has SQL parser which recognizes it. The bug has 3087 been fixed in pgpool-II 3.5 (having PostgreSQL 9.5 parser), and the fix 3088 is back ported to pgpool-II 3.3 and 3.4. 3089 3090 Per bug #153. 3091 3092 - Fix broken arping_cmd configuration check(Muhammad Usama) 3093 3094 wd_chk_setuid() function was bailing out with the NOTICE message as soon 3095 as it finds the setuid bit is not set on any configured network command 3096 and was ignoring the rest of configurations. 3097 3098 Per bug #139. 3099 3100 - doc: Add restriction about starting multiple pgpool simultaneously 3101 (Yugo Nagata) 3102 3103 - Fix a in-memory query cache bug (Tatsuo Ishii) 3104 3105 If extended query protocol is used and a bind/execute message arrives 3106 which uses a statement created by prior parse message, the temp_cache 3107 is not initialized by a parse messages. Thus messages are added to pre 3108 existing temp cache buffer which causes the trouble, that is, when the 3109 cached result returns, Data Row message and Command Complete message 3110 appeared twice. 3111 3112 Per by bug #152. 3113 3114 - Ignore close statement/portal request if they do not exist (Tatsuo Ishii) 3115 3116 In this case just returns a close complete message to client. 3117 This is a back port of the following commit from pgpool-II 3.4: 3118 3119 1a37e1c35bd8b6f10f524693bbcb7b51f73b4bf0 3120 3121 - test: Fix port numbers in expected result of show pool_nodes (Yugo Nagata) 3122 3123=============================================================================== 3124 3125 3.3.7 (tokakiboshi) 2015/07/24 3126 3127* Version 3.3.7 3128 3129 This is a bugfix release against pgpool-II 3.3.6. 3130 3131 __________________________________________________________________ 3132 3133* Bug fixes 3134 3135 - Fix "cannot find xlog functions" error in pgpool-recovery 3136 (Muhammad Usama) 3137 3138 The argument data type of PostgreSQL's pg_xlogfile_name() function 3139 has been changed from text to pg_lsn since PostgreSQL 9.4. And 3140 pgpool-recovery was still trying to locate the function by old 3141 signature. 3142 3143 - Pass empty string parameters in failover command when pgpool-II 3144 does not have a value for any particular parameter (Muhammad Usama) 3145 3146 Instead of omitting the values for the parameters when pgpool-II does 3147 not have any value for a particular parameter, it now passes an empty 3148 string to the failover command. This makes sure that failover script 3149 will always receive the exact number of expected parameters. 3150 3151 - doc: Clarify load balancing condition (Tatsuo Ishii) 3152 3153 - doc: Clarify description of pcp_promote_node (Tatsuo Ishii) 3154 3155 It does not actually promote PostgreSQL standby. 3156 3157 - doc: Fix outdated limitation description about load balancing using 3158 JDBC driver (Tatsuo Ishii) 3159 3160 Even if autocommit is false, load balancing is possible in certain 3161 conditions. 3162 3163 - Fix "select() system call interrupted" error (Tatsuo Ishii) 3164 3165 The health check process complains above and then: 3166 3167 ERROR: failed to make persistent db connection 3168 DETAIL: connection to host:"x.x.x.x:5432 failed 3169 3170 However, the healthchek triggers neither fail over nor retrying. So, 3171 except the annoying messages above, everything goes well. This could 3172 occur more easily if 1) num_init_children is big and 2) pgpool 3173 children go into idle state (no query arrived from client for 3174 child_life_time seconds). 3175 3176 Original bug report is [pgpool-general: 3756] Connection Interrupted. 3177 Patch created by Tatsuo Ishii. Enhancement from Usama. 3178 3179 - Fix the case when user table includes spaces (Tatsuo Ishii) 3180 3181 For example if table names including spaces are used, pgpool-II cannot 3182 be handled correctly by the internal functions which access system 3183 catalogs and it results in SQL errors. Solution is, to always use 3184 delimited identifier. 3185 3186 Per bug #136. 3187 http://www.pgpool.net/mantisbt/view.php?id=136 3188 3189 Also see [pgpool-general: 3818]. 3190 3191 - Allow to use in-memory query cache size more than 4GB (Tatsuo Ishii) 3192 3193 This should have been allowed since in memory query cache was born. 3194 3195 - Do not send a query for checking insert lock in non replication mode 3196 with extended query (Tatsuo Ishii) 3197 3198=============================================================================== 3199 3200 3.3.6 (tokakiboshi) 2015/04/08 3201 3202* Version 3.3.6 3203 3204 This is a bugfix release against pgpool-II 3.3.5. 3205 3206 __________________________________________________________________ 3207 3208* Bug fixes 3209 3210 - rpm: Fix %tmpfiles_create to not be executed in RHEL/CentOS 6 3211 (Nozomi Anzai) 3212 3213 - Fix to use void * type for receiving return value of thread function 3214 (Yugo Nagata) 3215 3216 Previously int type was used and this could occur stack buffer 3217 overflow. This caused an infinity loop of ping error at bringing 3218 up or down VIP. 3219 3220 - Fix to set SIGCHLD to SIG_DFL instead of SIG_IGN in watchdog processes 3221 (Yugo Nagata) 3222 3223 When using waitpid, it isn't necessary to set SIGCHLD to SIG_IGN. 3224 Rather, it is harmful, and due to this it was regarded that ping 3225 command exited abnormally in error even when this succeeded. 3226 3227 - Remove an unnecessary include directive (Yugo Nagata) 3228 3229 - Enlarge POOLCONFIG_MAXDESCLEN to 80 (Tatsuo Ishii) 3230 3231 This is used in show pool_status command and limits the length of 3232 parameter description. Unfortunately recovery_timeout description is 3233 64 chars, which is 1 byte longer than former definition of the macro. 3234 3235 - doc: Update document of condition for load balancig (Yugo Nagata) 3236 3237 Load balancing is possible in an explicit transaction block 3238 even in replication mode since 3.3.0. 3239 3240 - Support SSL certificate chains in the certificate file for incoming 3241 frontend connections (Muhammad Usama) 3242 3243 - Use to_regclass if available in time stamp rewriting in replication 3244 mode (Tatsuo Ishii) 3245 3246 - Fix a hang when an error occurs in a transaction block with 3247 replication mode (Yugo Nagata) 3248 3249 When an error occurs at a backend node in a transaction block with 3250 replication mode, pgpool-II sends an invalid query to other 3251 backends to sync transaction states. However, previously, this was 3252 not sent to master node, and pgpool-II was waiting for master's 3253 response forever. 3254 3255 - Fix a problem with pcp_detach_node about graceful node detach (Muhammad Usama) 3256 3257 When graceful node detach is requested gracefully, pcp_detach_node should 3258 check if it is allowed to process detach_node command on the particular 3259 node before blocking the incoming connections and closing the existing 3260 connections. 3261 3262 - doc: Update table and flowchart of where a query should be sent to 3263 (Yugo Nagata) 3264 3265 - rpm: pgpool.service is required only in RHEL/CentOS 7 (Nozomi Anzai) 3266 3267=============================================================================== 3268 3.3.5 (tokakiboshi) 2015/02/05 3269 3270* Version 3.3.5 3271 3272 This is a bugfix release against pgpool-II 3.3.4. 3273 3274 __________________________________________________________________ 3275 3276* Bug fixes 3277 3278 - doc: Describe explicitly that the number of slave nodes is not 3279 necessarily 1 (Tatsuo Ishii) 3280 3281 - Fix occasinal deadlock in failover with watchdog enabled 3282 (Muhammad Usama) 3283 3284 per bug #105 3285 http://www.pgpool.net/mantisbt/view.php?id=105 3286 3287 - Fix uninitialized variable (Tatsuo Ishii) 3288 3289 Per Coverity 1234603. 3290 3291 - doc: Fix missing release note entries in the previous release 3292 (Tatsuo Ishii) 3293 3294 - test: Fix wait_for_pgpool_startup in pgpool_setup to use "postgres" 3295 database rather than "test" (Tatsuo Ishii) 3296 3297 The test database may or may not exist and if it does not, it will 3298 always retry until timeout expired (20 seconds), and regression test 3299 takes unnecessary long. 3300 3301 - Fix possible segmentation fault in query cache (Tatsuo Ishii) 3302 3303 - RPM: Add to support for memcached. (Tatsuo Ishii) 3304 3305 - test: Allow pgpool_setup to set configuration file directory by setting 3306 environment variable PGPOOLDIR (Tatsuo Ishii) 3307 3308 - RPM: Rename RPM file (Yugo Nagata) 3309 3310 Rename filename to include the RHEL version number like PostgreSQL's 3311 official RPM file. (e.g. pgpool-II-pg93-3.4.0-2pgdg.rhel6.x86_64.rpm) 3312 3313 - Fix node id range check bug in trigger_failover_command(). (Tatsuo Ishii) 3314 3315 The node id should be lower than NUM_BACKENDS. Probably harmless since 3316 callers never pass node ids greater or equal to NUM_BACKENDS. 3317 3318 - test: Fix failover script of pgpool_setup to use absolute path to the 3319 database cluster (Tatsuo Ishii) 3320 3321 - test: Add memory leak regression test (Tatsuo Ishii) 3322 3323 - Fix ill signal befavior of SIGCHLD in exec_ifconfig() (Tatsuo Ishii) 3324 3325 For some reason SIGCHLD was set to SIG_IGN *and* tries to wait 3326 child process which always fails because SIGCHLD is never delivered. 3327 Due to this "ifconfig up" fails when switching to watchdog master. 3328 3329 See "[pgpool-general: 3310] for more details. 3330 3331 - Allow $_IP_$ having address prefix in if_up_cmd and if_down_cmd 3332 (Muhammad Usama) 3333 3334 Previously, it is assumed that "$_IP_$" keyword will always have a 3335 white space at the end, and when "$_IP_$" has address prefix (e.g. 3336 $_IP_$/24), this prefix was ignored. 3337 3338 Per bug #122. 3339 http://www.pgpool.net/mantisbt/view.php?id=122 3340 3341 - Allow "show pool_nodes" to print node ids having more than one digits 3342 (Muhammad Usama) 3343 3344 Problem reported in [pgpool-general: 3374]. 3345 3346 - Fix occasional failure in regression test '004.watchdog' (Yugo Nagata) 3347 3348 The patch provided by uehara in bug #127. 3349 http://www.pgpool.net/mantisbt/view.php?id=127 3350 3351 - Restore SIGCHLD handler to its original after executing if_up/down_cmd 3352 (Yugo Nagata) 3353 3354 Previously SIGCHLD was set to SIGIGN always after if_up/down_cmd. 3355 This led to a incorrect error handling of ping or other commands 3356 execution, and warning messages were output to log even when the 3357 command exited successfully. 3358 3359 - RPM: Add pgpool.service for systemd in RHEL/CentOS 7 (Nozomi Anzai) 3360 3361 - RPM: Split pgpool_regclass and pgpool_recovery as a separate extension 3362 package (Tatsuo Ishii) 3363 3364 On PostgreSQL server, only the extension package is required, no pgpool 3365 full package is necessary. 3366 3367 Per Andrew N Golovkov. 3368 3369 - RPM: Fix wrong SSL configure option in the RPM spec file (Tatsuo Ishii) 3370 3371 SSL enabling option is "--with-openssl=/usr" and this is wrong. This 3372 should be "--with-openssl". 3373 3374 Per bug #115. 3375 http://www.pgpool.net/mantisbt/view.php?id=115 3376 3377 - RPM: Change to use systemd if it is available and adopt to PostgreSQL 9.4 3378 (Nozomi Anzai) 3379 3380 - Fix to disable debug mode by reloading config (Yugo Nagata) 3381 3382 Per bug #114 3383 http://www.pgpool.net/mantisbt/view.php?id=114 3384 3385=============================================================================== 3386 3387 3.3.4 (tokakiboshi) 2014/09/05 3388 3389* Version 3.3.4 3390 3391 This is a bugfix release against pgpool-II 3.3.3. 3392 3393 __________________________________________________________________ 3394 3395* Bug fixes 3396 3397 - Fix a typo of pgpool.spec (Yugo Nagata) 3398 3399 - Fix bug that worker child process keeps failing when there's no 3400 primary backend (Tatsuo Ishii) 3401 3402 Problem identified and fix contributed by Junegunn Choi. 3403 3404 See [pgpool-hackers: 471] for more details. 3405 3406 - Close listen socket when smart shutdown request is made (Tatsuo Ishii) 3407 3408 When smart shutdown process starts, pgpool children still listen on 3409 the port and clients can send further connection requests which fail 3410 in the end. Which is not only waste of time, but also prevents a load 3411 balancer which sits in front of pgpool from realizing the pgpool is 3412 going down. 3413 3414 Problem analyzed and patch provided by Junegunn Choi in [pgpool-hackers 3415 474], and enhanced to take care not only inet domain socket but UNIX 3416 domain socket by Tatsuo Ishii. 3417 3418 - doc: Add cautions that recovery commands are killed by statement_timeout 3419 of PostgreSQL. (Tatsuo Ishii) 3420 3421 - test: Fix bug that wait_for_pgpool_startup does not work. (Tatsuo Ishii) 3422 3423 - test: Fix test driver for watchdog to use wait_for_pgpool_startup correctly 3424 (Tatsuo Ishii) 3425 3426 - Fix to ignore a harmless error code when executing ifconfig command 3427 (Yugo Nagata) 3428 3429 When executing command such as ifconfig or ping by execv() in a forked 3430 child proess, wait() can fails with an error code ECHILD, although the 3431 process exists exactly, if SIGCHLD is set to SIG_IGN in Linux. We should 3432 ignore this and not treat as failure of the command. 3433 3434 - test: Add undocumented "-j" option to the script comment. (Tatsuo Ishii) 3435 3436 - test: Fix unwanted JDBC regression test failure (Tatsuo Ishii) 3437 3438 - test: Fix to prevent regression test failures on slow machines 3439 (Tatsuo Ishii) 3440 3441 - test: Allow to specify PostgreSQL library directory by environment 3442 variable (Tatsuo Ishii) 3443 3444 - Adopt PostgreSQL 9.4 having to_regclass (Tatsuo Ishii) 3445 3446 PostgreSQL 9.4 has built-in function "to_regclass", which has 3447 equivalent functionality of pgpool_regclass. Now pgpool searches 3448 to_regclass first then try pgpool_regclass. 3449 3450 - Fix unportable code related to SO_REUSEPORT (Tatsuo Ishii) 3451 3452 There are several places using setsockopt(sock, SOL_SOCKET, 3453 SO_REUSEPORT...). SO_REUSEPORT is not available on all Linux kernels 3454 and the source code uses ifdef to detect the feature in the compile 3455 time. Problem is, the binary created with kernel which provides the 3456 feature cannot run on a kernel which does not provide the feature. Fix 3457 is, detecting the feature in the run time by checking error code 3458 returned by setsockopt() and ignore it if the cause of the error is 3459 lacking the feature. 3460 3461 - doc: Remove old restriction description which is no longer true 3462 (Tatsuo Ishii) 3463 3464 - Fix return type of text_to_lsn() function (Yugo Nagata) 3465 3466 This caused compile warning. 3467 3468 - Fix file descriptor leak when daemonize. (Tatsuo Ishii) 3469 3470 Per Coverity 1111471. 3471 3472 - Fix memory leak. (Tatsuo Ishii) 3473 3474 Per Coverity 1111442. 3475 3476 - Fix pgpool.init's long-standing bug of stop/restart failure 3477 (Yugo Nagata) 3478 3479 In previous, pgpool.init uses killproc for stopping pgpool, but there 3480 are several problems. In the new version, "pgpool -m fast stop" is 3481 used in stop command. 3482 3483 Original patch contributed by Ryan DeShone and modified by Yugo Nagata. 3484 3485 See [pgpool-hackers: 239][pgpool-hackers: 512]. 3486 3487 - Allow to run pgpool_setup and regression test on Ubuntu box 3488 (Tatsuo Ishii) 3489 3490 - test: Fix -i option (install directory of pgpool) not working 3491 (Tatsuo Ishii) 3492 3493 - Add missing include file sys/wait.h. (Tatsuo Ishii) 3494 3495 Per bug #104. 3496 http://www.pgpool.net/mantisbt/view.php?id=104 3497 3498 - Fix an infinite loop of ping error at new active pgpool when virtual 3499 IP switching (Yugo Nagata) 3500 3501 This bug also caused hangs of the old active pgpool, since this waits 3502 response from the new active pgpool, which is in the infinite loop and 3503 not able to respond. 3504 3505 This problem is reported by Qian Peng in [pgpool-hackers: 520]. 3506 3507 - Disbale statement_timeout of PostgreSQL while executing online recovery 3508 (Tatsuo Ishii) 3509 3510 Online recovery may take very long time and user may enable statement 3511 timeout. To prevent online recovery canceled by statement timeout, 3512 disable statement timeout in the connection used by online recovery. 3513 3514 See [pgpool-general: 2919] for more details. 3515 3516 - Fix pool_table_name_to_oid in case new to_regclass used which is 3517 introduced in PostgreSQL 9.4 (Tatsuo Ishii) 3518 3519 The relcache func used here should return 0 if target table is not 3520 found. However to_regclass returns NULL in this case. To fix the 3521 problem now COALESCE is used. 3522 3523 - test: Fix regression test 057 hung if run against PostgreSQL 9.4 or 3524 later (Tatsuo Ishii) 3525 3526 PostgreSQL 9.4 or later changed libpq behavior: NULL username for 3527 connection string does not cause an error, which was expected in the 3528 test. 3529 3530 - Fix to close pipe when ping command exits with failure (Yugo Nagata) 3531 3532 This bug causes pipe open error: Too many open files, which 3533 leads to failure of connecting to trusted servers, and then 3534 pgpool goes to down status. 3535 3536 - Fix Resource leaks (Muhammad Usama) 3537 3538 Coverity issue #1222998 and #1222999. 3539 3540 - Add a description that pcp_detach_node command disconnects existing 3541 sessions (Tatsuo Ishii) 3542 3543 - Fix failover.sh produced by pgpool_setup (Tatsuo Ishii) 3544 3545 It did not support there's more than 2 nodes case. It always tries to 3546 promoto node0 or node1. 3547 3548 - Remove meaningless minus check because of unsigned int variable 3549 (Tatsuo Ishii) 3550 3551 Coverity issue #1111419, #1111420, #1111422. 3552 3553 - replacing strcpy() with much safer and recomended call strlcpy() 3554 (Muhammad Usama) 3555 3556 Coverity issue #1111480. 3557 3558 - Fix pgpool.spec to support openssl (Tatsuo Ishii) 3559 3560 - Fix pgpool.spec to use 3.3-stable tree head (Tatsuo Ishii) 3561 3562 - Remove unnecessary call to pool_shmem_exit() which removes semaphore 3563 when it shouldn't (Tatsuo Ishii) 3564 3565 exit_handler checks if the process is parent or not. This is 3566 good. However, even if it is a child process, it calls 3567 pool_shmem_exit() which removes semaphore and shmem when it should 3568 not. It should be called only from parent process. 3569 3570 Per bug #102. 3571 http://www.pgpool.net/mantisbt/view.php?id=102 3572 3573 - Fix get_insert_command_table_name() function not to use freed pointer 3574 (Muhammad Usama) 3575 3576 Coverity issue #1223007. 3577 3578 - Fix pool_handle_query_cache() to not free NULL pointer (Tatsuo Ishii) 3579 3580 - Change connect() timeout longer (10 seconds) for flaky network 3581 (Tatsuo Ishii) 3582 3583 Change connect() timeout in connect_inet_domain_socket_by_port() from 3584 1 second to 10 seconds for flaky network such as AWS. This should help 3585 reducing frequent failover. 3586 3587 - Fix reset query stuck problem. (Tatsuo Ishii) 3588 3589 It is reported that reset query (DISCARD ALL etc.) occasionally does 3590 not finish and pgpool child remain waiting for reply from backend thus 3591 client cannot connect to pgpool. 3592 3593 The cause of problem is not identified yet but if client suddenly 3594 closes connection to pgpool in the middle of query processing, backend 3595 may not accept the reset queries because they are not ready for query. 3596 3597 The fix is, if frontend closes connection in unexpected way, query 3598 process loop immediately returns with new state: 3599 POOL_END_WITH_FRONTEND_ERROR and pgpool closes connection to 3600 PostgreSQL then goes back to new connection request waiting loop. 3601 3602 Also, pgpool closes connections to backend when client_idle_limit is 3603 set and the idle limit. 3604 3605 Per bug #107. 3606 http://www.pgpool.net/mantisbt/view.php?id=107 3607 3608 - Fix other dozens of coverity issues (Muhammad Usama) 3609 3610=============================================================================== 3611 3612 3.3.3 (tokakiboshi) 2014/03/24 3613 3614* Version 3.3.3 3615 3616 This is a bugfix release against pgpool-II 3.3.2. 3617 3618 __________________________________________________________________ 3619 3620* Bug fixes 3621 3622 - installer: Fix bug that install of pgpool-II RPM fails (Yugo Nagata) 3623 3624 - installer: Fix to set up passwordless SSH from apache@localhost to 3625 postgres@localhost (Yugo Nagata) 3626 3627 - Fix bug that restarted pgpool's watchdog status is regarded as down 3628 (Yugo Nagata) 3629 3630 - doc: Add mention about "listen queue" and how to increase the "backlog" 3631 in the num_init_children section. (Tatsuo Ishii) 3632 3633 - Fix bug that watchdog status goes down even when only one of trusted 3634 servers get unpingable (Yugo Nagata) 3635 3636 - Fix bad performance of unlogged tables detection code. (Tatsuo Ishii) 3637 3638 Pointed out at [pgpool-hackers: 435][[pgpool-general:2325]. 3639 3640 - Fix primary node detection logic. (Tatsuo Ishii) 3641 3642 There's a possibility that primary node is not detected. This happens 3643 in following situation. node 0: primary, node 1: standby. Node 0 goes 3644 down. Health checking detects the fact but local status is not updated 3645 yet. Primary node finding (find_primary_node) runs. Node 0's status is 3646 yet healthy. Because find_primary_node fails to connect to node 0, it 3647 immediately returns -1 and fails to find that fact that node 1 is now 3648 primary. 3649 3650 Fix is just continuing to look for primary node when fails to connect 3651 to a node. 3652 3653 Per [pgpool-general: 2409]. 3654 3655 - Add raw mode support to pgpool_setup. (Tatsuo Ishii) 3656 3657 - test: Integrate jdbc test to regression test. (Tatsuo Ishii) 3658 3659 - Fix jdbc DML fails when operated in raw mode and auto commit is off. 3660 (Tatsuo Ishii) 3661 3662 This is reported in bug #92. 3663 3664 - Fix to output error message when wd_escalation_command fails with exit 3665 code other than 0 (Yugo Nagata) 3666 3667 This is suggested by Sergey Arlashin in [pgpool-general: 2457]. 3668 3669 - test: Add new regression test for query cache. (Tatsuo Ishii) 3670 3671 - Fix query cache bug with extended protocol. (Tatsuo Ishii) 3672 3673 SELECT retrieves outdated cache even DML was executed in an expilicit 3674 transaction. The bug had been there since in memory query cache was 3675 born. Per [pgpool-general-jp: 1252]. 3676 3677 - Add missing entries "relcache_size" and "check_temp_table" to show 3678 pool_status (Tatsuo Ishii) 3679 3680 - Fix to output error message when if_up_cmd fails. (Yugo Nagata) 3681 3682 This is suggested by Sergey Arlashin in [pgpool-general: 2457]. 3683 3684 - Avoid to send queries to unrelated nodes in streaming replication mode. 3685 (Tatsuo Ishii) 3686 3687 Pgpool-II sends certain queries, such as BEGIN, END and SET commands to 3688 all of DB nodes. However in streaming replication mode, only primary 3689 node and at most one standby node are only concerned (if primacy node 3690 is selected as the load balance node, only 1 node is concerned). 3691 3692 See [pgpool-hackers: 464] for more details. 3693 3694 - Fix possible buffer overrun problem and memory leak. (Tatsuo Ishii) 3695 3696 Per Coverity 1111465 and 1111482. 3697 3698 - Fix possible buffer overrun. (Tatsuo Ishii) 3699 3700 Replace strcpy() with strlcpy(). Per Coverity report 1111478, 1111480, 3701 1111481. 3702 3703 - Add dubug messages for analyzing errors in if_up_cmd (Yugo Nagata) 3704 3705 - Fix freeing NULL. (Tatsuo Ishii) 3706 3707 Per Coverity 1111384. 3708 3709 - Do not enable query cache on materialized views. (Tatsuo Ishii) 3710 3711 Per bug #95. 3712 3713 - Fix memory leak. (Tatsuo Ishii) 3714 3715 Per Coverity 1111446. 3716 3717 - Fix a segmentation fault in parallel mode with system_db_hostname is 3718 empty (Yugo Nagata) 3719 3720 - Fix to output debug messages in processing pgpool.conf with -d option 3721 (Yugo Nagata) 3722 3723 Previously, some debug messages in pool_get_config() ware not output 3724 even when -d option was used. 3725 3726 - Fix JDBC exception of prepared statement including now() in 3727 replication mode (Yugo Nagata) 3728 3729 With JDBC, when a prepared statement is executed more than 3730 PrepareThreshold times, the statement is named and Describe message 3731 is sent after Parse. With named statement, pgpool rewrite now() to 3732 parameter in replication mode. Hence, rewritten query has additonal 3733 parameter than original. In this case, ParameterDescription message 3734 sent to frontend (response of Describe) should include OIDs of the 3735 same number os original query's parameters. Otherwize, JDBC throws 3736 ArrayIndexoutOfBoundsException. 3737 3738 This is reported in [pgpool-general-jp: 1192]. 3739 3740 - Fix backend error of prepared statement about table which has column whoes 3741 default value is now() in replication mode (Yugo Nagata) 3742 3743 When pgpool parses a named prepared statement with default now(), 3744 timestamps are replaced to additional parameters. So, Bind message also 3745 should inclued additional parameter format codes. However, when the 3746 number of original parameter was one, pgpool didn't handle this. This 3747 caused a error like "incorrect binary data format in bind parameter 2". 3748 3749 - test: Fix a bug of regression test of JDBC that shows OK even when 3750 this fails (Yugo Nagata) 3751 3752 - test: Add a new regression test for JDBC's PrepareThreshold (Yugo Nagata) 3753 3754 - doc: Add description about parallel mode doesn't support PREPARE (Yugo Nagata) 3755 3756 Per bug #93 3757 3758=============================================================================== 3759 3760 3.3.2 (tokakiboshi) 2013/11/29 3761 3762* Version 3.3.2 3763 3764 This is a bugfix release against pgpool-II 3.3.1. 3765 3766 __________________________________________________________________ 3767 3768* Bug fixes 3769 3770 - Fix incorrect time stamp rewriting in replication mode for certain time 3771 zones. (Tatsuo Ishii) 3772 3773 Time stamp rewriting calls "SELECT now()" to get current time. 3774 Unfortunately the buffer for the current time is too small for certain 3775 time zones such as "02:30". Note that non-30-minutes-time-zone such as 3776 "0900" does not reveal the problem. This explains why we haven't the bug 3777 report until today. 3778 3779 Bug reported in [pgpool-general: 2113] and fix provided by Sean Hogan. 3780 http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002142.html 3781 3782 - installer: Fix the way to specify pgpoolAdmin version in 3783 redhat/rpm_installer/getsources.sh. (Yugo Nagata) 3784 3785 - Makefile: Replace pg_config by $(PG_CONFIG) in Makefiles so it can be 3786 overridden at build time when compiling for different PG major versions. 3787 (Tatsuo Ishii) 3788 3789 Patch contributed by Christoph Berg ([pgpool-general: 2127]). 3790 http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002156.html 3791 3792 - watchdog: Fix a warning/error when compiling with -Werror=format-security. 3793 (Tatsuo Ishii) 3794 3795 Patch contributed by Christoph Berg ([pgpool-general: 2127]). 3796 http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002156.html 3797 3798 - configure: Remove -lcompat because it confuses FreeBSD per bug#15. 3799 (Tatsuo Ishii) 3800 http://www.pgpool.net/mantisbt/view.php?id=15 3801 3802 - Fix segfault when pgpool.conf does not set log_standby_delay. 3803 (Tatsuo Ishii) 3804 3805 This is caused by wrong initialization for log_standby_delay in 3806 pool_config.l. 3807 Per bug#74. http://www.pgpool.net/mantisbt/view.php?id=74 3808 3809 - doc: Modify descriptions about restrictions of parallel mode 3810 Muliple rows INSERT using VALUES are not supported in parallel mode. 3811 (Yugo Nagata) 3812 3813 - Avoid calling find_primary_node_repeatedly() when standby node goes 3814 down. (Tatsuo Ishii) 3815 3816 This will reduce the time to failover. Per bug #75, patch modified by 3817 Tatsuo Ishii. http://www.pgpool.net/mantisbt/view.php?id=75 3818 3819 - Fix data inconsistency problem with native replication mode + extended 3820 protocol case. (Tatsuo Ishii) 3821 3822 It is reported that concurrent INSERT using JDBC driver causes data 3823 difference among database node. This only happens following conditions 3824 are all met: 3825 3826 1) Native replication mode 3827 2) Extended protocol used 3828 3) The portal created by parse message is reused by bind message 3829 4) autocommit is on 3830 5) SERIAL (sequence) is used 3831 3832 Pgpool-II's parse message function knows it has to lock the target 3833 table when INSERT (plus #5) is issued by clients. Unfortunately bind 3834 message function did not know it. Once parse/bind/execute finishes, 3835 pgpool releases the lock obtained by parse because of #4. JDBC wants 3836 to reuse the portal and starts the cycle from bind message, which does 3837 not obtain lock. As as result, lock-free INSERT are floating around 3838 which causes data inconsistency of course. The solution is, lock the 3839 table in bind phase. 3840 3841 For this bind needs to issue LOCK in extended protocol. This was a little 3842 bit hard because the module (do_command()) to issue internal SQL command 3843 (other than SELECT) does not support extended protocol. 3844 To solve the problem do_query() is modified so that it accepts other than 3845 SELECT because it already accepts extended protocol. 3846 The modification is minimum and is only tested for the case called from 3847 insert_lock(). I do not recommend to replace every occurrence of 3848 do_command () with do_query() at this point. 3849 3850 BTW the reason why the bug is not reported is, most users uses JDBC 3851 with auto commit = off. In this case, the lock obtained by parse persists 3852 until user explicitly issues commit or rollback. 3853 3854 Per bug report by Steve Kuekes in [pgpool-general: 2142]. 3855 http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002171.html 3856 3857 - Fix memory allocation size bug in the code path of query cache. 3858 (Tatsuo Ishii) 3859 3860 In execute() memory allocation size is too small incertain case. No bug 3861 has been reported so far, but certainly this is a bug. 3862 3863 - Fix occasional segfault in query cache + extended protocol. 3864 (Tatsuo Ishii) 3865 3866 When the query is not "cache safe", bind_msg->param_offset was not set 3867 in Bind(). However, Execute() unconditionally uses bind_msg->param_offset 3868 to convert bind parameters to string so that they can be added to the 3869 cached query string and it causes segfault because bind_msg->param_offset 3870 is a garbage. Also logic bug to calculate bind_msg->param_offset is 3871 corrected. 3872 3873 Per bug#76. http://www.pgpool.net/mantisbt/view.php?id=76 3874 3875 - Avoid to run out free query cache hash index entry. (Tatsuo Ishii) 3876 3877 If hash index entries are run out, pgpool-II cannot reuse old cache 3878 entry because pgpool-II always expects there's at least one empty hash 3879 index entry. To mitigate the problem, if free hash index entries are run 3880 out, look for victim cache block to reuse the hash index entry. 3881 3882 Per bug #70. http://www.pgpool.net/mantisbt/view.php?id=70 3883 3884 - installer: checkEnv() didn't do anything and always returned 0. 3885 (Nozomi Anzai) 3886 3887 - Fix inappropriate shared memory allocation size for clock hand. 3888 (Tatsuo Ishii) 3889 3890 The memory for clock hand was allocated as sizeof(pool_fsmm_clock_hand)) 3891 which is 8 bytes long because the variable is declared as: 3892 3893 static int *pool_fsmm_clock_hand; 3894 3895 This is plain wrong. The memory size actually needed is only 4 bytes, 3896 which is sizeof(*pool_fsmm_clock_hand)). In other word, the bug allocated 3897 unnecessary 4 bytes, which did nothing bd for the execution of program. 3898 But a bug is a bug. 3899 3900 Per covery report "1111476 Wrong sizeof argument" 3901 3902 - Fix "show pool_status" always shows memqcache_auto_cache_invalidation as 3903 0. (Tatsuo Ishii) 3904 Per bug #80. http://www.pgpool.net/mantisbt/view.php?id=80 3905 3906 - Fix error message in read_password_packet(). (Tatsuo Ishii) 3907 3908 - watchdog: Fix to pass big parameter by pointer instead of by value at 3909 some function. (Yugo Nagata) 3910 3911 - Fix memory leak when SSL is requested. (Tatsuo Ishii) 3912 3913 When SSL is requested, pgpool child retries to read start up packet. 3914 However it does not free the memory for previous start up packet. 3915 3916 Per Coverity report "1111443 Resource". 3917 3918 - Fix memory leak when do_query() fails in timestamp rewriting. 3919 (Tatsuo Ishii) 3920 3921 For this purpose free_select_result() is changed to accept NULL argument. 3922 Per Coverity report "1111454, 1111455 Resource leak". 3923 3924 - Fix load balance bug in replication mode. (Tatsuo Ishii) 3925 3926 When load_balance_mode = off, SELECTs including writing function 3927 should be sent to all the DB nodes. Per [pgpool-general: 2221]. 3928 http://www.sraoss.jp/pipermail/pgpool-general/2013-October/002250.html 3929 3930 The bug was introduced in: 3931 http://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=1ac45a28258074ea4d9d902aca016f970d31f311 3932 (3.3.1). 3933 3934 - watchdog: Fix to put null character at end of ping result string used in 3935 watchdog. (Yugo Nagata) 3936 3937 - Fix target node selection logic when "DEALLOCATE portal|statement". 3938 (Tatsuo Ishii) 3939 3940 When "DEALLOCATE portal|statement" is used and last prepared statement or 3941 portal was not found, target node selection map is not set. Probably this 3942 is not actually harmful because prepared statement or portal was not found 3943 is an error case. The bug was there since day 0. 3944 3945 Per Coverity report "1111491 Structurally dead code". 3946 3947 - Fix range check bug of MAX_NUM_BACKENDS in corner case. (Tatsuo Ishii) 3948 3949 MAX_NUM_BACKENDS is the allowed max number of DB nodes (128, at this 3950 point). In reality, probably no one ever tried more than 128 DB nodes 3951 and that's the reason why nobody noticed. 3952 3953 Per Coverity report "1111429, 1111430 and 1111431 Out-of-bounds write". 3954 3955 - Do not set/unset fronted connection info for dead backend. (Tatsuo Ishii) 3956 3957 Per bug #82. http://www.pgpool.net/mantisbt/view.php?id=82 3958 3959 - Fix that the script forgets to allow public access to pgpool_catalog. 3960 (Tatsuo Ishii) 3961 3962 The bug prevents inserting data into user tables if pgpool_catalog is 3963 created in native replication mode. The bug was there from day 1. I 3964 wonder why nobody noticed until today. 3965 Per [pgpool-general-jp: 1229]. 3966 http://www.sraoss.jp/pipermail/pgpool-general-jp/2013-November/001228.html 3967 3968 - doc: Add description that it is recommended to specify multiple servers 3969 to trusted_servers. (Yugo Nagata) 3970 3971 - Fix uninitialized variable in error case in pool_do_auth(). 3972 (Tatsuo Ishii) 3973 3974 If there's no valid backend, pgpool will return garbage pid to frontend in 3975 auth phase. Actually because no backend is available, frontend will be 3976 disconnected later on. So this is harmless. 3977 Per Coverity report "1127331 Uninitialized scalar variable". 3978 3979 - Fix to add node id range check when issue an error message using node 3980 id. (Tatsuo Ishii) 3981 Per Coverity report #1111433 "Out-of-bounds read". 3982 3983 - Fix buffer overrun bug and resource leak bug of parse_copy_data(). 3984 (Tatsuo Ishii) 3985 Per Coverity report 1111427 "Out-of-bounds write" and 1111453 "Resource 3986 leak". 3987 3988 - Fix possible segfault in CopyDataRaws(). (Tatsuo Ishii) 3989 Coverity pointed out that if pool_get_id() returns an error, VALID_BACKEND 3990 will access out of array. 3991 Per Coverity report 1111413 "Memory - illegal accesses". 3992 3993 - Fix query cache is enabled and protocol version = 2 case. (Tatsuo Ishii) 3994 3995 When the protocol version = 2, we assume that session state is "idle". 3996 This is not feasible but no way. I recommend to not use query cache 3997 with protocol 2. 3998 Per Coverity report 1111488 "Uninitialized scalar variable". 3999 4000 - Fix strftime() usage in pool_pools(). (Tatsuo Ishii) 4001 4002 The buffer is not large enough as expected by the second parameter. This 4003 is not harmless because the format string will not produce longer result 4004 string than the buffer. 4005 Per Coverity report 1111426 "Out-of-bounds access". 4006 4007 - RPM: Improved to specify the versions of pgpool-II and PostgreSQL in the. 4008 spec file. (Nozomi Anzai) 4009 4010 - Fix resource leak in make_persistent_db_connection. (Tatsio Ishii) 4011 4012 For this pupose, new static function free_persisten_db_connection_memory 4013 is added. 4014 Per Coverity report #1111468. 4015 4016 - Fix a bug that connection check to trusted servers fails when the RTT 4017 is very short. (Yugo Nagata) 4018 4019 - Fix several small bug fixes detected by Coverity. (Tatsuo Ishii) 4020 4021=============================================================================== 4022 4023 3.3.1 (tokakiboshi) 2013/09/06 4024 4025* Version 3.3.1 4026 4027 This is a bugfix release against pgpool-II 3.3.0. 4028 4029 __________________________________________________________________ 4030 4031* Bug fixes 4032 4033 - Fix to add the regression test suite for making tar boll (Tatsuo Ishii) 4034 4035 This isn't included in the tar ball of 3.3.0 release. 4036 4037 - Fix watchdog test script in regression test (Tatsuo Ishii) 4038 4039 - Fix a memory overrun bug (Tatsuo Ishii) 4040 4041 This problem is pointed out in [pgpool-general: 1956] by Sean Hogan. 4042 4043 [pgpool-general: 1956] memory overrun bug? 4044 http://www.sraoss.jp/pipermail/pgpool-general/2013-July/001984.html 4045 4046 - Fix a compile error (Yugo Nagata) 4047 4048 - Fix child process termination with sig abort when memory query cache 4049 is enabled (Tatsuo Ishii) 4050 4051 This is due to double free bug that occurs when multiple bind/execute 4052 messages come after a parse message. When a parse messages comes, query 4053 context is created along with temp cache. The pointer to the temp cache 4054 is added to the temp cache array when the query executed. Subsequent 4055 bind messages uses the same temp cache pointer. This is the source of 4056 double free bug when the cache array discarded. 4057 4058 This is reported in Bug track #68 by harukat. 4059 4060 #68: child process termination with sigabort when memory_cache_enabled = on 4061 http://www.pgpool.net/mantisbt/view.php?id=68 4062 4063 - Add some test cases to regression test (Tatsuo Ishii) 4064 4065 - Fix typos of the document in installation of pgpool-recovery section. 4066 (Tatsuo Ishii) 4067 4068 - Fix a typo of log message (Yugo Nagata) 4069 4070 - Fix typos of the japanese document (Yugo Nagata) 4071 4072 - Fix to send SELECT to master node only when load_balance_mode is off 4073 in replication mode (Tatsuo Ishii) 4074 4075 When load_balance_mode is off in replication mode, SELECT queries 4076 should be sent to master node only, rather than sent to all nodes in 4077 an explicit transaction. 4078 4079 This problem is reported in [pgpool-general: 2038] by Rypl Lukas. 4080 4081 [pgpool-general: 2038] SELECT sent to both nodes in replication mode 4082 http://www.sraoss.jp/pipermail/pgpool-general/2013-August/002066.html 4083 4084 - Fix pgpool_setup to work in standalone. (Tatsuo Ishii) 4085 4086=============================================================================== 4087 4088 3.3.0 (tokakiboshi) 2013/07/30 4089 4090* Version 3.3.0 4091 4092 This is the first version of pgpool-II 3.3 series. 4093 That is, a "major version up" from 3.2 series. 4094 4095 __________________________________________________________________ 4096 4097* Incompatible changes 4098 4099 - All the follwing are about watchdog. 4100 See "New features" section below for details of these changes. 4101 4102 - Default monitoring method was changed from query mode to heartbeat mode. 4103 4104 - Failover/failback commands are executed in only one pgpool-II. 4105 4106 - In default, all the query caches on shared memory are cleared when 4107 standby pgpool-II escalates to active. 4108 4109 - Database name, user name, and password used for monitring other 4110 pgpool-II by query are specified by dedicated parameters. 4111 Previously, template1, recovery_user, and recovery_password are used. 4112 4113 __________________________________________________________________ 4114 4115* New features 4116 4117 ** Watchdog 4118 4119 - Add a new monitring method using heartbeat signal of UDP packet in 4120 lifecheck. (Yugo Nagata) 4121 4122 You can select a method from either of two methods, "heartbeat" mode or 4123 "query" mode. 4124 4125 The heartbeat mode is the new method. In this mode, watchdog monitors 4126 other pgpool-II process by using heartbeat signal. Watchdog receives 4127 heartbeat signals sent by other pgpool-II periodically. If there are no 4128 signal for a certain period, watchdog regards it as failure of the 4129 pgpool-II. For redundancy you can use multiple networks for heartbeat 4130 exchange between pgpool-IIs. This mode is default and recommended one. 4131 4132 The query mode is the conventional method. In this mode, watchdog monitors 4133 pgpool-II's service rather than process. Watchdog sends queries to other 4134 pgpool-II and checks the response. Note that this method requires connections 4135 from other pgpool-IIs, so it would fail motoring if num_init_children isn't 4136 large enough. This mode is deprecated and left for backward compatibility. 4137 4138 Add these new parameters: 4139 - wd_lifecheck_method 4140 - wd_heartbeat_port 4141 - wd_heartbeat_keepalive 4142 - wd_heartbeat_deadtime 4143 - heartbeat_destinationX 4144 - heartbeat_destination_portX 4145 - heartbeat_deviceX 4146 4147 - Add interlocking mechanism of exclusive failover/failback command 4148 execution. (Yugo Nagata) 4149 4150 When using multiple pgpool-IIs with watchdog enabled, failover commands 4151 (failover_command, failback_command, and follow_master_command) get 4152 executed only at one pgpool-II. 4153 4154 Previously, these command got executed at all pgpool-IIs. 4155 4156 - Add authentication mechanism for watchdog packet communication. 4157 (Yugo Nagata) 4158 4159 Watchdog packets (include heartbeat signal) from pgpool-II with wrong 4160 authentication key are rejected. All pgpool-IIs must have the same key, 4161 which is specified wd_authkey parameter in pgpool.conf. pgpool-II with 4162 wrong authkey can't even start watchdog, because the startup packet is 4163 rejected by other pgpool-IIs. 4164 4165 - Add clear_memqcache_on_escalation parameter. (Yugo Nagata) 4166 4167 If this is on, all the query caches on shared memory are cleared when 4168 standby pgpool-II escalates to active. 4169 4170 This is aimed to prevent the new active pgpool-II from using inconsistent 4171 query caches with the previous active. 4172 4173 - Add wd_escalation_command parameter. (Yugo Nagata) 4174 4175 This specifies command which is executed at escalation on the new active 4176 pgpool-II server. The timing is just before virtual IP is brought up. 4177 4178 - Add parameters wd_lifecheck_dbname, wd_lifecheck_user, and 4179 wd_lifecheck_password. (Yugo Nagata) 4180 4181 These parameters specify the database name, the user name, and password 4182 used in query mode lifecheck of watchdog . Previously, these are hard 4183 coded to use template1, recovery_user, and recovery_password. 4184 4185 - When delegate_IP parameter is emply, viertual IP is neither brought up 4186 nor switched. (Yugo Nagata) 4187 4188 This allows multi-master like configuration without virtual IP. 4189 4190 - Add pcp_watchdog_info command (Yugo Nagata) 4191 4192 This is PCP command for retrieving the watchdog status. 4193 4194 ** Others 4195 4196 - Import PostgreSQL 9.2 raw parser. (Nozomi Anzai, Tatsuo Ishii) 4197 4198 - Add a tool called pgpool_setup to set up pgpool-II and PostgreSQL 4199 temporary installation in current directory for *testing* purpose. 4200 (Tatsuo Ishii) 4201 4202 usage: pgpool_setup [-m r|s][-n num_clusters][--no-stop] 4203 -m s: create an installation as streaming replication mode. 4204 (the default) 4205 -m r: create an installation as native replication mode. 4206 -n num_clusters: create num_clusters PostgreSQL database cluster nodes 4207 -p base_port: specify base port. The first PostgreSQL node's port is 4208 base_port. Second PostgreSQL node's port is base_port+1 4209 ... nth PostgreSQL node's port is base_port+n-1, pgpool 4210 port is base_port+n, pcp port is base_port+n+1. 4211 --no-stop: do not stop pgpool and PostgreSQL after the work 4212 4213 - Support installation method using CREATE EXTENSION for pgpool-recovery 4214 and pgpool-regclass. (Tatsuo Ishii) 4215 4216 Older installtion method is still preserved. 4217 4218 Note: extension names are "pgpool_recovery" and "pgpool_regclass", not 4219 "pgpool-recovery" and "pgpool-regclass" because latters are not 4220 convenient in using CREATE EXTENSION command (requires double quotes). 4221 4222 - Add a function "pgpool_pgctl()" which enebles to execute 4223 pg_ctl stop/restart/reload (except for start) by SQL. (Nozomi Anzai) 4224 4225 $ psql sales -c "select pgpool_pgctl('reload', 'fast')"; 4226 pgpool_pgctl 4227 -------------- 4228 t 4229 (1 row) 4230 4231 This function always ignores the actual result and returns 't', so the 4232 user can't know if pg_ctl succeeded or failed. To use this we have to set 4233 the custom variable for security which limits the users to execute pg_ctl 4234 who has the permission of data directory. 4235 4236 - Add shell scripts to install pgpool-II and pgpoolAdmin by RPM. 4237 (Nozomi Anzai, Yugo Nagata) 4238 4239 To make the installer package execute getsources.sh, and the directory 4240 named "work" will be created. And you rpmbuild each spec files in work/, 4241 put RPMs into work/installer and make tar ball of work/installer. 4242 The installer does not only install RPMs but also edit postgresql.conf, 4243 pgpool.conf, pg_hba.conf, recovery.conf and scripts for failover and 4244 online recovery. 4245 4246 This assumes two-nodes configuration and the install script have to be 4247 executed in both nodes. 4248 4249 - Add new parameter "search_primary_node_timeout". 4250 (Muhammad Usama, Tatsuo Ishii) 4251 4252 The parameter specifies the maximum amount of time in seconds to 4253 search for a primary node when a failover scenario occurs. Patch 4254 contributed by Muhammad Usama. Japanese doc and slight editing of 4255 English doc by Tatsuo Ishii. 4256 4257 - Chinese tutorials for memqcache and watchdog. (Bambo Huang) 4258 4259 - Add regression test suit. (Tatsuo Ishii) 4260 4261 __________________________________________________________________ 4262 4263* Bug fixes 4264 4265 - Consider timeout waiting for compeletion of failback request in on line 4266 recovery. (Tatsuo Ishii) 4267 4268 This will prevent the situation that recovery operation continues forever 4269 and we cannot even shutdown pgpool-II main process. This could happen 4270 especially while executing follow master command. 4271 4272 - Fix a bug that %H of follow_master_command is not assigned correctly the 4273 new primary node in stream replication mode. 4274 (Tatsuo Ishii) 4275 4276 - Fix not to execute escalation when the pgpool-II which is already active 4277 receives down notification from other pgpool-II. (Yugo Nagata) 4278 4279 - Fix wd_create_send_socket() not to execute select() before connect(). 4280 (Yugo Nagata) 4281 4282 How select() works on an unconnected socket is undefined, and differs 4283 between platform. On Linux, this returns 2 and it is eventually harmless. 4284 However, on Soraris, this returns 0 and it is indistinguishable from time 4285 timeout, so watchdog wouldn't work correctly. 4286 4287 - Fix error when pgpool_regclass is not installed. (Tatsuo Ishii) 4288 4289 The query used in pool_has_pgpool_regclass() fails if pgpool_regclass 4290 does not exist. The bug was introduced in 3.2.4. See [pgpool-general: 4291 1722] for more details. 4292 4293 [pgpool-general: 1722] [PgPool-II 3.2.4] pgpool_regclass now mandatory? 4294 http://www.sraoss.jp/pipermail/pgpool-general/2013-May/001749.html 4295 4296 - Fix do_query() not to hang when PostgreSQL returns an error. 4297 (Tatsuo Ishii) 4298 4299 The typical symptom is "I see SELECT is keep on running according to 4300 pg_stat_activity". To fix this pgpool-II just exits the process and 4301 kill the existig connection. This is not gentle but at this point I 4302 believe this is the best solution. 4303 4304 - Fix possible deadlock during failover with watchdog enabled. 4305 (Yugo Nagata) 4306 4307 This is reported in Bug track #54 by arshu arora 4308 http://www.pgpool.net/mantisbt/view.php?id=54 4309 4310 - Fix unnecessary degeneration caused by error on commit. (Tatsuo Ishii) 4311 4312 In master slave mode, if master gets an error at commit, while other 4313 slaves are normal at commit, we don't need to degenrate any backend 4314 because it is likely that the "kind mismatch error" was caused by a 4315 deferred trigger. 4316 4317 - Fix bug with do_query which causes hung in extended protocol. 4318 (Tatsuo Ishii) 4319 4320 This problem could occur when insert lock is enabled and 4321 pgpool_catalog.insert_lock exists, See [pgpool-general: 1684] for more 4322 details. 4323 4324 [pgpool-general: 1684] insert_lock hangs 4325 http://www.sraoss.jp/pipermail/pgpool-general/2013-May/001711.html 4326 4327 - Fix possible failure of query cache invalidation for DML in transaction. 4328 (Tatsuo Ishii) 4329 4330 CREATE TABLE t1(i INTEGER); 4331 CREATE TABLE t2(i INTEGER); 4332 SELECT * FROM t1; 4333 BEGIN; 4334 DELETE FROM t2 WHERE i = 0; 4335 INSERT INTO t1(i) VALUES(1); 4336 COMMIT; 4337 4338 SELECT * FROM t1; 4339 4340 At commit pgpool tries to delete cache for t2 but failes because 4341 there's no oid table entry for t2. Problem is, it fails to check oid 4342 table for t1. So cahce for t1 remains and the last SELECT incorrectly 4343 returns cached data. Fix is, continuing to check oid table entries. 4344 4345 This is reported in Bug track #58 by wms 4346 http://www.pgpool.net/mantisbt/view.php?id=58 4347 4348 - Fix to register pgpool_regclass in pg_catalog schema (Tatsuo Ishii) 4349 4350 This is necessary to deal with clients which restricts schema search path 4351 to pg_catalog only. Postgres_fdw is such a client. 4352 4353 - Fix a hang of "pgpool -m f stop" (Tatsuo Ishii) 4354 4355 This is caused by unmanaged pgpool children remaining. This could happen 4356 when multiple PostgreSQLs are going down or even when pgpool is started 4357 before PostgreSQL startup. 4358 4359 - Fix a potential crash in pg_md5 command (Muhammad Usama) 4360 4361 - Fix a segmentation fault that occurs when on memory query cache enabled 4362 and the query is issued in extended query mode and the result is too large 4363 (Tatsuo Ishii) 4364 4365 This is reported in Bug track #63 by harukat. 4366 Analysis and a test case are also provided. 4367 4368 #63 Child process was terminated by segmentation fault with memcached 4369 http://www.pgpool.net/mantisbt/view.php?id=63 4370 4371 - Fix a segmentation fault of a child process that occurs when a startup 4372 packet has no PostgreSQL user information (Yugo Nagata) 4373 4374 You can reproduce it by 4375 4376 $ psql -p 9999 -U '' 4377 4378 If enable_pool_hba is on, a child process terminates by segmentation 4379 fault. Otherwise if enable_pool_hba is off, the error message is 4380 4381 ERROR: pool_discard_cp: cannot get connection pool for user (null) 4382 database (null) 4383 4384 In both cases, psql terminates with no message on frontend. 4385 4386 In the fixed version, if PostgreSQL user is not specified in startup packet, 4387 the message as following is output to both log and frontend. This is 4388 the same behavior as PostgreSQL. 4389 4390 FATAL: no PostgreSQL user name specified in startup packet 4391 4392 - Fix memory allocation logic in extended query processing with on-memory 4393 query cache enabled (Tatsuo Ishii) 4394 4395 When very long query string (> 1024 bytes) supplied in extended query 4396 with bind parameters, it fails to allocate enough memory. 4397 4398 - Fix to verify the backend node number in pcp_recovery_node (Yugo Nagata) 4399 4400 When an invalid number is used, null value is passed as an arguments 4401 of recovery script, and this causes a malfunction. In especially, 4402 rsync may delete unrelated files in basebackup scripts. 4403 4404 - Fix a segmentation fault on main process that could occures after backend 4405 error detection (Tatsuo Ishii) 4406 4407 This is reported in Bug track #62 by tuomas. 4408 4409 #62 Slave network outage causes a segmentation fault on main process 4410 http://www.pgpool.net/mantisbt/view.php?id=62 4411 4412 - Fix bug with health check when used with child_life_time (Tatsuo Ishii) 4413 4414 Failover could happen even if the backend was running fine. 4415 This problem is reported in [pgpool-general: 1892] by larisa sabban. 4416 4417 [pgpool-general: 1892] Pgpool is unable to connect backend PostgreSQL 4418 http://www.sraoss.jp/pipermail/pgpool-general/2013-July/001920.html 4419 4420 - Fix bug in parsing prepared statements with transaction handling in 4421 replication mode (Tatsuo Ishii) 4422 4423 Parse() automatically starts a transaction for non SELECT query to keep 4424 consistency among nodes in replication mode. But this wasn't closed. If 4425 wrong query comes in, the transaction goes into an abort state but pgpool 4426 does not close the transaction. Thus next query causes error because the 4427 transaction is still in abort status. 4428 4429 This problem was reported in [pgpool-general: 1877] by Sean Hogan. 4430 4431 [pgpool-general: 1877] current transaction is aborted, commands ignored 4432 http://www.sraoss.jp/pipermail/pgpool-general/2013-July/001905.html 4433 4434 __________________________________________________________________ 4435 4436* Enhancements 4437 4438 - Add mention about "-D" option to the man page. 4439 (Tatsuo Ishii) 4440 4441 - Fix to restart watchdog processes automatically when these exit abnormally. 4442 (Yugo Nagata) 4443 4444 - Add more error checks and reportings to functions executing ping command 4445 with watchdog enabled. (Tatsuo Ishii) 4446 4447 - Replace some unsafe functions, sprintf and strncpy, with more safe ones, 4448 snprintf and strlcpy respectively. (Yugo Nagata) 4449 4450 - Replace "sticky bit" to "setuid bit" in log message, comments and 4451 funcation names. (Yugo Nagata) 4452 4453 These words were used mistakenly and caused confusion. 4454 4455 - Fix description on SSL in pool_hba.conf.sample. (Tatsuo Ishii) 4456 4457 - Allow to load balancing in an explicit transaction in replication mode. 4458 (Tatsuo Ishii) 4459 4460 The condition to allow the load balancing is as follows: 4461 1) replicate_select is off 4462 2) no writing functions are used 4463 3) transaction isolation level is not serializable 4464 4) no DML/DDL are issued in the transaction 4465 4466 - Chinese manual is updated to the latest especially about watchdog. (Bambo Huang) 4467 4468 - Add mention about "-D" option to the man page. (Tatsuo Ishii) 4469 4470 - Move ssl_ca_cert and ssl_ca_cert_dir descriptions to the SSL section 4471 in the document (Yugo Nagata) 4472 4473 - Add ssl_ca_cert and ssl_ca_cert_dir descriptions to the japanese document 4474 (Yugo Nagata) 4475 4476 4477=============================================================================== 44783.2 Series (2012/08/03 - ) 4479=============================================================================== 4480 4481 3.2.17 (namameboshi) 2016/08/31 4482 4483* Version 3.2.17 4484 4485 This is a bugfix release against pgpool-II 3.2.16. 4486 4487 __________________________________________________________________ 4488 4489* Bug fixes 4490 4491 - Fix buffer over run problem in "show pool_nodes". (Tatsuo Ishii) 4492 4493 While processing "show pool_nodes", the buffer for hostname was too 4494 short. It should be same size as the buffer used for pgpool.conf. 4495 Problem reported by a twitter user who is using pgpool on AWS (which 4496 could have very long hostname). 4497 4498 - Fix usage of wait(2) in pgpool main process. (Tatsuo Ishii) 4499 4500 The usage of wait(2) in pgpool main could cause infinite wait in the 4501 system call. Solution is, to use waitpid(2) instead of wait(2). 4502 4503 - Fix "kind mismatch" error message in pgpool. (Muhammad Usama) 4504 4505 Many of "kind mismatch..." errors are caused by notice/warning 4506 messages produced by one or more of the DB nodes. In this case now 4507 Pgpool-II forwards the messages to frontend, rather than throwing the 4508 "kind mismatch..." error. This would reduce the chance of "kind 4509 mismatch..." errors. 4510 4511 See [pgpool-hackers: 1501] for more details. 4512 4513 - Replace "MAJOR" macro to prevent occasional failure. (Tatsuo Ishii) 4514 4515 The macro calls pool_virtual_master_db_node_id() and then access 4516 backend->slots[id]->con using the node id returned. In rare cases, it 4517 could point to 0 (in case when the DB node is not connected), which 4518 gives access to con->major, then it causes a segfault. 4519 4520 See bug 225 for related info. 4521 4522 - doc : fix Japanese document typo. (Bo Peng) 4523 4524 - Fixing a typo in the log message. (Muhammad Usama) 4525 4526 - doc : Add comment to the document about connection_cache. (Tatsuo Ishii) 4527 4528=============================================================================== 4529 4530 3.2.16 (namameboshi) 2016/06/17 4531 4532* Version 3.2.16 4533 4534 This is a bugfix release against pgpool-II 3.2.15. 4535 4536 __________________________________________________________________ 4537 4538* New features 4539 4540 - Allow to access to pgpool while doing health checking (Tatsuo Ishii) 4541 4542 Currently any attempt to connect to pgpool fails if pgpool is doing 4543 health check against failed node even if fail_over_on_backend_error is 4544 off because pgpool child first tries to connect to all backend 4545 including the failed one and exits if it fails to connect to a backend 4546 (of course it fails). This is a temporary situation and will be 4547 resolved before pgpool executes failover. However if the health check 4548 is retrying, the temporary situation keeps longer depending on the 4549 setting of health_check_max_retries and health_check_retry_delay. This 4550 is not good. Attached patch tries to mitigate the problem: 4551 4552 - When an attempt to connect to backend fails, give up connecting to 4553 the failed node and skip to other node, rather than exiting the 4554 process if operating in streaming replication mode and the node is 4555 not primary node. 4556 4557 - Mark the local status of the failed node to "down". 4558 4559 - This will let the primary node be selected as a load balance node 4560 and every queries will be sent to the primary node. If there's other 4561 healthy standby nodes, one of them will be chosen as the load 4562 balance node. 4563 4564 - After the session is over, the child process will suicide to not 4565 retain the local status. 4566 4567* Bug fixes 4568 4569 - Fix is_set_transaction_serializable() when 4570 SET default_transaction_isolation TO 'serializable'. (Bo Peng) 4571 4572 SET default_transaction_isolation TO 'serializable' is sent to 4573 not only primary but also to standby server in streaming replication mode, 4574 and this causes an error. Fix is, in streaming replication mode, 4575 SET default_transaction_isolation TO 'serializable' is sent only to the 4576 primary server. 4577 4578 See bug 191 for related info. 4579 4580 - Fix Chinese documetation bug about raw mode (Yugo Nagata, Bo Peng) 4581 Connection pool is avalilable in raw mode. 4582 4583 - Fix confusing comments in pgpool.conf (Tatsuo Ishii) 4584 4585 - Permit pgpool to support multiple SSL cipher protocols (Muhammad Usama) 4586 4587 Currently TLSv1_method() is used to initialize the SSL context, that puts an 4588 unnecessary limitation to allow only TLSv1 protocol for SSL communication. 4589 While postgreSQL supports other ciphers protocols as well. The commit changes 4590 the above and initializes the SSLSession using the SSLv23_method() 4591 (same is also used by PostgreSQL). Because it can negotiate the use of the 4592 highest mutually supported protocol version and remove the limitation of one 4593 specific protocol version. 4594 4595 - If statement timeout is enabled on backend and do_query() sends a (Tatsuo Ishii) 4596 query to primary node, and all of following user queries are sent to 4597 standby, it is possible that the next command, for example END, could 4598 cause a statement timeout error on the primary, and a kind mismatch 4599 error on pgpool-II is raised. 4600 4601 This fix tries to mitigate the problem by sending sync message instead 4602 of flush message in do_query(), expecting that the sync message reset 4603 the statement timeout timer if we are in an explicit transaction. We 4604 cannot use this technique for implicit transaction case, because the 4605 sync message removes the unnamed portal if there's any. 4606 4607 Plus, pg_stat_statement will no longer show the query issued by 4608 do_query() as "running". 4609 4610 See bug 194 for related info. 4611 4612 - Deal with the case when the primary is not node 0 in streaming replication mode. (Tatsuo Ishii) 4613 4614 http://www.pgpool.net/mantisbt/view.php?id=194#c837 reported that if 4615 primary is not node 0, then statement timeout could occur even after 4616 bug194-3.3.diff was applied. After some investigation, it appeared 4617 that MASTER macro could return other than primary or load balance 4618 node, which was not supposed to happen, thus do_query() sends queries 4619 to wrong node (this is not clear from the report but I confirmed it in 4620 my investigation). 4621 4622 pool_virtual_master_db_node_id(), which is called in MASTER macro 4623 returns query_context->virtual_master_node_id if query context 4624 exists. This could return wrong node if the variable has not been set 4625 yet. To fix this, the function is modified: if the variable is not 4626 either load balance node or primary node, the primary node id is 4627 returned. 4628 4629 - change the Makefile under the directory src/sql/, that is proposed (Bo Peng) 4630 by [pgpool-hackers: 1611] 4631 4632 - Fix a posible hang during health checking (Yugo Nagata) 4633 4634 Helath checking was hang when any data wasn't sent 4635 from backend after connect(2) succeeded. To fix this, 4636 pool_check_fd() returns 1 when select(2) exits with 4637 EINTR due to SIGALRM while health checkking is performed. 4638 4639 Reported and patch provided by harukat and some modification 4640 by Yugo. Per bug #204. 4641 4642 backported from 3.4 or later; 4643 https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=ed9f2900f1b611f5cfd52e8f758c3616861e60c0 4644 4645 - Fix bug with load balance node id info on shmem (Tatsuo Ishii) 4646 4647 There are few places where the load balance node was mistakenly put on 4648 wrong place. It should be placed on: ConnectionInfo *con_info[child 4649 id, connection pool_id, backend id].load_balancing_node]. In fact it 4650 was placed on: *con_info[child id, connection pool_id, 4651 0].load_balancing_node]. 4652 4653 As long as the backend id in question is 0, it is ok. However while 4654 testing pgpool-II 3.6's enhancement regarding failover, if primary 4655 node is 1 (which is the load balance node) and standby is 0, a client 4656 connecting to node 1 is disconnected when failover happens on node 4657 0. This is unexpected and the bug was revealed. 4658 4659 It seems the bug was there since long time ago but it had not found 4660 until today by the reason above. 4661 4662 4663=============================================================================== 4664 4665 3.2.15 (namameboshi) 2016/04/26 4666 4667* Version 3.2.15 4668 4669 This is a bugfix release against pgpool-II 3.2.14. 4670 4671 __________________________________________________________________ 4672 4673* Bug fixes 4674 4675 - Removing the limit on the maximum number of items in the 4676 black_function_list and white_function_list lists. (Muhammad Usama) 4677 4678 extract_string_tokens in pool_config uses the fixed size malloc on 4679 the array to hold the black_function_list/white_function_list items. 4680 This imposes a limit of maximum items in these lists. 4681 The fix is to use realloc to increase the array size when it gets full. 4682 4683 - Redirect all user queries to primary server (Tatsuo Ishii) 4684 4685 Up to now some user queries are sent to other than the primary server 4686 even if load_balance_mode = off. This commit changes the behavior: if 4687 load_balance_mode = off in streaming replication mode, now all the 4688 user queries are sent to the primary server only. 4689 4690 Per bug #189. 4691 4692 - Change the PID length of pcp_proc_count command result to 6 characters 4693 long (Bo Peng) 4694 4695 If the pgpool process ID are over 5 characters, the 6th character of each 4696 process ID will be removed. This commit changes the process ID length of 4697 pcp_proc_count command result to 6 characters long. 4698 4699 Per bug #188. 4700 4701=============================================================================== 4702 4703 3.2.14 (namameboshi) 2016/04/04 4704 4705* Version 3.2.14 4706 4707 This is a bugfix release against pgpool-II 3.2.13. 4708 4709 __________________________________________________________________ 4710 4711* Bug fixes 4712 4713 - doc: Change description of backend_flag (Tatsuo Ishii) 4714 4715 It is pointed out that restarting pgpool-II is not necessary. 4716 4717 Per [pgpool-general-jp: 1394]. 4718 4719 - doc: Fix installation procedure. (Tatsuo Ishii) 4720 4721 With PostgreSQL 9.4 or later, installing pgpool_regclass is not needed. 4722 4723 - Fix to validate the PCP packet length (Muhammad Usama) 4724 4725 Without the validation check, a malformed PCP packet can crash the 4726 PCP child and/or can run the server out of memory by sending the packet 4727 with a very large data size. 4728 4729 - Fix a reset query stuck problem (Muhammad Usama) 4730 4731 The solution is to return POOL_END_WITH_FRONTEND_ERROR instead of 4732 POOL_END when pool_flush on front-end socket fails. 4733 4734 The original report is 4735 [pgpool-general: 4265] Pgpool - connection hangs in DISCARD ALL 4736 4737=============================================================================== 4738 4739 3.2.13 (namameboshi) 2016/02/05 4740 4741* Version 3.2.13 4742 4743 This is a bugfix release against pgpool-II 3.2.12. 4744 4745 __________________________________________________________________ 4746 4747* Bug fixes 4748 4749 - doc: Fix misinformation regarding load balancing in docs (Tatsuo Ishii) 4750 4751 In streaming replication mode, DECLARE, FETCH, CLOSE and SHOW are sent 4752 to primary node only. Pointed out in [pgpool-general-jp: 1378]. 4753 4754 - Issue fsync() when writing pgpool_status (Tatsuo Ishii) 4755 4756 This ensures that pgpool_status is saved to permanent storage and 4757 allow to survive after system crash. 4758 4759 - Fix ancient bug of pool_push() and friends (Tatsuo Ishii) 4760 4761 It allocates buffer using realloc and uses the pointer 4762 returned. However it does the pointer calculation *before* realloc 4763 gets called. So the calculation uses the old pointer value, which 4764 causes various problems including segfault later. 4765 4766 Also there were other problems with it. The buffer pointer and buffer 4767 size variable is not initialized. The buffer is not freed by 4768 pool_close. Typo in debugging message (3.4 or later only). They are 4769 fixed as well. 4770 4771 - doc: Fix wrong description about log_standby_delay in the document 4772 (Yugo Nagata) 4773 4774 - Fix bug with "SET TRANSACTION READ ONLY" (Tatsuo Ishii) 4775 4776 Pgpool-II remembers that non read only queries (including SET) were 4777 executed in an explicit transaction and adds a "writing transaction" 4778 mark to the transaction. The mark affects the query routing behavior 4779 of pgpool-II while running in streaming replication mode. Pgpool-II 4780 starts sending queries to the primary after the mark is set. Because 4781 the effect of writing queries may appear on standbys after some delay 4782 in streaming replication mode, it is safer to route read queries to 4783 the primary after the mark is set. 4784 4785 However there's oversight here. "SET TRANSACTION READ ONLY" does no 4786 data modification and should be treated as an exception. 4787 4788 Per bug #157. 4789 4790 - Fix FATAL error with reloading (Tatsuo Ishii) 4791 4792 While reloading pgpool.conf, the number of DB nodes is tentatively set 4793 to 0, then counted up until reaching to the actual number of backends 4794 by the pgpool main process. Unfortunately the variable was on the 4795 shared memory and it confused pgpool child process when they were using 4796 the variable and this caused FATAL error. 4797 4798 Per bug #156 report by harukat. 4799 4800 - doc: Add restriction about starting multiple pgpool simultaneously 4801 (Yugo Nagata) 4802 4803 - Fix a in-memory query cache bug (Tatsuo Ishii) 4804 4805 If extended query protocol is used and a bind/execute message arrives 4806 which uses a statement created by prior parse message, the temp_cache 4807 is not initialized by a parse messages. Thus messages are added to pre 4808 existing temp cache buffer which causes the trouble, that is, when the 4809 cached result returns, Data Row message and Command Complete message 4810 appeared twice. 4811 4812 Per by bug #152. 4813 4814 - Ignore close statement/portal request if they do not exist (Tatsuo Ishii) 4815 4816 In this case just returns a close complete message to client. 4817 This is a back port of the following commit from pgpool-II 3.4: 4818 4819 1a37e1c35bd8b6f10f524693bbcb7b51f73b4bf0 4820 4821=============================================================================== 4822 4823 3.2.12 (namameboshi) 2015/07/24 4824 4825* Version 3.2.12 4826 4827 This is a bugfix release against pgpool-II 3.2.11. 4828 4829 __________________________________________________________________ 4830 4831* Bug fixes 4832 4833 - Fix "cannot find xlog functions" error in pgpool-recovery 4834 (Muhammad Usama) 4835 4836 The argument data type of PostgreSQL's pg_xlogfile_name() function 4837 has been changed from text to pg_lsn since PostgreSQL 9.4. And 4838 pgpool-recovery was still trying to locate the function by old 4839 signature. 4840 4841 - Pass empty string parameters in failover command when pgpool-II 4842 does not have a value for any particular parameter (Muhammad Usama) 4843 4844 Instead of omitting the values for the parameters when pgpool-II does 4845 not have any value for a particular parameter, it now passes an empty 4846 string to the failover command. This makes sure that failover script 4847 will always receive the exact number of expected parameters. 4848 4849 - doc: Fix outdated limitation description about load balancing using 4850 JDBC driver (Tatsuo Ishii) 4851 4852 Even if autocommit is false, load balancing is possible in certain 4853 conditions. 4854 4855 - Allow to use in-memory query cache size more than 4GB (Tatsuo Ishii) 4856 4857 This should have been allowed since in memory query cache was born. 4858 4859 - Do not send a query for checking insert lock in non replication mode 4860 with extended query (Tatsuo Ishii) 4861 4862=============================================================================== 4863 4864 3.2.11 (namameboshi) 2015/04/08 4865 4866* Version 3.2.11 4867 4868 This is a bugfix release against pgpool-II 3.2.10. 4869 4870 __________________________________________________________________ 4871 4872* Bug fixes 4873 4874 - Fix to use void * type for receiving return value of thread function 4875 (Yugo Nagata) 4876 4877 Previously int type was used and this could occur stack buffer 4878 overflow. This caused an infinity loop of ping error at bringing 4879 up or down VIP. 4880 4881 - Fix to set SIGCHLD to SIG_DFL instead of SIG_IGN in watchdog processes 4882 (Yugo Nagata) 4883 4884 When using waitpid, it isn't necessary to set SIGCHLD to SIG_IGN. 4885 Rather, it is harmful, and due to this it was regarded that ping 4886 command exited abnormally in error even when this succeeded. 4887 4888 - Remove an unnecessary include directive (Yugo Nagata) 4889 4890 - Enlarge POOLCONFIG_MAXDESCLEN to 80 (Tatsuo Ishii) 4891 4892 This is used in show pool_status command and limits the length of 4893 parameter description. Unfortunately recovery_timeout description is 4894 64 chars, which is 1 byte longer than former definition of the macro. 4895 4896 - Support SSL certificate chains in the certificate file for incoming 4897 frontend connections (Muhammad Usama) 4898 4899 - Fix a problem with pcp_detach_node about graceful node detach (Muhammad Usama) 4900 4901 When graceful node detach is requested gracefully, pcp_detach_node should 4902 check if it is allowed to process detach_node command on the particular 4903 node before blocking the incoming connections and closing the existing 4904 connections. 4905 4906=============================================================================== 4907 3.2.10 (namameboshi) 2015/02/05 4908 4909* Version 3.2.10 4910 4911 This is a bugfix release against pgpool-II 3.2.9. 4912 4913 __________________________________________________________________ 4914 4915* Bug fixes 4916 4917 - doc: Describe explicitly that the number of slave nodes is not 4918 necessarily 1 (Tatsuo Ishii) 4919 4920 - Fix uninitialized variable (Tatsuo Ishii) 4921 4922 Per Coverity 1234603. 4923 4924 - doc: Fix missing release note entries in the previous release 4925 (Tatsuo Ishii) 4926 4927 - Fix possible segmentation fault in query cache (Tatsuo Ishii) 4928 4929 - Fix node id range check bug in trigger_failover_command(). (Tatsuo Ishii) 4930 4931 The node id should be lower than NUM_BACKENDS. Probably harmless since 4932 callers never pass node ids greater or equal to NUM_BACKENDS. 4933 4934 - Allow $_IP_$ having address prefix in if_up_cmd and if_down_cmd 4935 (Muhammad Usama) 4936 4937 Previously, it is assumed that "$_IP_$" keyword will always have a 4938 white space at the end, and when "$_IP_$" has address prefix (e.g. 4939 $_IP_$/24), this prefix was ignored. 4940 4941 Per bug #122. 4942 http://www.pgpool.net/mantisbt/view.php?id=122 4943 4944 - Allow "show pool_nodes" to print node ids having more than one digits 4945 (Muhammad Usama) 4946 4947 Problem reported in [pgpool-general: 3374]. 4948 4949 - Fix to disable debug mode by reloading config (Yugo Nagata) 4950 4951 Per bug #114 4952 http://www.pgpool.net/mantisbt/view.php?id=114 4953 4954=============================================================================== 4955 4956 3.2.9 (namameboshi) 2014/09/05 4957 4958* Version 3.2.9 4959 4960 This is a bugfix release against pgpool-II 3.2.8. 4961 4962 __________________________________________________________________ 4963 4964* Bug fixes 4965 4966 - Fix a typo of pgpool.spec (Yugo Nagata) 4967 4968 - Fix bug that worker child process keeps failing when there's no 4969 primary backend (Tatsuo Ishii) 4970 4971 Problem identified and fix contributed by Junegunn Choi. 4972 4973 See [pgpool-hackers: 471] for more details. 4974 4975 - Close listen socket when smart shutdown request is made (Tatsuo Ishii) 4976 4977 When smart shutdown process starts, pgpool children still listen on 4978 the port and clients can send further connection requests which fail 4979 in the end. Which is not only waste of time, but also prevents a load 4980 balancer which sits in front of pgpool from realizing the pgpool is 4981 going down. 4982 4983 Problem analyzed and patch provided by Junegunn Choi in [pgpool-hackers 4984 474], and enhanced to take care not only inet domain socket but UNIX 4985 domain socket by Tatsuo Ishii. 4986 4987 - doc: Add cautions that recovery commands are killed by statement_timeout 4988 of PostgreSQL. (Tatsuo Ishii) 4989 4990 - doc: Remove old restriction description which is no longer true 4991 (Tatsuo Ishii) 4992 4993 - Fix return type of text_to_lsn() function (Yugo Nagata) 4994 4995 This caused compile warning. 4996 4997 - Fix file descriptor leak when daemonize. (Tatsuo Ishii) 4998 4999 Per Coverity 1111471. 5000 5001 - Fix memory leak. (Tatsuo Ishii) 5002 5003 Per Coverity 1111442. 5004 5005 - Fix pgpool.init's long-standing bug of stop/restart failure 5006 (Yugo Nagata) 5007 5008 In previous, pgpool.init uses killproc for stopping pgpool, but there 5009 are several problems. In the new version, "pgpool -m fast stop" is 5010 used in stop command. 5011 5012 Original patch contributed by Ryan DeShone and modified by Yugo Nagata. 5013 5014 See [pgpool-hackers: 239][pgpool-hackers: 512]. 5015 5016 - Add missing include file sys/wait.h. (Tatsuo Ishii) 5017 5018 Per bug #104. 5019 http://www.pgpool.net/mantisbt/view.php?id=104 5020 5021 - Disbale statement_timeout of PostgreSQL while executing online recovery 5022 (Tatsuo Ishii) 5023 5024 Online recovery may take very long time and user may enable statement 5025 timeout. To prevent online recovery canceled by statement timeout, 5026 disable statement timeout in the connection used by online recovery. 5027 5028 See [pgpool-general: 2919] for more details. 5029 5030 - Remove unnecessary call to pool_shmem_exit() which removes semaphore 5031 when it shouldn't (Tatsuo Ishii) 5032 5033 exit_handler checks if the process is parent or not. This is 5034 good. However, even if it is a child process, it calls 5035 pool_shmem_exit() which removes semaphore and shmem when it should 5036 not. It should be called only from parent process. 5037 5038 Per bug #102. 5039 http://www.pgpool.net/mantisbt/view.php?id=102 5040 5041 - Fix reset query stuck problem. (Tatsuo Ishii) 5042 5043 It is reported that reset query (DISCARD ALL etc.) occasionally does 5044 not finish and pgpool child remain waiting for reply from backend thus 5045 client cannot connect to pgpool. 5046 5047 The cause of problem is not identified yet but if client suddenly 5048 closes connection to pgpool in the middle of query processing, backend 5049 may not accept the reset queries because they are not ready for query. 5050 5051 The fix is, if frontend closes connection in unexpected way, query 5052 process loop immediately returns with new state: 5053 POOL_END_WITH_FRONTEND_ERROR and pgpool closes connection to 5054 PostgreSQL then goes back to new connection request waiting loop. 5055 5056 Also, pgpool closes connections to backend when client_idle_limit is 5057 set and the idle limit. 5058 5059 Per bug #107. 5060 http://www.pgpool.net/mantisbt/view.php?id=107 5061 5062=============================================================================== 5063 5064 3.2.8 (namameboshi) 2014/03/24 5065 5066* Version 3.2.8 5067 5068 This is a bugfix release against pgpool-II 3.2.7. 5069 5070 __________________________________________________________________ 5071 5072* Bug fixes 5073 5074 - doc: Add mention about "listen queue" and how to increase the "backlog" 5075 in the num_init_children section. (Tatsuo Ishii) 5076 5077 - Fix bug that watchdog status goes down even when only one of trusted 5078 servers get unpingable (Yugo Nagata) 5079 5080 - Fix bad performance of unlogged tables detection code. (Tatsuo Ishii) 5081 5082 Pointed out at [pgpool-hackers: 435][[pgpool-general:2325]. 5083 5084 - Fix primary node detection logic. (Tatsuo Ishii) 5085 5086 There's a possibility that primary node is not detected. This happens 5087 in following situation. node 0: primary, node 1: standby. Node 0 goes 5088 down. Health checking detects the fact but local status is not updated 5089 yet. Primary node finding (find_primary_node) runs. Node 0's status is 5090 yet healthy. Because find_primary_node fails to connect to node 0, it 5091 immediately returns -1 and fails to find that fact that node 1 is now 5092 primary. 5093 5094 Fix is just continuing to look for primary node when fails to connect 5095 to a node. 5096 5097 Per [pgpool-general: 2409]. 5098 5099 - Fix jdbc DML fails when operated in raw mode and auto commit is off. 5100 (Tatsuo Ishii) 5101 5102 This is reported in bug #92. 5103 5104 - Fix query cache bug with extended protocol. (Tatsuo Ishii) 5105 5106 SELECT retrieves outdated cache even DML was executed in an expilicit 5107 transaction. The bug had been there since in memory query cache was 5108 born. Per [pgpool-general-jp: 1252]. 5109 5110 - Add missing entries "relcache_size" and "check_temp_table" to show 5111 pool_status (Tatsuo Ishii) 5112 5113 - Avoid to send queries to unrelated nodes in streaming replication mode. 5114 (Tatsuo Ishii) 5115 5116 Pgpool-II sends certain queries, such as BEGIN, END and SET commands to 5117 all of DB nodes. However in streaming replication mode, only primary 5118 node and at most one standby node are only concerned (if primacy node 5119 is selected as the load balance node, only 1 node is concerned). 5120 5121 See [pgpool-hackers: 464] for more details. 5122 5123 - Fix possible buffer overrun problem and memory leak. (Tatsuo Ishii) 5124 5125 Per Coverity 1111465 and 1111482. 5126 5127 - Fix possible buffer overrun. (Tatsuo Ishii) 5128 5129 Replace strcpy() with strlcpy(). Per Coverity report 1111478, 1111480, 5130 1111481. 5131 5132 - Fix freeing NULL. (Tatsuo Ishii) 5133 5134 Per Coverity 1111384. 5135 5136 - Do not enable query cache on materialized views. (Tatsuo Ishii) 5137 5138 Per bug #95. 5139 5140 - Fix memory leak. (Tatsuo Ishii) 5141 5142 Per Coverity 1111446. 5143 5144 - Fix a segmentation fault in parallel mode with system_db_hostname is 5145 empty (Yugo Nagata) 5146 5147 - Fix to output debug messages in processing pgpool.conf with -d option 5148 (Yugo Nagata) 5149 5150 Previously, some debug messages in pool_get_config() ware not output 5151 even when -d option was used. 5152 5153 - Fix JDBC exception of prepared statement including now() in 5154 replication mode (Yugo Nagata) 5155 5156 With JDBC, when a prepared statement is executed more than 5157 PrepareThreshold times, the statement is named and Describe message 5158 is sent after Parse. With named statement, pgpool rewrite now() to 5159 parameter in replication mode. Hence, rewritten query has additonal 5160 parameter than original. In this case, ParameterDescription message 5161 sent to frontend (response of Describe) should include OIDs of the 5162 same number os original query's parameters. Otherwize, JDBC throws 5163 ArrayIndexoutOfBoundsException. 5164 5165 This is reported in [pgpool-general-jp: 1192]. 5166 5167 - Fix backend error of prepared statement about table which has column whoes 5168 default value is now() in replication mode (Yugo Nagata) 5169 5170 When pgpool parses a named prepared statement with default now(), 5171 timestamps are replaced to additional parameters. So, Bind message also 5172 should inclued additional parameter format codes. However, when the 5173 number of original parameter was one, pgpool didn't handle this. This 5174 caused a error like "incorrect binary data format in bind parameter 2". 5175 5176 - doc: Add description about parallel mode doesn't support PREPARE (Yugo Nagata) 5177 5178 Per bug #93 5179 5180=============================================================================== 5181 5182 3.2.7 (tokakiboshi) 2013/12/06 5183 5184* Version 3.2.7 5185 5186 This is a bugfix release against pgpool-II 3.2.6. 5187 5188 __________________________________________________________________ 5189 5190* Bug fixes 5191 5192 - Fix incorrect time stamp rewriting in replication mode for certain time 5193 zones. (Tatsuo Ishii) 5194 5195 Time stamp rewriting calls "SELECT now()" to get current time. 5196 Unfortunately the buffer for the current time is too small for certain 5197 time zones such as "02:30". Note that non-30-minutes-time-zone such as 5198 "0900" does not reveal the problem. This explains why we haven't the bug 5199 report until today. 5200 5201 Bug reported in [pgpool-general: 2113] and fix provided by Sean Hogan. 5202 http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002142.html 5203 5204 - Makefile: Replace pg_config by $(PG_CONFIG) in Makefiles so it can be 5205 overridden at build time when compiling for different PG major versions. 5206 (Tatsuo Ishii) 5207 5208 Patch contributed by Christoph Berg ([pgpool-general: 2127]). 5209 http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002156.html 5210 5211 - Remove -lcompat because it confuses FreeBSD per bug#15. (Tatsuo Ishii 5212 http://www.pgpool.net/mantisbt/view.php?id=15 5213 5214 - Fix segfault when pgpool.conf does not set log_standby_delay. 5215 (Tatsuo Ishii) 5216 5217 This is caused by wrong initialization for log_standby_delay in 5218 pool_config.l. 5219 Per bug#74. http://www.pgpool.net/mantisbt/view.php?id=74 5220 5221 - doc: Modify descriptions about restrictions of parallel mode 5222 Muliple rows INSERT using VALUES are not supported in parallel mode. 5223 (Yugo Nagata) 5224 5225 - Avoid calling find_primary_node_repeatedly() when standby node goes 5226 down. (Tatsuo Ishii) 5227 5228 This will reduce the time to failover. Per bug #75, patch modified by 5229 Tatsuo Ishii. http://www.pgpool.net/mantisbt/view.php?id=75 5230 5231 - Fix data inconsistency problem with native replication mode + extended 5232 protocol case. (Tatsuo Ishii) 5233 5234 It is reported that concurrent INSERT using JDBC driver causes data 5235 difference among database node. This only happens following conditions 5236 are all met: 5237 5238 1) Native replication mode 5239 2) Extended protocol used 5240 3) The portal created by parse message is reused by bind message 5241 4) autocommit is on 5242 5) SERIAL (sequence) is used 5243 5244 Pgpool-II's parse message function knows it has to lock the target 5245 table when INSERT (plus #5) is issued by clients. Unfortunately bind 5246 message function did not know it. Once parse/bind/execute finishes, 5247 pgpool releases the lock obtained by parse because of #4. JDBC wants 5248 to reuse the portal and starts the cycle from bind message, which does 5249 not obtain lock. As as result, lock-free INSERT are floating around 5250 which causes data inconsistency of course. The solution is, lock the 5251 table in bind phase. 5252 5253 For this bind needs to issue LOCK in extended protocol. This was a little 5254 bit hard because the module (do_command()) to issue internal SQL command 5255 (other than SELECT) does not support extended protocol. 5256 To solve the problem do_query() is modified so that it accepts other than 5257 SELECT because it already accepts extended protocol. 5258 The modification is minimum and is only tested for the case called from 5259 insert_lock(). I do not recommend to replace every occurrence of 5260 do_command () with do_query() at this point. 5261 5262 BTW the reason why the bug is not reported is, most users uses JDBC 5263 with auto commit = off. In this case, the lock obtained by parse persists 5264 until user explicitly issues commit or rollback. 5265 5266 Per bug report by Steve Kuekes in [pgpool-general: 2142]. 5267 http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002171.html 5268 5269 - Fix memory allocation size bug in the code path of query cache. 5270 (Tatsuo Ishii) 5271 5272 In execute() memory allocation size is too small incertain case. No bug 5273 has been reported so far, but certainly this is a bug. 5274 5275 - Fix occasional segfault in query cache + extended protocol. 5276 (Tatsuo Ishii) 5277 5278 When the query is not "cache safe", bind_msg->param_offset was not set 5279 in Bind(). However, Execute() unconditionally uses bind_msg->param_offset 5280 to convert bind parameters to string so that they can be added to the 5281 cached query string and it causes segfault because bind_msg->param_offset 5282 is a garbage. Also logic bug to calculate bind_msg->param_offset is 5283 corrected. 5284 5285 Per bug#76. http://www.pgpool.net/mantisbt/view.php?id=76 5286 5287 - Avoid to run out free query cache hash index entry. (Tatsuo Ishii) 5288 5289 If hash index entries are run out, pgpool-II cannot reuse old cache 5290 entry because pgpool-II always expects there's at least one empty hash 5291 index entry. To mitigate the problem, if free hash index entries are run 5292 out, look for victim cache block to reuse the hash index entry. 5293 5294 Per bug #70. http://www.pgpool.net/mantisbt/view.php?id=70 5295 5296 - Fix inappropriate shared memory allocation size for clock hand. 5297 (Tatsuo Ishii) 5298 5299 The memory for clock hand was allocated as sizeof(pool_fsmm_clock_hand)) 5300 which is 8 bytes long because the variable is declared as: 5301 5302 static int *pool_fsmm_clock_hand; 5303 5304 This is plain wrong. The memory size actually needed is only 4 bytes, 5305 which is sizeof(*pool_fsmm_clock_hand)). In other word, the bug allocated 5306 unnecessary 4 bytes, which did nothing bd for the execution of program. 5307 But a bug is a bug. 5308 5309 Per covery report "1111476 Wrong sizeof argument" 5310 5311 - Fix "show pool_status" always shows memqcache_auto_cache_invalidation as 5312 0. (Tatsuo Ishii) 5313 Per bug #80. http://www.pgpool.net/mantisbt/view.php?id=80 5314 5315 - Fix error message in read_password_packet(). (Tatsuo Ishii) 5316 5317 - watchdog: Fix to pass big parameter by pointer instead of by value at 5318 some function. (Yugo Nagata) 5319 5320 - Fix memory leak when SSL is requested. (Tatsuo Ishii) 5321 5322 When SSL is requested, pgpool child retries to read start up packet. 5323 However it does not free the memory for previous start up packet. 5324 5325 Per Coverity report "1111443 Resource". 5326 5327 - Fix memory leak when do_query() fails in timestamp rewriting. 5328 (Tatsuo Ishii) 5329 5330 For this purpose free_select_result() is changed to accept NULL argument. 5331 Per Coverity report "1111454, 1111455 Resource leak". 5332 5333 - watchdog: Fix to put null character at end of ping result string used in 5334 watchdog. (Yugo Nagata) 5335 5336 - Fix target node selection logic when "DEALLOCATE portal|statement". 5337 (Tatsuo Ishii) 5338 5339 When "DEALLOCATE portal|statement" is used and last prepared statement or 5340 portal was not found, target node selection map is not set. Probably this 5341 is not actually harmful because prepared statement or portal was not found 5342 is an error case. The bug was there since day 0. 5343 5344 Per Coverity report "1111491 Structurally dead code". 5345 5346 - Fix range check bug of MAX_NUM_BACKENDS in corner case. (Tatsuo Ishii) 5347 5348 MAX_NUM_BACKENDS is the allowed max number of DB nodes (128, at this 5349 point). In reality, probably no one ever tried more than 128 DB nodes 5350 and that's the reason why nobody noticed. 5351 5352 Per Coverity report "1111429, 1111430 and 1111431 Out-of-bounds write". 5353 5354 - Do not set/unset fronted connection info for dead backend. (Tatsuo Ishii) 5355 5356 Per bug #82. http://www.pgpool.net/mantisbt/view.php?id=82 5357 5358 - Fix that the script forgets to allow public access to pgpool_catalog. 5359 (Tatsuo Ishii) 5360 5361 The bug prevents inserting data into user tables if pgpool_catalog is 5362 created in native replication mode. The bug was there from day 1. I 5363 wonder why nobody noticed until today. 5364 Per [pgpool-general-jp: 1229]. 5365 http://www.sraoss.jp/pipermail/pgpool-general-jp/2013-November/001228.html 5366 5367 - Fix uninitialized variable in error case in pool_do_auth(). 5368 (Tatsuo Ishii) 5369 5370 If there's no valid backend, pgpool will return garbage pid to frontend in 5371 auth phase. Actually because no backend is available, frontend will be 5372 disconnected later on. So this is not harmless. 5373 Per Coverity report "1127331 Uninitialized scalar variable". 5374 5375 - Fix to add node id range check when issue an error message using node 5376 id. (Tatsuo Ishii) 5377 Per Coverity report #1111433 "Out-of-bounds read". 5378 5379 - Fix buffer overrun bug and resource leak bug of parse_copy_data(). 5380 (Tatsuo Ishii) 5381 Per Coverity report 1111427 "Out-of-bounds write" and 1111453 "Resource 5382 leak". 5383 5384 - Fix possible segfault in CopyDataRaws(). (Tatsuo Ishii) 5385 Coverity pointed out that if pool_get_id() returns an error, VALID_BACKEND 5386 will access out of array. 5387 Per Coverity report 1111413 "Memory - illegal accesses". 5388 5389 - Fix query cache is enabled and protocol version = 2 case. (Tatsuo Ishii) 5390 5391 When the protocol version = 2, we assume that session state is "idle". 5392 This is not feasible but no way. I recommend to not use query cache 5393 with protocol 2. 5394 Per Coverity report 1111488 "Uninitialized scalar variable". 5395 5396 - Fix strftime() usage in pool_pools(). (Tatsuo Ishii) 5397 5398 The buffer is not large enough as expected by the second parameter. This 5399 is not harmless because the format string will not produce longer result 5400 string than the buffer. 5401 Per Coverity report 1111426 "Out-of-bounds access". 5402 5403 - Fix resource leak in make_persistent_db_connection. (Tatsio Ishii) 5404 5405 For this pupose, new static function free_persisten_db_connection_memory 5406 is added. 5407 Per Coverity report #1111468. 5408 5409 - Fix a bug that connection check to trusted servers fails when the RTT 5410 is very short. (Yugo Nagata) 5411 5412 - Fix several small bug fixes detected by Coverity. (Tatsuo Ishii) 5413 5414=============================================================================== 5415 5416 3.2.6 (namameboshi) 2013/09/06 5417 5418 5419* Version 3.2.6 5420 5421 This is a bugfix release against pgpool-II 3.2.5. 5422 5423 __________________________________________________________________ 5424 5425* Bug fixes 5426 5427 - Fix a segmentation fault on main process that could occures after backend 5428 error detection (Tatsuo Ishii) 5429 5430 This is reported in Bug track #62 by tuomas. 5431 5432 #62 Slave network outage causes a segmentation fault on main process 5433 http://www.pgpool.net/mantisbt/view.php?id=62 5434 5435 - Fix a bug with health check when used with child_life_time (Tatsuo Ishii) 5436 5437 Failover could happen even if the backend was running fine. 5438 This problem is reported in [pgpool-general: 1892] by larisa sabban. 5439 5440 [pgpool-general: 1892] Pgpool is unable to connect backend PostgreSQL 5441 http://www.sraoss.jp/pipermail/pgpool-general/2013-July/001920.html 5442 5443 - Fix "Deploying pgpool-II" section in the document (Tatsuo Ishii) 5444 5445 Update descriptions about watchdog use. 5446 5447 - Fix a mistake in ssh command of doc/basebackup.sh (Tatsuo Ishii) 5448 5449 - Fix a bug in parsing prepared statements with transaction handling in 5450 replication mode (Tatsuo Ishii) 5451 5452 Parse() automatically starts a transaction for non SELECT query to keep 5453 consistency among nodes in replication mode. But this wasn't closed. If 5454 wrong query comes in, the transaction goes into an abort state but pgpool 5455 does not close the transaction. Thus next query causes error because the 5456 transaction is still in abort status. 5457 5458 This problem was reported in [pgpool-general: 1877] by Sean Hogan. 5459 5460 [pgpool-general: 1877] current transaction is aborted, commands ignored 5461 http://www.sraoss.jp/pipermail/pgpool-general/2013-July/001905.html 5462 5463 - Fix child process termination with sig abort when memory query cache 5464 is enabled (Tatsuo Ishii) 5465 5466 This is due to double free bug that occurs when multiple bind/execute 5467 messages come after a parse message. When a parse messages comes, query 5468 context is created along with temp cache. The pointer to the temp cache 5469 is added to the temp cache array when the query executed. Subsequent 5470 bind messages uses the same temp cache pointer. This is the source of 5471 double free bug when the cache array discarded. 5472 5473 This is reported in Bug track #68 by harukat. 5474 5475 #68: child process termination with sigabort when memory_cache_enabled = on 5476 http://www.pgpool.net/mantisbt/view.php?id=68 5477 5478 - Fix typos of the japanese document (Yugo Nagata) 5479 5480=============================================================================== 5481 5482 3.2.5 (namameboshi) 2013/07/10 5483 5484* Version 3.2.5 5485 5486 This is a bugfix release against pgpool-II 3.2.4. 5487 5488 __________________________________________________________________ 5489 5490* Bug fixes 5491 5492 - Add mention about "-D" option to the man page. (Tatsuo Ishii) 5493 5494 - Consider timeout waiting for compeletion of failback request in on line 5495 recovery (Tatsuo Ishii) 5496 5497 This will prevent the situation that recovery operation continues forever 5498 and we cannot even shutdown pgpool-II main process. This could happen 5499 especially while executing follow master command. 5500 5501 - Fix a bug that %H of follow_master_command is not assigned correctly the 5502 new primary node in stream replication mode 5503 (Tatsuo Ishii) 5504 5505 - Fix wd_create_send_socket() to not execute select() before connect() 5506 (Yugo Nagata) 5507 5508 How select() works on an unconnected socket is undefined, and differs 5509 between platform. On Linux, this returns 2 and it is eventually harmless. 5510 However, on Soraris, this returns 0 and it is indistinguishable from time 5511 timeout, so watchdog wouldn't work correctly. 5512 5513 - Fix error when pgpool_regclass is not installed (Tatsuo Ishii) 5514 5515 The query used in pool_has_pgpool_regclass() fails if pgpool_regclass 5516 does not exist. The bug was introduced in 3.2.4. See [pgpool-general: 5517 1722] for more details. 5518 5519 [pgpool-general: 1722] [PgPool-II 3.2.4] pgpool_regclass now mandatory? 5520 http://www.sraoss.jp/pipermail/pgpool-general/2013-May/001749.html 5521 5522 - Fix do_query() to not hang when PostgreSQL returns an error 5523 (Tatsuo Ishii) 5524 5525 The typical symptom is "I see SELECT is keep on running according to 5526 pg_stat_activity". To fix this pgpool-II just exits the process and 5527 kill the existig connection. This is not gentle but at this point I 5528 believe this is the best solution. 5529 5530 - Fix possible deadlock during failover with watchdog enabled 5531 (Yugo Nagata) 5532 5533 This is reported in Bug track #54 by arshu arora 5534 5535 #54 pgpool-II semaphore lock problem 5536 http://www.pgpool.net/mantisbt/view.php?id=54 5537 5538 - Fix bug with do_query which causes hung in extended protocol 5539 (Tatsuo Ishii) 5540 5541 This problem could occur when insert lock is enabled and 5542 pgpool_catalog.insert_lock exists, See [pgpool-general: 1684] for more 5543 details. 5544 5545 [pgpool-general: 1684] insert_lock hangs 5546 http://www.sraoss.jp/pipermail/pgpool-general/2013-May/001711.html 5547 5548 - Fix unnecessary degeneration caused by error on commit (Tatsuo Ishii) 5549 5550 In master slave mode, if master gets an error at commit, while other 5551 slaves are normal at commit, we don't need to degenrate any backend 5552 because it is likely that the "kind mismatch error" was caused by a 5553 deferred trigger. 5554 5555 - Fix possible failure of query cache invalidation for DML in transaction 5556 (Tatsuo Ishii) 5557 5558 CREATE TABLE t1(i INTEGER); 5559 CREATE TABLE t2(i INTEGER); 5560 SELECT * FROM t1; 5561 BEGIN; 5562 DELETE FROM t2 WHERE i = 0; 5563 INSERT INTO t1(i) VALUES(1); 5564 COMMIT; 5565 5566 SELECT * FROM t1; 5567 5568 At commit pgpool tries to delete cache for t2 but failes because 5569 there's no oid table entry for t2. Problem is, it fails to check oid 5570 table for t1. So cahce for t1 remains and the last SELECT incorrectly 5571 returns cached data. Fix is, continuing to check oid table entries. 5572 5573 This is reported in Bug track #58 by wms 5574 5575 #58 query cache invalidation does not fire for multiple DML in transaction 5576 http://www.pgpool.net/mantisbt/view.php?id=58 5577 5578 - Fix to register pgpool_regclass in pg_catalog schema (Tatsuo Ishii) 5579 5580 This is necessary to deal with clients which restricts schema search path 5581 to pg_catalog only. Postgres_fdw is such a client. 5582 5583 - Fix a potential crash in pg_md5 command (Muhammad Usama) 5584 5585 - Fix a segmentation fault that occurs when on memory query cache enabled 5586 and the query is issued in extended query mode and the result is too large 5587 (Tatsuo Ishii) 5588 5589 This is reported in Bug track #63 by harukat. 5590 Analysis and a test case are also provided. 5591 5592 #63 Child process was terminated by segmentation fault with memcached 5593 http://www.pgpool.net/mantisbt/view.php?id=63 5594 5595 - Fix a segmentation fault of a child process that occurs when a startup 5596 packet has no PostgreSQL user information (Yugo Nagata) 5597 5598 You can reproduce it by 5599 5600 $ psql -p 9999 -U '' 5601 5602 If enable_pool_hba is on, a child process terminates by segmentation 5603 fault. Otherwise if enable_pool_hba is off, the error message is 5604 5605 ERROR: pool_discard_cp: cannot get connection pool for user (null) 5606 database (null) 5607 5608 In both cases, psql terminates with no message on frontend. 5609 5610 In the fixed version, if PostgreSQL user is not specified in startup packet, 5611 the message as following is output to both log and frontend. This is 5612 the same behavior as PostgreSQL. 5613 5614 FATAL: no PostgreSQL user name specified in startup packet 5615 5616 - Fix memory allocation logic in extended query processing with on-memory 5617 query cache enabled (Tatsuo Ishii) 5618 5619 When very long query string (> 1024 bytes) supplied in extended query 5620 with bind parameters, it fails to allocate enough memory. 5621 5622 - Move ssl_ca_cert and ssl_ca_cert_dir descriptions to the SSL section 5623 (Yugo Nagata) 5624 5625 - Add ssl_ca_cert and ssl_ca_cert_dir descriptions to the japanese document 5626 (Yugo Nagata) 5627 5628 - Fix to verify the backend node number in pcp_recovery_node (Yugo Nagata) 5629 5630 When an invalid number is used, null value is passed as an arguments 5631 of recovery script, and this causes a malfunction. In especially, 5632 rsync may delete unrelated files in basebackup scripts. 5633 5634=============================================================================== 5635 5636 3.2.4 (namameboshi) 2013/04/26 5637 5638* Version 3.2.4 5639 5640 This is a bugfix release against pgpool-II 3.2.3. 5641 5642 __________________________________________________________________ 5643 5644* Bug fixes 5645 5646 - Fix connect_inet_domain_socket_by_port() to set more appropriate value 5647 for timeout parameter of select(2). (Tatsuo Ishii) 5648 5649 Some platforms such as Solaris do not allow to specify too large 5650 microseconds timeout value (>=1000000). So divide the timeout value to 5651 seconds and microseconds. 5652 5653 - Fix connect_inet_domain_socket_by_port() to not return as normal when 5654 interrupted by alarm. (Tatsuo Ishii) 5655 5656 This confuses health checking because connect_inet_domain_socket_by_port() 5657 returns unsable fd. This makes detecting errors in health checking longer. 5658 5659 See the following for more details: 5660 5661 [pgpool-general: 1458] 5662 health check timeout in pgpool-II-3.2.3 5663 http://www.pgpool.net/pipermail/pgpool-general/2013-March/001482.html 5664 5665 - Fix long standing bug with timestamp rewriting code for processing 5666 extended protocol. (Tatsuo Ishii) 5667 5668 Parse() allocate memory using palloc() while rewriting the parse 5669 message. Problem is, the rewritten message was kept in the data which 5670 is managed by pool_create_sent_message() etc. The function assumes 5671 that all the data is in session context memory. However, palloc() 5672 allocates memory in query context of course, and gets freeed later on 5673 when the query context disappears. And the function tries to free the 5674 memory as well, which causes various problems, including segfault and 5675 double free. To fix this, memory to store rewritten message is 5676 allocated using session context. The bug was there since pgpool-II 3.0 5677 was born. 5678 5679 Problem analysis and patch contributed by Naoya Anzai. 5680 5681 [pgpoolgenera-jp: 1146]. (in Japanese) 5682 http://www.pgpool.net/pipermail/pgpool-general-jp/2013-March/001145.html 5683 5684 - Fix bug with md5 auth long user name handling. (Tatsuo Ishii) 5685 5686 If user name is longer than 32 bytes, md5 authentication doesn't work. 5687 Problem reported in [pgpool-general: 1526] by Thomas Martin. 5688 5689 [pgpool-general: 1526] 5690 [pgPool-II 3.2.3] MD5 authentication and username longer than 32 characters. 5691 http://www.pgpool.net/pipermail/pgpool-general/2013-March/001551.html 5692 5693 - Fix to calculate replication delay only if standby server is behind from 5694 the primay server. (Yugo Nagata) 5695 5696 When the primary server is behind from standby server, negative value of 5697 delay is calculated and the value is assigned to unsigned variable. It 5698 causes a log message informing negative replication delay. And what is 5699 worse, it also causes SELECT queries to be sent to the primary in load 5700 balance even though there are no replication delay in fact. 5701 5702 The problem is reported and analyzed by Saitoh Hidenori in 5703 [pgpool-genera-jp: 1145]. 5704 5705 [pgpool-general-jp: 1145] (in Japanese) 5706 http://www.pgpool.net/pipermail/pgpool-general-jp/2013-March/001144.html 5707 5708 - pgpool-recovery adopts PostgreSQL 9.3. (Tatsuo Ishii) 5709 5710 Patch contributed by Asif Rehman. Slight editing by Tatsuo Ishii. 5711 5712 [pgpool-hackers: 180] 5713 compile error in ppool-recovery 5714 http://www.pgpool.net/pipermail/pgpool-hackers/2013-April/000179.html 5715 5716 - Fix pool_has_pgpool_regclass() to check execute privilege of 5717 pgpool_regclass(). (Tatsuo Ishii) 5718 5719 Even though pgpool_regclass() exists, if pgpool cannot execute the 5720 function, the connection to backend hangs. You can reproduce the problem 5721 by just dropping the execute privilege from pgpool_regclass and do some 5722 insert in native replication mode. 5723 5724 The problem is reported in bugtrack #53. 5725 5726 #53 pgpool_regclas hangs all connections 5727 Date: 2013-04-04 13:35 5728 Reporter: tmandke 5729 http://www.pgpool.net/mantisbt/view.php?id=53 5730 5731 - Fix error message mistakes in detect_postmaster_down_error(). (Tatsuo Ishii) 5732 5733 For example, "LOG: detect_stop_postmaster_error: detect_error error" is 5734 fixed to "LOG: detect_postmaster_down_error: detect_error error", and so on. 5735 5736 - Remove root user check when watchdog is enabled. (Tatsuo Ishii) 5737 5738 Per discussion [pgpool-general: 1627] Re: watchdog root requirement. 5739 5740 [pgpool-general: 1627] 5741 Re: watchdog root requirement. 5742 http://www.pgpool.net/pipermail/pgpool-general/2013-April/001654.html 5743 5744 - Fix bug with on memory query cache in handling UPDATE/DELETE with table 5745 alias. (Tatsuo Ishii) 5746 5747 If UPDATE/DELETE is with table alias (UPDATE t1 AS foo...) pgpool thinks 5748 the table name is "t1 AS foo" and fails to invalidate query cache. This 5749 is caused by _outRangeVar() called from nodeToString() which generates a 5750 query string from RangeVar node in raw parse tree. The solution is removing 5751 "AS foo" part from the output of the string. 5752 5753 Reported in bugtrack #56. 5754 5755 #56 UPDATE with alias does not discard cache 5756 Date: 2013-04-18 17:33 5757 Reporter: harukat 5758 http://www.pgpool.net/mantisbt/view.php?id=56 5759 5760=============================================================================== 5761 5762 3.2.3 (namameboshi) 2013/02/18 5763 5764* Version 3.2.3 5765 5766 This is a bug fix release against pgpool-II 3.2.2. Main purpose 5767 of this release is to fix fatal problem with pgpool-II 3.2.2's 5768 health checking. If all of following conditions are met, pgpool 5769 main process disappeared and all client connections to pgpool-II 5770 hang forever when failover happens. And the only way to recover 5771 from it is, manualy killing the pgpool child process and restart 5772 pgpool-II. 5773 5774 - health checking is enabled 5775 5776 - connecting method to PostgreSQL is TCP/IP, not UNIX domain 5777 socket(i.e. "backend_hostnameN" is not empty string) 5778 5779 __________________________________________________________________ 5780 5781* Bug fixes 5782 5783 - Fix connect_inet_domain_socket_by_port() bug introduced in 5784 3.2.2. (Tatsuo Ishii) 5785 5786 When non blocking connect() reports EINPROGRESS or EALREADY, it 5787 calls select(2) to wait for read or write fd ready. However it 5788 mistakenly checks error condition using getsockopt(). It should 5789 be called when select() returns > 0, rather than 0. Because of 5790 this, connect_inet_domain_socket_by_port() could return 5791 succeeded fd even it actually failed. 5792 5793 And what is worse, this health_check() mistakenly believes that 5794 backend is alive and tries to write to backend socket, which of 5795 course fails. This triggers to call notice_backend_error(), 5796 which sends SIGUSR1 signal to pgpool main's parent process. This 5797 will result in various weird things: for example, if you start 5798 pgpool from a shell, the signal kills the shell. If you start 5799 pgpool in background, pgpool's parent is the process #1. As long 5800 as you started pgpool as non root, it's ok. Even if you start 5801 pgpool as root, init just reopens /dev/initctl by receiving 5802 SIGUSR1. These all annoying bugs have been there since pgpool 5803 was born. The connect_inet_domain_socket_by_port() bug just 5804 reveals it. To fix this, I modified notice_backend_error and 5805 child_exit() so that it does nothing when called from pgpool 5806 main process itself to prevent pgpool from shooting itself in 5807 the foot. 5808 5809 - Fix to show pool_passwd in "SHOW pool_status". (Yugo Nagata) 5810 5811 - Fix a typo at configure's help in configure.in. (Yugo Nagata) 5812 5813=============================================================================== 5814 5815 3.2.2 (namameboshi) 2013/02/08 5816 5817* Version 3.2.2 5818 5819 This is a bugfix release against pgpool-II 3.2.1. 5820 5821 __________________________________________________________________ 5822 5823* Bug fixes 5824 5825 - Fix compile errors on FreeBSD. (Tatsuo Ishii) 5826 5827 - Fix pgpool does not recognize VIEWs other than in default schema, 5828 which is usually "public". (Tatsuo Ishii) 5829 5830 This makes pgpool to create caches for such a VIEW's query results, 5831 which of course should not be allowed. 5832 5833 Problem reported and patch provided by jgentsch in bug id #30. 5834 5835 #30 pgpool 3.2.1 - views in schema other than public are caching 5836 Reporter: jgentsch 5837 Date: 2012-10-19 23:13 5838 http://www.pgpool.net/mantisbt/view.php?id=30 5839 5840 - Fix race condition when using md5 authentication. (Tatsuo Ishii) 5841 5842 The file descriptor to pool_passwd is opened in pgpool main and pgpool 5843 child inherits it. When concurrent connections try to authenticate md5 5844 method, they call pool_get_passwd and seek the fd and cause random md5 5845 auth failure because underlying fd is shared. Fix is, let individual 5846 pgpool child open the file by calling pool_reopen_passwd_file. 5847 5848 Problem reported and analyzed by Jason Slagle in pgpool-general:1141. 5849 5850 [pgpool-general: 1141] Possible race condition in pool_get_passwd 5851 From: Jason Slagle 5852 Date: Sun, 28 Oct 2012 01:12:52 -0400 5853 http://www.sraoss.jp/pipermail/pgpool-general/2012-October/001160.html 5854 5855 - Clarify load balance condition information in manual. (Tatsuo Ishii) 5856 5857 - Fix segfault due to bug with query cache array handling. (Tatsuo Ishii) 5858 5859 The cache arrary is used to keep temporary cache results in a transaction. 5860 If there are more than 128 SELECTs in a transaction, the module expands 5861 cache_arrary by using realloc. However it does not record the new pointer 5862 returned by realloc. So the module keeps on using the old pointer which is 5863 absoleted. 5864 5865 This problem is reported in bug track #31 by jgentsch. 5866 5867 #31 pgpool V3_2_STABLE - segfault in pool_memqcache.c:2529 5868 Reporter:jgentsch 5869 Date: 2012-10-23 06:25 5870 http://www.pgpool.net/mantisbt/view.php?id=31 5871 5872 - Fix hung up while repeating pcp_attach_node and pcp_detatch_node 5873 (Tatsuo Ishii) 5874 5875 When node status is changed by pcp_attach_node and pcp_detatch_node, 5876 failover() sends SIGUSR1 to pcp_child process expecting it exits to 5877 refresh node status. In this situation lots of pgpool children exit and 5878 produce SIGCHLD as well. The SIGCHLD handler reaper() tries catch all 5879 SIGCHLD but sometimes it fails depending on the system load and timing. 5880 If SIGCHLD produced by pcp child is not caught, the process becomes 5881 zombie and never restarted. 5882 5883 This problem is reported in bug track #32 (by oleg_myrk) etc. 5884 5885 #32 PGPool hangs on pcp_attach/detach 5886 Reporter: oleg_myrk 5887 Date: 2012-10-24 00:01 5888 http://www.pgpool.net/mantisbt/view.php?id=32 5889 5890 - Fix pool_send_severity_message() not to use uninitialized memory. 5891 (Tatsuo Ishii) 5892 5893 It cause a segmentaion fault. 5894 Reported in Bug #33's attached valgrind output by dudee. 5895 5896 #33 pgpool-II 3.2.1 segfault 5897 Reporter: dudee 5898 Date: 2012-10-30 19:16 5899 http://www.pgpool.net/mantisbt/view.php?id=33 5900 5901 - Fix bug with query cache returning incorrect data in some cases when a 5902 persistent table and temp table have same name. (Tatsuo Ishii) 5903 5904 Here is a sequence to trigger the bug: 5905 5906 1) CREATE TABLE t1(i int); -- create a persistent table 5907 2) INSERT INTO t1 VALUES(1); 5908 3) SELECT * FROM t1; -- query cache entry created 5909 4) CREATE TEMP TABLE t1(i int); -- create a temp table 5910 5) SELECT * FROM t1; -- query cache entry mistakenly created! 5911 5912 Problem is #3 creates relcache entry for t1, and #5 incorrecly uses it 5913 and believes that temp table t1 is not a temp table. 5914 5915 - Add a description about "-f" to help message. (Tatsuo Ishii) 5916 5917 - Fix reaper() not to exit wait3() loop when catches pcp or worker child 5918 exit event. (Tatsuo Ishii) 5919 5920 Otherwise reaper() mistakenly ignore some process exit event and make a 5921 risk of creating zombie process and forgetting to create new process. 5922 5923 Problem reported and fix suggested by Goto in [pgpool-general-jp: 1123]. 5924 http://www.sraoss.jp/pipermail/pgpool-general-jp/2012-November/001122.html 5925 (in Japanese) 5926 5927 - Fix a typo of configure help message. (Yugo Nagata) 5928 5929 - Add wd_hostname to pool_process_reporting.c. (Yugo Nagata) 5930 5931 Otherwise, wd_hostname is not contained in results of SHOW pool_status and 5932 cp_pool_status. 5933 5934 - Fix connect_inet_domain_socket_by_port() to not error out when connect(2) 5935 returns EISCONN (Socket is already connected) error. (Tatsuo Ishii) 5936 5937 This could happen with non blocking socket and should be treated as normal. 5938 Per bug track #29 (by spork) and pgpool-general 1218 (by Mikola Rose). 5939 5940 #29 pgpool 3.2.1 cannot connect to db hosts 5941 Reporter: spork 5942 Date: 2012-10-18 15:03 5943 http://www.pgpool.net/mantisbt/view.php?id=29 5944 5945 [pgpool-general: 1218] pgpool 3.2.1 - Health check failing to connect 5946 From: Mikola Rose 5947 Date: Tue, 4 Dec 2012 20:21:55 +0000 5948 http://www.sraoss.jp/pipermail/pgpool-general/2012-December/001237.html 5949 5950 - Fix health_check() to check the health check timer before retrying 5951 with template1 database. (Tatuo Ishii) 5952 5953 Without this, the retry with node 0 always fails because health check timer 5954 may be already expired. 5955 5956 - Fix pool_search_relcache() to use MASTER or MASTER_NODE_ID macro, rather 5957 than REAL_MASTER_NODE_ID. (Tatsuo Ishii) 5958 5959 In case node 0 fail back in streaming replication mode, pgpool does not 5960 restart child process. So REAL_MASTER_NODE_ID looks for node 0 con info, 5961 which is not present until new connection to backend made. Thus referring 5962 to node con info results in segfault. MASTER or MASTER_NODE_ID are safe in 5963 this situation because they look at cached former master node id. 5964 5965 - Fix long standing bug "portal not found" error when replication delay 5966 is too much in streaming replication mode. (Tatsuo Ishii) 5967 5968 The bug had been there since the delay threshold was introduced. 5969 5970 We changed destination DB node if delay threshold exceeds in bind, 5971 describe and execute. However, if parse sends to different node, bind, 5972 describe or execute will fail because no parsed statement or portal 5973 exists. Solution is, not to send to different parse node even 5974 if delay threshold is too much. 5975 5976 - Fix pg_md5 to output "\n" after user inputs password. (Yugo Nagata) 5977 5978 - Fix to print error message when the port number for watchdog is already used. 5979 (Yugo Nagata) 5980 5981 This issue was reported by Will Ferguson in [pgpool-general: 1167]. 5982 5983 [pgpool-general: 1167] Re: Watchdog error - wd_init: delegate_IP already exists 5984 From: Will Ferguson 5985 Date: Tue, 6 Nov 2012 13:03:36 +0000 5986 http://www.sraoss.jp/pipermail/pgpool-general/2012-November/001186.html 5987 5988 - Fix child_exit() to not call send_frontend_exits() if there's no 5989 connection pool. (Tatsuo Ishii) 5990 5991 Otherwise, it segfaults because send_frontend_exits() referes to objects 5992 pointed to by pool_connection_pool. Per bug track #44 by tuomas. 5993 5994 #44 pgpool went haywire after slave shutdown triggering master failover 5995 Reporter: tuomas 5996 Date: 2012-12-11 00:33 5997 http://www.pgpool.net/mantisbt/view.php?id=44 5998 5999 - Fix bug that only tables in white_memqcache_table_list was cached when 6000 black_memqcache_table_list has any tables. (Yugo Nagata) 6001 6002 - Fix read_startup_packet() to reset alarm and free StartupPacket when 6003 pool_read() returns 0 which means incorrect packet length. (Nozomi Anzai) 6004 6005 Previously, authentication timeout occurs when connected by a program 6006 monitoring the pgpool port.It is reported in bug track #35. 6007 6008 #35 Authentication is timeout 6009 Reporter: tuomas 6010 Date: 2012-11-20 11:54 6011 http://www.pgpool.net/mantisbt/view.php?id=35 6012 6013 - Fix long standing bug with pool_open(). (Tatsuo Ishii) 6014 6015 It initializes wrong buffer pointer. Actually this is harmless because the 6016 pointer is initialized by prior memset() call, though. 6017 6018 - Log that failover is avoided because "fail_over_on_backend_error" is 6019 turned off. (Tatsuo Ishii) 6020 6021 - Fix LISTEN/NOTIFY handling bugs. (Tatsuo Ishii) 6022 6023 1) In streaming replication mode: 6024 6025 Session 1: LISTEN aaa; 6026 Session 2: NOTIFY aaa; 6027 Session 1: LISTEN aaa; --- hangs 6028 6029 (If LISTEN and NOTIFY are issued in a same session, it works fine.) 6030 6031 We assume that packets come from all nodes. However in streaming 6032 replication mode, notification message only comes from primary 6033 node and we should avoid reading from standby nodes. 6034 6035 2) In streaming replication mode: If primary node is not node 0, it 6036 hangs like #1 even if fix applies. This is because MASTER_NODE_ID 6037 macro (actually pool_virtual_master_db_node_id()) always returns 6038 REAL_MASTER_NODE_ID, which is node 0 (if it is alive). The function 6039 should return PRIMARY_NODE_ID in master/slave mode. 6040 6041 3) In replication mode, LISTEN/NOTIFY simply does not work. In the 6042 mode, NOTIFY is sent to all backends. However the order of arrival of 6043 'Notification response' is not necessarily the master first and then 6044 slaves. So if it arrives slave first, we should try to read from 6045 master, rather than just discard it. Fixed in pool_process_query(). 6046 6047 4) In replication mode, if LISTEN and NOTIFY are issued in a same 6048 session, the session is disconnected because do_command() may receive 6049 other than 'N', 'E', 'S' and 'C'. The solution is, put 'A' packet on a 6050 stack and pop out when it is convenient. For this purpose, new 6051 functions pool_push(), pool_pop() and pool_stacklen() are added. 6052 6053 This probmel is reported in but grack #45 by rpashin. 6054 6055 #45 LISTEN/NOTIFY doesn't work if cluster contains more then 1 node in 6056 streaming replication mode 6057 Reporter: rpashin 6058 Date: 2012-12-12 00:09 6059 http://www.pgpool.net/mantisbt/view.php?id=45 6060 6061 Considering the size of the patch, I do not back patch to 3.1 or 6062 before(so far, we have not heard any complaints on 3.1 or before). 6063 6064 - Fix connect_inet_domain_socket_by_port() to call select(2) rather than 6065 error out when connect(2) returns EINPROGESS or EALREADY error. 6066 (Tatsuo Ishii) 6067 6068 When using non-blocking socket, despite the errors like 6069 "Connection timed out", actually connection has been established. 6070 To solve the problem we should use select(2) to wait for connection 6071 establishing when connect(2) reports EINPROGRESS or EALREADY, instead 6072 of doing a retry tight loop. 6073 6074 This problem is reported in bug track #46 by mcousin. 6075 6076 #46 Watchdog failing to connect sometimes 6077 Reporter: mcousin 6078 Date: 2012-12-15 01:01 6079 http://www.pgpool.net/mantisbt/view.php?id=46 6080 6081 - Add caution to increase num_init_children if watchdog enabled in manual. 6082 (Tatsuo Ishii) 6083 6084 See [pgpool-general: 1330] for more details. 6085 6086 [pgpool-general: 1330] WatchDog and pgpool sudden stop working 6087 From: Tomas Halgas 6088 Date: Fri, 18 Jan 2013 14:47:23 +0100 6089 http://www.sraoss.jp/pipermail/pgpool-general/2013-January/001350.html 6090 6091 - Fix segmentation fault while pgpool-II stating up or fail over when 6092 watchdog is enabled. (Yugo Nagata) 6093 6094 This is caused by wrong usage of pthread, namely pthread_detach and 6095 pthread_join are mixed together. Solution is to use pthread_join only 6096 if we need to get status of child thread. BTW, the problem could occu 6097 on moderately modern OS such as Fedora 17, but the reason why the problem 6098 is not observed on other OSs is, just we were lucky. 6099 6100 Problem reported in [pgpool-general: 1179] by Lonni J Friedman. 6101 6102 [pgpool-general: 1179] 3.2.1 segfaults at startup on Fedora17. 6103 From: Lonni J Friedman 6104 Date: Mon, 12 Nov 2012 15:58:29 -0800 6105 http://www.sraoss.jp/pipermail/pgpool-general/2012-November/001198.html 6106 6107 Patch provided by chads in bug track #48. 6108 6109 pthread_detach is being used wrong; causes pgpool to segfault. 6110 Reporter: chads 6111 Date: 2013-01-16 05:44 6112 http://www.pgpool.net/mantisbt/view.php?id=48 6113 6114 - Avoid split-brain situation reported in [pgpool-general: 1046] (Yugo Nagata) 6115 6116 After all backend nodes are detached from pgpools and then some backend node 6117 are attached to these, multiple active pgpools could exist simultaneously, 6118 that is to say, split-brain situation occurs. 6119 6120 In this fix, when once all backend DB nodes are detached from pgpool, the pgpool 6121 stays DOWN status until this is restarted. The pgpool in DOWN status cannot 6122 escalate to active (delegate IP holder), so split-brain situation is avoided. 6123 6124 [pgpool-general: 1046] 6125 watchdog enabled delegate_IP on multiple nodes simultaneously 6126 From: Lonni J Friedman 6127 Date: Wed, 26 Sep 2012 09:05:09 -0700 6128 http://www.sraoss.jp/pipermail/pgpool-general/2012-September/001064.html 6129 6130 - Avoid a possible hang during the active pgpool exits. (Yugo Nagata) 6131 6132 When exiting, the active pgpool brings down the virtual IP and then 6133 sends a packet to other pgpools. However, the packet sometimes is sent 6134 before the virtual IP is brought down completely. In this case the packet 6135 sender is set to this IP. When the IP is brought down before other pgpools 6136 respond, the active pgpool can not recieve the response, and hang up. 6137 6138 In this fix, the active pgpool confirms that the virtual IP is brought 6139 down before sending the packet. 6140 6141 - Modify descriptions of restrictions on watchdog. (Yugo Nagata) 6142 6143 - Modify pgpool.conf.sample* and documents to correct information of 6144 whether a certain parameter change requires restart. (Yugo Nagata) 6145 6146 - Add pool_passwd option to pgpool.conf.sample*, pool_process_reporting.c, 6147 and documents. (Yugo Nagata) 6148 6149 Otherwise, wd_hostname is not contained in results of SHOW pool_status and 6150 pcp_pool_status. 6151 6152=============================================================================== 6153 6154 3.2.1 (namameboshi) 2012/10/12 6155 6156* Version 3.2.1 6157 6158 This is a bugfix release against pgpool-II 3.2.0. 6159 6160 __________________________________________________________________ 6161 6162* Bug fixes 6163 6164 - Fix send_cached_messages(). (Tatsuo Ishii) 6165 6166 Before it had 8192 bytes fix length buffer for each row data and if data 6167 exceeded 8192 bytes, it just crashed. 6168 To fix this, eliminate copying raw data which is passed as an argument 6169 to buffer and pass the pointer to send_message. 6170 6171 - Fix that extended queries failed due to query cache. (Nozomi Anzai) 6172 6173 - Fix read_startup_packet(). (Tatsuo Ishii) 6174 6175 If packet length is lower than 0, it should have returned immediately. 6176 Otherwise it would cause memory allocation error later on. 6177 per pgpool-general:886. Also add canceling alarm. 6178 6179 [pgpool-general: 886] read_startup_packet: out of memory 6180 From: Lonni J Friedman 6181 Date: Wed, 8 Aug 2012 10:18:15 -0700 6182 http://www.sraoss.jp/pipermail/pgpool-general/2012-August/000896.html 6183 6184 - Fix too watchdog process's aggressively kill other processes when pgpool 6185 shuts down. (Tatsuo Ishii) 6186 6187 watchdog process calls kill(0,SIG) to kill all processes related to 6188 watchdog. Unfortunately this will kill not only watchdog related 6189 processes but parent pgpool and even httpd in case when pgpool was 6190 invoked from pgpoolAdmin because they are in the same process 6191 group. 6192 So for now, fix is removing call to the kill() and setpgid() because 6193 setpgid() does nothing useful. 6194 6195 In the future, we should call setsid() to establish new process group 6196 in any case. 6197 6198 - Fix query cache to regist such queries that start with "-- comment" or 6199 have comments more than one. (Nozomi Anzai) 6200 6201 - Fix query cache to ignore multi statement. (Nozomi Anzai) 6202 6203 In previous, queries like "SELECT 1;UPDATE..." were cached, too, but it 6204 was wrong. 6205 6206 - Add a watchdog restriction to documents. (Yugo Nagata) 6207 6208 - Add NOTICE message handling to s_do_auth(). (Tatsuo Ishii) 6209 6210 Without this, health check responses false alarm and causes failover. 6211 per bug track: 6212 6213 #25 s_do_auth doesn't handle NoticeResponse (N) message 6214 Date: 2012-08-28 03:57 6215 Reporter: singh.gurjeet 6216 Date: 6217 http://www.pgpool.net/mantisbt/view.php?id=25 6218 6219 - Remove unnecessary/confusing debug log from s_do_auth().(Tatsuo Ishii) 6220 6221 - Fix buffer overrun in Execute when memory cache enabled. 6222 (Tatsuo Ishii) 6223 6224 If one of bind parameter < 0, it was possible to produce more than 2 6225 byte string for "%02X" due to sign extention. 6226 Also use snprintf, rather than sprintf to prevent from possible buffer 6227 overrun in the future. 6228 6229 - Fix long standing memory leak bug with free_select_result() since 6230 pgpool-II 2.3 was born in December 2009. (Tatsuo Ishii) 6231 6232 Actually this bug only appears when operated in replication mode 6233 (triggered by timestamp rewriting process by coincidence). 6234 Per bug track #24: 6235 6236 #24 Severe memory leak in an OLTP environment 6237 Date: 2012-08-28 03:43 6238 Reporter: singh.gurjeet 6239 Date: 6240 http://www.pgpool.net/mantisbt/view.php?id=24 6241 6242 - Fix typo in cache_reporting(). (Tatsuo Ishii) 6243 6244 - Fix inifinit loop in SSL mode. (Tatsuo Ishii) 6245 6246 When there's pending data in SSL layer of frontend, pool_process_query() 6247 checks pending data in backend. If there's non, it loops again and checks 6248 frontend/backend receive buffer by using is_cache_empty(). 6249 Unfortunately it first checks pending data in SSL layer of frontend, 6250 thus goes to backend data and checks again (infinite loop). 6251 6252 The solution is, if there's pending data in SSL layer of frontend and 6253 query is not in progress, call ProcessFrontendResponse() to process new 6254 request from frontend. 6255 6256 - Fix is_system_catalog() to use pgpool_regclass if available. 6257 (Tatsuo Ishii) 6258 6259 - Fix memory leak in pool_get_insert_table_name(). (Tatsuo Ishii) 6260 6261 If session context's memory contex is used for nodeToString(), memory is 6262 not freed until session ends. 6263 See bug track #24 for more details. 6264 6265 #24 Severe memory leak in an OLTP environment 6266 Date: 2012-08-28 03:43 6267 Reporter: singh.gurjeet 6268 http://www.pgpool.net/mantisbt/view.php?id=24 6269 6270 - Use fcntl(2) rather than flock(2) to lock oid map files. (Tatsuo Ishii) 6271 6272 flock(2) is not portable and cannot be used on Solaris. 6273 Patch contributed by Ibrar Ahmed. 6274 6275 - Fix oversight of get_next_master_node() when operated in raw mode. 6276 (Tatsuo Ishii) 6277 6278 If master node goes down, it always returned master node id 0. 6279 See [pgpool-general: 1039] for more details. 6280 6281 [pgpool-general: 1039] Raw failover not working as expected on pgpool-II 6282 v3.2.0 6283 From: Quentin White 6284 Date: Tue, 25 Sep 2012 07:45:34 +0000 6285 http://www.sraoss.jp/pipermail/pgpool-general/2012-September/001057.html 6286 6287 - Fix segfault of do_query(). (Tatsuo Ishii) 6288 6289 When memqcache enabled and extended protocol is used, do_query() 6290 accesses system catalog and use pool_read2(). Unfortunately parse message 6291 packet is given to Parse() and the packet contents is on pool_read2's 6292 buffer. Thus do_query could break the packet contents, and it leads to 6293 segfault. 6294 6295 Solution is, allocate memory and copies the packet contents and pass to 6296 Parse(). Note that query context holds query string, which is in the 6297 packet as well. So we need to copy it and save the pointer in the 6298 query context. 6299 6300 We think the problem is not only with Parse() but with other protocol 6301 modules. So this fix is not Parse() only, rather for other modules. For 6302 this purpose ProcessFrontendResponse() is changed. 6303 6304 See bugtrack in detai. 6305 6306 #21 pgpool-II 3.2.0 cannot execute sql through jdbc 6307 Date: 2012-08-17 16:31 6308 Reporter: elisechiang 6309 http://www.pgpool.net/mantisbt/view.php?id=21 6310 6311 - Fix to set unix domain socket path for pgpool PCP communication before 6312 setting up signal handlers. (Yugo Nagata) 6313 6314 Previously, unlink of the socket in exitting process was failed because 6315 the path of the socket was not set. 6316 Patch contributed by Gilles Darold 6317 6318 [pgpool-hackers: 131] Found bug with watchdog resulting in pgpool 6319 segmentation fault 6320 From: Gilles Darold 6321 Date: Thu, 13 Sep 2012 18:54:42 +0200 6322 http://www.sraoss.jp/pipermail/pgpool-hackers/2012-September/000130.html 6323 6324 - Fix to output the message when, in watchdog, ifup/down or arping command 6325 does not exist. (Yugo Nagata) 6326 6327 - Fix long standing problem with do_query(). (Tatsuo Ishii) 6328 6329 When 1) extended protocol used and 2)unnamed portal is used and 3) no 6330 explicit transaction is used, user's unnamed portal is removed by Sync 6331 message. 6332 This is because Sync message closes transaction and unnamed portal is 6333 removed. This leads to "portal "" does not exist" error. 6334 6335 Fix is, use "Flush" message instead of Sync. Main difference between 6336 using Sync and Flush is, Flush does not return Ready for Query message. 6337 So do_query() does not return until all expected responses are returned. 6338 It seems the order of messages returned from backend is random, and 6339 do_query () manages it by using state bits. 6340 6341=============================================================================== 6342 6343 3.2.0 (namameboshi) 2012/08/03 6344 6345* Version 3.2.0 6346 6347 This is the first version of pgpool-II 3.2 series. 6348 That is, a "major version up" from 3.1 series. 6349 6350 __________________________________________________________________ 6351 6352* Incompatible changes 6353 6354 6355 - The new query cache "On memory query cache" took the place of the old 6356 one. 6357 - Now the parameter "enable_query_cache" is deleted. 6358 6359 __________________________________________________________________ 6360 6361* New features 6362 6363 ** Memory based query cache 6364 6365 Original author is Masanori Yamazaki, improved by Development Group. 6366 (Tatsuo Ishii, Nozomi Anzai, Yugo Nagata) 6367 6368 Overview: 6369 6370 On memory query cache is faster because cache storage is on memory. 6371 Moreover you don't need to restart pgpool-II when the cache is outdated 6372 because the underlying table gets updated. 6373 6374 On memory cache saves pair of SELECT statements (with its Bind parameters 6375 if the SELECT is an extended query). If the same SELECTs comes in, it 6376 returns the value from cache. Since no SQL parsing nor access to 6377 PostgreSQL are involed, it's extremely fast. 6378 6379 On the other hand, it might be slower than the normal path because it 6380 adds some overhead to store cache. Moreover when a table is updated, 6381 pgpool automatically deletes all the caches related to the table. So the 6382 prformace will be degraded by a system with a lot of updates. If the 6383 cache_hit_ratio is lower than 70%, you might want to disable onl memory 6384 cache. 6385 6386 Choosing cache storage: 6387 6388 You can choose a cache storage: shared memory or memcached (you can't use 6389 the both). 6390 Query cache with shared memory is fast and easy because you don't have 6391 to install and config memcached, but restricted the max size of cache by 6392 the one of shared memory. Query cache with memcached needs a overhead to 6393 access network, but you can set the size as you like. 6394 6395 Restrictions: 6396 6397 - On memory query cache deletes the all cache of an updated table 6398 automatically with monitoring if the executed query is UPDATE, INSERT, 6399 ALTER TABLE and so on. But pgpool-II isn't able to recognize implicit 6400 updates due to trigers, foreign keys and DROP TABLE CASCADE. 6401 You can avoid this problem with memqcache_expire by which pgpool deletes 6402 old cache in a fixed time automatically, or with black_memqcache_table_list 6403 by which pgpool's memory cache flow ignores the tables. 6404 6405 - If you want to use multiple instances of pgpool-II with online memory 6406 cache which uses shared memory, it could happen that one pgpool deletes 6407 cache, and the other one doesn't do it thus finds old cached result 6408 when a table gets updated. Memcached is the better cache storage in this 6409 case. 6410 6411 New parameters: 6412 6413 - Add parameters for on memoey query cache as follows: 6414 memory_cache_enabled, memqcache_method, memqcache_expire, 6415 memqcache_maxcache, memqcache_oiddir. (Tatsuo Ishii) 6416 6417 - Add parameters about shared memory for on memory query cache as 6418 follows: 6419 memqcache_total_size, memqcache_max_num_cache, 6420 memqcache_cache_block_size. (Tatsuo Ishii) 6421 6422 - Add parameters about memcached for on memory query cache as follows: 6423 memqcache_memcached_host, memqcache_memcached_port. (Tatsuo Ishii) 6424 6425 - Add parameters about relation cache for on memory query cache as 6426 follows: 6427 relcache_expire, relcache_size. (Tatsuo Ishii) 6428 6429 - Add a parameter "check_temp_table" to check if the SELECTed table is 6430 temp table. (Tatsuo Ishii) 6431 6432 - Add the parameters of white_memqcache_table_list, 6433 black_memqcache_table_list that check if the SELECTed tables, temp 6434 tables and views are to be cached or not. (Nozomi Anzai) 6435 6436 - Add a parameter "memqcache_auto_cache_invalidation" of the flag if 6437 query cache is triggered by corresponding DDL/DML/DCL (and 6438 memqcache_expire). (Yugo Nagata) 6439 6440 New commands: 6441 6442 - Add "SHOW pool cache" which shows hit ratio of query cache and the 6443 status of cache storage. 6444 6445 - Add "--with-memcached" option to configure. (Nozomi Anzai) 6446 6447 - Add "-C, --clear-oidmaps" option to "pgpool" command. (Nozomi Anzai) 6448 If pgpool with memcached starts / restarts with -C option, discard oid 6449 maps, if not, it can reuse old oid maps and query caches. 6450 6451 ** Watchdog 6452 6453 The author is Atsushi Mitani, tested by Yugo Nagata. 6454 6455 Overview: 6456 6457 "Watchdog" is a sub process of pgpool-II aiming for adding high 6458 availability feature to it. Features added by watchdog include: 6459 6460 - Life checking of pgpool service 6461 6462 Watchdog monitors responses of pgpool service rather than process. It 6463 sends queries to PostgreSQL via pgpool which is being monitored by 6464 watchdog and watchdog checks the response. Also watchdog monitors 6465 connections to up stream servers (application servers etc.) from the 6466 pgpool. The connection between the up stream servers and the pgpool is 6467 monitored as service of pgpool. 6468 6469 - Mutual monitoring of watchdog processes 6470 6471 Watchdog processes exchange information on the monitored servers to 6472 keep the information up to date, and to allow watchdog processes to 6473 mutually monitor each other. 6474 6475 - Changing active/standby state in case of certain faults detected 6476 6477 When a fault is detected in the pgpool service, watchdog notifies the 6478 other watchdogs of it. Watchdogs decide the new active pgpool if 6479 previous active pgpool is broken by voting and change active/standby 6480 state. 6481 6482 - Automatic virtual IP address assigning synchronous to server switching 6483 6484 When a standby pgpool server promotes to active, the new active server 6485 brings up virtual IP interface. Meanwhile, the previous active server 6486 brings down the virtual IP interface. This enables the active pgpool to 6487 work using the same IP address even when servers is switched over. 6488 6489 - Automatic registration of a server as standby in recovery 6490 6491 When broken server recovers or new server is attached, the watchdog 6492 process notifies the other watchdog process along with information of 6493 the new server, and the watchdog process receives information on the 6494 active server and other servers. Then, the attached server is 6495 registered as standby. 6496 6497 New parameters: 6498 6499 - Add a parameter to enable watchdog: use_watchdog. (Atsushi Mitani) 6500 6501 - Add the parameters about life checking of pgpool service as follows: 6502 wd_interval,other_pgpool_port wd_life_point, wd_lifecheck_query, 6503 other_pgpool_hostname, other_pgpool_port. (Atsushi Mitani) 6504 6505 - Add the parameters about up to stream connection (e.g. to application 6506 servers) as follows: 6507 trusted_servers, ping_path. (Atsushi Mitani) 6508 6509 - Add the parameters about mutual monitoring of watchdog processes 6510 as follows: 6511 wd_hostname, wd_port, other_wd_port. (Atsushi Mitani) 6512 6513 - Add the parameters about virtual IP as follows: 6514 ifconfig_path, if_up_cmd, if_down_cmd, arping_path, arping_cmd. 6515 (Atsushi Mitani) 6516 6517 __________________________________________________________________ 6518 6519* Enhancements 6520 6521 - Retry if health check faied rather than immediately do failover. For 6522 this purpose new directives "health_check_max_retries" and 6523 "health_check_retry_delay" were added. (Tatsuo Ishii) 6524 Patch contributed by Matt Solnit. 6525 6526 Subject: [Pgpool-hackers] Health check retries (patch) 6527 From: Matt Solnit 6528 Date: Fri, 18 Nov 2011 16:28:44 -0500 6529 6530 - Log client IP and port number when pgpool failed to parse given query. 6531 (Tasuo) 6532 6533 This is usefull to identify which client gives wrong query without 6534 enabling log_connections, which produces too many log entries on busy web 6535 systems. 6536 6537 - Refactor pool_process_query(). (Tatsuo Ishii) 6538 6539 Deal with the case when: 6540 1) query not in progress 6541 2) other than master node has pending data. 6542 It is reported that pgpool goes into infinite loop in this case. 6543 6544 [pgpool-general: 43] 6545 Re: [Pgpool-general] seemingly hung pgpool process consuming 100% CPU 6546 http://www.pgpool.net/pipermail/pgpool-general/2011-December/000042.html 6547 6548 - Add "role" which represents "primary" or "standby" iin streaming 6549 replication mode for example to "SHOW pool_nodes" command.(Tatsuo Ishii) 6550 6551 - Add params to the result of "SHOW pool_status": backend_data_directory, 6552 ssl_ca_cert, ssl_ca_cert_dir, and sort by orders in pgpool.conf. (Anzai) 6553 6554 - Commentout params about system db from pgpool.conf.sample-*. (Nozomi Anzai) 6555 6556 - Add new parameter to failover/failback/followmaster command. (Tatsuo Ishii) 6557 6558 %r: new master port number 6559 %R: new master database cluster path 6560 6561 - Allow to reload to recognize md5 password change. (Tatsuo Ishii) 6562 Before, the only way to recognize md5 password change was restarting 6563 pgpool-II. Patch contributed by Gurjeet Singh. 6564 6565 - Remove unused parameter "query" from is_set_transaction_serializable(). 6566 (Tastuo Ishii) 6567 6568 - Fix on memory query cache section's comments in pgpool.com in the way 6569 which other sections employ. (Tastuo Ishii) 6570 6571 - Add missing health_check_max_retries and health_check_retry_delay 6572 directives to pgpool.conf.sample-master-slave, pgpool.conf.sample-replication 6573 pgpool.conf.sample-stream. (Tastuo Ishii) 6574 6575 - Fix pool_ssl_write. It seems someone forgot to do retrying when SSL 6576 returns SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE. 6577 Per [pgpool-general: 797] 6578 6579 [pgpool-general: 797] 6580 Re: Problem with pgpool when using SSL, for client/pgpool communication 6581 http://www.sraoss.jp/pipermail/pgpool-general/2012-July/000807.html 6582 6583 - Improve the design of manuals. (Nozomi Anzai) 6584 6585 __________________________________________________________________ 6586 6587* Bug Fix 6588 6589 - Fix memory leak in Raw mode.(Tatsuo Ishii) 6590 6591 - Fix failover/failback in Raw mode. (Tatsuo Ishii) 6592 - Simply does not failover if target node is not master. 6593 - Fail to select master node if the node is in CON_UP. 6594 6595 - Allow health check retry while connect(). (Tatsuo Ishii) 6596 6597 It is reported that connect() blocks sigalarm under some conditions, for 6598 example: When system is configured for security reasons not to return 6599 destination host unreachable messages ([pgpool-general: 131]) 6600 Part of changes are contributed by Stevo Slavic. 6601 6602 [pgpool-general: 131] Healthcheck timeout not always respected 6603 http://www.pgpool.net/pipermail/pgpool-general/2012-January/000131.html 6604 6605 - Fix pool_send_and_wait() to send or not to send COMMIT / ABORT depending 6606 on the transaction state on each node. (Tatsuo Ishii) 6607 6608 It is possible that only primary is in an explicit transaction but 6609 standby is not in it if multi statement query has been sent. 6610 Per bug report [pgpool-general-jp: 1049]. 6611 6612 - Fix load balance in Solaris. (Tatsuo Ishii) 6613 6614 Problem is, random() in using random() in Solaris results in strange 6615 load balancing calculation. 6616 Use srand()/rand() instead although they produce lesser quality random 6617 Problem reported at [pgpool-general: 396]. 6618 6619 [pgpool-general: 396] strange load balancing issue in Solaris 6620 http://www.pgpool.net/pipermail/pgpool-general/2012-April/000397.html 6621 6622 - Fix segfault of pcp_systemdb_info not in parallel mode. (Nozomi Anzai) 6623 6624 - Fix "unnamed prepared statment does not exist" error. (Tatsuo Ishii) 6625 6626 This is caused by pgpool's internal query, which breaks client's unnamed 6627 statements. To fix this, if extended query is used, named 6628 statement/portal for internal are used for internal query. 6629 6630 - Fix hangup when query conflict occurs in Hot-Standby mode. (Yugo Nagata) 6631 Query example to reproduce: 6632 6633 (S1) BEGIN; 6634 (S1) SELECT * FROM t; 6635 (S2) DELETE FROM t; 6636 (S2) VACUUM t; 6637 6638 - Fix pool_process_query() bug reported in [pgpool-general: 672]. 6639 (Tatsuo Ishii) 6640 6641 This is caused by the function waits for primary node which does not 6642 have pending data, while standbys have pending data. 6643 6644 [pgpool-general: 672] Transaction never finishes 6645 http://www.pgpool.net/pipermail/pgpool-general/2012-June/000676.html 6646 6647 - Fix wait_for_query_response() not to send param status to frontend if 6648 frontend is NULL. (Tatsuo Ishii) 6649 6650 This could happen while processing reset_query_list and occur crash. 6651 6652 - Fix bug with treatment of BEGIN TRANSACTION in master/slave mode. 6653 (Tatsuo Ishii) 6654 6655 Original complain is [pgpool-general: 714]. 6656 From 3.1, pgpool-II sends BEGIN.. to all DB nodes. Of course we cannot 6657 send BEGIN TRANSACTION READ WRITE to standby nodes. 6658 Problem is, we did not check BEGIN WORK ISOLATION LEVEL SERIALIZABLE; 6659 and sent to standby nodes. Of course this is wrong, since it's not 6660 allowed to run transactions in serializable mode on standby nodes. 6661 So added check for BEGIN WORK ISOLATION LEVEL SERIALIZABLE case. 6662 6663 [pgpool-general: 714] 6664 Load Balancing / Streaming Replication / Isolation Level serializable 6665 http://www.pgpool.net/pipermail/pgpool-general/2012-July/000719.html 6666 6667 - Fix send_to_where() to send the query to only primary if the it is like 6668 SET TRANSACTION ISOLATION LEVELSERIALIZABLE etc. (Tatsuo Ishii) 6669 6670 Case in streaming replication mode. Previously, it was sent to not only 6671 primary but also to standby and of course this causes an error. 6672 Similar SQLs are: 6673 SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL SERIALIZABLE or 6674 SET transaction_isolation TO 'serializable' 6675 SET default_transaction_isolation TO 'serializable' 6676 6677 Original complain is [pgpool-general: 715]. 6678 6679 [pgpool-general: 715] 6680 Re: Load Balancing / Streaming Replication / Isolation Level serializable 6681 http://www.pgpool.net/pipermail/pgpool-general/2012-July/000720.html 6682 6683 - Prevent errors even if memcached is not available with on memory query 6684 cache enabled and cache storage is memcached. (Tatsuo Ishii) 6685 6686 This is mainly achieved by modifying pool_fetch_cache to pretend 6687 "cache not found" if memcached_get returns error other than 6688 MEMCACHED_NOTFOUND. Also we set pool_config->memory_cache_enabled to 0 to 6689 prevent future errors by accessing memcached. 6690 6691 - Run rerun libtoolize with --copy and --force option. (Tatsuo Ishii) 6692 6693 This should prevent build problems in different environment. 6694 Following commands were executed: 6695 libtoolize --copy --force 6696 aclocal 6697 autoheader 6698 automake -a 6699 autoconf 6700 6701 - Fix pool_ssl_read. (Tatsuo Ishii) 6702 6703 When SSL_read returns unknown error, treat as if EOF detected and returns 0 6704 to caller (pool_read). This is same as libpq's behavior. Also this will 6705 avoid unwanted failover in pool_read. pool_read triggers failover if 6706 underlying I/O functions, read(2) or pool_ssl_read returns -1. 6707 6708 - Fix pool_process_query. (Tatsuo Ishii) 6709 6710 When other than primary sends packet, pgpool tries to terminate session 6711 gracefully and hung because now ssl_read returns EOF, rather than error 6712 and triggers failover. For example [pgpool-general: 766] reported this: 6713 6714 2012-07-17 00:11:03 NZST [15692]: [257-1] ERROR: canceling statement 6715 due to conflict with recovery 6716 2012-07-17 00:11:03 NZST [15692]: [258-1] DETAIL: User query might 6717 have needed to see row versions that must be removed. 6718 2012-07-17 00:11:03 NZST [15692]: [259-1] STATEMENT: <SNIP> 6719 2012-07-17 00:11:03 NZST [15696]: [366-1] FATAL: terminating 6720 connection due to conflict with recovery 6721 2012-07-17 00:11:03 NZST [15696]: [367-1] DETAIL: User query might 6722 have needed to see row versions that must be removed. 6723 6724 In this case pool_process_query should return POOL_ERROR, rather than 6725 POOL_END. 6726 6727 [pgpool-general: 766] 6728 Re: pgpool dropping backends too much 6729 http://www.pgpool.net/pipermail/pgpool-general/2012-July/000774.html 6730 6731 - If frontend terminates while reading large number of query results 6732 from backend, pgpool continues to read from backend and write to 6733 frontend until all query results consumued. (Tatsuo Ishii) 6734 6735 This will take very long time if query results is huge. To finish pgpool 6736 session as soon as possible, modify pool_flush_it to returns error if 6737 fail to write to frontend when operated in other than replication mode. 6738 In replication mode, we need to keep the previous behavior to save 6739 consistency among backends). 6740 6741 Also fix SimpleForwardToFrontend to return pool_write_and_flush error 6742 status. Before it was ignored. 6743 6744 6745=============================================================================== 67463.1 Series (2011/09/08 - ) 6747=============================================================================== 6748 6749 3.1.20 (hatsuiboshi) 2016/08/31 6750 6751* Version 3.1.20 6752 6753 This is a bugfix release against pgpool-II 3.1.19. 6754 6755 __________________________________________________________________ 6756 6757* Bug fixes 6758 6759 - Fix buffer over run problem in "show pool_nodes". (Tatsuo Ishii) 6760 6761 While processing "show pool_nodes", the buffer for hostname was too 6762 short. It should be same size as the buffer used for pgpool.conf. 6763 Problem reported by a twitter user who is using pgpool on AWS (which 6764 could have very long hostname). 6765 6766 - Fix usage of wait(2) in pgpool main process. (Tatsuo Ishii) 6767 6768 The usage of wait(2) in pgpool main could cause infinite wait in the 6769 system call. Solution is, to use waitpid(2) instead of wait(2). 6770 6771 - Fix "kind mismatch" error message in pgpool. (Muhammad Usama) 6772 6773 Many of "kind mismatch..." errors are caused by notice/warning 6774 messages produced by one or more of the DB nodes. In this case now 6775 Pgpool-II forwards the messages to frontend, rather than throwing the 6776 "kind mismatch..." error. This would reduce the chance of "kind 6777 mismatch..." errors. 6778 6779 See [pgpool-hackers: 1501] for more details. 6780 6781 - Replace "MAJOR" macro to prevent occasional failure. (Tatsuo Ishii) 6782 6783 The macro calls pool_virtual_master_db_node_id() and then access 6784 backend->slots[id]->con using the node id returned. In rare cases, it 6785 could point to 0 (in case when the DB node is not connected), which 6786 gives access to con->major, then it causes a segfault. 6787 6788 See bug 225 for related info. 6789 6790 - doc : fix Japanese document typo. (Bo Peng) 6791 6792 - Fixing a typo in the log message. (Muhammad Usama) 6793 6794 - doc : Add comment to the document about connection_cache. (Tatsuo Ishii) 6795 6796=============================================================================== 6797 6798 3.1.19 (hatsuiboshi) 2016/06/17 6799 6800* Version 3.1.19 6801 6802 This is a bugfix release against pgpool-II 3.1.18. 6803 6804 __________________________________________________________________ 6805 6806* Bug fixes 6807 6808 - Fix is_set_transaction_serializable() when 6809 SET default_transaction_isolation TO 'serializable'. (Bo Peng) 6810 6811 SET default_transaction_isolation TO 'serializable' is sent to 6812 not only primary but also to standby server in streaming replication mode, 6813 and this causes an error. Fix is, in streaming replication mode, 6814 SET default_transaction_isolation TO 'serializable' is sent only to the 6815 primary server. 6816 6817 See bug 191 for related info. 6818 6819 - Fix Chinese documetation bug about raw mode (Yugo Nagata, Bo Peng) 6820 Connection pool is avalilable in raw mode. 6821 6822 - Fix confusing comments in pgpool.conf (Tatsuo Ishii) 6823 6824 - Permit pgpool to support multiple SSL cipher protocols (Muhammad Usama) 6825 6826 Currently TLSv1_method() is used to initialize the SSL context, that puts an 6827 unnecessary limitation to allow only TLSv1 protocol for SSL communication. 6828 While postgreSQL supports other ciphers protocols as well. The commit changes 6829 the above and initializes the SSLSession using the SSLv23_method() 6830 (same is also used by PostgreSQL). Because it can negotiate the use of the 6831 highest mutually supported protocol version and remove the limitation of one 6832 specific protocol version. 6833 6834 - If statement timeout is enabled on backend and do_query() sends a (Tatsuo Ishii) 6835 query to primary node, and all of following user queries are sent to 6836 standby, it is possible that the next command, for example END, could 6837 cause a statement timeout error on the primary, and a kind mismatch 6838 error on pgpool-II is raised. 6839 6840 This fix tries to mitigate the problem by sending sync message instead 6841 of flush message in do_query(), expecting that the sync message reset 6842 the statement timeout timer if we are in an explicit transaction. We 6843 cannot use this technique for implicit transaction case, because the 6844 sync message removes the unnamed portal if there's any. 6845 6846 Plus, pg_stat_statement will no longer show the query issued by 6847 do_query() as "running". 6848 6849 See bug 194 for related info. 6850 6851 - Deal with the case when the primary is not node 0 in streaming replication mode. (Tatsuo Ishii) 6852 6853 http://www.pgpool.net/mantisbt/view.php?id=194#c837 reported that if 6854 primary is not node 0, then statement timeout could occur even after 6855 bug194-3.3.diff was applied. After some investigation, it appeared 6856 that MASTER macro could return other than primary or load balance 6857 node, which was not supposed to happen, thus do_query() sends queries 6858 to wrong node (this is not clear from the report but I confirmed it in 6859 my investigation). 6860 6861 pool_virtual_master_db_node_id(), which is called in MASTER macro 6862 returns query_context->virtual_master_node_id if query context 6863 exists. This could return wrong node if the variable has not been set 6864 yet. To fix this, the function is modified: if the variable is not 6865 either load balance node or primary node, the primary node id is 6866 returned. 6867 6868 - change the Makefile under the directory src/sql/, that is proposed (Bo Peng) 6869 by [pgpool-hackers: 1611] 6870 6871 - Fix a posible hang during health checking (Yugo Nagata) 6872 6873 Helath checking was hang when any data wasn't sent 6874 from backend after connect(2) succeeded. To fix this, 6875 pool_check_fd() returns 1 when select(2) exits with 6876 EINTR due to SIGALRM while health checkking is performed. 6877 6878 Reported and patch provided by harukat and some modification 6879 by Yugo. Per bug #204. 6880 6881 backported from 3.4 or later; 6882 https://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=ed9f2900f1b611f5cfd52e8f758c3616861e60c0 6883 6884 - Fix bug with load balance node id info on shmem (Tatsuo Ishii) 6885 6886 There are few places where the load balance node was mistakenly put on 6887 wrong place. It should be placed on: ConnectionInfo *con_info[child 6888 id, connection pool_id, backend id].load_balancing_node]. In fact it 6889 was placed on: *con_info[child id, connection pool_id, 6890 0].load_balancing_node]. 6891 6892 As long as the backend id in question is 0, it is ok. However while 6893 testing pgpool-II 3.6's enhancement regarding failover, if primary 6894 node is 1 (which is the load balance node) and standby is 0, a client 6895 connecting to node 1 is disconnected when failover happens on node 6896 0. This is unexpected and the bug was revealed. 6897 6898 It seems the bug was there since long time ago but it had not found 6899 until today by the reason above. 6900 6901=============================================================================== 6902 6903 3.1.18 (hatsuiboshi) 2016/04/26 6904 6905* Version 3.1.18 6906 6907 This is a bugfix release against pgpool-II 3.1.17. 6908 6909 __________________________________________________________________ 6910 6911* Bug fixes 6912 6913 - Removing the limit on the maximum number of items in the 6914 black_function_list and white_function_list lists. (Muhammad Usama) 6915 6916 extract_string_tokens in pool_config uses the fixed size malloc on 6917 the array to hold the black_function_list/white_function_list items. 6918 This imposes a limit of maximum items in these lists. 6919 The fix is to use realloc to increase the array size when it gets full. 6920 6921 - Redirect all user queries to primary server (Tatsuo Ishii) 6922 6923 Up to now some user queries are sent to other than the primary server 6924 even if load_balance_mode = off. This commit changes the behavior: if 6925 load_balance_mode = off in streaming replication mode, now all the 6926 user queries are sent to the primary server only. 6927 6928 Per bug #189. 6929 6930 - Change the PID length of pcp_proc_count command result to 6 characters 6931 long (Bo Peng) 6932 6933 If the pgpool process ID are over 5 characters, the 6th character of each 6934 process ID will be removed. This commit changes the process ID length of 6935 pcp_proc_count command result to 6 characters long. 6936 6937 Per bug #188. 6938 6939=============================================================================== 6940 6941 3.1.17 (hatsuiboshi) 2016/04/04 6942 6943* Version 3.1.17 6944 6945 This is a bugfix release against pgpool-II 3.1.16. 6946 6947 __________________________________________________________________ 6948 6949* Bug fixes 6950 6951 - doc: Change description of backend_flag (Tatsuo Ishii) 6952 6953 It is pointed out that restarting pgpool-II is not necessary. 6954 6955 Per [pgpool-general-jp: 1394]. 6956 6957 - doc: Fix installation procedure. (Tatsuo Ishii) 6958 6959 With PostgreSQL 9.4 or later, installing pgpool_regclass is not needed. 6960 6961 - Fix to validate the PCP packet length (Muhammad Usama) 6962 6963 Without the validation check, a malformed PCP packet can crash the 6964 PCP child and/or can run the server out of memory by sending the packet 6965 with a very large data size. 6966 6967 - Fix a reset query stuck problem (Muhammad Usama) 6968 6969 The solution is to return POOL_END_WITH_FRONTEND_ERROR instead of 6970 POOL_END when pool_flush on front-end socket fails. 6971 6972 The original report is 6973 [pgpool-general: 4265] Pgpool - connection hangs in DISCARD ALL 6974 6975=============================================================================== 6976 6977 3.1.16 (hatsuiboshi) 2016/02/05 6978 6979* Version 3.1.16 6980 6981 This is a bugfix release against pgpool-II 3.1.15. 6982 6983 __________________________________________________________________ 6984 6985* Bug fixes 6986 6987 - doc: Fix misinformation regarding load balancing in docs (Tatsuo Ishii) 6988 6989 In streaming replication mode, DECLARE, FETCH, CLOSE and SHOW are sent 6990 to primary node only. Pointed out in [pgpool-general-jp: 1378]. 6991 6992 - Issue fsync() when writing pgpool_status (Tatsuo Ishii) 6993 6994 This ensures that pgpool_status is saved to permanent storage and 6995 allow to survive after system crash. 6996 6997 - doc: Fix wrong description about log_standby_delay in the document 6998 (Yugo Nagata) 6999 7000 - Fix bug with "SET TRANSACTION READ ONLY" (Tatsuo Ishii) 7001 7002 Pgpool-II remembers that non read only queries (including SET) were 7003 executed in an explicit transaction and adds a "writing transaction" 7004 mark to the transaction. The mark affects the query routing behavior 7005 of pgpool-II while running in streaming replication mode. Pgpool-II 7006 starts sending queries to the primary after the mark is set. Because 7007 the effect of writing queries may appear on standbys after some delay 7008 in streaming replication mode, it is safer to route read queries to 7009 the primary after the mark is set. 7010 7011 However there's oversight here. "SET TRANSACTION READ ONLY" does no 7012 data modification and should be treated as an exception. 7013 7014 Per bug #157. 7015 7016 - Fix FATAL error with reloading (Tatsuo Ishii) 7017 7018 While reloading pgpool.conf, the number of DB nodes is tentatively set 7019 to 0, then counted up until reaching to the actual number of backends 7020 by the pgpool main process. Unfortunately the variable was on the 7021 shared memory and it confused pgpool child process when they were using 7022 the variable and this caused FATAL error. 7023 7024 Per bug #156 report by harukat. 7025 7026 - Ignore close statement/portal request if they do not exist (Tatsuo Ishii) 7027 7028 In this case just returns a close complete message to client. 7029 This is a back port of the following commit from pgpool-II 3.4: 7030 7031 1a37e1c35bd8b6f10f524693bbcb7b51f73b4bf0 7032 7033=============================================================================== 7034 7035 3.1.15 (hatsuiboshi) 2015/07/24 7036 7037* Version 3.1.15 7038 7039 This is a bugfix release against pgpool-II 3.1.14. 7040 7041 __________________________________________________________________ 7042 7043* Bug fixes 7044 7045 - Fix "cannot find xlog functions" error in pgpool-recovery 7046 (Muhammad Usama) 7047 7048 The argument data type of PostgreSQL's pg_xlogfile_name() function 7049 has been changed from text to pg_lsn since PostgreSQL 9.4. And 7050 pgpool-recovery was still trying to locate the function by old 7051 signature. 7052 7053 - Do not send a query for checking insert lock in non replication mode 7054 with extended query (Tatsuo Ishii) 7055 7056=============================================================================== 7057 7058 3.1.14 (hatsuiboshi) 2015/04/08 7059 7060* Version 3.1.14 7061 7062 This is a bugfix release against pgpool-II 3.1.13. 7063 7064 __________________________________________________________________ 7065 7066* Bug fixes 7067 7068 - Enlarge POOLCONFIG_MAXDESCLEN to 80 (Tatsuo Ishii) 7069 7070 This is used in show pool_status command and limits the length of 7071 parameter description. Unfortunately recovery_timeout description is 7072 64 chars, which is 1 byte longer than former definition of the macro. 7073 7074 - Support SSL certificate chains in the certificate file for incoming 7075 frontend connections (Muhammad Usama) 7076 7077 - Fix a problem with pcp_detach_node about graceful node detach (Muhammad Usama) 7078 7079 When graceful node detach is requested gracefully, pcp_detach_node should 7080 check if it is allowed to process detach_node command on the particular 7081 node before blocking the incoming connections and closing the existing 7082 connections. 7083 7084=============================================================================== 7085 7086 3.1.13 (hatsuiboshi) 2015/02/05 7087 7088* Version 3.1.13 7089 7090 This is a bugfix release against pgpool-II 3.1.12. 7091 7092 __________________________________________________________________ 7093 7094* Bug fixes 7095 7096 - doc: Describe explicitly that the number of slave nodes is not 7097 necessarily 1 (Tatsuo Ishii) 7098 7099 - Fix uninitialized variable (Tatsuo Ishii) 7100 7101 Per Coverity 1234603. 7102 7103 - doc: Fix missing release note entries in the previous release 7104 (Tatsuo Ishii) 7105 7106 - Fix node id range check bug in trigger_failover_command(). (Tatsuo Ishii) 7107 7108 The node id should be lower than NUM_BACKENDS. Probably harmless since 7109 callers never pass node ids greater or equal to NUM_BACKENDS. 7110 7111 - Fix to disable debug mode by reloading config (Yugo Nagata) 7112 7113 Per bug #114 7114 http://www.pgpool.net/mantisbt/view.php?id=114 7115 7116=============================================================================== 7117 7118 3.1.12 (hatsuiboshi) 2014/09/05 7119 7120* Version 3.1.12 7121 7122 This is a bugfix release against pgpool-II 3.1.11. 7123 7124 __________________________________________________________________ 7125 7126* Bug fixes 7127 7128 - Fix a typo of pgpool.spec (Yugo Nagata) 7129 7130 - Fix bug that worker child process keeps failing when there's no 7131 primary backend (Tatsuo Ishii) 7132 7133 Problem identified and fix contributed by Junegunn Choi. 7134 7135 See [pgpool-hackers: 471] for more details. 7136 7137 - Close listen socket when smart shutdown request is made (Tatsuo Ishii) 7138 7139 When smart shutdown process starts, pgpool children still listen on 7140 the port and clients can send further connection requests which fail 7141 in the end. Which is not only waste of time, but also prevents a load 7142 balancer which sits in front of pgpool from realizing the pgpool is 7143 going down. 7144 7145 Problem analyzed and patch provided by Junegunn Choi in [pgpool-hackers 7146 474], and enhanced to take care not only inet domain socket but UNIX 7147 domain socket by Tatsuo Ishii. 7148 7149 - doc: Add cautions that recovery commands are killed by statement_timeout 7150 of PostgreSQL. (Tatsuo Ishii) 7151 7152 - doc: Remove old restriction description which is no longer true 7153 (Tatsuo Ishii) 7154 7155 - Fix return type of text_to_lsn() function (Yugo Nagata) 7156 7157 This caused compile warning. 7158 7159 - Fix file descriptor leak when daemonize. (Tatsuo Ishii) 7160 7161 Per Coverity 1111471. 7162 7163 - Fix memory leak. (Tatsuo Ishii) 7164 7165 Per Coverity 1111442. 7166 7167 - Fix pgpool.init's long-standing bug of stop/restart failure 7168 (Yugo Nagata) 7169 7170 In previous, pgpool.init uses killproc for stopping pgpool, but there 7171 are several problems. In the new version, "pgpool -m fast stop" is 7172 used in stop command. 7173 7174 Original patch contributed by Ryan DeShone and modified by Yugo Nagata. 7175 7176 See [pgpool-hackers: 239][pgpool-hackers: 512]. 7177 7178 - Disbale statement_timeout of PostgreSQL while executing online recovery 7179 (Tatsuo Ishii) 7180 7181 Online recovery may take very long time and user may enable statement 7182 timeout. To prevent online recovery canceled by statement timeout, 7183 disable statement timeout in the connection used by online recovery. 7184 7185 See [pgpool-general: 2919] for more details. 7186 7187 - Remove unnecessary call to pool_shmem_exit() which removes semaphore 7188 when it shouldn't (Tatsuo Ishii) 7189 7190 exit_handler checks if the process is parent or not. This is 7191 good. However, even if it is a child process, it calls 7192 pool_shmem_exit() which removes semaphore and shmem when it should 7193 not. It should be called only from parent process. 7194 7195 Per bug #102. 7196 http://www.pgpool.net/mantisbt/view.php?id=102 7197 7198 - Fix reset query stuck problem. (Tatsuo Ishii) 7199 7200 It is reported that reset query (DISCARD ALL etc.) occasionally does 7201 not finish and pgpool child remain waiting for reply from backend thus 7202 client cannot connect to pgpool. 7203 7204 The cause of problem is not identified yet but if client suddenly 7205 closes connection to pgpool in the middle of query processing, backend 7206 may not accept the reset queries because they are not ready for query. 7207 7208 The fix is, if frontend closes connection in unexpected way, query 7209 process loop immediately returns with new state: 7210 POOL_END_WITH_FRONTEND_ERROR and pgpool closes connection to 7211 PostgreSQL then goes back to new connection request waiting loop. 7212 7213 Also, pgpool closes connections to backend when client_idle_limit is 7214 set and the idle limit. 7215 7216 Per bug #107. 7217 http://www.pgpool.net/mantisbt/view.php?id=107 7218 7219=============================================================================== 7220 7221 3.1.11 (hatsuiboshi) 2014/03/24 7222 7223* Version 3.1.11 7224 7225 This is a bugfix release against pgpool-II 3.1.10. 7226 7227 __________________________________________________________________ 7228 7229* Bug fixes 7230 7231 - doc: Add mention about "listen queue" and how to increase the "backlog" 7232 in the num_init_children section. (Tatsuo Ishii) 7233 7234 - Fix bad performance of unlogged tables detection code. (Tatsuo Ishii) 7235 7236 Pointed out at [pgpool-hackers: 435][[pgpool-general:2325]. 7237 7238 - Fix primary node detection logic. (Tatsuo Ishii) 7239 7240 There's a possibility that primary node is not detected. This happens 7241 in following situation. node 0: primary, node 1: standby. Node 0 goes 7242 down. Health checking detects the fact but local status is not updated 7243 yet. Primary node finding (find_primary_node) runs. Node 0's status is 7244 yet healthy. Because find_primary_node fails to connect to node 0, it 7245 immediately returns -1 and fails to find that fact that node 1 is now 7246 primary. 7247 7248 Fix is just continuing to look for primary node when fails to connect 7249 to a node. 7250 7251 Per [pgpool-general: 2409]. 7252 7253 - Fix jdbc DML fails when operated in raw mode and auto commit is off. 7254 (Tatsuo Ishii) 7255 7256 This is reported in bug #92. 7257 7258 - Avoid to send queries to unrelated nodes in streaming replication mode. 7259 (Tatsuo Ishii) 7260 7261 Pgpool-II sends certain queries, such as BEGIN, END and SET commands to 7262 all of DB nodes. However in streaming replication mode, only primary 7263 node and at most one standby node are only concerned (if primacy node 7264 is selected as the load balance node, only 1 node is concerned). 7265 7266 See [pgpool-hackers: 464] for more details. 7267 7268 - Fix possible buffer overrun problem and memory leak. (Tatsuo Ishii) 7269 7270 Per Coverity 1111465 and 1111482. 7271 7272 - Fix possible buffer overrun. (Tatsuo Ishii) 7273 7274 Replace strcpy() with strlcpy(). Per Coverity report 1111478, 1111480, 7275 1111481. 7276 7277 - Fix freeing NULL. (Tatsuo Ishii) 7278 7279 Per Coverity 1111384. 7280 7281 - Fix memory leak. (Tatsuo Ishii) 7282 7283 Per Coverity 1111446. 7284 7285 - Fix a segmentation fault in parallel mode with system_db_hostname is 7286 empty (Yugo Nagata) 7287 7288 - Fix to output debug messages in processing pgpool.conf with -d option 7289 (Yugo Nagata) 7290 7291 Previously, some debug messages in pool_get_config() ware not output 7292 even when -d option was used. 7293 7294 - Fix JDBC exception of prepared statement including now() in 7295 replication mode (Yugo Nagata) 7296 7297 With JDBC, when a prepared statement is executed more than 7298 PrepareThreshold times, the statement is named and Describe message 7299 is sent after Parse. With named statement, pgpool rewrite now() to 7300 parameter in replication mode. Hence, rewritten query has additonal 7301 parameter than original. In this case, ParameterDescription message 7302 sent to frontend (response of Describe) should include OIDs of the 7303 same number os original query's parameters. Otherwize, JDBC throws 7304 ArrayIndexoutOfBoundsException. 7305 7306 This is reported in [pgpool-general-jp: 1192]. 7307 7308 - Fix backend error of prepared statement about table which has column whoes 7309 default value is now() in replication mode (Yugo Nagata) 7310 7311 When pgpool parses a named prepared statement with default now(), 7312 timestamps are replaced to additional parameters. So, Bind message also 7313 should inclued additional parameter format codes. However, when the 7314 number of original parameter was one, pgpool didn't handle this. This 7315 caused a error like "incorrect binary data format in bind parameter 2". 7316 7317 - doc: Add description about parallel mode doesn't support PREPARE (Yugo Nagata) 7318 7319 Per bug #93 7320 7321=============================================================================== 7322 7323 3.1.10 (hatsuiboshi) 2013/12/06 7324 7325* Version 3.1.10 7326 7327 This is a bugfix release against pgpool-II 3.1.9. 7328 7329 __________________________________________________________________ 7330 7331* Bug fixes 7332 7333 - Fix incorrect time stamp rewriting in replication mode for certain time 7334 zones. (Tatsuo Ishii) 7335 7336 Time stamp rewriting calls "SELECT now()" to get current time. 7337 Unfortunately the buffer for the current time is too small for certain 7338 time zones such as "02:30". Note that non-30-minutes-time-zone such as 7339 "0900" does not reveal the problem. This explains why we haven't the bug 7340 report until today. 7341 7342 Bug reported in [pgpool-general: 2113] and fix provided by Sean Hogan. 7343 http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002142.html 7344 7345 - Makefile: Replace pg_config by $(PG_CONFIG) in Makefiles so it can be 7346 overridden at build time when compiling for different PG major versions. 7347 (Tatsuo Ishii) 7348 7349 Patch contributed by Christoph Berg ([pgpool-general: 2127]). 7350 http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002156.html 7351 7352 - configure: Remove -lcompat because it confuses FreeBSD per bug#15. 7353 (Tatsuo Ishii) 7354 http://www.pgpool.net/mantisbt/view.php?id=15 7355 7356 - Fix segfault when pgpool.conf does not set log_standby_delay. 7357 (Tatsuo Ishii) 7358 7359 This is caused by wrong initialization for log_standby_delay in 7360 pool_config.l. 7361 Per bug#74. http://www.pgpool.net/mantisbt/view.php?id=74 7362 7363 - doc: Modify descriptions about restrictions of parallel mode 7364 Muliple rows INSERT using VALUES are not supported in parallel mode. 7365 (Yugo Nagata) 7366 7367 - Avoid calling find_primary_node_repeatedly() when standby node goes 7368 down. (Tatsuo Ishii) 7369 7370 This will reduce the time to failover. Per bug #75, patch modified by 7371 Tatsuo Ishii. http://www.pgpool.net/mantisbt/view.php?id=75 7372 7373 - Fix data inconsistency problem with native replication mode + extended 7374 protocol case. (Tatsuo Ishii) 7375 7376 It is reported that concurrent INSERT using JDBC driver causes data 7377 difference among database node. This only happens following conditions 7378 are all met: 7379 7380 1) Native replication mode 7381 2) Extended protocol used 7382 3) The portal created by parse message is reused by bind message 7383 4) autocommit is on 7384 5) SERIAL (sequence) is used 7385 7386 Pgpool-II's parse message function knows it has to lock the target 7387 table when INSERT (plus #5) is issued by clients. Unfortunately bind 7388 message function did not know it. Once parse/bind/execute finishes, 7389 pgpool releases the lock obtained by parse because of #4. JDBC wants 7390 to reuse the portal and starts the cycle from bind message, which does 7391 not obtain lock. As as result, lock-free INSERT are floating around 7392 which causes data inconsistency of course. The solution is, lock the 7393 table in bind phase. 7394 7395 For this bind needs to issue LOCK in extended protocol. This was a little 7396 bit hard because the module (do_command()) to issue internal SQL command 7397 (other than SELECT) does not support extended protocol. 7398 To solve the problem do_query() is modified so that it accepts other than 7399 SELECT because it already accepts extended protocol. 7400 The modification is minimum and is only tested for the case called from 7401 insert_lock(). I do not recommend to replace every occurrence of 7402 do_command () with do_query() at this point. 7403 7404 BTW the reason why the bug is not reported is, most users uses JDBC 7405 with auto commit = off. In this case, the lock obtained by parse persists 7406 until user explicitly issues commit or rollback. 7407 7408 Per bug report by Steve Kuekes in [pgpool-general: 2142]. 7409 http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002171.html 7410 7411 - Fix error message in read_password_packet(). (Tatsuo Ishii) 7412 7413 - Fix memory leak when do_query() fails in timestamp rewriting. 7414 (Tatsuo Ishii) 7415 7416 For this purpose free_select_result() is changed to accept NULL argument. 7417 Per Coverity report "1111454, 1111455 Resource leak". 7418 7419 - Fix target node selection logic when "DEALLOCATE portal|statement". 7420 (Tatsuo Ishii) 7421 7422 When "DEALLOCATE portal|statement" is used and last prepared statement or 7423 portal was not found, target node selection map is not set. Probably this 7424 is not actually harmful because prepared statement or portal was not found 7425 is an error case. The bug was there since day 0. 7426 7427 Per Coverity report "1111491 Structurally dead code". 7428 7429 - Fix range check bug of MAX_NUM_BACKENDS in corner case. (Tatsuo Ishii) 7430 7431 MAX_NUM_BACKENDS is the allowed max number of DB nodes (128, at this 7432 point). In reality, probably no one ever tried more than 128 DB nodes 7433 and that's the reason why nobody noticed. 7434 7435 Per Coverity report "1111429, 1111430 and 1111431 Out-of-bounds write". 7436 7437 - Fix that the script forgets to allow public access to pgpool_catalog. 7438 (Tatsuo Ishii) 7439 7440 The bug prevents inserting data into user tables if pgpool_catalog is 7441 created in native replication mode. The bug was there from day 1. I 7442 wonder why nobody noticed until today. 7443 Per [pgpool-general-jp: 1229]. 7444 http://www.sraoss.jp/pipermail/pgpool-general-jp/2013-November/001228.html 7445 7446 - Fix uninitialized variable in error case in pool_do_auth(). 7447 (Tatsuo Ishii) 7448 7449 If there's no valid backend, pgpool will return garbage pid to frontend in 7450 auth phase. Actually because no backend is available, frontend will be 7451 disconnected later on. So this is not harmless. 7452 Per Coverity report "1127331 Uninitialized scalar variable". 7453 7454 - Fix to add node id range check when issue an error message using node 7455 id. (Tatsuo Ishii) 7456 Per Coverity report #1111433 "Out-of-bounds read". 7457 7458 - Fix buffer overrun bug and resource leak bug of parse_copy_data(). 7459 (Tatsuo Ishii) 7460 Per Coverity report 1111427 "Out-of-bounds write" and 1111453 "Resource 7461 leak". 7462 7463 - Fix possible segfault in CopyDataRaws(). (Tatsuo Ishii) 7464 Coverity pointed out that if pool_get_id() returns an error, VALID_BACKEND 7465 will access out of array. 7466 Per Coverity report 1111413 "Memory - illegal accesses". 7467 7468 - Fix resource leak in make_persistent_db_connection. (Tatsio Ishii) 7469 7470 For this pupose, new static function free_persisten_db_connection_memory 7471 is added. 7472 Per Coverity report #1111468. 7473 7474=============================================================================== 7475 7476 3.1.9 (hatsuiboshi) 2013/09/06 7477 7478* Version 3.1.9 7479 7480 This is a bugfix release against pgpool-II 3.1.8. 7481 7482 __________________________________________________________________ 7483 7484* Bug fixes 7485 7486 - Fix a mistake in ssh command of doc/basebackup.sh (Tatsuo Ishii) 7487 7488 - Fix a bug in parsing prepared statements with transaction handling in 7489 replication mode (Tatsuo Ishii) 7490 7491 Parse() automatically starts a transaction for non SELECT query to keep 7492 consistency among nodes in replication mode. But this wasn't closed. If 7493 wrong query comes in, the transaction goes into an abort state but pgpool 7494 does not close the transaction. Thus next query causes error because the 7495 transaction is still in abort status. 7496 7497 This problem was reported in [pgpool-general: 1877] by Sean Hogan. 7498 7499 [pgpool-general: 1877] current transaction is aborted, commands ignored 7500 http://www.sraoss.jp/pipermail/pgpool-general/2013-July/001905.html 7501 7502 - Fix typos of the japanese document (Yugo Nagata) 7503 7504=============================================================================== 7505 7506 3.1.8 (hatsuiboshi) 2013/07/10 7507 7508* Version 3.1.8 7509 7510 This is a bugfix release against pgpool-II 3.1.7. 7511 7512 __________________________________________________________________ 7513 7514* Bug fixes 7515 7516 - Add mention about "-D" option to the man page. (Tatsuo Ishii) 7517 7518 - Consider timeout waiting for compeletion of failback request in on line 7519 recovery (Tatsuo Ishii) 7520 7521 This will prevent the situation that recovery operation continues forever 7522 and we cannot even shutdown pgpool-II main process. This could happen 7523 especially while executing follow master command. 7524 7525 - Fix a bug that %H of follow_master_command is not assigned correctly the 7526 new primary node in stream replication mode 7527 (Tatsuo Ishii) 7528 7529 - Fix do_query() to not hang when PostgreSQL returns an error 7530 (Tatsuo Ishii) 7531 7532 The typical symptom is "I see SELECT is keep on running according to 7533 pg_stat_activity". To fix this pgpool-II just exits the process and 7534 kill the existig connection. This is not gentle but at this point I 7535 believe this is the best solution. 7536 7537 - Fix bug with do_query which causes hung in extended protocol 7538 (Tatsuo Ishii) 7539 7540 This problem could occur when insert lock is enabled and 7541 pgpool_catalog.insert_lock exists, See [pgpool-general: 1684] for more 7542 details. 7543 7544 [pgpool-general: 1684] insert_lock hangs 7545 http://www.sraoss.jp/pipermail/pgpool-general/2013-May/001711.html 7546 7547 - Fix unnecessary degeneration caused by error on commit (Tatsuo Ishii) 7548 7549 In master slave mode, if master gets an error at commit, while other 7550 slaves are normal at commit, we don't need to degenrate any backend 7551 because it is likely that the "kind mismatch error" was caused by a 7552 deferred trigger. 7553 7554 - Fix to register pgpool_regclass in pg_catalog schema (Tatsuo Ishii) 7555 7556 This is necessary to deal with clients which restricts schema search path 7557 to pg_catalog only. Postgres_fdw is such a client. 7558 7559 - Fix a potential crash in pg_md5 command (Muhammad Usama) 7560 7561 - Fix a segmentation fault of a child process that occurs when a startup 7562 packet has no PostgreSQL user information (Yugo Nagata) 7563 7564 You can reproduce it by 7565 7566 $ psql -p 9999 -U '' 7567 7568 If enable_pool_hba is on, a child process terminates by segmentation 7569 fault. Otherwise if enable_pool_hba is off, the error message is 7570 7571 ERROR: pool_discard_cp: cannot get connection pool for user (null) 7572 database (null) 7573 7574 In both cases, psql terminates with no message on frontend. 7575 7576 In the fixed version, if PostgreSQL user is not specified in startup packet, 7577 the message as following is output to both log and frontend. This is 7578 the same behavior as PostgreSQL. 7579 7580 FATAL: no PostgreSQL user name specified in startup packet 7581 7582 - Move ssl_ca_cert and ssl_ca_cert_dir descriptions to the SSL section 7583 (Yugo Nagata) 7584 7585 - Add ssl_ca_cert and ssl_ca_cert_dir descriptions to the japanese document 7586 (Yugo Nagata) 7587 7588 - Fix to verify the backend node number in pcp_recovery_node (Yugo Nagata) 7589 7590 When an invalid number is used, null value is passed as an arguments 7591 of recovery script, and this causes a malfunction. In especially, 7592 rsync may delete unrelated files in basebackup scripts. 7593 7594=============================================================================== 7595 7596 3.1.7 (hatsuiboshi) 2013/4/26 7597 7598* Version 3.1.7 7599 7600 This is a bugfix release against pgpool-II 3.1.6 7601 7602 __________________________________________________________________ 7603 7604* Bug fixes 7605 7606 - Fix to show pool_passwd in "SHOW pool_status". (Yugo Nagata) 7607 7608 - Fix long standing bug with timestamp rewriting code for processing 7609 extended protocol. (Tatsuo Ishii) 7610 7611 Parse() allocate memory using palloc() while rewriting the parse 7612 message. Problem is, the rewritten message was kept in the data which 7613 is managed by pool_create_sent_message() etc. The function assumes 7614 that all the data is in session context memory. However, palloc() 7615 allocates memory in query context of course, and gets freeed later on 7616 when the query context disappears. And the function tries to free the 7617 memory as well, which causes various problems, including segfault and 7618 double free. To fix this, memory to store rewritten message is 7619 allocated using session context. The bug was there since pgpool-II 3.0 7620 was born. 7621 7622 Problem analysis and patch contributed by Naoya Anzai. 7623 7624 [pgpoolgenera-jp: 1146]. (in Japanese) 7625 http://www.pgpool.net/pipermail/pgpool-general-jp/2013-March/001145.html 7626 7627 - Fix bug with md5 auth long user name handling. (Tatsuo Ishii) 7628 7629 If user name is longer than 32 bytes, md5 authentication doesn't work. 7630 Problem reported in [pgpool-general: 1526] by Thomas Martin. 7631 7632 [pgpool-general: 1526] 7633 [pgPool-II 3.2.3] MD5 authentication and username longer than 32 characters. 7634 http://www.pgpool.net/pipermail/pgpool-general/2013-March/001551.html 7635 7636 - Fix to calculate replication delay only if standby server is behind from 7637 the primay server. (Yugo Nagata) 7638 7639 When the primary server is behind from standby server, negative value of 7640 delay is calculated and the value is assigned to unsigned variable. It 7641 causes a log message informing negative replication delay. And what is 7642 worse, it also causes SELECT queries to be sent to the primary in load 7643 balance even though there are no replication delay in fact. 7644 7645 The problem is reported and analyzed by Saitoh Hidenori in 7646 [pgpool-genera-jp: 1145]. 7647 7648 [pgpool-general-jp: 1145] (in Japanese) 7649 http://www.pgpool.net/pipermail/pgpool-general-jp/2013-March/001144.html 7650 7651 - pgpool-recovery adopts PostgreSQL 9.3. (Tatsuo Ishii) 7652 7653 Patch contributed by Asif Rehman. Slight editing by Tatsuo Ishii. 7654 7655 [pgpool-hackers: 180] 7656 compile error in ppool-recovery 7657 http://www.pgpool.net/pipermail/pgpool-hackers/2013-April/000179.html 7658 7659 - Fix pool_has_pgpool_regclass() to check execute privilege of 7660 pgpool_regclass(). (Tatsuo Ishii) 7661 7662 Even though pgpool_regclass() exists, if pgpool cannot execute the 7663 function, the connection to backend hangs. You can reproduce the problem 7664 by just dropping the execute privilege from pgpool_regclass and do some 7665 insert in native replication mode. 7666 7667 The problem is reported in bugtrack #53. 7668 7669 #53 pgpool_regclas hangs all connections 7670 Date: 2013-04-04 13:35 7671 Reporter: tmandke 7672 http://www.pgpool.net/mantisbt/view.php?id=53 7673 7674 - Fix error message mistakes in detect_postmaster_down_error(). (Tatsuo Ishii) 7675 7676 For example, "LOG: detect_stop_postmaster_error: detect_error error" is 7677 fixed to "LOG: detect_postmaster_down_error: detect_error error", and so on. 7678 7679=============================================================================== 7680 7681 3.1.6 (hatsuiboshi) 2013/2/8 7682 7683* Version 3.1.6 7684 7685 This is a bugfix release against pgpool-II 3.1.5 7686 7687 __________________________________________________________________ 7688 7689* Bug fixes 7690 7691 - Fix race condition when using md5 authentication. (Tatsuo Ishii) 7692 7693 The file descriptor to pool_passwd is opened in pgpool main and pgpool 7694 child inherits it. When concurrent connections try to authenticate md5 7695 method, they call pool_get_passwd and seek the fd and cause random md5 7696 auth failure because underlying fd is shared. Fix is, let individual 7697 pgpool child open the file by calling pool_reopen_passwd_file. 7698 7699 Problem reported and analyzed by Jason Slagle in pgpool-general:1141. 7700 7701 [pgpool-general: 1141] Possible race condition in pool_get_passwd 7702 From: Jason Slagle 7703 Date: Sun, 28 Oct 2012 01:12:52 -0400 7704 http://www.sraoss.jp/pipermail/pgpool-general/2012-October/001160.html 7705 7706 - Fix hung up while repeating pcp_attach_node and pcp_detatch_node 7707 (Tatsuo Ishii) 7708 7709 When node status is changed by pcp_attach_node and pcp_detatch_node, 7710 failover() sends SIGUSR1 to pcp_child process expecting it exits to 7711 refresh node status. In this situation lots of pgpool children exit and 7712 produce SIGCHLD as well. The SIGCHLD handler reaper() tries catch all 7713 SIGCHLD but sometimes it fails depending on the system load and timing. 7714 If SIGCHLD produced by pcp child is not caught, the process becomes 7715 zombie and never restarted. 7716 7717 This problem is reported in bug track #32 (by oleg_myrk) etc. 7718 7719 #32 PGPool hangs on pcp_attach/detach 7720 Reporter: oleg_myrk 7721 $B!!(BDate: 2012-10-24 00:01 7722 http://www.pgpool.net/mantisbt/view.php?id=32 7723 7724 - Fix pool_send_severity_message() not to use uninitialized memory. 7725 (Tatsuo Ishii) 7726 7727 It cause a segmentaion fault. 7728 Reported in Bug #33's attached valgrind output by dudee. 7729 7730 #33 pgpool-II 3.2.1 segfault 7731 Reporter: dudee 7732 Date: 2012-10-30 19:16 7733 http://www.pgpool.net/mantisbt/view.php?id=33 7734 7735 - Add a description about "-f" to help message. (Tatsuo Ishii) 7736 7737 - Fix reaper() not to exit wait3() loop when catches pcp or worker child 7738 exit event. (Tatsuo Ishii) 7739 7740 Otherwise reaper() mistakenly ignore some process exit event and make a 7741 risk of creating zombie process and forgetting to create new process. 7742 7743 Problem reported and fix suggested by Goto in [pgpool-general-jp: 1123]. 7744 http://www.sraoss.jp/pipermail/pgpool-general-jp/2012-November/001122.html 7745 (in Japanese) 7746 7747 - Fix pool_search_relcache() to use MASTER or MASTER_NODE_ID macro, rather 7748 than REAL_MASTER_NODE_ID. (Tatsuo Ishii) 7749 7750 In case node 0 fail back in streaming replication mode, pgpool does not 7751 restart child process. So REAL_MASTER_NODE_ID looks for node 0 con info, 7752 which is not present until new connection to backend made. Thus referring 7753 to node con info results in segfault. MASTER or MASTER_NODE_ID are safe in 7754 this situation because they look at cached former master node id. 7755 7756 - Fix long standing bug "portal not found" error when replication delay 7757 is too much in streaming replication mode. (Tatsuo Ishii) 7758 7759 The bug had been there since the delay threshold was introduced. 7760 7761 We changed destination DB node if delay threshold exceeds in bind, 7762 describe and execute. However, if parse sends to different node, bind, 7763 describe or execute will fail because no parsed statement or portal 7764 exists. Solution is, not to send to different parse node even 7765 if delay threshold is too much. 7766 7767 - Fix pg_md5 to output "\n" after user inputs password. (Yugo Nagata) 7768 7769 - Fix child_exit() to not call send_frontend_exits() if there's no 7770 connection pool. (Tatsuo Ishii) 7771 7772 Otherwise, it segfaults because send_frontend_exits() referes to objects 7773 pointed to by pool_connection_pool. Per bug track #44 by tuomas. 7774 7775 #44 pgpool went haywire after slave shutdown triggering master failover 7776 Reporter: tuomas 7777 Date: 2012-12-11 00:33 7778 http://www.pgpool.net/mantisbt/view.php?id=4 7779 7780 - Fix read_startup_packet() to reset alarm and free StartupPacket when 7781 pool_read() returns 0 which means incorrect packet length. (Nozomi Anzai) 7782 7783 Previously, authentication timeout occurs when connected by a program 7784 monitoring the pgpool port.It is reported in bug track #35 by tuomas. 7785 7786 #35 Authentication is timeout 7787 Reporter: tuomas 7788 Date: 2012-11-20 11:54 7789 http://www.pgpool.net/mantisbt/view.php?id=3 7790 7791 - Fix long standing bug with pool_open(). (Tatsuo Ishii) 7792 7793 It initializes wrong buffer pointer. Actually this is harmless because the 7794 pointer is initialized by prior memset() call, though. 7795 7796 - Modify documents to correct information of whether a certain parameter 7797 change requires restart. (Yugo Nagata) 7798 7799 - Add pool_passwd option to pgpool.conf.sample*, and documents. (Yugo Nagata) 7800 7801=============================================================================== 7802 7803 3.1.5 (hatsuiboshi) 2012/10/12 7804 7805* Version 3.1.5 7806 7807 This is a bugfix release against pgpool-II 3.1.4 7808 7809 __________________________________________________________________ 7810 7811* Bug fixes 7812 7813 - Fix read_startup_packet. (Tatsuo Ishii) 7814 7815 If packet length is lower than 0, it should 7816 have returned immediately. Otherwise it would cause memory allocation 7817 error later on. per pgpool-general:886. 7818 Also add canceling alarm. 7819 7820 - Add NOTICE message handling to s_do_auth. (Tatsuo Ishii) 7821 7822 Without this, health check responses false alarm and causes failover. 7823 per bug track: 7824 http://www.pgpool.net/mantisbt/view.php?id=25 7825 Also allow to receive ready for query packet *not* right after backend 7826 keydata. I'm not sure if this could happen in the real world but the 7827 protocol seems to allow this. 7828 7829 - Remove unnecessary/confusing debug log from s_do_auth.(Tatsuo Ishii) 7830 7831 - Fix inifinit loop in SSL mode. When there's pending data in SSL layer 7832 of frontend, pool_process_query() checks pending data in backend. 7833 (Tatsuo Ishii) 7834 7835 If there's non, it loops again and checks frontend/backend receive buffer 7836 by using is_cache_empty(). Unfortunately it first checks pending data 7837 in SSL layer of frontend, thus goes to backend data and checks again 7838 (infinite loop). 7839 The solution is, if there's pending data in SSL layer of frontend and 7840 query is not in progress, call ProcessFrontendResponse() to process new 7841 request from frontend. 7842 7843 - Fix is_system_catalog to use pgpool_regclass if available. 7844 (Tatsuo Ishii) 7845 7846 - Fix memory leak in pool_get_insert_table_name(). (Tatsuo Ishii) 7847 7848 If session context's memory contex is used for nodeToString(), memory is 7849 not freed until session ends. 7850 7851 - Fix possible memory leak in nodeToString(). (Tatsuo Ishii) 7852 7853 Since the memory context could be session context, memory used for 7854 String object may be considerable if user session continues for hours or 7855 days. 7856 See bug track #24 for more details. 7857 7858 - Fix long standing problem with do_query(). (Tatsuo Ishii) 7859 7860 When 1) extended protocol used and 2)unnamed portal is used and 3) no 7861 explicit transaction is used, user's unnamed portal is removed by Sync 7862 message. 7863 This is because Sync message closes transaction and unnamed portal is 7864 removed. This leads to "portal "" does not exist" error. 7865 7866 Fix is, use "Flush" message instead of Sync. Main difference between 7867 using Sync and Flush is, Flush does not return Ready for Query message. 7868 So do_query() does not return until all expected responses are returned. 7869 It seems the order of messages returned from backend is random, and 7870 do_query () manages it by using state bits. 7871 7872=============================================================================== 7873 7874 3.1.4 (hatsuiboshi) 2012/08/06 7875 7876* Version 3.1.4 7877 7878 This is a bugfix release against pgpool-II 3.1.3. 7879 7880 __________________________________________________________________ 7881 7882* General 7883 7884 - Adopt PostgreSQL 9.2. (Tatsuo Ishii) 7885 7886 __________________________________________________________________ 7887 7888* Bug fixes 7889 7890 - Fix pool_send_and_wait() to send or not to send COMMIT / ABORT 7891 depending on the transaction state on each node. (Tatsuo Ishii) 7892 7893 It is possible that only primary is in an explicit transaction but 7894 standby is not in it if multi statement query has been sent. 7895 Per bug report [pgpool-general-jp: 1049]. 7896 7897 - Fix load balance in Solaris. (Tatsuo Ishii) 7898 7899 Problem is, random() in using random() in Solaris results in strange 7900 load balancing calculation. 7901 Use srand()/rand() instead although they produce lesser quality random 7902 Problem reported at [pgpool-general: 396]. 7903 7904 [pgpool-general: 396] strange load balancing issue in Solaris 7905 http://www.pgpool.net/pipermail/pgpool-general/2012-April/000397.html 7906 7907 - Add params to the result of "SHOW pool_status": backend_data_directory, 7908 ssl_ca_cert, ssl_ca_cert_dir. (Nozomi Anzai) 7909 7910 - Fix segfault of pcp_systemdb_info not in parallel mode. (Nozomi Anzai) 7911 7912 - Fix "unnamed prepared statment does not exist" error. (Tatsuo Ishii) 7913 7914 This is caused by pgpool's internal query, which breaks client's 7915 unnamed statements. To fix this, if extended query is used, named 7916 statement/portal for internal are used for internal query. 7917 7918 - Fix is_system_catalog(). Its relcach was accidently defined as 7919 "session local". (Tatsuo Ishii) 7920 7921 - Fix hangup when query conflict occurs in Hot-Standby mode. 7922 (Yugo Nagata) 7923 7924 Query example to reproduce: 7925 7926 (S1) BEGIN; 7927 (S1) SELECT * FROM t; 7928 (S2) DELETE FROM t; 7929 (S2) VACUUM t; 7930 7931 - Improve reading and writing pid_file. (Tatsuo Ishii) 7932 7933 - Fix pool_process_query() bug reported in [pgpool-general: 672]. 7934 (Tatsuo Ishii) 7935 7936 This is caused by the function waits for primary node which does not 7937 have pending data, while standbys have pending data. 7938 7939 [pgpool-general: 672] Transaction never finishes 7940 http://www.pgpool.net/pipermail/pgpool-general/2012-June/000676.html 7941 7942 - Fix wait_for_query_response() not to send param status to frontend if 7943 frontend is NULL. (Tatsuo Ishii) 7944 7945 This could happen while processing reset_query_list and occur crash. 7946 7947 - Fix bug with treatment of BEGIN TRANSACTION in master/slave mode. 7948 (Tatsuo Ishii) 7949 7950 Original complain is [pgpool-general: 714]. 7951 From 3.1, pgpool-II sends BEGIN.. to all DB nodes. Of course we cannot 7952 send BEGIN TRANSACTION READ WRITE to standby nodes. 7953 Problem is, we did not check BEGIN WORK ISOLATION LEVEL SERIALIZABLE; 7954 and sent to standby nodes. Of course this is wrong, since it's not 7955 allowed to run transactions in serializable mode on standby nodes. 7956 So added check for BEGIN WORK ISOLATION LEVEL SERIALIZABLE case. 7957 7958 [pgpool-general: 714] 7959 Load Balancing / Streaming Replication / Isolation Level serializable 7960 http://www.pgpool.net/pipermail/pgpool-general/2012-July/000719.html 7961 7962 - Fix send_to_where() to send the query to only primary if the it is like 7963 SET TRANSACTION ISOLATION LEVELSERIALIZABLE etc. (Tatsuo Ishii) 7964 7965 Case in streaming replication mode. Previously, it was sent to not only 7966 primary but also to standby and of course this causes an error. 7967 Similar SQLs are: 7968 7969 SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL 7970 SERIALIZABLE or SET transaction_isolation TO 'serializable' 7971 SET default_transaction_isolation TO 'serializable' 7972 7973 Original complain is [pgpool-general: 715]. 7974 7975 [pgpool-general: 715] 7976 Re: Load Balancing / Streaming Replication / Isolation Level 7977 serializable 7978 http://www.pgpool.net/pipermail/pgpool-general/2012-July/000720.html 7979 7980=============================================================================== 7981 7982 3.1.3 (hatsuiboshi) 2012/04/23 7983 7984* Version 3.1.3 7985 7986 This is a bugfix release against pgpool-II 3.1.2. 7987 7988 __________________________________________________________________ 7989 7990* Bug fixes 7991 7992 - Add m4 files. This should prevent compiling problem on older 7993 OS's. (Tatsuo Ishii) 7994 7995 - Fix to handle failover properly in detect_postmaster_down_error(). 7996 (Tatsuo Ishii) 7997 7998 It is possible that it fails to read backend socket after detecting 7999 backend errors and before actually detaching the backend. 8000 8001 - Fix bug that the process exits before unlocking semaphore by a 8002 signal interrupt. (Tatsuo Ishii) 8003 8004 - Fix a memory leak in case of reset_query. (Tatsuo Ishii) 8005 8006 - Fix pool_ssl_read() to deal with large data reading. (Tatsuo Ishii) 8007 8008 Original complain is here: 8009 http://www.pgpool.net/pipermail/pgpool-general/2012-March/000299.html 8010 8011 - Fix deadlock by enabling log_destination = syslog. (Tatsuo Ishii) 8012 8013 Reported in bug tracker http://www.pgpool.net/mantisbt/view.php?id=9. 8014 Patch provided by Gilles Darold. 8015 8016 - Allow to use multi statement in master/slave mode. (Tatsuo Ishii) 8017 8018 From 3.1 transactional statements such as "BEGIN" are sent to not only 8019 primary but also standbys. This brings an unfortunate side effect: if 8020 the multi statement is "BEGIN;DELETE FROM table;END", this will be 8021 sent to standy as well and cause an error because standby does notallow 8022 write SQL. So fix is, if a query is a multi statement one, then send it 8023 to primary only. 8024 8025 - Allow to have private cache of master node id. (Tatsuo Ishii) 8026 8027 When master goes down running pgpool children look into NULL pointer 8028 because the process does not connect to the new master yet. The private 8029 cache returns the old master node id and will avoid the situation. 8030 8031 Per bug reported in http://www.pgpool.net/mantisbt/view.php?id=51 8032 8033 - Fix pool_start_query() so that it uses my_master_node_id instead of 8034 REAL_MASTER_NODE_ID for initial virtual_master_node_id. (Tatsuo Ishii) 8035 8036 Real master node could be changed while pgpool is running in streaming 8037 replication mode. Previously it is assigned REAL_MASTER_NODE_ID, which 8038 could have no connections after fail over and cause segafult. 8039 8040 - Fix pool_setall_node_to_be_sent() to use private_backend_status instead 8041 of BACKEND_INFO macro. (Tatsuo Ishii) 8042 8043 It is possible that while processing, the node returned by BACKEND_INFO 8044 is not usable any more. 8045 8046 - Fix failover(). (Tatsuo Ishii) 8047 8048 Before it only restarts worker child only when pgpool child do not need 8049 restart. This is wrong. We need to restart worker child in any case. 8050 Otherwise it continues to send replication time lag check request to down 8051 the node. 8052 8053 - Fix debug log message so that it does not contain null characters. 8054 (Toshihiro Kitagawa) 8055 8056 - Fix SimpleQuery() so that it restores parser memory context when: 8057 1) Builtin show commands are used 8058 2) Parallel query mode 8059 3) Query cache is used 8060 (Tatsuo Ishii) 8061 8062 - Fix hangup when PREPARE statement causes error. (Toshihiro Kitagawa) 8063 8064 This issue was reported by Tomonari Katsumata: 8065 Subject: [pgpool-general: 121] question of pgpool's behavior 8066 8067 - Add doc/pgpool-fr.html to Makefile.am. (Tatsuo Ishii) 8068 8069 This had been forgotten when the doc was added. 8070 8071 - Fix hangup during md5 authentication that occurs in daemon mode 8072 and log_destination is 'syslog'. (Yugo Nagata) 8073 8074 Reported in bug tracker http://www.pgpool.net/mantisbt/view.php?id=2. 8075 8076=============================================================================== 8077 8078 3.1.2 (hatsuiboshi) 2012/01/31 8079 8080* Version 3.1.2 8081 8082 This is a bugfix release against pgpool-II 3.1.1. 8083 8084 __________________________________________________________________ 8085 8086* Bug fixes 8087 8088 - Fix to recognize READ UNCOMMITTED and REPEATABLE READ of transaction 8089 isolation levels. (Tatsuo Ishii) 8090 8091 - Fix infinite loop reported in this thread (Tatsuo Ishii): 8092 http://www.pgpool.net/pipermail/pgpool-general/2011-December/000099.html 8093 8094 It was not considered the case that, when received buffer in primary was 8095 empty but the one in a standby was not, the standby spontaneously sent 8096 packet to pgpool. 8097 This could happen when, for example, reloading postgresql.conf. 8098 The fix is that such buffer in standby is discarded. 8099 8100=============================================================================== 8101 8102 3.1.1 (hatsuiboshi) 2011/12/06 8103 8104* Version 3.1.1 8105 8106 This is a bugfix release against pgpool-II 3.1. 8107 8108 __________________________________________________________________ 8109 8110* Bug fixes 8111 8112 - Fix add_regex_pattern(). It does not allocate enough memory 8113 for each black/white_function_list items. The function adds 8114 "^" and "$" to each function items which do not contain those 8115 characters. Unfortunately the function forgot to add extra 2 8116 bytes for those characters. This may lead to memory corruption 8117 errors when pgpool starting up. 8118 8119 - Fix error message of check_replication_time_lag(Tatsuo 8120 Ishii). It emitted wrong error message when it failed to 8121 connect to PostgreSQL while checking streaming replication 8122 delay. Because it does not use health_check_user anymore. 8123 8124 - Fix memory leak(Toshihiro Kitagawa). This is essentially same 8125 as the fix made for 3.0.5(commit 8126 19a4ea9215da0b61728741fc0da2271958b09238). 8127 8128 - Major cleanup for strncpy(Tatsuo Ishii). There are several 8129 places where strncpy() is used. Problem is some of them do not 8130 consider the case when copy lengh == buffer size. In this case 8131 copied buffer is not null terminated and may cause tons of 8132 problems later. To fix this, most of them are replaced by 8133 strlcpy(). 8134 8135 - Update cached backend status whenever possible(Tatsuo Ishii). 8136 This solves the problem of follow_master_command not being 8137 able to lookup backend status correctly which was reported by 8138 Jeff Frost: Subject: [Pgpool-general] diagnosing BackendError 8139 from pcp_recovery_node To: pgpool-general@pgfoundry.org Date: 8140 Wed, 05 Oct 2011 15:15:07 -0700 8141 8142 - Fix buffer overrun problem when pcp password is longer than 8143 32(Tatsuo Ishii). 8144 8145 - Remove PGDLLIMPORTI which is only neccessary for Windows 8146 and cause a problem for non gcc. Patch contributed by Ibrar Ahmed. 8147 8148=============================================================================== 8149 8150 3.1 (hatsuiboshi) 2011/09/08 8151 8152* Version 3.1 8153 8154 This is the first version of pgpool-II 3.1 series. 8155 That is, a "major version up" from 3.0 series. 8156 8157 __________________________________________________________________ 8158 8159* Incompatible changes 8160 8161 - Change the lock method of insert_lock. The previous insert_lock uses 8162 row locking against the sequence relation, but the current one uses 8163 row locking against pgpool_catalog.insert_lock table. The reason is 8164 that PostgreSQL core developers decided to disallow row locking 8165 against the sequence relation to avoid an internal error which it 8166 leads. So creating insert_lock table in all databases which are 8167 accessed via pgpool-II beforehand is required. If does not exist 8168 insert_lock table, pgpool-II locks the insert target table. This 8169 behavior is same as pgpool-II 2.2 and 2.3 series. If you want to use 8170 insert_lock which is compatible with older releases, you can specify 8171 lock method by configure options: --enable-sequence-lock, 8172 --enable-table-lock(Toshihiro Kitagawa) 8173 8174 - Deprecate backend_socket_dir. Instead, if backend_hostname starts 8175 with '/' it is regarded the as path to Unix domain. If backend_hostname 8176 is left empty, then default Unix domain path(/tmp) is used. This 8177 follows the convention of libpq interface. Patch contributed by 8178 Jehan-Guillaume (ioguix) de Rorthais. 8179 8180 - Now "pgpool_walrecrunning()" was not used. pgpool-II used to consider 8181 the node that is promoted a primary node using the function. Now, 8182 pgpool-II waits for completing of the promotion to primary node 8183 because it did not work as we intended. But we still have a problem 8184 that pgpool-II waits while recovery_timeout, when there is no primary 8185 node(Toshihiro Kitagawa) 8186 8187 - Add node_id to each PostgreSQL DB node info in the output of 8188 show pool_nodes(Jean-Paul Argudo) 8189 8190 - Change the handling of sequence functions(nextval, setval) so that 8191 they completely obey setting of black/white_function_list. They were 8192 always handled as write functions before(Toshihiro Kitagawa) 8193 8194 __________________________________________________________________ 8195 8196* New features 8197 8198 - Add syslog support. Patch contributed by Gilles Darold. Review and 8199 editing by Guillaume Lelarge. 8200 8201 - Adapt application_name introduced in PostgreSQL 9.0. When reusing 8202 connection, send application_name in the startup packet to backend 8203 and send parameter status to frontend(Tatsuo Ishii) 8204 8205 - Add relcache_expire directive to control the expiration of the 8206 internal system catalog cache. ALTER TABLE might make these 8207 cache values obsoleted and the new directive will make the risk 8208 lower(Tatsuo Ishii). 8209 8210 - Add follow_master_command directive. This directive specifies a 8211 command to run in master/slave streaming replication only after 8212 a master failover. Patch contributed by Gilles Darold. 8213 8214 - Add pcp_promote_node command. This command promotes a new master 8215 node to pgpool-II. This can use in master/slave streaming replication 8216 only. Patch contributed by Gilles Darold. 8217 8218 - Add pcp_pool_status command which produces similar output of show 8219 pool_status. Also C API for this command is added. Patch 8220 contributed by Jehan-Guillaume (ioguix) de Rorthais. 8221 8222 - Add new per backend directive "backend_flag". This controls per 8223 backend behavior. Currently "ALLOW_TO_FAILOVER" or 8224 "DISALLOW_TO_FAILOVER" are allowed(Tatsuo Ishii) 8225 8226 - Add health_check_password directive, but is not yet implemented 8227 (Nicolas Thauvin) 8228 8229 - Add sr_check_period, sr_check_user and sr_check_password directives. 8230 These are used for streaming replication delay checking and 8231 determining primary node(Tatsuo Ishii) 8232 8233 - Add --username(or -u) option to pg_md5 command. This allows to manage 8234 users which do not have UNIX accounts. Japanese document change by 8235 Tatsuo Ishii(Nicolas Thauvin) 8236 8237 - Add pgpool_adm functions to pgpool_adm/. These are user-defined 8238 functions written in C language which work like pcp commands 8239 (Jehan-Guillaume (ioguix) de Rorthais) 8240 8241 - Add Simplified Chinese version of documents(Huang Jian, Sun Peng) 8242 8243 - Add SQL files to uninstall functions to sql/(Nicolas Thauvin) 8244 8245 - In master/slave mode, SELECTs to unlogged table execute only on 8246 master/primary(Toshihiro Kitagawa) 8247 8248 __________________________________________________________________ 8249 8250* Bug fixes 8251 8252 - Fix bug which cannot use the cursors of JDBC driver on standby 8253 node. The transaction commands come to be sent to all nodes by 8254 this fix in master/slave mode(Toshihiro Kitagawa) 8255 8256 - Fix bug with the handling of empty queries. The empty queries 8257 come to be handled the same as SELECT queries. This fix allows 8258 load-balance after the empty query(Toshihiro Kitagawa) 8259 8260 - Fix insert_lock so that it works correctly even if the column 8261 definition such as "DEFAULT nextval(('"x_seq"'::text)::regclass)" 8262 (Toshihiro Kitagawa) 8263 8264 - Fix pcp_attach_node command so that it emits error message while 8265 doing failover(Toshihiro Kitagawa) 8266 8267 - Fix log message which is emitted when pgpool-II cannot parse the 8268 query in the extended query protocol so that it shows the query 8269 (Toshihiro Kitagawa) 8270 8271 - Fix description about backend_weight inpgpool-II manual. It can 8272 be changed by reloading pgpool.conf(Tatsuo Ishii) 8273 8274 - Fix and enhance wording in English tutorial document. 8275 Fix suggested by Huang Jian(Tatsuo Ishii) 8276 8277 - Fix bug which does not update the node status when reattaching the 8278 node in raw mode(Guillaume Lelarge) 8279 8280 - Fix incorrect calculation of the replication delay in streaming 8281 replication mode(Tatsuo Ishii) 8282 8283 - Replace wrong function name "notice_backend_error" with correct one 8284 "degenerate_backend_set" in the failover log message(Tatsuo Ishii) 8285 8286 - Remove unnecessary logging at the end of pgpool.conf parsing(Tatsuo Ishii) 8287 8288 - Fix possible crash of pgpool/worker child after attaching new backend. 8289 Fix suggested by Gurjeet Singh(Tatsuo Ishii) 8290 8291 - Fix bug that SELECTs which have subquery with FOR SHARE/UPDATE clause 8292 are sent to slave/standby(Tatsuo Ishii) 8293 8294 - Fix bug which rewriting timestamp of default value fails in PREPARE 8295 statements. This used to work but was broken in 3.0(Toshihiro Kitagawa) 8296 8297 - Fix fail to compile pcp commands on the environment without 8298 getopt_long()(Tatsuo Ishii) 8299 8300 - Fix crash of pgpool child when frontend connects if in raw mode, 8301 enable_hba is off and more than 2 backends(Toshihiro Kitagawa) 8302 8303 - Fix some memory leaks(Toshihiro Kitagawa) 8304 8305 __________________________________________________________________ 8306 8307* Enhancements 8308 8309 - Enhance online recovery in streaming replication mode. 8310 Now restarting pgpool-II children is avoided when recovery finished. So 8311 existing sessions can be continued while doing online recovery(Tatsuo Ishii) 8312 8313 - pcp_attach_node does not diconnect existing sessions in 8314 streaming replication mode. In other mode, pcp_attache_node 8315 still disconnects existing sessions(Tatsuo Ishii). 8316 8317 - Import PostgreSQL 9.0 parser. This allows to use CREATE INDEX with 8318 implicit index name, which is new in 9.0. Patch contributed by 8319 Akio Ishida. 8320 8321 - Allow to use regular expressions in black and white function list. 8322 Patch contributed by Gilles Darold. Patch reviewed by Guillaume Lelarge. 8323 8324 - Reorganize pgpool.conf sample files so that they are easier to read 8325 (Guillaume Lelarge) 8326 8327 - Add <a name="..."> tags into all parameters in the pgpool-II user 8328 manual(Haruka Takatsuka) 8329 8330 - Enhance online recovery documents in streaming replication(Tatsuo Ishii) 8331 8332 - Change the function to check the replication delay in streaming 8333 replication mode. Currently, pgpool uses 8334 pg_last_xlog_replay_location() instead of 8335 pg_last_xlog_receive_location(). Fix suggested by Anton Yuzhaninov 8336 (Tatsuo Ishii) 8337 8338 - Allow time stamp rewriting to work with arbitrary expression in 8339 default value of a column. Before we detected anything including 8340 now() then simply replaced it to now(). This will lead to wrong 8341 rewriting of default value. for example, timezone('utc'::text, now()). 8342 Note that, however, this only adopts to simple queries. Extended 8343 protocols(for example Java, PHP PDO) or SQL "PREPARE" still remain 8344 same(Tatsuo Ishii) 8345 8346 - Enhance the error message which is emitted when failed to check 8347 replication delay(Nicolas Thauvin) 8348 8349 - Change error message "do_md5: read_password_packet failed" into debug 8350 level(Toshihiro Kitagawa) 8351 8352 - Allow to compile pgpool-regclass() against PostgreSQL 9.1(Tatsuo Ishii) 8353 8354 - Update and sync pgpool-II manuals of English version and Japanese 8355 version(Tatsuo Ishii) 8356 8357 8358=============================================================================== 83593.0 Series (2013/07/30 - ) 8360=============================================================================== 8361 8362 3.0.20 (umiyameboshi) 2016/02/05 8363 8364* Version 3.0.20 8365 8366 This is a bugfix release against pgpool-II 3.0.19. 8367 8368 This is the final release of the series. pgpool-II 3.0 has reached 8369 End of Life, and is no longer maintained and does not receive any 8370 updates. 8371 8372 __________________________________________________________________ 8373 8374* Bug fixes 8375 8376 - doc: Fix misinformation regarding load balancing in docs (Tatsuo Ishii) 8377 8378 In streaming replication mode, DECLARE, FETCH, CLOSE and SHOW are sent 8379 to primary node only. Pointed out in [pgpool-general-jp: 1378]. 8380 8381 - Issue fsync() when writing pgpool_status (Tatsuo Ishii) 8382 8383 This ensures that pgpool_status is saved to permanent storage and 8384 allow to survive after system crash. 8385 8386 - doc: Fix wrong description about log_standby_delay in the document 8387 (Yugo Nagata) 8388 8389 - Fix bug with "SET TRANSACTION READ ONLY" (Tatsuo Ishii) 8390 8391 Pgpool-II remembers that non read only queries (including SET) were 8392 executed in an explicit transaction and adds a "writing transaction" 8393 mark to the transaction. The mark affects the query routing behavior 8394 of pgpool-II while running in streaming replication mode. Pgpool-II 8395 starts sending queries to the primary after the mark is set. Because 8396 the effect of writing queries may appear on standbys after some delay 8397 in streaming replication mode, it is safer to route read queries to 8398 the primary after the mark is set. 8399 8400 However there's oversight here. "SET TRANSACTION READ ONLY" does no 8401 data modification and should be treated as an exception. 8402 8403 Per bug #157. 8404 8405 - Fix FATAL error with reloading (Tatsuo Ishii) 8406 8407 While reloading pgpool.conf, the number of DB nodes is tentatively set 8408 to 0, then counted up until reaching to the actual number of backends 8409 by the pgpool main process. Unfortunately the variable was on the 8410 shared memory and it confused pgpool child process when they were using 8411 the variable and this caused FATAL error. 8412 8413 Per bug #156 report by harukat. 8414 8415 - Ignore close statement/portal request if they do not exist (Tatsuo Ishii) 8416 8417 In this case just returns a close complete message to client. 8418 This is a back port of the following commit from pgpool-II 3.4: 8419 8420 1a37e1c35bd8b6f10f524693bbcb7b51f73b4bf0 8421 8422=============================================================================== 8423 8424 3.0.19 (umiyameboshi) 2015/07/24 8425 8426* Version 3.0.19 8427 8428 This is a bugfix release against pgpool-II 3.0.18. 8429 8430 __________________________________________________________________ 8431 8432* Bug fixes 8433 8434 - Fix "cannot find xlog functions" error in pgpool-recovery 8435 (Muhammad Usama) 8436 8437 The argument data type of PostgreSQL's pg_xlogfile_name() function 8438 has been changed from text to pg_lsn since PostgreSQL 9.4. And 8439 pgpool-recovery was still trying to locate the function by old 8440 signature. 8441 8442 - Do not send a query for checking insert lock in non replication mode 8443 with extended query (Tatsuo Ishii) 8444 8445=============================================================================== 8446 8447 3.0.18 (umiyameboshi) 2015/04/08 8448 8449* Version 3.0.18 8450 8451 This is a bugfix release against pgpool-II 3.0.17. 8452 8453 __________________________________________________________________ 8454 8455* Bug fixes 8456 8457 - Enlarge POOLCONFIG_MAXDESCLEN to 80 (Tatsuo Ishii) 8458 8459 This is used in show pool_status command and limits the length of 8460 parameter description. Unfortunately recovery_timeout description is 8461 64 chars, which is 1 byte longer than former definition of the macro. 8462 8463 - Support SSL certificate chains in the certificate file for incoming 8464 frontend connections (Muhammad Usama) 8465 8466 - Fix a problem with pcp_detach_node about graceful node detach (Muhammad Usama) 8467 8468 When graceful node detach is requested gracefully, pcp_detach_node should 8469 check if it is allowed to process detach_node command on the particular 8470 node before blocking the incoming connections and closing the existing 8471 connections. 8472 8473=============================================================================== 8474 8475 3.0.17 (umiyameboshi) 2015/02/05 8476 8477* Version 3.0.17 8478 8479 This is a bugfix release against pgpool-II 3.0.16. 8480 8481 __________________________________________________________________ 8482 8483* Bug fixes 8484 8485 - doc: Describe explicitly that the number of slave nodes is not 8486 necessarily 1 (Tatsuo Ishii) 8487 8488 - Fix uninitialized variable (Tatsuo Ishii) 8489 8490 Per Coverity 1234603. 8491 8492 - doc: Fix missing release note entries in the previous release 8493 (Tatsuo Ishii) 8494 8495 - Fix node id range check bug in trigger_failover_command(). (Tatsuo Ishii) 8496 8497 The node id should be lower than NUM_BACKENDS. Probably harmless since 8498 callers never pass node ids greater or equal to NUM_BACKENDS. 8499 8500 - Fix to disable debug mode by reloading config (Yugo Nagata) 8501 8502 Per bug #114 8503 http://www.pgpool.net/mantisbt/view.php?id=114 8504 8505=============================================================================== 8506 8507 3.0.16 (umiyameboshi) 2014/09/05 8508 8509* Version 3.0.16 8510 8511 This is a bugfix release against pgpool-II 3.0.15. 8512 8513 __________________________________________________________________ 8514 8515* Bug fixes 8516 8517 - Fix a typo of pgpool.spec (Yugo Nagata) 8518 8519 - Fix bug that worker child process keeps failing when there's no 8520 primary backend (Tatsuo Ishii) 8521 8522 Problem identified and fix contributed by Junegunn Choi. 8523 8524 See [pgpool-hackers: 471] for more details. 8525 8526 - Close listen socket when smart shutdown request is made (Tatsuo Ishii) 8527 8528 When smart shutdown process starts, pgpool children still listen on 8529 the port and clients can send further connection requests which fail 8530 in the end. Which is not only waste of time, but also prevents a load 8531 balancer which sits in front of pgpool from realizing the pgpool is 8532 going down. 8533 8534 Problem analyzed and patch provided by Junegunn Choi in [pgpool-hackers 8535 474], and enhanced to take care not only inet domain socket but UNIX 8536 domain socket by Tatsuo Ishii. 8537 8538 - doc: Add cautions that recovery commands are killed by statement_timeout 8539 of PostgreSQL. (Tatsuo Ishii) 8540 8541 - doc: Remove old restriction description which is no longer true 8542 (Tatsuo Ishii) 8543 8544 - Fix return type of text_to_lsn() function (Yugo Nagata) 8545 8546 This caused compile warning. 8547 8548 - Fix file descriptor leak when daemonize. (Tatsuo Ishii) 8549 8550 Per Coverity 1111471. 8551 8552 - Fix memory leak. (Tatsuo Ishii) 8553 8554 Per Coverity 1111442. 8555 8556 - Fix pgpool.init's long-standing bug of stop/restart failure 8557 (Yugo Nagata) 8558 8559 In previous, pgpool.init uses killproc for stopping pgpool, but there 8560 are several problems. In the new version, "pgpool -m fast stop" is 8561 used in stop command. 8562 8563 Original patch contributed by Ryan DeShone and modified by Yugo Nagata. 8564 8565 See [pgpool-hackers: 239][pgpool-hackers: 512]. 8566 8567 - Disbale statement_timeout of PostgreSQL while executing online recovery 8568 (Tatsuo Ishii) 8569 8570 Online recovery may take very long time and user may enable statement 8571 timeout. To prevent online recovery canceled by statement timeout, 8572 disable statement timeout in the connection used by online recovery. 8573 8574 See [pgpool-general: 2919] for more details. 8575 8576 - Remove unnecessary call to pool_shmem_exit() which removes semaphore 8577 when it shouldn't (Tatsuo Ishii) 8578 8579 exit_handler checks if the process is parent or not. This is 8580 good. However, even if it is a child process, it calls 8581 pool_shmem_exit() which removes semaphore and shmem when it should 8582 not. It should be called only from parent process. 8583 8584 Per bug #102. 8585 http://www.pgpool.net/mantisbt/view.php?id=102 8586 8587=============================================================================== 8588 8589 3.0.15 (umiyameboshi) 2014/03/24 8590 8591* Version 3.0.15 8592 8593 This is a bugfix release against pgpool-II 3.0.14. 8594 8595 __________________________________________________________________ 8596 8597* Bug fixes 8598 8599 - doc: Add mention about "listen queue" and how to increase the "backlog" 8600 in the num_init_children section. (Tatsuo Ishii) 8601 8602 - Fix bad performance of unlogged tables detection code. (Tatsuo Ishii) 8603 8604 Pointed out at [pgpool-hackers: 435][[pgpool-general:2325]. 8605 8606 - Fix primary node detection logic. (Tatsuo Ishii) 8607 8608 There's a possibility that primary node is not detected. This happens 8609 in following situation. node 0: primary, node 1: standby. Node 0 goes 8610 down. Health checking detects the fact but local status is not updated 8611 yet. Primary node finding (find_primary_node) runs. Node 0's status is 8612 yet healthy. Because find_primary_node fails to connect to node 0, it 8613 immediately returns -1 and fails to find that fact that node 1 is now 8614 primary. 8615 8616 Fix is just continuing to look for primary node when fails to connect 8617 to a node. 8618 8619 Per [pgpool-general: 2409]. 8620 8621 - Fix jdbc DML fails when operated in raw mode and auto commit is off. 8622 (Tatsuo Ishii) 8623 8624 This is reported in bug #92. 8625 8626 - Avoid to send queries to unrelated nodes in streaming replication mode. 8627 (Tatsuo Ishii) 8628 8629 Pgpool-II sends certain queries, such as BEGIN, END and SET commands to 8630 all of DB nodes. However in streaming replication mode, only primary 8631 node and at most one standby node are only concerned (if primacy node 8632 is selected as the load balance node, only 1 node is concerned). 8633 8634 See [pgpool-hackers: 464] for more details. 8635 8636 - Fix possible buffer overrun problem and memory leak. (Tatsuo Ishii) 8637 8638 Per Coverity 1111465 and 1111482. 8639 8640 - Fix freeing NULL. (Tatsuo Ishii) 8641 8642 Per Coverity 1111384. 8643 8644 - Fix memory leak. (Tatsuo Ishii) 8645 8646 Per Coverity 1111446. 8647 8648 - Fix a segmentation fault in parallel mode with system_db_hostname is 8649 empty (Yugo Nagata) 8650 8651 - Fix to output debug messages in processing pgpool.conf with -d option 8652 (Yugo Nagata) 8653 8654 Previously, some debug messages in pool_get_config() ware not output 8655 even when -d option was used. 8656 8657 - Fix JDBC exception of prepared statement including now() in 8658 replication mode (Yugo Nagata) 8659 8660 With JDBC, when a prepared statement is executed more than 8661 PrepareThreshold times, the statement is named and Describe message 8662 is sent after Parse. With named statement, pgpool rewrite now() to 8663 parameter in replication mode. Hence, rewritten query has additonal 8664 parameter than original. In this case, ParameterDescription message 8665 sent to frontend (response of Describe) should include OIDs of the 8666 same number os original query's parameters. Otherwize, JDBC throws 8667 ArrayIndexoutOfBoundsException. 8668 8669 This is reported in [pgpool-general-jp: 1192]. 8670 8671 - Fix backend error of prepared statement about table which has column whoes 8672 default value is now() in replication mode (Yugo Nagata) 8673 8674 When pgpool parses a named prepared statement with default now(), 8675 timestamps are replaced to additional parameters. So, Bind message also 8676 should inclued additional parameter format codes. However, when the 8677 number of original parameter was one, pgpool didn't handle this. This 8678 caused a error like "incorrect binary data format in bind parameter 2". 8679 8680 - doc: Add description about parallel mode doesn't support PREPARE (Yugo Nagata) 8681 8682 Per bug #93 8683 8684=============================================================================== 8685 8686 3.0.14 (umiyameboshi) 2013/12/06 8687 8688* Version 3.0.14 8689 8690 This is a bugfix release against pgpool-II 3.0.13. 8691 8692 __________________________________________________________________ 8693 8694* Bug fixes 8695 8696 - Fix incorrect time stamp rewriting in replication mode for certain time 8697 zones. (Tatsuo Ishii) 8698 8699 Time stamp rewriting calls "SELECT now()" to get current time. 8700 Unfortunately the buffer for the current time is too small for certain 8701 time zones such as "02:30". Note that non-30-minutes-time-zone such as 8702 "0900" does not reveal the problem. This explains why we haven't the bug 8703 report until today. 8704 8705 Bug reported in [pgpool-general: 2113] and fix provided by Sean Hogan. 8706 http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002142.html 8707 8708 - Makefile: Replace pg_config by $(PG_CONFIG) in Makefiles so it can be 8709 overridden at build time when compiling for different PG major versions. 8710 (Tatsuo Ishii) 8711 8712 Patch contributed by Christoph Berg ([pgpool-general: 2127]). 8713 http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002156.html 8714 8715 - configure: Remove -lcompat because it confuses FreeBSD per bug#15. 8716 (Tatsuo Ishii) 8717 http://www.pgpool.net/mantisbt/view.php?id=15 8718 8719 - Fix segfault when pgpool.conf does not set log_standby_delay. 8720 (Tatsuo Ishii) 8721 8722 This is caused by wrong initialization for log_standby_delay in 8723 pool_config.l. 8724 Per bug#74. http://www.pgpool.net/mantisbt/view.php?id=74 8725 8726 - doc: Modify descriptions about restrictions of parallel mode 8727 Muliple rows INSERT using VALUES are not supported in parallel mode. 8728 (Yugo Nagata) 8729 8730 - Avoid calling find_primary_node_repeatedly() when standby node goes 8731 down. (Tatsuo Ishii) 8732 8733 This will reduce the time to failover. Per bug #75, patch modified by 8734 Tatsuo Ishii. http://www.pgpool.net/mantisbt/view.php?id=75 8735 8736 - Fix error message in read_password_packet(). (Tatsuo Ishii) 8737 8738 - Fix memory leak when do_query() fails in timestamp rewriting. 8739 (Tatsuo Ishii) 8740 8741 For this purpose free_select_result() is changed to accept NULL argument. 8742 Per Coverity report "1111454, 1111455 Resource leak". 8743 8744 - Fix target node selection logic when "DEALLOCATE portal|statement". 8745 (Tatsuo Ishii) 8746 8747 When "DEALLOCATE portal|statement" is used and last prepared statement or 8748 portal was not found, target node selection map is not set. Probably this 8749 is not actually harmful because prepared statement or portal was not found 8750 is an error case. The bug was there since day 0. 8751 8752 Per Coverity report "1111491 Structurally dead code". 8753 8754 - Fix range check bug of MAX_NUM_BACKENDS in corner case. (Tatsuo Ishii) 8755 8756 MAX_NUM_BACKENDS is the allowed max number of DB nodes (128, at this 8757 point). In reality, probably no one ever tried more than 128 DB nodes 8758 and that's the reason why nobody noticed. 8759 8760 Per Coverity report "1111429, 1111430 and 1111431 Out-of-bounds write". 8761 8762 - Fix that the script forgets to allow public access to pgpool_catalog. 8763 (Tatsuo Ishii) 8764 8765 The bug prevents inserting data into user tables if pgpool_catalog is 8766 created in native replication mode. The bug was there from day 1. I 8767 wonder why nobody noticed until today. 8768 Per [pgpool-general-jp: 1229]. 8769 http://www.sraoss.jp/pipermail/pgpool-general-jp/2013-November/001228.html 8770 8771 - Fix uninitialized variable in error case in pool_do_auth(). 8772 (Tatsuo Ishii) 8773 8774 If there's no valid backend, pgpool will return garbage pid to frontend in 8775 auth phase. Actually because no backend is available, frontend will be 8776 disconnected later on. So this is not harmless. 8777 Per Coverity report "1127331 Uninitialized scalar variable". 8778 8779 - Fix to add node id range check when issue an error message using node 8780 id. (Tatsuo Ishii) 8781 Per Coverity report #1111433 "Out-of-bounds read". 8782 8783 - Fix buffer overrun bug and resource leak bug of parse_copy_data(). 8784 (Tatsuo Ishii) 8785 Per Coverity report 1111427 "Out-of-bounds write" and 1111453 "Resource 8786 leak". 8787 8788 - Fix possible segfault in CopyDataRaws(). (Tatsuo Ishii) 8789 Coverity pointed out that if pool_get_id() returns an error, VALID_BACKEND 8790 will access out of array. 8791 Per Coverity report 1111413 "Memory - illegal accesses". 8792 8793 - Fix strftime() usage in pool_pools(). (Tatsuo Ishii) 8794 8795 The buffer is not large enough as expected by the second parameter. This 8796 is not harmless because the format string will not produce longer result 8797 string than the buffer. 8798 Per Coverity report 1111426 "Out-of-bounds access". 8799 8800 - Fix resource leak in make_persistent_db_connection. (Tatsio Ishii) 8801 8802 For this pupose, new static function free_persisten_db_connection_memory 8803 is added. 8804 Per Coverity report #1111468. 8805 8806=============================================================================== 8807 8808 3.0.13 (umiyameboshi) 2013/09/06 8809 8810* Version 3.0.13 8811 8812 This is a bugfix release against pgpool-II 3.0.12. 8813 8814 __________________________________________________________________ 8815 8816* Bug fixes 8817 8818 - Fix a mistake in ssh command of doc/basebackup.sh (Tatsuo Ishii) 8819 8820 - Fix a bug in parsing prepared statements with transaction handling in 8821 replication mode (Tatsuo Ishii) 8822 8823 Parse() automatically starts a transaction for non SELECT query to keep 8824 consistency among nodes in replication mode. But this wasn't closed. If 8825 wrong query comes in, the transaction goes into an abort state but pgpool 8826 does not close the transaction. Thus next query causes error because the 8827 transaction is still in abort status. 8828 8829 This problem was reported in [pgpool-general: 1877] by Sean Hogan. 8830 8831 [pgpool-general: 1877] current transaction is aborted, commands ignored 8832 http://www.sraoss.jp/pipermail/pgpool-general/2013-July/001905.html 8833 8834 - Fix typos of the japanese document (Yugo Nagata) 8835 8836=============================================================================== 8837 8838 3.0.12 (umiyameboshi) 2013/07/10 8839 8840* Version 3.0.12 8841 8842 This is a bugfix release against pgpool-II 3.0.11. 8843 8844 __________________________________________________________________ 8845 8846* Bug fixes 8847 8848 - Add mention about "-D" option to the man page. (Tatsuo Ishii) 8849 8850 - Consider timeout waiting for compeletion of failback request in on line 8851 recovery (Tatsuo Ishii) 8852 8853 This will prevent the situation that recovery operation continues forever 8854 and we cannot even shutdown pgpool-II main process. This could happen 8855 especially while executing follow master command. 8856 8857 - Fix do_query() to not hang when PostgreSQL returns an error 8858 (Tatsuo Ishii) 8859 8860 The typical symptom is "I see SELECT is keep on running according to 8861 pg_stat_activity". To fix this pgpool-II just exits the process and 8862 kill the existig connection. This is not gentle but at this point I 8863 believe this is the best solution. 8864 8865 - Fix bug with do_query which causes hung in extended protocol 8866 (Tatsuo Ishii) 8867 8868 This problem could occur when insert lock is enabled and 8869 pgpool_catalog.insert_lock exists, See [pgpool-general: 1684] for more 8870 details. 8871 8872 [pgpool-general: 1684] insert_lock hangs 8873 http://www.sraoss.jp/pipermail/pgpool-general/2013-May/001711.html 8874 8875 - Fix unnecessary degeneration caused by error on commit (Tatsuo Ishii) 8876 8877 In master slave mode, if master gets an error at commit, while other 8878 slaves are normal at commit, we don't need to degenrate any backend 8879 because it is likely that the "kind mismatch error" was caused by a 8880 deferred trigger. 8881 8882 - Fix to register pgpool_regclass in pg_catalog schema (Tatsuo Ishii) 8883 8884 This is necessary to deal with clients which restricts schema search path 8885 to pg_catalog only. Postgres_fdw is such a client. 8886 8887 - Fix a potential crash in pg_md5 command (Muhammad Usama) 8888 8889 - Fix a segmentation fault of a child process that occurs when a startup 8890 packet has no PostgreSQL user information (Yugo Nagata) 8891 8892 You can reproduce it by 8893 8894 $ psql -p 9999 -U '' 8895 8896 If enable_pool_hba is on, a child process terminates by segmentation 8897 fault. Otherwise if enable_pool_hba is off, the error message is 8898 8899 ERROR: pool_discard_cp: cannot get connection pool for user (null) 8900 database (null) 8901 8902 In both cases, psql terminates with no message on frontend. 8903 8904 In the fixed version, if PostgreSQL user is not specified in startup packet, 8905 the message as following is output to both log and frontend. This is 8906 the same behavior as PostgreSQL. 8907 8908 FATAL: no PostgreSQL user name specified in startup packet 8909 8910 - Move ssl_ca_cert and ssl_ca_cert_dir descriptions to the SSL section 8911 (Yugo Nagata) 8912 8913 - Add ssl_ca_cert and ssl_ca_cert_dir descriptions to the japanese document 8914 (Yugo Nagata) 8915 8916 - Fix to verify the backend node number in pcp_recovery_node (Yugo Nagata) 8917 8918 When an invalid number is used, null value is passed as an arguments 8919 of recovery script, and this causes a malfunction. In especially, 8920 rsync may delete unrelated files in basebackup scripts. 8921 8922 - Fix reset query stuck problem. (Tatsuo Ishii) 8923 8924 It is reported that reset query (DISCARD ALL etc.) occasionally does 8925 not finish and pgpool child remain waiting for reply from backend thus 8926 client cannot connect to pgpool. 8927 8928 The cause of problem is not identified yet but if client suddenly 8929 closes connection to pgpool in the middle of query processing, backend 8930 may not accept the reset queries because they are not ready for query. 8931 8932 The fix is, if frontend closes connection in unexpected way, query 8933 process loop immediately returns with new state: 8934 POOL_END_WITH_FRONTEND_ERROR and pgpool closes connection to 8935 PostgreSQL then goes back to new connection request waiting loop. 8936 8937 Also, pgpool closes connections to backend when client_idle_limit is 8938 set and the idle limit. 8939 8940 Per bug #107. 8941 http://www.pgpool.net/mantisbt/view.php?id=107 8942 8943=============================================================================== 8944 8945 3.0.11 (umiyameboshi) 2013/04/26 8946 8947* Version 3.0.11 8948 8949 This is a bugfix release against pgpool-II 3.0.10. 8950 8951 __________________________________________________________________ 8952 8953* Buf fixes 8954 8955 - Fix to show pool_passwd in "SHOW pool_status". (Yugo Nagata) 8956 8957 - Fix long standing bug with timestamp rewriting code for processing 8958 extended protocol. (Tatsuo Ishii) 8959 8960 Parse() allocate memory using palloc() while rewriting the parse 8961 message. Problem is, the rewritten message was kept in the data which 8962 is managed by pool_create_sent_message() etc. The function assumes 8963 that all the data is in session context memory. However, palloc() 8964 allocates memory in query context of course, and gets freeed later on 8965 when the query context disappears. And the function tries to free the 8966 memory as well, which causes various problems, including segfault and 8967 double free. To fix this, memory to store rewritten message is 8968 allocated using session context. The bug was there since pgpool-II 3.0 8969 was born. 8970 8971 Problem analysis and patch contributed by Naoya Anzai. 8972 8973 [pgpoolgenera-jp: 1146]. (in Japanese) 8974 http://www.pgpool.net/pipermail/pgpool-general-jp/2013-March/001145.html 8975 8976 - Fix bug with md5 auth long user name handling. (Tatsuo Ishii) 8977 8978 If user name is longer than 32 bytes, md5 authentication doesn't work. 8979 Problem reported in [pgpool-general: 1526] by Thomas Martin. 8980 8981 [pgpool-general: 1526] 8982 [pgPool-II 3.2.3] MD5 authentication and username longer than 32 characters. 8983 http://www.pgpool.net/pipermail/pgpool-general/2013-March/001551.html 8984 8985 - Fix to calculate replication delay only if standby server is behind from 8986 the primay server. (Yugo Nagata) 8987 8988 When the primary server is behind from standby server, negative value of 8989 delay is calculated and the value is assigned to unsigned variable. It 8990 causes a log message informing negative replication delay. And what is 8991 worse, it also causes SELECT queries to be sent to the primary in load 8992 balance even though there are no replication delay in fact. 8993 8994 The problem is reported and analyzed by Saitoh Hidenori in 8995 [pgpool-genera-jp: 1145]. 8996 8997 [pgpool-general-jp: 1145] (in Japanese) 8998 http://www.pgpool.net/pipermail/pgpool-general-jp/2013-March/001144.html 8999 9000 - pgpool-recovery adopts PostgreSQL 9.3. (Tatsuo Ishii) 9001 9002 Patch contributed by Asif Rehman. Slight editing by Tatsuo Ishii. 9003 9004 [pgpool-hackers: 180] 9005 compile error in ppool-recovery 9006 http://www.pgpool.net/pipermail/pgpool-hackers/2013-April/000179.html 9007 9008 - Fix pool_has_pgpool_regclass() to check execute privilege of 9009 pgpool_regclass(). (Tatsuo Ishii) 9010 9011 Even though pgpool_regclass() exists, if pgpool cannot execute the 9012 function, the connection to backend hangs. You can reproduce the problem 9013 by just dropping the execute privilege from pgpool_regclass and do some 9014 insert in native replication mode. 9015 9016 The problem is reported in bugtrack #53. 9017 9018 #53 pgpool_regclas hangs all connections 9019 Date: 2013-04-04 13:35 9020 Reporter: tmandke 9021 http://www.pgpool.net/mantisbt/view.php?id=53 9022 9023 - Fix error message mistakes in detect_postmaster_down_error(). (Tatsuo Ishii) 9024 9025 For example, "LOG: detect_stop_postmaster_error: detect_error error" is 9026 fixed to "LOG: detect_postmaster_down_error: detect_error error", and so on. 9027 9028=============================================================================== 9029 9030 3.0.10 (umiyameboshi) 2013/02/08 9031 9032* Version 3.0.10 9033 9034 This is a bugfix release against pgpool-II 3.0.9. 9035 9036 __________________________________________________________________ 9037 9038* General 9039 9040 - Fix race condition when using md5 authentication. (Tatsuo Ishii) 9041 9042 The file descriptor to pool_passwd is opened in pgpool main and pgpool 9043 child inherits it. When concurrent connections try to authenticate md5 9044 method, they call pool_get_passwd and seek the fd and cause random md5 9045 auth failure because underlying fd is shared. Fix is, let individual 9046 pgpool child open the file by calling pool_reopen_passwd_file. 9047 9048 Problem reported and analyzed by Jason Slagle in pgpool-general:1141. 9049 9050 [pgpool-general: 1141] Possible race condition in pool_get_passwd 9051 From: Jason Slagle 9052 Date: Sun, 28 Oct 2012 01:12:52 -0400 9053 http://www.sraoss.jp/pipermail/pgpool-general/2012-October/001160.html 9054 9055 - Fix pool_send_severity_message() not to use uninitialized memory. 9056 (Tatsuo Ishii) 9057 9058 It cause a segmentaion fault. 9059 Reported in Bug #33's attached valgrind output by dudee. 9060 9061 #33 pgpool-II 3.2.1 segfault 9062 Reporter: dudee 9063 Date: 2012-10-30 19:16 9064 http://www.pgpool.net/mantisbt/view.php?id=33 9065 9066 - Fix reaper() not to exit wait3() loop when catches pcp or worker child 9067 exit event. (Tatsuo Ishii) 9068 9069 Otherwise reaper() mistakenly ignore some process exit event and make a 9070 risk of creating zombie process and forgetting to create new process. 9071 9072 Problem reported and fix suggested by Goto in [pgpool-general-jp: 1123]. 9073 http://www.sraoss.jp/pipermail/pgpool-general-jp/2012-November/001122.html 9074 (in Japanese) 9075 9076 - Fix pool_search_relcache() to use MASTER or MASTER_NODE_ID macro, rather 9077 than REAL_MASTER_NODE_ID. (Tatsuo Ishii) 9078 9079 In case node 0 fail back in streaming replication mode, pgpool does not 9080 restart child process. So REAL_MASTER_NODE_ID looks for node 0 con info, 9081 which is not present until new connection to backend made. Thus referring 9082 to node con info results in segfault. MASTER or MASTER_NODE_ID are safe in 9083 this situation because they look at cached former master node id. 9084 9085 - Fix long standing bug "portal not found" error when replication delay 9086 is too much in streaming replication mode. (Tatsuo Ishii) 9087 9088 The bug had been there since the delay threshold was introduced. 9089 9090 We changed destination DB node if delay threshold exceeds in bind, 9091 describe and execute. However, if parse sends to different node, bind, 9092 describe or execute will fail because no parsed statement or portal 9093 exists. Solution is, not to send to different parse node even 9094 if delay threshold is too much. 9095 9096 - Fix pg_md5 to output "\n" after user inputs password. (Yugo Nagata) 9097 9098 - Fix child_exit() to not call send_frontend_exits() if there's no 9099 connection pool. (Tatsuo Ishii) 9100 9101 Otherwise, it segfaults because send_frontend_exits() referes to objects 9102 pointed to by pool_connection_pool. Per bug track #44 by tuomas. 9103 9104 #44 pgpool went haywire after slave shutdown triggering master failover 9105 Reporter: tuomas 9106 Date: 2012-12-11 00:33 9107 http://www.pgpool.net/mantisbt/view.php?id=44 9108 9109 - Fix read_startup_packet() to reset alarm and free StartupPacket when 9110 pool_read() returns 0 which means incorrect packet length. (Nozomi Anzai) 9111 9112 Previously, authentication timeout occurs when connected by a program 9113 monitoring the pgpool port.It is reported in bug track #35 by tuomas. 9114 9115 #35 Authentication is timeout 9116 Reporter: tuomas 9117 Date: 2012-11-20 11:54 9118 http://www.pgpool.net/mantisbt/view.php?id=35 9119 9120 - Fix long standing bug with pool_open(). (Tatsuo Ishii) 9121 9122 It initializes wrong buffer pointer. Actually this is harmless because the 9123 pointer is initialized by prior memset() call, though. 9124 9125 - Add a description about "-f" to help message. (Tatsuo Ishii) 9126 9127 - Modify documents to correct information of whether a certain parameter 9128 change requires restart. (Yugo Nagata) 9129 9130 - Add pool_passwd option to pgpool.conf.sample*, and documents. (Yugo Nagata) 9131 9132=============================================================================== 9133 9134 3.0.9 (umiyameboshi) 2012/10/12 9135 9136* Version 3.0.9 9137 9138 This is a bugfix release against pgpool-II 3.0.8. 9139 9140 __________________________________________________________________ 9141 9142* General 9143 9144 - Fix read_startup_packet. (Tatsuo Ishii) 9145 9146 If packet length is lower than 0, it should 9147 have returned immediately. Otherwise it would cause memory allocation 9148 error later on. per pgpool-general:886. 9149 Also add canceling alarm. 9150 9151 - Add NOTICE message handling to s_do_auth. (Tatsuo Ishii) 9152 9153 Without this, health check responses false alarm and causes failover. 9154 per bug track: 9155 http://www.pgpool.net/mantisbt/view.php?id=25 9156 Also allow to receive ready for query packet *not* right after backend 9157 keydata. I'm not sure if this could happen in the real world but the 9158 protocol seems to allow this. 9159 9160 - Remove unnecessary/confusing debug log from s_do_auth.(Tatsuo Ishii) 9161 9162 - Fix inifinit loop in SSL mode. When there's pending data in SSL layer 9163 of frontend, pool_process_query() checks pending data in backend. 9164 (Tatsuo Ishii) 9165 9166 If there's non, it loops again and checks frontend/backend receive buffer 9167 by using is_cache_empty(). Unfortunately it first checks pending data 9168 in SSL layer of frontend, thus goes to backend data and checks again 9169 (infinite loop). 9170 The solution is, if there's pending data in SSL layer of frontend and 9171 query is not in progress, call ProcessFrontendResponse() to process new 9172 request from frontend. 9173 9174 - Fix is_system_catalog to use pgpool_regclass if available. 9175 (Tatsuo Ishii) 9176 9177 - Fix memory leak in pool_get_insert_table_name(). (Tatsuo Ishii) 9178 9179 If session context's memory contex is used for nodeToString(), memory is 9180 not freed until session ends. 9181 9182 - Fix possible memory leak in nodeToString(). (Tatsuo Ishii) 9183 9184 Since the memory context could be session context, memory used for 9185 String object may be considerable if user session continues for hours or 9186 days. 9187 See bug track #24 for more details. 9188 9189 - Fix long standing problem with do_query(). (Tatsuo Ishii) 9190 9191 When 1) extended protocol used and 2)unnamed portal is used and 3) no 9192 explicit transaction is used, user's unnamed portal is removed by Sync 9193 message. 9194 This is because Sync message closes transaction and unnamed portal is 9195 removed. This leads to "portal "" does not exist" error. 9196 9197 Fix is, use "Flush" message instead of Sync. Main difference between 9198 using Sync and Flush is, Flush does not return Ready for Query message. 9199 So do_query() does not return until all expected responses are returned. 9200 It seems the order of messages returned from backend is random, and 9201 do_query () manages it by using state bits. 9202 9203=============================================================================== 9204 9205 3.0.8 (umiyameboshi) 2012/08/06 9206 9207* Version 3.0.8 9208 9209 This is a bugfix release against pgpool-II 3.0.7. 9210 9211 __________________________________________________________________ 9212 9213* General 9214 9215 - Adopt PostgreSQL 9.2. (Tatsuo Ishii) 9216 9217 __________________________________________________________________ 9218 9219* Bug fixes 9220 9221 - Fix load balance in Solaris. (Tatsuo Ishii) 9222 9223 Problem is, random() in using random() in Solaris results in strange 9224 load balancing calculation. 9225 Use srand()/rand() instead although they produce lesser quality random 9226 Problem reported at [pgpool-general: 396]. 9227 9228 [pgpool-general: 396] strange load balancing issue in Solaris 9229 http://www.pgpool.net/pipermail/pgpool-general/2012-April/000397.html 9230 9231 - Fix segfault of pcp_systemdb_info not in parallel mode. (Nozomi Anzai) 9232 9233 - Fix "unnamed prepared statment does not exist" error. (Tatsuo Ishii) 9234 9235 This is caused by pgpool's internal query, which breaks client's 9236 unnamed statements. To fix this, if extended query is used, named 9237 statement/portal for internal are used for internal query. 9238 9239 - Fix is_system_catalog(). Its relcach was accidently defined as 9240 "session local". (Tatsuo Ishii) 9241 9242 - Improve reading and writing pid_file. (Tatsuo Ishii) 9243 9244 - Fix pool_process_query() bug reported in [pgpool-general: 672]. 9245 (Tatsuo Ishii) 9246 9247 This is caused by the function waits for primary node which does not 9248 have pending data, while standbys have pending data. 9249 9250 [pgpool-general: 672] Transaction never finishes 9251 http://www.pgpool.net/pipermail/pgpool-general/2012-June/000676.html 9252 9253 - Fix wait_for_query_response() not to send param status to frontend if 9254 frontend is NULL. (Tatsuo Ishii) 9255 9256 This could happen while processing reset_query_list and occur crash. 9257 9258=============================================================================== 9259 9260 3.0.7 (umiyameboshi) 2012/04/23 9261 9262* Version 3.0.7 9263 9264 This is a bugfix release against pgpool-II 3.0.6. 9265 9266 __________________________________________________________________ 9267 9268* Bug fixes 9269 9270 - Add m4 files. This should prevent compiling problem on older 9271 OS's. (Tatsuo Ishii) 9272 9273 - Fix bug that the process exits before unlocking semaphore by a 9274 signal interrupt. (Tatsuo Ishii) 9275 9276 - Fix a memory leak in case of reset_query. (Tatsuo Ishii) 9277 9278 - Fix SimpleQuery() so that it restores parser memory context when: 9279 1) Builtin show commands are used 9280 2) Parallel query mode 9281 3) Query cache is used 9282 (Tatsuo Ishii) 9283 9284 - Fix pool_ssl_read() to deal with large data reading. (Tatsuo Ishii) 9285 9286 Original complain is here: 9287 http://www.pgpool.net/pipermail/pgpool-general/2012-March/000299.html 9288 9289 - Fix hangup when PREPARE statement causes error. (Toshihiro Kitagawa) 9290 9291 This issue was reported by Tomonari Katsumata: 9292 Subject: [pgpool-general: 121] question of pgpool's behavior 9293 9294=============================================================================== 9295 9296 3.0.6 (umiyameboshi) 2012/01/31 9297 9298* Version 3.0.6 9299 9300 This version fixes various bugs since 3.0.5. 9301 9302 __________________________________________________________________ 9303 9304* Bug fixes 9305 9306 - Fix infinite loop reported in this thread (Tatsuo Ishii): 9307 http://www.pgpool.net/pipermail/pgpool-general/2011-December/000099.html 9308 9309 It was not considered the case that, when received buffer in primary was 9310 empty but the one in a standby was not, the standby spontaneously sent 9311 packet to pgpool. 9312 This could happen when, for example, reloading postgresql.conf. 9313 The fix is that such buffer in standby is discarded. 9314 9315=============================================================================== 9316 9317 3.0.5 (umiyameboshi) 2011/10/31 9318 9319* Version 3.0.5 9320 9321 This version fixes various bugs since 3.0.4. 9322 9323 __________________________________________________________________ 9324 9325* Bug fixes 9326 9327 - Fix bug with the handling of empty queries. The empty queries 9328 come to be handled the same as SELECT queries. This fix allows 9329 load-balance after the empty query(Toshihiro Kitagawa) 9330 9331 - Fix insert_lock so that it works correctly even if the column 9332 definition such as "DEFAULT nextval(('"x_seq"'::text)::regclass)" 9333 (Toshihiro Kitagawa) 9334 9335 - Fix log message which is emitted when pgpool-II cannot parse the 9336 query in the extended query protocol so that it shows the query 9337 (Toshihiro Kitagawa) 9338 9339 - Fix description about backend_weight inpgpool-II manual. It can 9340 be changed by reloading pgpool.conf(Tatsuo Ishii) 9341 9342 - Fix bug which does not update the node status when reattaching the 9343 node in raw mode(Guillaume Lelarge) 9344 9345 - Fix bug that SELECTs which have subquery with FOR SHARE/UPDATE clause 9346 are sent to slave/standby(Tatsuo Ishii) 9347 9348 - Fix bug which rewriting timestamp of default value fails in PREPARE 9349 statements. This used to work but was broken in 3.0(Toshihiro Kitagawa) 9350 9351 - Fix crash of pgpool child when frontend connects if in raw mode, 9352 enable_hba is off and more than 2 backends(Toshihiro Kitagawa) 9353 9354 - Fix some memory leaks(Toshihiro Kitagawa) 9355 9356 __________________________________________________________________ 9357 9358* Enhancements 9359 9360 - Allow time stamp rewriting to work with arbitrary expression in 9361 default value of a column. Before we detected anything including 9362 now() then simply replaced it to now(). This will lead to wrong 9363 rewriting of default value. for example, timezone('utc'::text, now()). 9364 Note that, however, this only adopts to simple queries. Extended 9365 protocols(for example Java, PHP PDO) or SQL "PREPARE" still remain 9366 same(Tatsuo Ishii) 9367 9368 - Change error message "do_md5: read_password_packet failed" into debug 9369 level(Toshihiro Kitagawa) 9370 9371=============================================================================== 9372 9373 3.0.4 (umiyameboshi) 2011/06/01 9374 9375* Version 3.0.4 9376 9377 This version fixes various bugs since 3.0.3. 9378 9379 __________________________________________________________________ 9380 9381* Incompatible changes 9382 9383 - In streaming replication, if delay_threshold is 0 or health 9384 checking is disabled, the delay checking is not performed. 9385 This is the behaviour according to a description of the 9386 pgpool-II manual. But, so far the delay checking was performed 9387 even if health checking was disabled(Guillaume Lelarge) 9388 9389 __________________________________________________________________ 9390 9391* Bug fixes 9392 9393 - Fix pgpool-regclass() to be compiled in PostgreSQL 8.0 or later. 9394 7.4 still produces errors(Tatsuo Ishii) 9395 9396 - Fix possible hangup when using /*NO LOAD BALANCE*/ comment in 9397 streaming replication(Toshihiro Kitagawa) 9398 9399 - Fix hangup when received Flush(H) message or CloseComplete(C) 9400 message(Toshihiro Kitagawa) 9401 9402 - Fix possible hangup that happen for the receiving timing of 9403 ReadyForQuery(Z) message after pgpool-II connects to backends(Toshihiro Kitagawa) 9404 9405 - Add description about parameters for recovery_1st_stage_command 9406 and recovery_2nd_stage_command(Tatsuo Ishii) 9407 9408 - Increase size of the internal system catalog cache from 32 to 128. 9409 This has the effect of reducing "unnamed prepared statement does 9410 not exist" error(Tatsuo, Kitagawa) 9411 9412 - Fix bug with pcp_connect() which causes double free. Patch 9413 contributed by Jehan-Guillaume (ioguix) de Rorthais(Tatsuo Ishii) 9414 9415 - Fix bug with start_recoery() which is apparently wrong usage of 9416 PQfinish()(Tatsuo Ishii) 9417 9418 - Fix incorrect error message which is sent to the frontend when 9419 client idle time reached client_idle_limit(Tatsuo Ishii) 9420 9421 - Fix "backend status" variable name correctly in pool_status. 9422 Replace the space with a '_'(Guillaume Lelarge) 9423 9424 - Fix hangup when using md5 authentication method and running as 9425 daemon. Patch contributed by Nicolas Thauvin(Tatsuo Ishii) 9426 9427 - Fix log_per_node_statement so that it prints statements in the 9428 extended query protocol. This used to work but was broken in 3.0 9429 (Toshihiro Kitagawa) 9430 9431 __________________________________________________________________ 9432 9433* Enhancements 9434 9435 - Add currval() and lastval() to black_function_list of sample 9436 configuration files. If they are load balanced, currval() or 9437 lastval() may be called before the result of nextval() or setval() 9438 is propagated to slaves(Tatsuo Ishii) 9439 9440=============================================================================== 9441 9442 3.0.3 (umiyameboshi) 2011/02/23 9443 9444* Version 3.0.3 9445 9446 This version fixes various bugs since 3.0.1. Please note that 9447 3.0.2 was canceled due to a packaging problem. 9448 9449 __________________________________________________________________ 9450 9451* Incompatible changes 9452 9453 - Now installing C function "pgpool_walrecrunning()" is recommended 9454 if you plan to use streaming replication mode. 9455 This is necessary for better use of online recovery in the mode. 9456 Also new variable "%P" can be used in the online recovery script. 9457 If you do not install the function, these functionalities cannot be 9458 used(Tatsuo Ishii). 9459 9460 - In raw mode if there's only one DB node and if a problem arises 9461 with the DB node, it will be brought to down status. However if 9462 the DB node goes into good condition again, you can use the DB 9463 node without restarting pgpool. This change has been included in 9464 3.0, but did not work(Tatsuo, Kitagawa) 9465 9466 __________________________________________________________________ 9467 9468* Bug fixes 9469 9470 - Fix non portable code in password authentication. 9471 Bug report from a FreeBSD user(Tatsuo Ishii) 9472 9473 - Fix bug that insert_lock locks all rows in user table 9474 (Tatsuo, Kitagawa) 9475 9476 - Fix bug with password authentication. If user name is 32 bytes 9477 long, pgpool child segfaults.(Tatsuo Ishii) 9478 9479 - Fix bug with md5 authentication. If raw mode or number of 9480 backend is 1, pgpool child segfaults. Patch contributed by 9481 Rob Shepherd(Tatsuo Ishii) 9482 9483 - Fix long standing bug with timestamp rewriting against array 9484 and complex types. Patch contributed by Akio Ishida(Tatsuo Ishii) 9485 9486 - Fix bug that debug_level directive doesn't work. Patch 9487 contributed by Gilles Darold(Tatsuo Ishii) 9488 9489 - Fix possible crash of pgpool child while doing failover(Toshihiro Kitagawa) 9490 9491 - Fix white/black_function_list so that it works correctly when user 9492 calls function with schema name(Tatsuo Ishii) 9493 9494 - Fix bug that DROP DATABASE fails by connection cache(Toshihiro Kitagawa) 9495 9496 - Fix bug that failover fails in raw mode(Toshihiro Kitagawa) 9497 9498 - Fix possible termination of pgpool child when both simple query 9499 protocol and extended query protocol are used in one session 9500 (Toshihiro Kitagawa) 9501 9502 - Fix possible hang up when an error occurs while using extended 9503 query protocol(Toshihiro Kitagawa) 9504 9505 - Fix pgpool-regclass() so that it doesn't use PG_TRY/CATCH. 9506 It appeared that using PG_TRY/CATCH is not safe, sometimes backend 9507 dies with PANIC: ERRORDATA_STACK_SIZE exceeded.(Tatsuo Ishii) 9508 9509 - Fix bug that select query isn't sent to master node when it meets 9510 the following conditions(Toshihiro Kitagawa) 9511 - in MASTER/SLAVE mode 9512 - use extended query protocol 9513 - started transaction explicitly 9514 - after write queries 9515 9516 - Fix bug with load_balance that JDBC driver sends BEGIN to master node 9517 many times(Toshihiro Kitagawa) 9518 9519 - Fix pool_status so that failback_command and fail_over_on_backend_error 9520 show correct values(Toshihiro Kitagawa) 9521 9522 - Remove parameters from pool_status: recovery_password, 9523 system_db_password(Toshihiro Kitagawa) 9524 9525 - Fix online recovery problem in the streaming replication 9526 mode(Tatsuo Ishii). Consider following scenario. Suppose node 0 is 9527 the initial primary server and 1 is the initial standby 9528 server. 9529 9530 1) Node 0 going down and node 1 promotes to new primary. 9531 2) Recover node 0 as new standby. 9532 3) pgpool-II assumes that node 0 is the new primary. 9533 9534 This problem happens because pgpool-II regarded unconditionally 9535 the youngest node to be the primary. pgpool-II 3.0.3 now checks 9536 each node by using pgpool_walrecrunning() to see if it is a 9537 actually primary or not and is able to avoid the problem and 9538 regards node as standby correctly. Also you can use new 9539 variable "%P" to be used in the recovery script. If you do 9540 not install the function, the above problem is not resolved. 9541 9542 - Fix backend complaining "unexpected EOF on client connection" 9543 while doing failover in streaming replication mode(Tatsuo Ishii) 9544 9545 - Fix pgpool crashes when all backends go down(Tatsuo Ishii) 9546 9547 - Fix replication delay checking so that it does not keep persistent 9548 connection to backends. Because the persistent connection may 9549 become bogus if a node down and then wake up between replication 9550 delay checking period(Tatsuo Ishii) 9551 9552 - Rewrite and review english document(Marc Cousin, Gleu) 9553 9554 __________________________________________________________________ 9555 9556* Enhancements 9557 9558 - Emit log if particular backend is down status while reading 9559 the status file(Tatsuo Ishii) 9560 9561 - Emit error message if an error occurred by the query that 9562 pgpool executed(Tatsuo Ishii) 9563 9564 - Add sql directories main Makefile(Tatsuo Ishii) 9565 9566=============================================================================== 9567 9568 3.0.1 (umiyameboshi) 2010/10/19 9569 9570* Version 3.0.1 9571 9572 This version fixes various bug in 3.0. 9573 9574 __________________________________________________________________ 9575 9576* Bug fixes 9577 9578 - Fix bug with md5 auth. If there's more than 1 servers to be 9579 authenticated, it segfaults(Tatsuo Ishii) 9580 9581 - Fix bug that a child process crashes when clients execute a query 9582 contains syntax error in extended query protocol(Toshihiro Kitagawa) 9583 9584 - Fix bug with handling of portal information, it terminates 9585 a child process(Toshihiro Kitagawa) 9586 9587 - Fix hungup when a query sent to one node caused an error 9588 in extended query protocol(Toshihiro Kitagawa) 9589 9590 - Fix typo in English doc. Patch contributed by Asaf Ohaion(Tatsuo Ishii) 9591 9592=============================================================================== 9593 9594 3.0 (umiyameboshi) 2010/09/10 9595 9596* Version 3.0 9597 9598 This is the first version of pgpool-II 3.0 series. 9599 That is, a "major version up" from 2.2 or 2.3 series. 9600 9601 The biggest news is, this version adapts to PostgreSQL 9.0's new 9602 feature: Streaming Replication/Hot Standby. Streaming 9603 replication can be used as a sub mode of master slave 9604 mode. Master slave mode itself heavily enhanced: 9605 9606 - SELECTs in explicit transactions can be load balanced 9607 9608 - In extended protocol, PARSE/BIND/DESCRIBE messages are sent to 9609 the node which execute EXECUTE message, not all node. This 9610 will reduce lock contentions. 9611 9612 - Auto start of transaction happens only when it needed. 9613 9614 - Temporary tables can be used safely. 9615 9616 - SELECT which calls functions possibly write to database 9617 executes on master(primary) 9618 9619 Also many new features are added and major refactoring has been 9620 made to the internal structure of pgpool-II. For example, in 9621 replication mode, SELECTs calling functions possibly write to 9622 database will not allow to load balance. 9623 9624 __________________________________________________________________ 9625 9626* New features 9627 9628 - Online recovery can be used with master/slave/streaming 9629 replication mode(Tatsuo Ishii) 9630 9631 - New directive "delay_threshold" is added to monitor 9632 replication delay in master/slave/streaming replication 9633 mode. If replication delay is too much, SELECTs are not load 9634 balanced(Tatsuo Ishii) 9635 9636 - show pool_status shows replication delay in 9637 master/slave/streaming replication mode(Tatsuo Ishii) 9638 9639 - New directive "log_standby_delay" is added to control logging of 9640 replication delay in master/slave/streaming replication 9641 mode(Tatsuo Ishii) 9642 9643 - When insert_lock is enabled and the table includes SERIAL data 9644 type, issue row lock on the sequence table. Before we issues 9645 table lock. Problem is, the table lock conflicts with auto 9646 vacuum and sometimes caused excessive lock waiting(Tatsuo Ishii) 9647 9648 - Add support for more "SHOW" commands: pool_nodes, 9649 pool_processes, pool_pools, and pool_version(Guillaume Lelarge) 9650 9651 - Backend process id and whether frontend connects to this 9652 connection pool or not are added to pcp_proc_info's 9653 output(Tatsuo Ishii) 9654 9655 - "Gracefuly detach" option is added to pcp_detatch_node. With 9656 this option, pcp_detatch_node waits until all frontends 9657 disconnected(Tatsuo Ishii) 9658 9659 - New directive "white_function_list" and "black_function_list" 9660 are added to register functions those do not or do write to 9661 database(Tatsuo Ishii) 9662 9663 - In master/slave mode, SELECTs to system catalogs executes only 9664 on master/primary(Tatsuo Ishii) 9665 9666 - In master/slave mode, SELECTs to temporary table executes only 9667 on master/primary(Tatsuo Ishii) 9668 9669 - In master/slave mode, write queries outside of explicit 9670 transactions no longer trigger to start internal 9671 transaction(Tatsuo Ishii) 9672 9673 - In master/slave mode, SELECTs inside explicit transactions are 9674 load balanced(Tatsuo, Kitagawa) 9675 9676 - In master/slave mode, commands are no longer sent to all DB 9677 nodes. This will prevent unnecessary locking(Tatsuo, Kitagawa) 9678 9679 - New command option adds to ignore the status file when 9680 starting up(Tatsuo Ishii) 9681 9682 - Supports PostgreSQL 9.0's new VACUUM syntax(Tatsuo Ishii) 9683 9684 - New directive "failover_if_affected_tuples_mismatch" controls 9685 the behavior when number of result rows of 9686 INSERT/UPDATE/DELETE are differ(Tatsuo Ishii) 9687 9688 - When number of result rows of INSERT/UPDATE/DELETE are 9689 differ, each number are logged(Tatsuo Ishii) 9690 9691 - md5 authentication is supported in replication mode and 9692 master/slave mode(Tatsuo Ishii) 9693 9694 - Allow to force to move to online recovery second stage even 9695 there are connecting frontends(Tatsuo Ishii) 9696 9697 - If there's only one DB node and it triggers failover, 9698 pgpool-II will automatically connects if the DB node coming 9699 up(Tatsuo Ishii) 9700 9701 - Pcp commands supports long options(Guillaume Lelarge) 9702 9703 - New directive "debug_level" added to control the debug message 9704 logging(Tatsuo Ishii) 9705 9706 - Allow to use various boolean representations as PostgreSQL in 9707 pgpool.conf(Toshihiro Kitagawa) 9708 9709 - New C language function pgpool_switch_xlog for online recovery 9710 added(Toshihiro Kitagawa) 9711 9712 - New C language function pgpool_regclass added to avoid a trouble 9713 about handling of duplicate table names in different schema(Tatsuo Ishii) 9714 9715 __________________________________________________________________ 9716 9717* Bug fixes 9718 9719 - Do not rewrite statement which accesses columns having now() 9720 etc. as the default value but the data type are not timestamp 9721 etc. Otherwise we have an error in DMLs(Tatsuo Ishii) 9722 9723 - Fix timestamp rewriting not to omit schema qualification(Tatsuo Ishii) 9724 9725 - Fix bug with timeout handling in pcp commands(Tatsuo Ishii) 9726 9727 - Fix SSL hang when large amount of data transfered(Tatsuo Ishii) 9728 9729 - Fix failover when there's only one DB node(Tatsuo Ishii) 9730 9731 - Fix bug with postmaster start check in online recovery. 9732 Before it continued infinitely to try to connect to postmaster 9733 if the first attempt failed(Tatsuo Ishii) 9734 9735 9736=============================================================================== 97372.3 Series (2009/12/07 - 2012/08/06) 9738=============================================================================== 9739 9740 2.3.4 (tomiteboshi) 2012/08/06 9741 9742* Version 2.3.4 9743 9744 This version fixes various bugs since 2.3.3. 9745 9746 __________________________________________________________________ 9747 9748* Bug fixes 9749 9750 - Fix do_error_execute_command() so that it discards responses from 9751 backend until ErrorResponse received. (Toshihiro Kitagawa) 9752 9753 Note that we need to preserve non-error responses (i.e. ReadyForQuery) 9754 and put back them using pool_unread(). 9755 Otherwise, ReadyForQuery response of DEALLOCATE. This could happen if 9756 PHP PDO used. 9757 9758 - Fix SimpleForwardToFrontend() so that it reset select_in_transaction 9759 flag and execute_select flag when bind error occurred while executing 9760 SELECT. (Toshihiro Kitagawa) 9761 9762 - Fix SSL connection sometimes hung if lots of data read from backend. 9763 This is caused by the buffering in OpenSSL layer. To fix the problem, 9764 (Tatsuo Ishii) 9765 9766 we check the buffer has any pending data by using SSL_pending() before 9767 calling select(2). 9768 See thread [Pgpool-general] Fwd: PGPOOL II 2.3.3 hang in ssl mode for 9769 more details. 9770 9771 - Fix bug with pcp_check_fd()'s timeout handling. (Tatsuo Ishii) 9772 9773 Per erboles. 9774 Subject: [Pgpool-general] question about pcp_check_fd 9775 Date: Sun, 23 May 2010 18:21:41 -0500 9776 To: pgpool <pgpool-general@pgfoundry.org> 9777 9778 - Do not force replication of DEALLOCATE if operated in master/slave mode. 9779 Reported by Jan Kantert. (Toshihiro Kitagawa) 9780 9781 See: 9782 Subject: [Pgpool-hackers] Problems with PgPool 2.3.3 Prepare / 9783 Deallocation handling in Master/Slave mode 9784 Date: Fri, 28 May 2010 20:59:47 +0200 9785 For more details. 9786 9787 - Make timestamp rewriting schema aware. (Tatsuo Ishii) 9788 9789 - Do not rewrite statement which accesses columns having now() etc. as the 9790 default value but the data type are not timestamp etc. (Tatsuo Ishii) 9791 9792 Otherwise we have an error in DMLS. See: 9793 Subject: [Pgpool-general] function epoch seems to be causing error 9794 To: pgpool-general@pgfoundry.org 9795 Date: Mon, 16 Aug 2010 21:48:31 +0000 (UTC) 9796 For more details. 9797 9798 - Fix insert_lock to be schema aware. (Tatsuo Ishii) 9799 9800 - Fix long standing bug with timestamp rewriting against array and complex 9801 types. (Tatsuo Ishii) 9802 9803 9804 Failed examples are: 9805 9806 INSERT INTO r1(col[1], col2.foo) VALUES (1, 2); -- insert_column_item 9807 UPDATE r1 SET col1[1] = 1, col2.foo = 1; -- set_target 9808 PREPARE "p" (int4[]) AS SELECT $1[1]; -- c_expr 9809 SELECT (ARRAY[1,2,3])[1]; 9810 SELECT (ARRAY[ARRAY[1]])[1][1]; 9811 SELECT ('{1,2,3}'::int[])[1]; 9812 SELECT ('{1,2,3}'::int[3])[1]; 9813 SELECT r1.col[1], (r1.col1).bar, (r1.col1).* FROM r1; -- columnref 9814 SELECT (r1.col1).baz[1], (r1.col1).baz[1][2] FROM r1; 9815 9816 Patch provided by Akio Ishida. 9817 9818 - Fix buffer overrun problem when pcp password is longer than 32. 9819 (Tatsuo Ishii) 9820 9821 - Fix wait_for_query_response() not to send param status to frontend if 9822 frontend is NULL. This could happen while processing reset_query_list. 9823 (Tatsuo Ishii) 9824 9825=============================================================================== 9826 9827 2.3.3 (tomiteboshi) 2010/04/23 9828 9829* Version 2.3.3 9830 9831 This version fixes various bugs since 2.3.2.2. 9832 9833 __________________________________________________________________ 9834 9835* Incompatible changes 9836 9837 - Please note that this version of pgpool consumes more shared 9838 memory than before. If you encounter problems when starting up 9839 pgpool, please look into pgpool log. If you find messages 9840 something like "could not create shared memory segment: Cannot 9841 allocate memory", please increase the shared memory on your 9842 system. 9843 9844 - Now parallel mode requires replication mode turned 9845 on. parallel mode without replication mode turned on has been 9846 broken since pgpool-II was born anyway(Toshihiro Kitagawa) 9847 9848 - Change default value for insert_lock to false since there's no 9849 point in turning this on in master/slave mode. Fix suggested by 9850 Fujii Masao(Tatsuo Ishii) 9851 9852 __________________________________________________________________ 9853 9854* Newly added documents 9855 9856 - README.online-recovery, which is an internal document of 9857 online recovery, added(Tatsuo Ishii) 9858 9859 __________________________________________________________________ 9860 9861* Bug fixes 9862 9863 - Fix long standing bug since pgpool-II 1.0 which causes 9864 segfault of pgpool child process. This was caused by 9865 miscalculation of shmem size in pgpool parent. Bug analysis by 9866 Kitagawa patch created by Tatsuo 9867 9868 - Add restriction for parallel mode(Toshihiro Kitagawa) 9869 - The Natural Join is not supported 9870 - The USING CLAUSE is converted to ON CLAUSE by query rewrite 9871 process 9872 9873 - Fix possible crash during rewriting JOIN syntax that have 9874 USING in parallel query mode(Toshihiro Kitagawa) 9875 9876 This fix is supporting such as following JOIN syntax. 9877 9878 example: 9879 - SELECT * FROM a JOIN b USING (aid) JOIN c USING (cid); 9880 - SELECT * FROM a JOIN b USING (aid) JOIN c USING (cid) 9881 JOIN d USING (did) 9882 9883 - Fix parallel query so that it can parse INSERT statements that 9884 have current_time before a partitioning key column 9885 (Toshihiro Kitagawa) 9886 9887 - Fix SimpleForwardToBackend() so that pgpool doesn't keep 9888 waiting for reply from a backend, when clients using the 9889 extended query protocol cause a command error such as bind 9890 error. This bug occur in master/slave, raw, and connection 9891 pool mode. This fix is, sending SYNC message to recover error 9892 after command error(Toshihiro Kitagawa) 9893 9894 - Fix SIGINT/SIGQUIT is ignored if pgpool child is in 9895 select(). In this case pgpool retries select() thus the signal 9896 is ignored(Tatsuo Ishii) 9897 9898 - Fix connect_inet_domain_socket_by_port/ 9899 connect_unix_domain_socket_by_port so that they check if 9900 SIGTERM/SIGINT/SIGQUIT signal has been delivered. Per bug 9901 report from Daniel Codina(Tatsuo Ishii) 9902 9903 - Fix possible crash during creating "kind mismatch" error 9904 message. This used to work but was broken in 2.3.2(Tatsuo Ishii) 9905 9906 - Fix bug with healh checking. If a network problem such as 9907 unplugged wire happens while calling connect(), health 9908 checking does not work since 9909 connect_unix_domain_socket()/connect_inet_domain_socket() do 9910 retry if connect() is interrupted by ALARM signal. Added new 9911 retry argument which controls the retrying behavior to those 9912 functions. Per bug report and problem analysis by Daniel 9913 Codina(Tatsuo Ishii) 9914 9915 - Fix enbug in 2.3.2.2 with time stamp rewriting in 9916 SimpleForwardToBackend. Per bug report from Bugtrack #1010771. 9917 Report from Peter Pramberge(Tatsuo Ishii) 9918 9919 - Fix rewriting "*" in paralell query. Patch conributed by 9920 sho-san(Toshihiro Kitagawa) 9921 9922 - Fix connect_inet_domain_socket_by_port() so that it print out 9923 error message by using hstrerror(), rather than 9924 strerror()(Tatsuo Ishii) 9925 9926=============================================================================== 9927 9928 2.3.2.2 (tomiteboshi) 2010/02/22 9929 9930* Version 2.3.2.2 9931 9932 This version fixes various bug in 2.3.x. 9933 9934 - When rewriting timestamp in extended query, it allocated less 9935 than what it actually needed. This causes random problematic 9936 behavior, typically "message: invalid string in message" error 9937 in backend(Tatsuo Ishii). 9938 9939 - In extended query, if one of parameters contains NULL, ppool 9940 crashes(Tatsuo Ishii). 9941 9942 - If in previous status file all nodes were marked down status, 9943 it is regarded that this file is bogus. This will prevent "all 9944 node down" syndrome(Tatsuo Ishii). 9945 9946=============================================================================== 9947 9948 2.3.2.1 (tomiteboshi) 2010/02/11 9949 9950* Version 2.3.2.1 9951 9952 This version fixes bug in 2.3.x. It is identfied that 9953 pgpool-II 2.3.x has a problem with erroneous query 9954 processing(Akio Ishida). 9955 9956=============================================================================== 9957 9958 2.3.2 (tomiteboshi) 2010/02/07 9959 9960* Version 2.3.2 9961 9962 This version includes various fixes for bugs in 2.3.1 or before. 9963 All 2.3.x users are encouraged to upgrade to 2.3.2 as soon as 9964 possible. 9965 9966 Also this version enables long awaited SSL support and large 9967 object replication support. 9968 9969 __________________________________________________________________ 9970 9971* Enhancements 9972 9973 - SSL support(Sean Finney) 9974 9975 - Large object replication support. You need PostgreSQL 8.1 or 9976 later, however(Tatsuo Ishii) 9977 9978 - Emit statement log when error or notice message comes from 9979 query parsing process. This is usefull because PostgreSQL does 9980 not log particular statement if the error was detected 9981 *before* raw parser get executed. This typlically happens 9982 when encoding error was found(Tatsuo Ishii) 9983 9984 - Display original query to log if kind mismatch error was 9985 caused by DEALLOCATE(Tatsuo Ishii) 9986 9987 - While health checking and recovery use postgres database if 9988 possible. If postgres database does not exist, use template1 9989 as it stands now. While connecting template1, certain 9990 commands, for example DROP DATABASE cannot used. Using postgres 9991 database allows to use these commands while recovery(Tatsuo Ishii) 9992 9993 __________________________________________________________________ 9994 9995* Bug fixes 9996 9997 - Fix errors in timestamp rewriting which occasionaly cause 9998 broken packet sentto slave nodes(Tatsuo Ishii) 9999 10000 - Fix errors when timestamp rewriting is used with V2 10001 protocol(Toshihiro Kitagawa) 10002 10003 - Propagate Bind, Describe and Close messages to only master 10004 node if running in master/slave and in transaction (Tatsuo Ishii) 10005 10006 - Fix do_child() so that check_stop_request() exits immediately 10007 when smart shutdown signal has been sent. This has been used 10008 to work in 2.2(Toshihiro Kitagawa) 10009 10010 - Fix ProcessFrontendResponse not to accept invalid frotend 10011 packet(Xavier Noguer) 10012 10013 - Use %dz for sizeof in fprintf for more portability(Tatsuo Ishii) 10014 10015 - Fix compiler warnings(Tatsuo Ishii) 10016 10017 - Do not force replication of DEALLOCATE if operated in 10018 master/slave mode. Now that pgpool do not execute PARSE in all 10019 nodes, this was pointless and caused problem (kind mismatch 10020 when executing DEALLOCATE)(Tatsuo Ishii) 10021 10022=============================================================================== 10023 10024 2.3.1 (tomiteboshi) 2009/12/18 10025 10026* Version 2.3.1 10027 10028 This version includes various fixes for bugs in 2.3 or before. 10029 All 2.3 users are encouraged to upgrade to 2.3.1 as soon as 10030 possible. 10031 __________________________________________________________________ 10032 10033* Bug fixes 10034 10035 - If all of following conditions met, incorrect data is written 10036 to DB(Tatsuo Ishii) 10037 10038 - pgpool is running in replication mode 10039 - pgpool is running on 64bit OS 10040 - INSERT or UPDATE are used which explicitly include now(), 10041 - CURRENT_TIMESTAMP, CURRENT_DATE, CURRENT_TIME. Or the target 10042 - Table's default value use above functions 10043 - The SQL statement inclludes out of 32bit 10044 integer value(-2147483648 to 2147483647 in decimal) 10045 10046 Example SQL: INSERT INTO t1(id, regdate) VALUES(98887776655, 10047 NOW()); 10048 10049 - Fix crush in case of more than 18 DB nodes are used(Tatsuo Ishii) 10050 10051 - Enhance kind mismatch error message. If kind is ERROR or 10052 NOTICE, the error or notice message from PostgreSQL will be printed 10053 (Tatsuo Ishii) 10054 10055=============================================================================== 10056 10057 2.3 (tomiteboshi) 2009/12/07 10058 10059* Version 2.3 10060 10061 This version enhances replication, especially CURRENT_TIMESTAMP, 10062 CURRENT_DATE, now() etc. now can be properly replicated. Also 10063 perforance of replication when num_init_children == 1 is 10064 enhanced. Pgpool-II now records the status of down nodes, and 10065 remember when it restarts to ensure that keep the node status as 10066 before. Also some logs are enhanced and more fine fail over 10067 controls are added. Please note that pgpool-II 2.3 includes all 10068 of enhancements and fixes of pgpool-II 2.2.1 to 2.2.6. 10069 10070 __________________________________________________________________ 10071 10072* Incompatibilities from 2.2.x 10073 10074 - pgpool_status file is created under logdir. So you need to 10075 give write permission to the directory so that pgpool-II can 10076 read/write pgpool_status file. 10077 10078 __________________________________________________________________ 10079 10080* Enhancements 10081 10082 - Enable proper replication of results of temporal functions 10083 (CURRENT_TIMESTAMP, CURRENT_DATE, now() etc.). Now 10084 applications can execute INSERT/UPDATE tables which include 10085 defaut values using those temporal functions. There are small 10086 limitations. See restriction sections of docs for more 10087 details (Akio Ishida) 10088 10089 - Use PostgreSQL 8.4's SQL parser(Akio Ishida) 10090 10091 - Enhance the performance 20% to 100% of replication when 10092 num_init_children == 1(Tatsuo Ishii) 10093 10094 - Add new directive log_per_node_statement which is similar to 10095 log_statement except that prints info for each DB node to make 10096 it easier which query is sent to which DB node(Tatsuo Ishii) 10097 10098 - Add new directive fail_over_on_backend_error to control the 10099 behaviro of fail over(Tatsuo Ishii) 10100 10101 - Record DB node status and remember when pgpool-II restarts(Tatsuo Ishii) 10102 10103 - EXPLAIN and EXPLAIN ANALYZE for SELECT query are now load 10104 balanced. This will prevent unwanted kind mismatch errors when 10105 EXPLAIN produces slightly different plan(Tatsuo Ishii) 10106 10107 - Enhance CSS of pgpool-ja.html(Tatsuo Ishii) 10108 10109 - Add sample configuration file for replication mode and 10110 master/slave mode(Tatsuo Ishii) 10111 10112 - Add test for temporal data(Akio Ishida) 10113 10114 10115=============================================================================== 101162.2 Series (2009/02/08 - 2012/08/06) 10117=============================================================================== 10118 10119 2.2.8 (urukiboshi) 2012/08/06 10120 10121* Version 2.2.8 10122 10123 It includes various fixes for bugs various bug fixes in 2.2.7. 10124 10125 __________________________________________________________________ 10126 10127* Bug fixes 10128 10129 - Fix do_error_execute_command() so that it discards responses from 10130 backend until ErrorResponse received. (Toshihiro Kitagawa) 10131 10132 Note that we need to preserve non-error responses (i.e. ReadyForQuery) 10133 and put back them using pool_unread(). 10134 Otherwise, ReadyForQuery response of DEALLOCATE. This could happen if 10135 PHP PDO used. 10136 10137 - Fix SimpleForwardToFrontend() so that it reset select_in_transaction 10138 flag and execute_select flag when bind error occurred while executing 10139 SELECT. (Toshihiro Kitagawa) 10140 10141 - Fix bug with pcp_check_fd()'s timeout handling. (Tatsuo Ishii) 10142 10143 Per erboles. 10144 Subject: [Pgpool-general] question about pcp_check_fd 10145 Date: Sun, 23 May 2010 18:21:41 -0500 10146 To: pgpool <pgpool-general@pgfoundry.org> 10147 10148 - Fix buffer overrun problem when pcp password is longer than 32. 10149 (Tatsuo Ishii) 10150 10151 - Fix wait_for_query_response() not to send param status to frontend if 10152 frontend is NULL. This could happen while processing reset_query_list. 10153 (Tatsuo Ishii) 10154 10155=============================================================================== 10156 10157 2.2.7 (urukiboshi) 2010/04/15 10158 10159* Version 2.2.7 10160 10161 This version enhances displaying error messages when kind 10162 mismatch error occurs. Also it includes various fixes for bugs 10163 in 2.2.6 or before as usual. 10164 10165 __________________________________________________________________ 10166 10167* Bug fixes 10168 10169 - Fix occasional hangup in extend protocol + master/slave mode, 10170 row mode or connection pool mode. Back patch from 2.3 10171 tree(Toshihiro Kitagawa) 10172 10173 - Fix long standing bug since pgpool-II 1.0 which causes 10174 segfault of pgpool child process. This was caused by 10175 miscalculation of shmem size in pgpool parent. Bug analysis by 10176 Kitagawa patch created by Tatsuo 10177 10178 - Send Parse, Bind, Describe and Close message to only master 10179 node if operated in explicit transaction and master/slave 10180 mode(Tatsuo Ishii). 10181 10182 - Emit a log when postmaster goes down(Tatsuo Ishii) 10183 10184 - Fix memory leak in make_persistent_db_connection(Xavier 10185 Noguer) 10186 10187 - Do not force replication of DEALLOCATE if operated in 10188 master/slave mode. Now that pgpool do not execute PARSE in all 10189 nodes, this was pointless and caused problem (kind mismatch 10190 when executing DEALLOCATE) (Tatsuo Ishii) 10191 10192 - Fix crash with show pool_status when there many (more than 18) 10193 DB nodes(Tatsuo Ishii) 10194 10195 - Enhance "kind mismatch" message. If kind is ERROR or NOTICE, 10196 print the ERROR/NOTICE message to help users to find what's 10197 going on(Tatsuo Ishii) 10198 10199=============================================================================== 10200 10201 2.2.6 (urukiboshi) 2009/12/01 10202 10203* Version 2.2.6 10204 10205 This version enhances handling of backend weight. Also it allows 10206 to use temp tables in master/slave mode. It includes various 10207 fixes for bugs in 2.2.5 or before as usual. 10208 10209 __________________________________________________________________ 10210 10211* Bug fixes 10212 10213 - Do not allow to load balance DECLARE, CLOSE, FETCH and 10214 MOVE. If data gets updated and CLOSE issued after transaction 10215 commit(i.e. holdbale cursor), this will cause data 10216 inconsistency since CLOSE is executed one of the severs, 10217 rather than all(Tatsuo Ishii) 10218 10219 - In master/slave mode, execute Parse message on only master 10220 node. In previous versions Parse executed on all nodes, which 10221 grabbed unneccessary lock(Tatsuo Ishii) 10222 10223 - Remove init script from all runlevels before uninstall(Devrim) 10224 10225 - Fix pgpoo.spec(Devrim) 10226 10227 - Do not execute REINDEX DATABASE or SYSTEM, CREATE/DROP TABLE 10228 SPACE inside a transaction block(Tatsuo Ishii) 10229 10230 __________________________________________________________________ 10231 10232* Enhancements 10233 10234 - Allow to change weight by reloading pgpool.conf. This will take 10235 effect for next client sessions(Tatsuo Ishii) 10236 10237 - Reply with usefull error messages, rather than "server closed 10238 the connection unexpectedly" when authentication fails(Glyn 10239 Astill) 10240 10241 - Add info to logs when writing to sockets falis to know if it 10242 was for backend or frontend(Tatsuo Ishii) 10243 10244 - Do not complain when writing to socket of frontend 10245 fails(Tatsuo Ishii) 10246 10247 - Allow to use temp tables in master/slave 10248 mode. INSERT/UPDATE/DELETE will automatically be sent to 10249 master only. Still SELECT you need to add /*NO LOAD BALANCE*/ 10250 comment(Tatsuo Ishii) 10251 10252 - Add temp table test to test/jdbc(Tatsuo Ishii) 10253 10254=============================================================================== 10255 10256 2.2.5 (urukiboshi) 2009/10/4 10257 10258* Version 2.2.5 10259 10260 This version fixes various bugs in 2.2.4 or before. 10261 10262 __________________________________________________________________ 10263 10264* Bug fixes 10265 10266 - Fix connection_count_down(). It decrements the connection 10267 counter too much in some corner cases and causes online 10268 recover never completes(Tatsuo Ishii) 10269 10270 - Detect frontend exiting while waiting for commands complete in 10271 other cases such as internal locks are issued and Parse 10272 (Tatsuo Ishii) 10273 10274 - Fix inifinit loop in reset_backend(Xavier Noguer, Tatsuo) 10275 10276 - Fix Parse() to print actual query when it detects kind 10277 mismatch error(Tatsuo Ishii) 10278 10279 - Document enhancements(Tatsuo Ishii) 10280 10281=============================================================================== 10282 10283 2.2.4 (urukiboshi) 2009/8/24 10284 10285* Version 2.2.4 10286 10287 This version fixes various bugs in 2.2.3 or before. 10288 10289 __________________________________________________________________ 10290 10291* Bug fixes 10292 10293 - Fix possible bug introduced in pgpool-II 2.2.2. Load balance 10294 control variables may remain not be restored and subsequent 10295 DML/DDL call might sent to only master node(Tatsuo Ishii) 10296 10297 - Send NOTICE message to frontend periodically if V2 protocol is 10298 used. This is ifdef out since it affectes visible change to 10299 applications. 2.2.3 unconditionaly sends param packet to 10300 client even it uses version 2 protocol, which is apparentlt 10301 wrong. Also tweak checking period from 1 second to 30 seconds 10302 since 1 second seems too aggressive(Tatsuo Ishii) 10303 10304 - Block signals before forking children rather after. Otherwise 10305 parent will be killed by failover signal if it receives a 10306 signal before establishing signal handler(Tatsuo Ishii) 10307 10308 - Remove unnecessary spaces and tabs at the end of line(Jun Kuriyama) 10309 10310=============================================================================== 10311 10312 2.2.3 (urukiboshi) 2009/8/11 10313 10314* Version 2.2.3 10315 10316 This version fixes various bugs in 2.2.2 or before. 10317 10318 __________________________________________________________________ 10319 10320* Bug fixes 10321 10322 - Fix child process death if one of backends is not available(Tatsuo Ishii). 10323 10324 - Fix various parallel query bugs(Yoshiharu Mori) 10325 10326 - Fix message corruption for kid mismatch error(Akio Ishida) 10327 10328 - Now stetmemt_time works(Tatsuo Ishii) 10329 10330 - Enhance health checking to detect postmaster stopping by 10331 SIGSTOP(Tatsuo Ishii) 10332 10333 - Detect frontend abnormal exiting while waiting for reply from 10334 backend. This only works with V3 protocol(Tatsuo Ishii) 10335 10336 - Do not start internal transaction if command is CLUSTER 10337 without arguments(Tatsuo Ishii) 10338 10339 - Fix bug with COPY FROM in that backend process remains after 10340 COPY failed(Tatsuo Ishii) 10341 10342 __________________________________________________________________ 10343 10344* Enhancements 10345 10346 - Show last query for extended protocol(Akio Ishida) 10347 10348 - Allow to compile sql/pgpool-recovery/pgpool-recovery.c with 10349 PostgreSQL 8.4(Tatsuo Ishii) 10350 10351=============================================================================== 10352 10353 2.2.2 (urukiboshi) 2009/5/5 10354 10355* Version 2.2.2 10356 10357 This version fixes various bugs in 2.2.1 or before. Please note 10358 that an importan fix is made to avoid data incositency risk, 10359 which could happen when client does not exit gracely(without 10360 sending "X" packet) while pgpool is trying to send data to 10361 it. This could happen with all version of pgpool-II. 10362 10363 __________________________________________________________________ 10364 10365* Bug fixes 10366 10367 - Ignore write error on frontend connection. This is needed to 10368 continue processing with backend, otherwise we risk data 10369 incositency(Tatsuo Ishii) 10370 10371 - Fix bug introduced in 2.2.1 (In master slave mode, sometimes 10372 DEALLOCATE fails). If prepared statement reused, pgpool 10373 hangs(Toshihiro Kitagawa) 10374 10375 - Fix pgpool crash when SQL command PREPARE and protocol level 10376 EXECUTE are mixed. The bug was introduced in 2.2(Tatsuo Ishii) 10377 10378 - Avoid "unexpected EOF on client connection" error in PostgreSQL 10379 when reset query fails(Tatsuo Ishii) 10380 10381=============================================================================== 10382 10383 2.2.1 (urukiboshi) 2009/4/25 10384 10385* Version 2.2.1 10386 10387 This version fixes various bugs in 2.2. 10388 10389 __________________________________________________________________ 10390 10391* Bug fixes 10392 10393 - In master slave mode, sometimes DEALLOCATE fails. This is 10394 caused by that the first PREPARE was not executed on the 10395 slave(Toshihiro Kitagawa) 10396 10397 - Update pgpool.spec along with related files(Devrim) 10398 10399 - Fix inser_lock so that it is ignored when protocol version is 10400 2(Tatsuo Ishii) 10401 10402 - Remove excessive log messages regarding parameter change notice(Tatsuo Ishii) 10403 10404 - Add missing files to doc(Tatsuo Ishii) 10405 10406=============================================================================== 10407 10408 2.2 (urukiboshi) 2009/2/28 10409 10410* Version 2.2 10411 10412 This version enhances SERIAL data type handling and on line 10413 recovery. Also an important bug, serializable transactions could 10414 cause data inconsistency among DB nodes, is fixed. Query 10415 cancelation, which never worked since pgpool-II was born, is 10416 finally fixed. 10417 10418 __________________________________________________________________ 10419 10420* New features/enhancements 10421 10422 - With insert_lock, now a table is locked only if it has 10423 SERIAL data type and now the default value for insert_lock 10424 is true(Tatsuo Ishii) 10425 10426 - Start internal transaction other than INSERT, UPDATE, DELETE 10427 and SELECT to keep node consistency(Tatsuo Ishii) 10428 10429 - Add client_idle_limit_in_recovery directive. This will 10430 prevent 2nd stage of on line recovery from not going forward 10431 by idle clients sitting forever(Tatsuo Ishii) 10432 10433 - Add pid_file_name directive which specifies a path to the 10434 file containing pgpool process id. "logdir" is no more used(Tatsuo Ishii) 10435 10436 - Allow to load balance DECLARE, FETCH and CLOSE(Tatsuo Ishii) 10437 10438 - Add -d option to pcp commands(Jun Kuriyama) 10439 10440 - Enahnce kind mismatch error message to include originarl 10441 query string(Tatsuo Ishii) 10442 10443 __________________________________________________________________ 10444 10445* Bug fixes 10446 10447 - Close all file descriptors when running in daemon mode. 10448 Otherwise we inherit sockets from apache when it's 10449 started by pgpoolAdmin. This results in that port 80 is 10450 occupied for example. Patch provided by Akio 10451 Ishida. Also add chdir("/"). This is always good for 10452 daemon programs(Tatsuo Ishii) 10453 10454 - Allow MD5 authentication in raw mode as stated in docs(Tatsuo Ishii) 10455 10456 - Check transaction serialization failure error in 10457 serializable mode and abort all nodes if so. Otherwise 10458 we allow data inconsistency among DB nodes(Tatsuo Ishii). 10459 10460 See following scenario: (M:master, S:slave) 10461 10462 M:S1:BEGIN; 10463 M:S2:BEGIN; 10464 S:S1:BEGIN; 10465 S:S2:BEGIN; 10466 M:S1:SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; 10467 M:S2:SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; 10468 S:S1:SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; 10469 S:S2:SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; 10470 M:S1:UPDATE t1 SET i = i + 1; 10471 S:S1:UPDATE t1 SET i = i + 1; 10472 M:S2:UPDATE t1 SET i = i + 1; <-- blocked 10473 S:S1:COMMIT; 10474 M:S1:COMMIT; 10475 M:S2:ERROR: could not serialize access due to concurrent update 10476 S:S2:UPDATE t1 SET i = i + 1; <-- success in UPDATE and data 10477 becomes inconsistent! 10478 10479 - avoid kind mismatch error caused by "SET TRANSACTION 10480 ISOLATION LEVEL must be called before any query"(Tatsuo Ishii). 10481 10482 This could happen in following scenario: 10483 10484 M:S1:BEGIN; 10485 S:S1:BEGIN; 10486 M:S1:SELECT 1; <-- only sent to MASTER 10487 M:S1:SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; 10488 S:S1:SET TRANSACTION ISOLATION LEVEL SERIALIZABLE; 10489 M: <-- error 10490 S: <-- ok since no previous SELECT is sent. kind mismatch error occurs! 10491 10492 - Process status display has extra space on FreeeBSD(Jun Kuriyama) 10493 10494 - Fix incorrect kind mismatch detection case. e.g: BEGIN; 10495 BEGIN; (Tatsuo Ishii) 10496 10497 - If PostgreSQL sends lots of DEBUG message, sometimes pgpool 10498 complains: 10499 2008-11-08 22:41:53 ERROR: pid 23744: do_command: backend does not 10500 return ReadyForQuery. This due to a wrong assumption for the 10501 client/server protocol(Tatsuo Ishii) 10502 10503 - Fix the case when sending an erronous query to abort 10504 transaction. It assumed that after sending an error query, 10505 always ReadyForQuery came right after that. If some 10506 debugging or logging verboseness is set, PostgreSQL might 10507 sends NOTICE before ReadyForQuery(Tatsuo Ishii) 10508 10509 - Query cancelation now works. It never worked since pgpool-II 10510 was born(Tatsuo Ishii) 10511 10512 - Fix online recovery to wait for failback done before 10513 allowing to accept connections from clients. It was supposed 10514 to work like this but actually was not since the day 0 when 10515 online recovery was born. Without the fix there could be 10516 potential data inconsistency among DB nodes(Tatsuo Ishii) 10517 10518 - Fix pgpool-II crash after on line recovery. This happens 10519 after the failback process adds a recovered node which has 10520 no connection to the node(Tatsuo Ishii) 10521 10522 - Fix pgpool-II errors when postgresql.conf is reloaded. This 10523 was caused by parameter status packet sent asynchronously 10524 from backend, which indicates the internal setting of 10525 backend has been changed(Tatsuo Ishii) 10526 10527 __________________________________________________________________ 10528 10529* Incompatible changes 10530 10531 - Always fail over and restart all children. Before we do 10532 restart only if master has not been changed. This is 10533 wrong. If we have trouble with network cable or something, 10534 TCP/IP stack keeps on retrying for long time and the only 10535 way to prevent it is restarting process(Tatsuo Ishii) 10536 10537 - "logdir" is no more used. Instead use 10538 "pid_file_name"(Tatsuo Ishii) 10539 10540 - Default value for insert_lock is now true(Tatsuo Ishii) 10541 10542 10543=============================================================================== 105442.1 Series (2008/07/25 - 2008/07/25) 10545=============================================================================== 10546 10547 2.1 (inamiboshi) 2008/7/25 10548 10549* Version 2.1 10550 10551 __________________________________________________________________ 10552 10553* New feature 10554 10555 - Add '%m' format to failover_command and failback_command to 10556 obtain new master node ID. (Yoshiyuki Asaba) 10557 - Add '%m' format to failover_command and failback_command to 10558 obtain old master node ID. (Yoshiyuki Asaba) 10559 - Add new directive "recovery_timeout" to specify recovery 10560 timeout in second. (Taiki Yamaguchi) 10561 - Add optino '-v' to print pgpool version. (Yoshiyuki Asaba) 10562 10563 __________________________________________________________________ 10564 10565* Incompatibility 10566 10567 - Restrict pgpool_recovery() and pgpool_remote_start() 10568 functions to superusers. (Yoshiyuki Asaba) 10569 - Do not create a connection pool to standby node in raw 10570 mode. (Yoshiyuki Asaba) 10571 - Remove "replication_timeout" parameter. (Yoshiyuki Asaba) 10572 - This enabled if replication_strict was false. However, 10573 replication_strict was already removed. 10574 - Ignore timeout argument of pcp commands. (Taiki Yamaguchi) 10575 - Do not replicate "COPY TO STDOUT" when replicate_select is 10576 false. (Yoshiyuki Asaba) 10577 10578 __________________________________________________________________ 10579 10580* Bug fix 10581 10582 ** General 10583 10584 - Fix crash when CloseComplete message was 10585 received. (Yoshiyuki Asaba) 10586 - Improve network I/O routine. (Yoshiyuki Asaba) 10587 - Fix compile errors on Solaris 10. (Yoshiyuki Asaba) 10588 - Improve log messages of health check and recovery. (Tatsuo Ishii) 10589 - Change error level of the "failed to read kind from 10590 frontend" message from ERROR to LOG. (Yoshiyuki Asaba) 10591 - Fix failover failure in raw mode. (Taiki Yamaguchi) 10592 - Fix zombie process bug. (Yoshiyuki Asaba) 10593 - Fix health_check_timeout to work correctly. (Kenichi Sawada) 10594 - Support ps status on FreeBSD. (ISHIDA Akio) 10595 - Improve bind(2) failure report. (Jun Kuriyama) 10596 - Improve error message when client authentication 10597 failed. (Tatsuo Ishii) 10598 10599 ** Replication 10600 10601 - Fix replicate_select to work correctly. (Tatsuo Ishii) 10602 - Fix a wrong rollback bug with extended query. (Yoshiyuki Asaba) 10603 - Fix a bug with asynchronous query. (Yoshiyuki Asaba) 10604 - Fix hint clause handling like /*REPLICATION*/ with extended 10605 query. (Yoshiyuki Asaba) 10606 - Fix crash of "DEALLOCATE ALL". (Yoshiyuki Asaba) 10607 - Fix hang up when a backend node does immediate 10608 shutdown. (Yoshiyuki Asaba) 10609 - Fix hang up online recovery in high load. (Yoshiyuki Asaba) 10610 - Fix hang up with extended query protocol when SELECT is 10611 failed inside a transaction block. (Yoshiyuki Asaba) 10612 10613 ** Master Slave 10614 10615 - Fix load balancing to work correctly. (Yoshiyuki Asaba) 10616 - Fix crash if SET, PREPARE or DEALLOCATE is executed inside a 10617 transaction block. (Yoshiyuki Asaba) 10618 10619 ** Parallel query 10620 10621 - Fix INSERT failure. (Yoshiharu Mori) 10622 - Fix syntax error when a query contains "AS" in FROM 10623 clause. (sho) 10624 - Fix Hung up when two or more statment was executed 10625 in parallel mode (Yoshiharu Mori) 10626 - Fix Query rewriting of Join Expression and DISTINCT ON 10627 (Yoshiharu Mori) 10628 10629=============================================================================== 106302.0 Series (2007/11/16 - 2007/11/21) 10631=============================================================================== 10632 10633 2.0.1 (hikitsuboshi) 2007/11/21 10634 10635 * Version 2.0.1 10636 * Fix process down with UPDATE or DELETE query.(Yoshiyuki Asaba) 10637 * Send a syntax query only to a master node if master_slave is 10638 true.(Yoshiyuki Asaba) 10639 10640=============================================================================== 10641 10642 2.0 (hikitsuboshi) 2007/11/16 10643 10644* Version 2.0 10645 10646 __________________________________________________________________ 10647 10648* Incompatibility since pgpool-II 1.x 10649 10650 - the default value for ignore_leading_white_space is now 10651 true(Yoshiyuki Asaba) 10652 - replicate_strict is removed. The value is always 10653 true(Yoshiyuki Asaba) 10654 10655 __________________________________________________________________ 10656 10657* General 10658 - Allow to reload pgpool.conf(Yoshiyuki Asaba) 10659 - The paraser is now compatible with PostgreSQL 8.3(Yoshiyuki Asaba) 10660 - Add new directive "failover_command" to specify command when 10661 a node is detached(Yoshiyuki Asaba) 10662 - Add new directive "client_idle_limit" to specify the time out since 10663 the last command is arrived from a client(Tatsuo Ishii) 10664 10665 __________________________________________________________________ 10666 10667* Replication 10668 10669 - Always start a new transaction even if the query is not in 10670 an explicit transaction to enhance the reliabilty of 10671 replication(Yoshiyuki Asaba) 10672 - Enhance the performance of replication for write 10673 queries. Now the worst case is 1/2 compared with single DB 10674 node regardless the number of DB nodes. Previous release 10675 tends to degrade according to the numer of DB 10676 nodes(Yoshiyuki Asaba) 10677 - Add "online recovery" which allows to add a DB node and sync 10678 with other DB nodes without stopping the pgpool 10679 server(Yoshiyuki Asaba) 10680 - Abort a transaction if INSERT, UPDATE and DELETE reports 10681 different number of result rows(Yoshiyuki Asaba) 10682 10683 x=# update t set a = a + 1; 10684 ERROR: pgpool detected difference of the number of update tuples 10685 HINT: check data consistency between master and other db node 10686 10687 - If the results from DB nodes do not match, select the 10688 possible correct result by "decide by majority". Previous 10689 release always trust the result of the master DB 10690 node(Yoshiyuki Asaba) 10691 - Allow load balance in V2 frontend/backend protocol(Yoshiyuki Asaba) 10692 10693 __________________________________________________________________ 10694 10695* Parallel query 10696 10697 - Allow "partial replication" to enhance the performance of 10698 the parallel query(Yoshiharu Mori) 10699 10700 10701=============================================================================== 107021.3 Series (2007/10/23 - 2007/10/23) 10703=============================================================================== 10704 10705 1.3 (sohiboshi) 2007/10/23 10706 10707 * Version 1.3 10708 * Add new "authentication_timeout" directive, being the default 10709 value is 60. (Yoshiyuki Asaba) 10710 - Maximum time in seconds to complete client authentication. 10711 * Reject a connection when startup packet length is greater than 10712 10,000 byte. (Yoshiyuki Asaba) 10713 * Fix invalid memory access when pgpool processed DEALLOCATE 10714 statement. (Yoshiyuki Asaba) 10715 * Fix hang up in load balance mode. (Yoshiyuki Asaba) 10716 - This was introduced in V1.2. 10717 * Fix segmentation fault in 64-bit environment when query cache 10718 is enable. (Yoshiyuki Asaba) 10719 10720 10721=============================================================================== 107221.2 Series (2007/08/01 - 2007/09/28) 10723=============================================================================== 10724 10725 1.2.1 (tomoboshi) 2007/09/28 10726 10727 * Version 1.2.1 10728 * Fix deadlock while processing Parse message. (Yoshiyuki Asaba) 10729 * Fix memory leak in reset_prepared_list(). (Yoshiyuki Asaba) 10730 * Fix compile error on FreeBSD 4.11. (Yoshiyuki Asaba) 10731 * SET, PREPARE and DEALLOCATE statements are replicated in 10732 master/slave mode. (Yoshiyuki Asaba) 10733 10734=============================================================================== 10735 10736 1.2 (tomoboshi) 2007/08/01 10737 10738 * Version 1.2 10739 * Add new "replicate_select" directive, being the default value 10740 is false. (Yoshiyuki Asaba) 10741 - If it is true, SELECT query is replicated. This behavior is 10742 same as V3.2 or earlier. 10743 * Improve signal handling. (Yoshiyuki Asaba) 10744 - Occasionaly, zombie processes were remained. Or processes 10745 were unstable. 10746 * Fix hang up when SELECT was error inside a transaction 10747 block. The bug was introduced in V3.3. (Yoshiyuki Asaba) 10748 * Fix PREPARE/EXECUTE handling in master slave mode. (Yoshiyuki Asaba) 10749 * Fix "kind mismatch error" when deadlock error 10750 * Fix hang up and SEGV in extended query protocol when a warning 10751 SQL like "SELECT '\'';" executed. (Yoshiyuki Asaba) 10752 * Fix hang up when postmaster did fast or immediate 10753 shutdown. (Yoshiyuki Asaba) 10754 * Fix memory leak when connection cache was full. (Yoshiyuki Asaba) 10755 * Load balancing node is selected when a session 10756 starts. (Yoshiyuki Asaba) 10757 * Fix buffer overrun if connection_life_time was 10758 set. (Yoshiyuki Asaba) 10759 10760 10761=============================================================================== 107621.1 Series (2007/5/25 - 2007/6/15) 10763=============================================================================== 10764 10765 1.1.1 (amiboshi) 2007/6/15 10766 10767 * Version 1.1.1 10768 * Fix "kind mismatch" bug when load_balance_mode is true 10769 introduced in 1.1 (Yoshiyuki Asaba) 10770 * Fix deadlock with extended query protocol(Yoshiyuki Asaba) 10771 * Fix numerous bugs with protocol V2(Yoshiyuki Asaba) 10772 10773=============================================================================== 10774 10775 1.1 (amiboshi) 2007/5/25 10776 10777 * Version 1.1 10778 * Support HBA authentication(Taiki Yamaguchi) 10779 * Support log_connections(Taiki Yamaguchi) 10780 * Support log_hostname(Taiki Yamaguchi) 10781 * Show pgpool status in ps command(Taiki Yamaguchi) 10782 * Fix compile error on MacOS X(Yoshiyuki Asaba) 10783 * Allow load balancing with extended protocol(Yoshiyuki Asaba) 10784 * Improve replication. SELECT nextval() and SELECT setval() are 10785 now replicated. (Yoshiyuki Asaba) 10786 * Change SELECT query is only sent to the master node. (Yoshiyuki Asaba) 10787 - Use /*REPLICATION*/ comment to repliate a SELECT query. 10788 * Fix unexpected failover error due to receiving an interrupt 10789 signal while connecting to the backend. (Yoshiyuki Asaba) 10790 * Add "pgpool.pam" file, for PAM configuration file, to be 10791 installed under "$PREFIX/share/pgpool-II/". (Taiki Yamaguchi) 10792 * Fix core dump when executing large SQL. (Yoshiyuki Asaba) 10793 10794 10795=============================================================================== 107961.0 Series (2006/09/08 - 2007/02/12) 10797=============================================================================== 10798 10799 1.0.2 (suboshi) 2007/02/12 10800 10801 * Version 1.0.2 10802 * Fix bug when executing large SQL to prevent pgpool goes into 10803 infinite loop(Yoshiyuki Asaba) 10804 * Fix bug with extended protocol handling(Yoshiyuki Asaba) 10805 * Enhance log for failover and failback(Tatsuo Ishii) 10806 * Add backend status info to show pool_status(Tatsuo Ishii) 10807 * Fix UPDATE/DELETE returns wrong number of rows(Tatsuo Ishii) 10808 * Fix configure fails to link libpq when used with older 10809 version of gcc(Yoshiyuki Asaba) 10810 * Fix DEALLOCATE treatment when used with PHP:PDO DBD-Pg(Yoshiyuki Asaba) 10811 * Do not load balance SELECT FOR UPDATE, SELECT INTO and SELECT 10812 with comments. This behavior is compatible with 10813 pgpool-I(Yoshiyuki Asaba) 10814 * Obtain path to libpq using pg_config. --with-pgsql will be 10815 removed in next version(Yoshiyuki Asaba) 10816 * When reusing connection pool, reconnect to backend if the 10817 socket is broken(Yoshiyuki Asaba) 10818 * Fix error with configure when used with PostgreSQL 10819 7.4(Yoshiyuki Asaba) 10820 10821=============================================================================== 10822 10823 1.0.1 (suboshi) 2006/09/22 10824 10825 * Version 1.0.1 10826 * This version fixes bugs including master/slave not being 10827 working, deadlock problem in COPY FROM STDIN. Also documents 10828 are improved. 10829 10830=============================================================================== 10831 10832 1.0 (suboshi) 2006/09/08 10833 10834 * Initial release 10835 10836Local Variables: 10837mode: outline 10838End: 10839