This repository has been archived by the owner on Jul 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
/
NEWS
6569 lines (4487 loc) · 259 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Release Notes
===============================================================================
3.4.0 (tataraboshi) 2014/11/07
* Version 3.4.0
This is the first version of pgpool-II 3.4 series.
That is, a "major version up" from 3.3 series.
__________________________________________________________________
* Incompatible changes
- Parallel query mode is obsoleted and is removed from
pgpool.conf. This is due to the very few users using the mode
(and the relatively high cost to maintain it). Actual codes for
the mode are still there and users can use the mode if they
specify necessary parameters in pgpool.conf. Note, however, the
next version of pgpool-II (will be 3.5.0) will actually remove
the code.
- "print_timestamp" parameter is removed. Instead new
"log_line_prefix" should be used.
- Recovery script now accepts 4 parameters, rather than 3 (the 4th
parameter is the port number of master PostgreSQL). Existing
3-parameter-style recovery scripts can be used if you don't care
about information provided by the 4th parameter.
__________________________________________________________________
* New features
- Allow fine control of load balancing by using application name
or database name. For example, if a client has particular
application name, read queries can be redirect to master node,
rather than to one of slave nodes (Tatsuo Ishii)
- Allow to print pgpool-II process names in the log output. New
parameter "log_line_prefix", which is the printf-style string
that is output at the beginning of each log line (Muhammad Usama)
- Allow to control log verbosity like PostgreSQL. For this purpose
new parameters "log_error_verbosity", "client_min_messages",
"log_min_messages" are added (Muhammad Usama)
- Allow to use SQL comments without disturbing load balancing if
new parameter "allow_sql_comments" is on. If it's off, previous
behavior is kept (Tatsuo Ishii)
- Allow to skip unlogged tables checking by using new parameter
"check_unlogged_table". This reduces the number of pgpool-II's
internal catalog look up queries and enhances performance
(Tatsuo Ishii)
- Prevent listen backlog overflow by using new parameter
"listen_backlog_multiplier" for very busy systems (Tatsuo Ishii)
- Prevent connection timeout to backend by using new parameter
"connect_timeout". This is useful in unstable networks
(Tatsuo Ishii)
__________________________________________________________________
* Enhancements
- Builtin SQL parser is now compatible with PostgreSQL 9.4 (Muhammad Usama)
- Import PostgreSQL's memory manager and exception manager (Muhammad Usama)
- Reorganize source code tree (Muhammad Usama)
- The status file "pgpool_status" is now a plain ASCII file. This
allows to register down PostgreSQL nodes before pgpool-II
starts for example (Tatsuo Ishii)
- Allow to use IPv6 address for PostgreSQ (Michael Stapelberg)
- Allow to use IPv6 bind address for pgpool-II (Michael Stapelberg)
- Rename all occurrence of "on memory query cache" to "in memory
query cache" because latter is more correct in English (Tatsuo Ishii)
- Add 4th paramter "master node port number" to recovery script
(Tatsuo Ishii)
- Allow to handle more than 3 database nodes in pgpool_setup
(Tatsuo Ishii)
__________________________________________________________________
* Bug fixes (since 3.3.4)
- Fix failover deadlock problem in watchdog (Muhammad Usama). See
bug #105 and [pgpool-committers: 2195] for more details.
- As per the PostgreSQL specification, calling close on non
existing portals is not an error. So on the same footings this
commit ignores all such packets and return the 'close complete'
message to client with out going to backend (Muhammad Usama)
- Fix many issues/bugs found by Coverity (Muhammad Usama, Tatsuo Ishii)
===============================================================================
3.3 Series (2013/07/30 - )
===============================================================================
3.3.4 (tokakiboshi) 2014/09/05
* Version 3.3.4
This is a bugfix release against pgpool-II 3.3.3.
__________________________________________________________________
* Bug fixes
- Fix a typo of pgpool.spec (Yugo Nagata)
- Fix bug that worker child process keeps failing when there's no
primary backend (Tatsuo Ishii)
Problem identified and fix contributed by Junegunn Choi.
See [pgpool-hackers: 471] for more details.
- Close listen socket when smart shutdown request is made (Tatsuo Ishii)
When smart shutdown process starts, pgpool children still listen on
the port and clients can send further connection requests which fail
in the end. Which is not only waste of time, but also prevents a load
balancer which sits in front of pgpool from realizing the pgpool is
going down.
Problem analyzed and patch provided by Junegunn Choi in [pgpool-hackers
474], and enhanced to take care not only inet domain socket but UNIX
domain socket by Tatsuo Ishii.
- doc: Add cautions that recovery commands are killed by statement_timeout
of PostgreSQL. (Tatsuo Ishii)
- test: Fix bug that wait_for_pgpool_startup does not work. (Tatsuo Ishii)
- test: Fix test driver for watchdog to use wait_for_pgpool_startup correctly
(Tatsuo Ishii)
- Fix to ignore a harmless error code when executing ifconfig command
(Yugo Nagata)
When executing command such as ifconfig or ping by execv() in a forked
child proess, wait() can fails with an error code ECHILD, although the
process exists exactly, if SIGCHLD is set to SIG_IGN in Linux. We should
ignore this and not treat as failure of the command.
- test: Add undocumented "-j" option to the script comment. (Tatsuo Ishii)
- test: Fix unwanted JDBC regression test failure (Tatsuo Ishii)
- test: Fix to prevent regression test failures on slow machines
(Tatsuo Ishii)
- test: Allow to specify PostgreSQL library directory by environment
variable (Tatsuo Ishii)
- Adopt PostgreSQL 9.4 having to_regclass (Tatsuo Ishii)
PostgreSQL 9.4 has built-in function "to_regclass", which has
equivalent functionality of pgpool_regclass. Now pgpool searches
to_regclass first then try pgpool_regclass.
- Fix unportable code related to SO_REUSEPORT (Tatsuo Ishii)
There are several places using setsockopt(sock, SOL_SOCKET,
SO_REUSEPORT...). SO_REUSEPORT is not available on all Linux kernels
and the source code uses ifdef to detect the feature in the compile
time. Problem is, the binary created with kernel which provides the
feature cannot run on a kernel which does not provide the feature. Fix
is, detecting the feature in the run time by checking error code
returned by setsockopt() and ignore it if the cause of the error is
lacking the feature.
- doc: Remove old restriction description which is no longer true
(Tatsuo Ishii)
- Fix return type of text_to_lsn() function (Yugo Nagata)
This caused compile warning.
- Fix file descriptor leak when daemonize. (Tatsuo Ishii)
Per Coverity 1111471.
- Fix memory leak. (Tatsuo Ishii)
Per Coverity 1111442.
- Fix pgpool.init's long-standing bug of stop/restart failure
(Yugo Nagata)
In previous, pgpool.init uses killproc for stopping pgpool, but there
are several problems. In the new version, "pgpool -m fast stop" is
used in stop command.
Original patch contributed by Ryan DeShone and modified by Yugo Nagata.
See [pgpool-hackers: 239][pgpool-hackers: 512].
- Allow to run pgpool_setup and regression test on Ubuntu box
(Tatsuo Ishii)
- test: Fix -i option (install directory of pgpool) not working
(Tatsuo Ishii)
- Add missing include file sys/wait.h. (Tatsuo Ishii)
Per bug #104.
http://www.pgpool.net/mantisbt/view.php?id=104
- Fix an infinite loop of ping error at new active pgpool when virtual
IP switching (Yugo Nagata)
This bug also caused hangs of the old active pgpool, since this waits
response from the new active pgpool, which is in the infinite loop and
not able to respond.
This problem is reported by Qian Peng in [pgpool-hackers: 520].
- Disbale statement_timeout of PostgreSQL while executing online recovery
(Tatsuo Ishii)
Online recovery may take very long time and user may enable statement
timeout. To prevent online recovery canceled by statement timeout,
disable statement timeout in the connection used by online recovery.
See [pgpool-general: 2919] for more details.
- Fix pool_table_name_to_oid in case new to_regclass used which is
introduced in PostgreSQL 9.4 (Tatsuo Ishii)
The relcache func used here should return 0 if target table is not
found. However to_regclass returns NULL in this case. To fix the
problem now COALESCE is used.
- test: Fix regression test 057 hung if run against PostgreSQL 9.4 or
later (Tatsuo Ishii)
PostgreSQL 9.4 or later changed libpq behavior: NULL username for
connection string does not cause an error, which was expected in the
test.
- Fix to close pipe when ping command exits with failure (Yugo Nagata)
This bug causes pipe open error: Too many open files, which
leads to failure of connecting to trusted servers, and then
pgpool goes to down status.
- Fix Resource leaks (Muhammad Usama)
Coverity issue #1222998 and #1222999.
- Add a description that pcp_detach_node command disconnects existing
sessions (Tatsuo Ishii)
- Fix failover.sh produced by pgpool_setup (Tatsuo Ishii)
It did not support there's more than 2 nodes case. It always tries to
promoto node0 or node1.
- Remove meaningless minus check because of unsigned int variable
(Tatsuo Ishii)
Coverity issue #1111419, #1111420, #1111422.
- replacing strcpy() with much safer and recomended call strlcpy()
(Muhammad Usama)
Coverity issue #1111480.
- Fix pgpool.spec to support openssl (Tatsuo Ishii)
- Fix pgpool.spec to use 3.3-stable tree head (Tatsuo Ishii)
- Remove unnecessary call to pool_shmem_exit() which removes semaphore
when it shouldn't (Tatsuo Ishii)
exit_handler checks if the process is parent or not. This is
good. However, even if it is a child process, it calls
pool_shmem_exit() which removes semaphore and shmem when it should
not. It should be called only from parent process.
Per bug #102.
http://www.pgpool.net/mantisbt/view.php?id=102
- Fix get_insert_command_table_name() function not to use freed pointer
(Muhammad Usama)
Coverity issue #1223007.
- Fix pool_handle_query_cache() to not free NULL pointer (Tatsuo Ishii)
- Change connect() timeout longer (10 seconds) for flaky network
(Tatsuo Ishii)
Change connect() timeout in connect_inet_domain_socket_by_port() from
1 second to 10 seconds for flaky network such as AWS. This should help
reducing frequent failover.
- Fix reset query stuck problem. (Tatsuo Ishii)
It is reported that reset query (DISCARD ALL etc.) occasionally does
not finish and pgpool child remain waiting for reply from backend thus
client cannot connect to pgpool.
The cause of problem is not identified yet but if client suddenly
closes connection to pgpool in the middle of query processing, backend
may not accept the reset queries because they are not ready for query.
The fix is, if frontend closes connection in unexpected way, query
process loop immediately returns with new state:
POOL_END_WITH_FRONTEND_ERROR and pgpool closes connection to
PostgreSQL then goes back to new connection request waiting loop.
Also, pgpool closes connections to backend when client_idle_limit is
set and the idle limit.
Per bug #107.
http://www.pgpool.net/mantisbt/view.php?id=107
- Fix other dozens of coverity issues (Muhammad Usama)
===============================================================================
3.3.3 (tokakiboshi) 2014/03/24
* Version 3.3.3
This is a bugfix release against pgpool-II 3.3.2.
__________________________________________________________________
* Bug fixes
- installer: Fix bug that install of pgpool-II RPM fails (Yugo Nagata)
- installer: Fix to set up passwordless SSH from apache@localhost to
postgres@localhost (Yugo Nagata)
- Fix bug that restarted pgpool's watchdog status is regarded as down
(Yugo Nagata)
- doc: Add mention about "listen queue" and how to increase the "backlog"
in the num_init_children section. (Tatsuo Ishii)
- Fix bug that watchdog status goes down even when only one of trusted
servers get unpingable (Yugo Nagata)
- Fix bad performance of unlogged tables detection code. (Tatsuo Ishii)
Pointed out at [pgpool-hackers: 435][[pgpool-general:2325].
- Fix primary node detection logic. (Tatsuo Ishii)
There's a possibility that primary node is not detected. This happens
in following situation. node 0: primary, node 1: standby. Node 0 goes
down. Health checking detects the fact but local status is not updated
yet. Primary node finding (find_primary_node) runs. Node 0's status is
yet healthy. Because find_primary_node fails to connect to node 0, it
immediately returns -1 and fails to find that fact that node 1 is now
primary.
Fix is just continuing to look for primary node when fails to connect
to a node.
Per [pgpool-general: 2409].
- Add raw mode support to pgpool_setup. (Tatsuo Ishii)
- test: Integrate jdbc test to regression test. (Tatsuo Ishii)
- Fix jdbc DML fails when operated in raw mode and auto commit is off.
(Tatsuo Ishii)
This is reported in bug #92.
- Fix to output error message when wd_escalation_command fails with exit
code other than 0 (Yugo Nagata)
This is suggested by Sergey Arlashin in [pgpool-general: 2457].
- test: Add new regression test for query cache. (Tatsuo Ishii)
- Fix query cache bug with extended protocol. (Tatsuo Ishii)
SELECT retrieves outdated cache even DML was executed in an expilicit
transaction. The bug had been there since in memory query cache was
born. Per [pgpool-general-jp: 1252].
- Add missing entries "relcache_size" and "check_temp_table" to show
pool_status (Tatsuo Ishii)
- Fix to output error message when if_up_cmd fails. (Yugo Nagata)
This is suggested by Sergey Arlashin in [pgpool-general: 2457].
- Avoid to send queries to unrelated nodes in streaming replication mode.
(Tatsuo Ishii)
Pgpool-II sends certain queries, such as BEGIN, END and SET commands to
all of DB nodes. However in streaming replication mode, only primary
node and at most one standby node are only concerned (if primacy node
is selected as the load balance node, only 1 node is concerned).
See [pgpool-hackers: 464] for more details.
- Fix possible buffer overrun problem and memory leak. (Tatsuo Ishii)
Per Coverity 1111465 and 1111482.
- Fix possible buffer overrun. (Tatsuo Ishii)
Replace strcpy() with strlcpy(). Per Coverity report 1111478, 1111480,
1111481.
- Add dubug messages for analyzing errors in if_up_cmd (Yugo Nagata)
- Fix freeing NULL. (Tatsuo Ishii)
Per Coverity 1111384.
- Do not enable query cache on materialized views. (Tatsuo Ishii)
Per bug #95.
- Fix memory leak. (Tatsuo Ishii)
Per Coverity 1111446.
- Fix a segmentation fault in parallel mode with system_db_hostname is
empty (Yugo Nagata)
- Fix to output debug messages in processing pgpool.conf with -d option
(Yugo Nagata)
Previously, some debug messages in pool_get_config() ware not output
even when -d option was used.
- Fix JDBC exception of prepared statement including now() in
replication mode (Yugo Nagata)
With JDBC, when a prepared statement is executed more than
PrepareThreshold times, the statement is named and Describe message
is sent after Parse. With named statement, pgpool rewrite now() to
parameter in replication mode. Hence, rewritten query has additonal
parameter than original. In this case, ParameterDescription message
sent to frontend (response of Describe) should include OIDs of the
same number os original query's parameters. Otherwize, JDBC throws
ArrayIndexoutOfBoundsException.
This is reported in [pgpool-general-jp: 1192].
- Fix backend error of prepared statement about table which has column whoes
default value is now() in replication mode (Yugo Nagata)
When pgpool parses a named prepared statement with default now(),
timestamps are replaced to additional parameters. So, Bind message also
should inclued additional parameter format codes. However, when the
number of original parameter was one, pgpool didn't handle this. This
caused a error like "incorrect binary data format in bind parameter 2".
- test: Fix a bug of regression test of JDBC that shows OK even when
this fails (Yugo Nagata)
- test: Add a new regression test for JDBC's PrepareThreshold (Yugo Nagata)
- doc: Add description about parallel mode doesn't support PREPARE (Yugo Nagata)
Per bug #93
===============================================================================
3.3.2 (tokakiboshi) 2013/11/29
* Version 3.3.2
This is a bugfix release against pgpool-II 3.3.1.
__________________________________________________________________
* Bug fixes
- Fix incorrect time stamp rewriting in replication mode for certain time
zones. (Tatsuo Ishii)
Time stamp rewriting calls "SELECT now()" to get current time.
Unfortunately the buffer for the current time is too small for certain
time zones such as "02:30". Note that non-30-minutes-time-zone such as
"0900" does not reveal the problem. This explains why we haven't the bug
report until today.
Bug reported in [pgpool-general: 2113] and fix provided by Sean Hogan.
http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002142.html
- installer: Fix the way to specify pgpoolAdmin version in
redhat/rpm_installer/getsources.sh. (Yugo Nagata)
- Makefile: Replace pg_config by $(PG_CONFIG) in Makefiles so it can be
overridden at build time when compiling for different PG major versions.
(Tatsuo Ishii)
Patch contributed by Christoph Berg ([pgpool-general: 2127]).
http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002156.html
- watchdog: Fix a warning/error when compiling with -Werror=format-security.
(Tatsuo Ishii)
Patch contributed by Christoph Berg ([pgpool-general: 2127]).
http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002156.html
- configure: Remove -lcompat because it confuses FreeBSD per bug#15.
(Tatsuo Ishii)
http://www.pgpool.net/mantisbt/view.php?id=15
- Fix segfault when pgpool.conf does not set log_standby_delay.
(Tatsuo Ishii)
This is caused by wrong initialization for log_standby_delay in
pool_config.l.
Per bug#74. http://www.pgpool.net/mantisbt/view.php?id=74
- doc: Modify descriptions about restrictions of parallel mode
Muliple rows INSERT using VALUES are not supported in parallel mode.
(Yugo Nagata)
- Avoid calling find_primary_node_repeatedly() when standby node goes
down. (Tatsuo Ishii)
This will reduce the time to failover. Per bug #75, patch modified by
Tatsuo Ishii. http://www.pgpool.net/mantisbt/view.php?id=75
- Fix data inconsistency problem with native replication mode + extended
protocol case. (Tatsuo Ishii)
It is reported that concurrent INSERT using JDBC driver causes data
difference among database node. This only happens following conditions
are all met:
1) Native replication mode
2) Extended protocol used
3) The portal created by parse message is reused by bind message
4) autocommit is on
5) SERIAL (sequence) is used
Pgpool-II's parse message function knows it has to lock the target
table when INSERT (plus #5) is issued by clients. Unfortunately bind
message function did not know it. Once parse/bind/execute finishes,
pgpool releases the lock obtained by parse because of #4. JDBC wants
to reuse the portal and starts the cycle from bind message, which does
not obtain lock. As as result, lock-free INSERT are floating around
which causes data inconsistency of course. The solution is, lock the
table in bind phase.
For this bind needs to issue LOCK in extended protocol. This was a little
bit hard because the module (do_command()) to issue internal SQL command
(other than SELECT) does not support extended protocol.
To solve the problem do_query() is modified so that it accepts other than
SELECT because it already accepts extended protocol.
The modification is minimum and is only tested for the case called from
insert_lock(). I do not recommend to replace every occurrence of
do_command () with do_query() at this point.
BTW the reason why the bug is not reported is, most users uses JDBC
with auto commit = off. In this case, the lock obtained by parse persists
until user explicitly issues commit or rollback.
Per bug report by Steve Kuekes in [pgpool-general: 2142].
http://www.sraoss.jp/pipermail/pgpool-general/2013-September/002171.html
- Fix memory allocation size bug in the code path of query cache.
(Tatsuo Ishii)
In execute() memory allocation size is too small incertain case. No bug
has been reported so far, but certainly this is a bug.
- Fix occasional segfault in query cache + extended protocol.
(Tatsuo Ishii)
When the query is not "cache safe", bind_msg->param_offset was not set
in Bind(). However, Execute() unconditionally uses bind_msg->param_offset
to convert bind parameters to string so that they can be added to the
cached query string and it causes segfault because bind_msg->param_offset
is a garbage. Also logic bug to calculate bind_msg->param_offset is
corrected.
Per bug#76. http://www.pgpool.net/mantisbt/view.php?id=76
- Avoid to run out free query cache hash index entry. (Tatsuo Ishii)
If hash index entries are run out, pgpool-II cannot reuse old cache
entry because pgpool-II always expects there's at least one empty hash
index entry. To mitigate the problem, if free hash index entries are run
out, look for victim cache block to reuse the hash index entry.
Per bug #70. http://www.pgpool.net/mantisbt/view.php?id=70
- installer: checkEnv() didn't do anything and always returned 0.
(Nozomi Anzai)
- Fix inappropriate shared memory allocation size for clock hand.
(Tatsuo Ishii)
The memory for clock hand was allocated as sizeof(pool_fsmm_clock_hand))
which is 8 bytes long because the variable is declared as:
static int *pool_fsmm_clock_hand;
This is plain wrong. The memory size actually needed is only 4 bytes,
which is sizeof(*pool_fsmm_clock_hand)). In other word, the bug allocated
unnecessary 4 bytes, which did nothing bd for the execution of program.
But a bug is a bug.
Per covery report "1111476 Wrong sizeof argument"
- Fix "show pool_status" always shows memqcache_auto_cache_invalidation as
0. (Tatsuo Ishii)
Per bug #80. http://www.pgpool.net/mantisbt/view.php?id=80
- Fix error message in read_password_packet(). (Tatsuo Ishii)
- watchdog: Fix to pass big parameter by pointer instead of by value at
some function. (Yugo Nagata)
- Fix memory leak when SSL is requested. (Tatsuo Ishii)
When SSL is requested, pgpool child retries to read start up packet.
However it does not free the memory for previous start up packet.
Per Coverity report "1111443 Resource".
- Fix memory leak when do_query() fails in timestamp rewriting.
(Tatsuo Ishii)
For this purpose free_select_result() is changed to accept NULL argument.
Per Coverity report "1111454, 1111455 Resource leak".
- Fix load balance bug in replication mode. (Tatsuo Ishii)
When load_balance_mode = off, SELECTs including writing function
should be sent to all the DB nodes. Per [pgpool-general: 2221].
http://www.sraoss.jp/pipermail/pgpool-general/2013-October/002250.html
The bug was introduced in:
http://git.postgresql.org/gitweb/?p=pgpool2.git;a=commitdiff;h=1ac45a28258074ea4d9d902aca016f970d31f311
(3.3.1).
- watchdog: Fix to put null character at end of ping result string used in
watchdog. (Yugo Nagata)
- Fix target node selection logic when "DEALLOCATE portal|statement".
(Tatsuo Ishii)
When "DEALLOCATE portal|statement" is used and last prepared statement or
portal was not found, target node selection map is not set. Probably this
is not actually harmful because prepared statement or portal was not found
is an error case. The bug was there since day 0.
Per Coverity report "1111491 Structurally dead code".
- Fix range check bug of MAX_NUM_BACKENDS in corner case. (Tatsuo Ishii)
MAX_NUM_BACKENDS is the allowed max number of DB nodes (128, at this
point). In reality, probably no one ever tried more than 128 DB nodes
and that's the reason why nobody noticed.
Per Coverity report "1111429, 1111430 and 1111431 Out-of-bounds write".
- Do not set/unset fronted connection info for dead backend. (Tatsuo Ishii)
Per bug #82. http://www.pgpool.net/mantisbt/view.php?id=82
- Fix that the script forgets to allow public access to pgpool_catalog.
(Tatsuo Ishii)
The bug prevents inserting data into user tables if pgpool_catalog is
created in native replication mode. The bug was there from day 1. I
wonder why nobody noticed until today.
Per [pgpool-general-jp: 1229].
http://www.sraoss.jp/pipermail/pgpool-general-jp/2013-November/001228.html
- doc: Add description that it is recommended to specify multiple servers
to trusted_servers. (Yugo Nagata)
- Fix uninitialized variable in error case in pool_do_auth().
(Tatsuo Ishii)
If there's no valid backend, pgpool will return garbage pid to frontend in
auth phase. Actually because no backend is available, frontend will be
disconnected later on. So this is harmless.
Per Coverity report "1127331 Uninitialized scalar variable".
- Fix to add node id range check when issue an error message using node
id. (Tatsuo Ishii)
Per Coverity report #1111433 "Out-of-bounds read".
- Fix buffer overrun bug and resource leak bug of parse_copy_data().
(Tatsuo Ishii)
Per Coverity report 1111427 "Out-of-bounds write" and 1111453 "Resource
leak".
- Fix possible segfault in CopyDataRaws(). (Tatsuo Ishii)
Coverity pointed out that if pool_get_id() returns an error, VALID_BACKEND
will access out of array.
Per Coverity report 1111413 "Memory - illegal accesses".
- Fix query cache is enabled and protocol version = 2 case. (Tatsuo Ishii)
When the protocol version = 2, we assume that session state is "idle".
This is not feasible but no way. I recommend to not use query cache
with protocol 2.
Per Coverity report 1111488 "Uninitialized scalar variable".
- Fix strftime() usage in pool_pools(). (Tatsuo Ishii)
The buffer is not large enough as expected by the second parameter. This
is not harmless because the format string will not produce longer result
string than the buffer.
Per Coverity report 1111426 "Out-of-bounds access".
- RPM: Improved to specify the versions of pgool-II and PostgreSQL in the.
spec file. (Nozomi Anzai)
- Fix resource leak in make_persistent_db_connection. (Tatsio Ishii)
For this pupose, new static function free_persisten_db_connection_memory
is added.
Per Coverity report #1111468.
- Fix a bug that connection check to trusted servers fails when the RTT
is very short. (Yugo Nagata)
- Fix several small bug fixes detected by Coverity. (Tatsuo Ishii)
===============================================================================
3.3.1 (tokakiboshi) 2013/09/06
* Version 3.3.1
This is a bugfix release against pgpool-II 3.3.0.
__________________________________________________________________
* Bug fixes
- Fix to add the regression test suite for making tar boll (Tatsuo Ishii)
This isn't included in the tar ball of 3.3.0 release.
- Fix watchdog test script in regression test (Tatsuo Ishii)
- Fix a memory overrun bug (Tatsuo Ishii)
This problem is pointed out in [pgpool-general: 1956] by Sean Hogan.
[pgpool-general: 1956] memory overrun bug?
http://www.sraoss.jp/pipermail/pgpool-general/2013-July/001984.html
- Fix a compile error (Yugo Nagata)
- Fix child process termination with sig abort when memory query cache
is enabled (Tatsuo Ishii)
This is due to double free bug that occurs when multiple bind/execute
messages come after a parse message. When a parse messages comes, query
context is created along with temp cache. The pointer to the temp cache
is added to the temp cache array when the query executed. Subsequent
bind messages uses the same temp cache pointer. This is the source of
double free bug when the cache array discarded.
This is reported in Bug track #68 by harukat.
#68: child process termination with sigabort when memory_cache_enabled = on
http://www.pgpool.net/mantisbt/view.php?id=68
- Add some test cases to regression test (Tatsuo Ishii)
- Fix typos of the document in installation of pgpool-recovery section.
(Tatsuo Ishii)
- Fix a typo of log message (Yugo Nagata)
- Fix typos of the japanese document (Yugo Nagata)
- Fix to send SELECT to master node only when load_balance_mode is off
in replication mode (Tatsuo Ishii)
When load_balance_mode is off in replication mode, SELECT queries
should be sent to master node only, rather than sent to all nodes in
an explicit transaction.
This problem is reported in [pgpool-general: 2038] by Rypl Lukas.
[pgpool-general: 2038] SELECT sent to both nodes in replication mode
http://www.sraoss.jp/pipermail/pgpool-general/2013-August/002066.html
- Fix pgpool_setup to work in standalone. (Tatsuo Ishii)
===============================================================================
3.3.0 (tokakiboshi) 2013/07/30
* Version 3.3.0
This is the first version of pgpool-II 3.3 series.
That is, a "major version up" from 3.2 series.
__________________________________________________________________
* Incompatible changes
- All the follwing are about watchdog.
See "New features" section below for details of these changes.
- Default monitoring method was changed from query mode to heartbeat mode.
- Failover/failback commands are executed in only one pgpool-II.
- In default, all the query caches on shared memory are cleared when
standby pgpool-II escalates to active.
- Database name, user name, and password used for monitring other
pgpool-II by query are specified by dedicated parameters.
Previously, template1, recovery_user, and recovery_password are used.
__________________________________________________________________
* New features
** Watchdog
- Add a new monitring method using heartbeat signal of UDP packet in
lifecheck. (Yugo Nagata)
You can select a method from either of two methods, "heartbeat" mode or
"query" mode.
The heartbeat mode is the new method. In this mode, watchdog monitors
other pgpool-II process by using heartbeat signal. Watchdog receives
heartbeat signals sent by other pgpool-II periodically. If there are no
signal for a certain period, watchdog regards it as failure of the
pgpool-II. For redundancy you can use multiple networks for heartbeat
exchange between pgpool-IIs. This mode is default and recommended one.
The query mode is the conventional method. In this mode, watchdog monitors
pgpool-II's service rather than process. Watchdog sends queries to other
pgpool-II and checks the response. Note that this method requires connections
from other pgpool-IIs, so it would fail motoring if num_init_children isn't
large enough. This mode is deprecated and left for backward compatibility.
Add these new parameters:
- wd_lifecheck_method
- wd_heartbeat_port
- wd_heartbeat_keepalive
- wd_heartbeat_deadtime
- heartbeat_destinationX
- heartbeat_destination_portX
- heartbeat_deviceX
- Add interlocking mechanism of exclusive failover/failback command
execution. (Yugo Nagata)
When using multiple pgpool-IIs with watchdog enabled, failover commands
(failover_command, failback_command, and follow_master_command) get
executed only at one pgpool-II.
Previously, these command got executed at all pgpool-IIs.
- Add authentication mechanism for watchdog packet communication.
(Yugo Nagata)
Watchdog packets (include heartbeat signal) from pgpool-II with wrong
authentication key are rejected. All pgpool-IIs must have the same key,
which is specified wd_authkey parameter in pgpool.conf. pgpool-II with
wrong authkey can't even start watchdog, because the startup packet is
rejected by other pgpool-IIs.
- Add clear_memqcache_on_escalation parameter. (Yugo Nagata)
If this is on, all the query caches on shared memory are cleared when
standby pgpool-II escalates to active.
This is aimed to prevent the new active pgpool-II from using inconsistent
query caches with the previous active.
- Add wd_escalation_command parameter. (Yugo Nagata)
This specifies command which is executed at escalation on the new active
pgpool-II server. The timing is just before virtual IP is brought up.
- Add parameters wd_lifecheck_dbname, wd_lifecheck_user, and
wd_lifecheck_password. (Yugo Nagata)
These parameters specify the database name, the user name, and password
used in query mode lifecheck of watchdog . Previously, these are hard
coded to use template1, recovery_user, and recovery_password.
- When delegate_IP parameter is emply, viertual IP is neither brought up
nor switched. (Yugo Nagata)
This allows multi-master like configuration without virtual IP.
- Add pcp_watchdog_info command (Yugo Nagata)
This is PCP command for retrieving the watchdog status.
** Others
- Import PostgreSQL 9.2 raw parser. (Nozomi Anzai, Tatsuo Ishii)
- Add a tool called pgpool_setup to set up pgpool-II and PostgreSQL
temporary installation in current directory for *testing* purpose.
(Tatsuo Ishii)
usage: pgpool_setup [-m r|s][-n num_clusters][--no-stop]
-m s: create an installation as streaming replication mode.
(the default)
-m r: create an installation as native replication mode.
-n num_clusters: create num_clusters PostgreSQL database cluster nodes
-p base_port: specify base port. The first PostgreSQL node's port is
base_port. Second PostgreSQL node's port is base_port+1
... nth PostgreSQL node's port is base_port+n-1, pgpool
port is base_port+n, pcp port is base_port+n+1.
--no-stop: do not stop pgpool and PostgreSQL after the work
- Support installation method using CREATE EXTENSION for pgpool-recovery
and pgpool-regclass. (Tatsuo Ishii)
Older installtion method is still preserved.
Note: extension names are "pgpool_recovery" and "pgpool_regclass", not
"pgpool-recovery" and "pgpool-regclass" because latters are not
convenient in using CREATE EXTENSION command (requires double quotes).
- Add a function "pgpool_pgctl()" which enebles to execute
pg_ctl stop/restart/reload (except for start) by SQL. (Nozomi Anzai)
$ psql sales -c "select pgpool_pgctl('reload', 'fast')";
pgpool_pgctl
--------------
t
(1 row)
This function always ignores the actual result and returns 't', so the
user can't know if pg_ctl succeeded or failed. To use this we have to set
the custom variable for security which limits the users to execute pg_ctl
who has the permission of data directory.
- Add shell scripts to install pgpool-II and pgpoolAdmin by RPM.
(Nozomi Anzai, Yugo Nagata)
To make the installer package execute getsources.sh, and the directory
named "work" will be created. And you rpmbuild each spec files in work/,
put RPMs into work/installer and make tar ball of work/installer.
The installer does not only install RPMs but also edit postgresql.conf,
pgpool.conf, pg_hba.conf, recovery.conf and scripts for failover and
online recovery.
This assumes two-nodes configuration and the install script have to be
executed in both nodes.
- Add new parameter "search_primary_node_timeout".
(Muhammad Usama, Tatsuo Ishii)
The parameter specifies the maximum amount of time in seconds to
search for a primary node when a failover scenario occurs. Patch
contributed by Muhammad Usama. Japanese doc and slight editing of
English doc by Tatsuo Ishii.
- Chinese tutorials for memqcache and watchdog. (Bambo Huang)
- Add regression test suit. (Tatsuo Ishii)
__________________________________________________________________
* Bug fixes
- Consider timeout waiting for compeletion of failback request in on line
recovery. (Tatsuo Ishii)
This will prevent the situation that recovery operation continues forever
and we cannot even shutdown pgpool-II main process. This could happen
especially while executing follow master command.
- Fix a bug that %H of follow_master_command is not assigned correctly the
new primary node in stream replication mode.
(Tatsuo Ishii)
- Fix not to execute escalation when the pgpool-II which is already active
receives down notification from other pgpool-II. (Yugo Nagata)
- Fix wd_create_send_socket() not to execute select() before connect().
(Yugo Nagata)