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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
|
<!-- doc/src/sgml/release-12.sgml -->
<!-- See header comment in release.sgml about typical markup -->
<sect1 id="release-12-6">
<title>Release 12.6</title>
<formalpara>
<title>Release date:</title>
<para>2021-02-11</para>
</formalpara>
<para>
This release contains a variety of fixes from 12.5.
For information about new features in major release 12, see
<xref linkend="release-12"/>.
</para>
<sect2>
<title>Migration to Version 12.6</title>
<para>
A dump/restore is not required for those running 12.X.
</para>
<para>
However, see the second and third changelog items below,
which describe cases in which reindexing indexes after the upgrade
may be advisable.
</para>
<para>
Also, if you are upgrading from a version earlier than 12.2,
see <xref linkend="release-12-2"/>.
</para>
</sect2>
<sect2>
<title>Changes</title>
<itemizedlist>
<listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [6214e2b22] 2021-02-08 11:01:51 +0200
Branch: REL_13_STABLE [8e56684d5] 2021-02-08 11:01:55 +0200
Branch: REL_12_STABLE [f50e88899] 2021-02-08 11:01:55 +0200
Branch: REL_11_STABLE [cb5868cc1] 2021-02-08 11:01:55 +0200
-->
<para>
Fix information leakage in constraint-violation error messages
(Heikki Linnakangas)
</para>
<para>
If an <command>UPDATE</command> command attempts to move a row to a
different partition but finds that it violates some constraint on
the new partition, and the columns in that partition are in
different physical positions than in the parent table, the error
message could reveal the contents of columns that the user does not
have <literal>SELECT</literal> privilege on.
(CVE-2021-3393)
</para>
</listitem>
<listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [6b4d3046f] 2021-01-20 11:58:03 +0200
Branch: REL_13_STABLE [b8403d140] 2021-01-20 11:58:25 +0200
Branch: REL_12_STABLE [0326635dd] 2021-01-20 11:58:27 +0200
-->
<para>
Fix incorrect detection of concurrent page splits while inserting
into a GiST index (Heikki Linnakangas)
</para>
<para>
Concurrent insertions could lead to a corrupt index with entries
placed in the wrong pages. It's recommended to reindex any GiST
index that's been subject to concurrent insertions.
</para>
</listitem>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [8a54e12a3] 2021-01-30 00:00:27 -0800
Branch: REL_13_STABLE [86a5b309c] 2021-01-30 00:00:42 -0800
Branch: REL_12_STABLE [be843ce29] 2021-01-30 00:01:56 -0800
Branch: REL_11_STABLE [d1ab4bf6e] 2021-01-30 00:02:08 -0800
Branch: REL_10_STABLE [179775135] 2021-01-30 00:02:11 -0800
Branch: REL9_6_STABLE [d683d6528] 2021-01-30 00:04:05 -0800
Branch: REL9_5_STABLE [77a0e14f0] 2021-01-30 00:05:34 -0800
-->
<para>
Fix <command>CREATE INDEX CONCURRENTLY</command> to wait for
concurrent prepared transactions (Andrey Borodin)
</para>
<para>
At the point where <command>CREATE INDEX CONCURRENTLY</command>
waits for all concurrent transactions to complete so that it can see
rows they inserted, it must also wait for all prepared transactions
to complete, for the same reason. Its failure to do so meant that
rows inserted by prepared transactions might be omitted from the new
index, causing queries relying on the index to miss such rows.
In installations that have enabled prepared transactions
(<varname>max_prepared_transactions</varname> > 0),
it's recommended to reindex any concurrently-built indexes in
case this problem occurred when they were built.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9624321ec] 2021-02-03 19:38:43 -0500
Branch: REL_13_STABLE [57868d957] 2021-02-03 19:38:29 -0500
Branch: REL_12_STABLE [77e760d5c] 2021-02-03 19:38:29 -0500
Branch: REL_11_STABLE [1c3a87746] 2021-02-03 19:38:29 -0500
-->
<para>
Avoid crash when a <literal>CALL</literal> or <literal>DO</literal>
statement that performs a transaction rollback is executed via
extended query protocol (Thomas Munro, Tom Lane)
</para>
<para>
In <productname>PostgreSQL</productname> 13, this case reliably
caused a null-pointer dereference. In earlier versions the bug
seems to have no visible symptoms, but it's not quite clear that
it could never cause a problem.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [1d9351a87] 2021-01-28 13:41:55 -0500
Branch: REL_13_STABLE [7f1921cb9] 2021-01-28 13:41:55 -0500
Branch: REL_12_STABLE [7c53a8067] 2021-01-28 13:41:55 -0500
Branch: REL_11_STABLE [6f94531b0] 2021-01-28 13:41:55 -0500
-->
<para>
Fix partition pruning logic to handle asymmetric hash partition sets
(Tom Lane)
</para>
<para>
If a hash-partitioned table has unequally-sized partitions (that is,
varying modulus values), or it lacks partitions for some remainder
values, then the planner's pruning logic could mistakenly conclude
that some partitions don't need to be scanned, leading to failure to
find rows that the query should find.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a0efda88a] 2021-01-19 13:25:33 -0500
Branch: REL_13_STABLE [188cd4f44] 2021-01-19 13:25:40 -0500
Branch: REL_12_STABLE [625315996] 2021-01-19 13:25:45 -0500
Branch: REL_11_STABLE [794562d07] 2021-01-19 13:25:49 -0500
Branch: REL_10_STABLE [fac54bd5e] 2021-01-19 13:25:54 -0500
Branch: REL9_6_STABLE [fe8edbb82] 2021-01-19 13:26:01 -0500
Branch: REL9_5_STABLE [0ab177bec] 2021-01-19 13:26:05 -0500
-->
<para>
Avoid incorrect results when <literal>WHERE CURRENT OF</literal> is
applied to a cursor whose plan contains a MergeAppend node (Tom
Lane)
</para>
<para>
This case is unsupported (in general, a cursor using <literal>ORDER
BY</literal> is not guaranteed to be simply updatable); but the code
previously did not reject it, and could silently give false matches.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [60661bbf2] 2021-01-18 18:32:30 -0500
Branch: REL_13_STABLE [f0f53195b] 2021-01-18 18:32:40 -0500
Branch: REL_12_STABLE [ba80489c6] 2021-01-18 18:32:45 -0500
Branch: REL_11_STABLE [de622e677] 2021-01-18 18:32:49 -0500
Branch: REL_10_STABLE [5cd94de77] 2021-01-18 18:32:55 -0500
Branch: REL9_6_STABLE [ffbf17463] 2021-01-18 18:33:02 -0500
Branch: REL9_5_STABLE [33a46993f] 2021-01-18 18:33:07 -0500
-->
<para>
Fix crash when <literal>WHERE CURRENT OF</literal> is applied to a
cursor whose plan contains a custom scan node (David Geier)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [55dc86eca] 2021-01-21 15:37:23 -0500
Branch: REL_13_STABLE [73fc2e5ba] 2021-01-21 15:37:23 -0500
Branch: REL_12_STABLE [1cce024fd] 2021-01-21 15:37:23 -0500
-->
<para>
Fix planner's mishandling of placeholders whose evaluation should be
delayed by an outer join (Tom Lane)
</para>
<para>
This occurs in particular with trivial subqueries containing lateral
references to outer-join outputs. The mistake could result in a
malformed plan. The known cases trigger a <quote>failed to assign
all NestLoopParams to plan nodes</quote> error, but other symptoms
may be possible.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e98c90099] 2020-12-05 16:16:13 -0500
Branch: REL_13_STABLE [7d43b76f6] 2020-12-05 16:16:13 -0500
Branch: REL_12_STABLE [77a94c30d] 2020-12-05 16:16:13 -0500
-->
<para>
Fix planner's handling of placeholders during removal of useless
RESULT RTEs (Tom Lane)
</para>
<para>
This oversight could lead to <quote>no relation entry for
relid <replaceable>N</replaceable></quote> planner errors.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b1738ff6a] 2020-11-30 12:22:43 -0500
Branch: REL_13_STABLE [666a4de93] 2020-11-30 12:22:43 -0500
Branch: REL_12_STABLE [4f728a1f5] 2020-11-30 12:22:43 -0500
Branch: REL_11_STABLE [caecab229] 2020-11-30 12:22:43 -0500
Branch: REL_10_STABLE [785f4462d] 2020-11-30 12:22:43 -0500
Branch: REL9_6_STABLE [ab4cbb4bc] 2020-11-30 12:22:43 -0500
Branch: REL9_5_STABLE [8c5da2d51] 2020-11-30 12:22:43 -0500
-->
<para>
Fix planner's handling of a placeholder that is computed at some
join level and used only at that same level (Tom Lane)
</para>
<para>
This oversight could lead to <quote>failed to build
any <replaceable>N</replaceable>-way joins</quote> planner errors.
</para>
</listitem>
<listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [660b89928] 2020-11-24 21:58:32 +0000
Branch: REL_13_STABLE [6dda05704] 2020-11-24 21:16:58 +0000
Branch: REL_12_STABLE [ae5aa26dc] 2020-11-24 21:17:02 +0000
Branch: REL_11_STABLE [018e7d98d] 2020-11-24 21:18:37 +0000
Branch: REL_10_STABLE [321c87e5c] 2020-11-24 21:18:59 +0000
Branch: REL9_6_STABLE [6402afd98] 2020-11-24 21:19:50 +0000
Branch: REL9_5_STABLE [59ed45e27] 2020-11-24 21:36:09 +0000
-->
<para>
Be more careful about whether index AMs support mark/restore
(Andrew Gierth)
</para>
<para>
This prevents errors about missing support functions in rare edge
cases.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master Release: REL_13_BR [d061ea21f] 2020-01-31 17:29:38 +1300
Branch: REL_12_STABLE [2ded1f1fb] 2020-11-20 10:51:30 +1300
Branch: REL_11_STABLE [0455f78dd] 2020-11-20 10:52:38 +1300
Branch: REL_10_STABLE [f5332503e] 2020-11-20 10:53:08 +1300
-->
<para>
Adjust settings to make it more difficult to run out of DSM slots
during heavy usage of parallel queries (Thomas Munro)
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [2ad78a87f] 2021-01-15 12:44:17 +0900
Branch: REL_13_STABLE [60369db86] 2021-01-15 12:45:25 +0900
Branch: REL_12_STABLE [19a1d7685] 2021-01-15 12:45:51 +0900
Branch: REL_11_STABLE [97b025ebe] 2021-01-15 12:46:26 +0900
-->
<para>
Fix overestimate of the amount of shared memory needed for parallel
queries (Takayuki Tsunakawa)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [21378e1fe] 2021-01-20 11:38:17 +0900
Branch: REL_13_STABLE [31e0f9d76] 2021-01-20 11:39:14 +0900
Branch: REL_12_STABLE [5ad672fc2] 2021-01-20 11:39:17 +0900
Branch: REL_11_STABLE [1c3a4d44d] 2021-01-20 11:39:21 +0900
Branch: REL_10_STABLE [74ee3abcf] 2021-01-20 11:39:24 +0900
Branch: REL9_6_STABLE [7dc3be9df] 2021-01-20 11:39:31 +0900
Branch: REL9_5_STABLE [0ddb529cf] 2021-01-20 11:39:35 +0900
-->
<para>
Fix <command>ALTER DEFAULT PRIVILEGES</command> to handle duplicated
arguments safely (Michael Paquier)
</para>
<para>
Duplicate role or schema names within the same command could lead
to <quote>tuple already updated by self</quote> errors or
unique-constraint violations.
</para>
</listitem>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [08db7c63f] 2020-12-25 10:41:59 -0800
Branch: REL_13_STABLE [9f8a48bb2] 2020-12-25 10:42:02 -0800
Branch: REL_12_STABLE [c96698806] 2020-12-25 10:42:03 -0800
Branch: REL_11_STABLE [e83e8509b] 2020-12-25 10:42:03 -0800
Branch: REL_10_STABLE [d7c197f46] 2020-12-25 10:42:03 -0800
Branch: REL9_6_STABLE [b81d3791e] 2020-12-25 10:42:04 -0800
Branch: REL9_5_STABLE [90383a613] 2020-12-25 10:42:04 -0800
Branch: REL_10_STABLE [d176b9d5e] 2020-12-25 11:02:56 -0800
Branch: REL9_6_STABLE [3f920e876] 2020-12-25 11:03:05 -0800
Branch: REL9_5_STABLE [14649bf50] 2020-12-25 11:06:23 -0800
-->
<para>
Flush ACL-related caches when <structname>pg_authid</structname>
changes (Noah Misch)
</para>
<para>
This change ensures that permissions-related decisions will promptly
reflect the results of <command>ALTER ROLE ... [NO] INHERIT</command>.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f7f83a55b] 2020-12-01 14:02:27 -0500
Branch: REL_13_STABLE [dffc82a5b] 2020-12-01 14:02:27 -0500
Branch: REL_12_STABLE [5f9b05ada] 2020-12-01 14:02:28 -0500
Branch: REL_11_STABLE [28bb8c496] 2020-12-01 14:02:28 -0500
Branch: REL_10_STABLE [d98e27dc6] 2020-12-01 14:02:28 -0500
Branch: REL9_6_STABLE [f00c44002] 2020-12-01 14:02:28 -0500
Branch: REL9_5_STABLE [fb500296d] 2020-12-01 14:02:28 -0500
-->
<para>
Prevent misprocessing of ambiguous <command>CREATE TABLE
LIKE</command> clauses (Tom Lane)
</para>
<para>
A <literal>LIKE</literal> clause is re-examined after initial
creation of the new table, to handle importation of indexes and
such. It was possible for this re-examination to find a different
table of the same name, causing unexpected behavior; one example is
where the new table is a temporary table of the same name as
the <literal>LIKE</literal> target.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [97390fe8a] 2020-11-19 15:03:17 -0500
Branch: REL_13_STABLE [98f3f1d5c] 2020-11-19 15:03:17 -0500
Branch: REL_12_STABLE [87ab46421] 2020-11-19 15:03:17 -0500
Branch: REL_11_STABLE [c690ebbef] 2020-11-19 15:03:17 -0500
Branch: REL_10_STABLE [513db7b70] 2020-11-19 15:03:17 -0500
Branch: REL9_6_STABLE [159b6775f] 2020-11-19 15:03:17 -0500
Branch: REL9_5_STABLE [6631d5f26] 2020-11-19 15:03:17 -0500
-->
<para>
Rearrange order of operations in <command>CREATE TABLE
LIKE</command> so that indexes are cloned before building foreign
key constraints (Tom Lane)
</para>
<para>
This fixes the case where a self-referential foreign key constraint
declared in the outer <command>CREATE TABLE</command> depends on an
index that's coming from the <literal>LIKE </literal> clause.
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [c9a0dc348] 2021-01-15 23:31:22 +0100
Branch: REL_13_STABLE [d26d4c717] 2021-01-15 23:32:54 +0100
Branch: REL_12_STABLE [943a113bc] 2021-01-15 23:33:16 +0100
Branch: REL_11_STABLE [f52db9694] 2021-01-15 23:33:44 +0100
Branch: REL_10_STABLE [c22539756] 2021-01-15 23:34:02 +0100
-->
<para>
Disallow <command>CREATE STATISTICS</command> on system catalogs
(Tomas Vondra)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [dd705a039] 2021-02-06 15:17:01 -0500
Branch: REL_13_STABLE [4353bc878] 2021-02-06 15:17:01 -0500
Branch: REL_12_STABLE [f73321957] 2021-02-06 15:17:01 -0500
Branch: REL_11_STABLE [580069037] 2021-02-06 15:17:02 -0500
Branch: REL_10_STABLE [ad85e5efa] 2021-02-06 15:17:02 -0500
Branch: REL9_6_STABLE [7736ab05f] 2021-02-06 15:17:02 -0500
Branch: REL9_5_STABLE [5ad03374b] 2021-02-06 15:17:02 -0500
-->
<para>
Disallow converting an inheritance child table to a view
(Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [9f35f9437] 2020-12-01 13:21:03 +1300
Branch: REL_13_STABLE [fd3a75d82] 2020-12-01 13:22:01 +1300
Branch: REL_12_STABLE [50f338574] 2020-12-01 13:37:00 +1300
Branch: REL_11_STABLE [d5706ad7b] 2020-12-01 13:46:27 +1300
Branch: REL_10_STABLE [22701755d] 2020-12-01 14:43:04 +1300
Branch: REL9_6_STABLE [d0bbe2122] 2020-12-01 14:50:41 +1300
Branch: REL9_5_STABLE [e00928de8] 2020-12-01 14:54:49 +1300
-->
<para>
Ensure that disk space allocated for a dropped relation is released
promptly at commit (Thomas Munro)
</para>
<para>
Previously, if the dropped relation spanned multiple 1GB segments,
only the first segment was truncated immediately. Other segments
were simply unlinked, which doesn't authorize the kernel to release
the storage so long as any other backends still have the files open.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [ebfe2dbd6] 2021-01-14 15:32:14 -0300
Branch: REL_13_STABLE [5b01a6f13] 2021-01-14 15:32:14 -0300
Branch: REL_12_STABLE [c9b702552] 2021-01-14 15:32:14 -0300
Branch: REL_11_STABLE [c442b32c2] 2021-01-14 15:32:14 -0300
-->
<para>
Prevent dropping a tablespace that is referenced by a partitioned
relation, but is not used for any actual storage (Álvaro
Herrera)
</para>
<para>
Previously this was allowed, but subsequent operations on the
partitioned relation would fail.
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [3df51ca8b] 2020-11-27 20:16:44 +0900
Branch: REL_13_STABLE [dcc20946a] 2020-11-27 20:17:33 +0900
Branch: REL_12_STABLE [fce17e486] 2020-11-27 20:18:02 +0900
-->
<para>
Fix progress reporting for <command>CLUSTER</command> (Matthias van
de Meent)
</para>
</listitem>
<listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [c444472af] 2021-02-05 11:14:56 +0200
Branch: REL_13_STABLE [c87cbd51e] 2021-02-05 11:19:48 +0200
Branch: REL_12_STABLE [9b0ce8957] 2021-02-05 11:16:33 +0200
Branch: REL_11_STABLE [d9b4163c5] 2021-02-05 11:16:53 +0200
Branch: REL_10_STABLE [c06632e48] 2021-02-05 11:17:07 +0200
Branch: REL9_6_STABLE [e152ccc7f] 2021-02-05 11:17:13 +0200
Branch: REL9_5_STABLE [aaf266157] 2021-02-05 11:17:27 +0200
-->
<para>
Fix handling of backslash-escaped multibyte characters
in <command>COPY FROM</command> (Heikki Linnakangas)
</para>
<para>
A backslash followed by a multibyte character was not handled
correctly. In some client character encodings, this could lead to
misinterpreting part of a multibyte character as a field separator
or end-of-copy-data marker.
</para>
</listitem>
<listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [2cccb627f] 2020-11-18 12:39:15 +0200
Branch: REL_13_STABLE [340ae3cfb] 2020-11-20 14:41:14 +0200
Branch: REL_12_STABLE [888fa2bae] 2020-11-20 14:46:47 +0200
Branch: REL_11_STABLE [57b5d8484] 2020-11-20 14:49:25 +0200
Branch: REL_10_STABLE [1dbe627fd] 2020-11-20 14:49:42 +0200
Branch: REL9_6_STABLE [02a2dbe91] 2020-11-20 14:57:15 +0200
Branch: REL9_5_STABLE [ded7db4c1] 2020-11-20 14:57:51 +0200
-->
<para>
Avoid preallocating executor hash tables
in <command>EXPLAIN</command> without <literal>ANALYZE</literal>
(Alexey Bashtanov)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9c83b54a9] 2020-11-28 14:03:40 -0500
Branch: REL_13_STABLE [f5de090cc] 2020-11-28 14:03:40 -0500
Branch: REL_12_STABLE [cbc7a7a10] 2020-11-28 14:03:40 -0500
Branch: REL_11_STABLE [40f2fbe71] 2020-11-28 14:03:40 -0500
Branch: REL_10_STABLE [f6324bbbe] 2020-11-28 14:03:40 -0500
Branch: REL9_6_STABLE [8a4069766] 2020-11-28 14:03:40 -0500
Branch: REL9_5_STABLE [60d6c7143] 2020-11-28 14:03:40 -0500
-->
<para>
Fix recently-introduced race conditions
in <command>LISTEN</command>/<command>NOTIFY</command> queue
handling (Tom Lane)
</para>
<para>
A newly-listening backend could attempt to read SLRU pages that
were in process of being truncated, possibly causing an error.
</para>
<para>
The queue tail pointer could become
set to a value that's not equal to the queue position of any
backend, resulting in effective disabling of the queue truncation
logic. Continued use of <command>NOTIFY</command> then led to
queue-fill warnings, and eventually to inability to send any more
notifies until the server is restarted.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ff5d5611c] 2020-12-21 13:11:50 -0500
Branch: REL_13_STABLE [38d30a14b] 2020-12-21 13:11:51 -0500
Branch: REL_12_STABLE [38bef9e43] 2020-12-21 13:11:29 -0500
Branch: REL_11_STABLE [75c8ef5ae] 2020-12-21 13:11:29 -0500
Branch: REL_10_STABLE [542248f9d] 2020-12-21 13:11:30 -0500
Branch: REL9_6_STABLE [1d5f3f976] 2020-12-21 13:11:30 -0500
Branch: REL9_5_STABLE [edcdbc44e] 2020-12-21 13:11:30 -0500
-->
<para>
Allow the <type>jsonb</type> concatenation operator to handle all
combinations of JSON data types (Tom Lane)
</para>
<para>
We can concatenate two JSON objects or two JSON arrays. Handle
other cases by wrapping non-array inputs in one-element arrays,
then performing an array concatenation. Previously, some
combinations of inputs followed this rule but others arbitrarily
threw an error.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [afcc8772e] 2021-01-08 12:16:00 -0500
Branch: REL_13_STABLE [49c928c0c] 2021-01-08 12:16:00 -0500
Branch: REL_12_STABLE [8354371d0] 2021-01-08 12:16:00 -0500
Branch: REL_11_STABLE [769908811] 2021-01-08 12:16:00 -0500
Branch: REL_10_STABLE [2d540ac5f] 2021-01-08 12:16:00 -0500
Branch: REL9_6_STABLE [085a1cfb3] 2021-01-08 12:16:00 -0500
Branch: REL9_5_STABLE [0c23f30fa] 2021-01-08 12:16:00 -0500
-->
<para>
Fix use of uninitialized value while parsing a <literal>*</literal>
quantifier in a BRE-mode regular expression (Tom Lane)
</para>
<para>
This error could cause the quantifier to act non-greedy, that is
behave like a <literal>*?</literal> quantifier would do in full
regular expressions.
</para>
</listitem>
<listitem>
<!--
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
Branch: master [bc43b7c2c] 2021-01-05 11:15:28 +0000
Branch: REL_13_STABLE [e15c384d7] 2021-01-05 11:08:59 +0000
Branch: REL_12_STABLE [258b77005] 2021-01-05 11:07:12 +0000
Branch: REL_11_STABLE [160a9e425] 2021-01-05 11:05:58 +0000
Branch: REL_10_STABLE [275b190b3] 2021-01-05 11:04:41 +0000
Branch: REL9_6_STABLE [9a299dff2] 2021-01-05 11:02:46 +0000
Branch: master [fead67c24] 2021-01-05 11:52:42 +0000
Branch: REL_13_STABLE [5777b6ea2] 2021-01-05 11:51:21 +0000
Branch: REL_12_STABLE [740780a61] 2021-01-05 11:50:11 +0000
Branch: REL_11_STABLE [ab042d010] 2021-01-05 11:48:45 +0000
Branch: REL_10_STABLE [0097193b1] 2021-01-05 11:46:44 +0000
Branch: REL9_6_STABLE [f0b9bada5] 2021-01-05 11:45:17 +0000
-->
<para>
Fix numeric <function>power()</function> for the case where the
exponent is exactly <literal>INT_MIN</literal> (-2147483648)
(Dean Rasheed)
</para>
<para>
Previously, a result with no significant digits was produced.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4bd3fad80] 2021-01-04 18:32:44 -0500
Branch: REL_13_STABLE [9e7d87ca8] 2021-01-04 18:32:40 -0500
Branch: REL_12_STABLE [7c98759e0] 2021-01-04 18:32:40 -0500
Branch: REL_11_STABLE [50a420bee] 2021-01-04 18:32:40 -0500
-->
<para>
Fix integer-overflow cases in <function>substring()</function>
functions (Tom Lane, Pavel Stehule)
</para>
<para>
If the specified starting index and length overflow an integer when
added together, <function>substring()</function> misbehaved, either
throwing a bogus <quote>negative substring length</quote> error for
a case that should succeed, or failing to complain that a negative
length is negative (and instead returning the whole string, in most
cases).
</para>
</listitem>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [6db992833] 2021-01-16 12:21:35 -0800
Branch: REL_13_STABLE [6eb3fc7fc] 2021-01-16 12:21:38 -0800
Branch: REL_12_STABLE [66087f7e9] 2021-01-16 12:21:39 -0800
Branch: REL_11_STABLE [677f6cb1d] 2021-01-16 12:21:39 -0800
Branch: REL_10_STABLE [9afba9b0e] 2021-01-16 12:21:39 -0800
Branch: REL9_6_STABLE [1a31d8c52] 2021-01-16 12:21:39 -0800
Branch: REL9_5_STABLE [c424c75f5] 2021-01-16 12:21:39 -0800
-->
<para>
Prevent possible data loss from incorrect detection of the
wraparound point of an SLRU log
(Noah Misch)
</para>
<para>
The wraparound point typically falls in the middle of a page, which
must be rounded off to a page boundary, and that was not done
correctly. No issue could arise unless an installation had gotten
to within one page of SLRU overflow, which is unlikely in a
properly-functioning system. If this did happen, it would manifest
in later <quote>apparent wraparound</quote> or <quote>could not
access status of transaction</quote> errors.
</para>
</listitem>
<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [ee1b38f65] 2021-01-13 08:19:50 +0530
Branch: REL_13_STABLE [0685c5c1b] 2021-01-13 08:31:45 +0530
Branch: REL_12_STABLE [0b2ae3c92] 2021-01-13 08:40:06 +0530
Branch: REL_11_STABLE [7adc408f4] 2021-01-13 08:50:13 +0530
Branch: REL_10_STABLE [636b6f99c] 2021-01-13 09:01:57 +0530
Branch: REL9_6_STABLE [f2b268ee0] 2021-01-13 09:12:59 +0530
Branch: REL9_5_STABLE [4bccceaa9] 2021-01-13 09:22:03 +0530
-->
<para>
Fix memory leak in walsender processes while sending new snapshots
for logical decoding (Amit Kapila)
</para>
</listitem>
<listitem>
<!--
Author: Jeff Davis <jdavis@postgresql.org>
Branch: master [a58db3aa1] 2020-12-14 23:47:30 -0800
Branch: REL_13_STABLE [fde5f130c] 2020-12-14 23:48:44 -0800
Branch: REL_12_STABLE [706d84fe7] 2020-12-14 23:48:04 -0800
Branch: REL_11_STABLE [4ee058a3b] 2020-12-14 23:49:06 -0800
Branch: REL_10_STABLE [ac7df6e8f] 2020-12-14 23:49:29 -0800
Branch: REL9_6_STABLE [f10da1e9c] 2020-12-14 23:49:57 -0800
Branch: REL9_5_STABLE [133a0906d] 2020-12-14 23:50:20 -0800
-->
<para>
Fix walsender to accept additional commands after
terminating replication (Jeff Davis)
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [8900b5a9d] 2021-01-06 12:39:18 +0900
Branch: REL_13_STABLE [0f8977b3f] 2021-01-06 12:30:37 +0900
Branch: REL_12_STABLE [9f540f840] 2021-01-06 12:31:23 +0900
Branch: REL_11_STABLE [e83771880] 2021-01-06 12:31:55 +0900
Branch: REL_10_STABLE [4c20e78f1] 2021-01-06 12:32:32 +0900
Branch: REL9_6_STABLE [0307b98d8] 2021-01-06 12:33:28 +0900
-->
<para>
Ensure detection of deadlocks between hot standby backends and the
startup (WAL-application) process (Fujii Masao)
</para>
<para>
The startup process did not run the deadlock detection code, so that
in situations where the startup process is last to join a circular
wait situation, the deadlock might never be recognized.
</para>
</listitem>
<listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
Branch: master [422881744] 2020-12-30 16:29:05 -0800
Branch: REL_13_STABLE [7a57960ba] 2020-12-30 16:29:03 -0800
Branch: REL_12_STABLE [4f70e0910] 2020-12-30 16:29:01 -0800
Branch: master [32d6287d2] 2020-12-30 17:21:42 -0800
Branch: REL_13_STABLE [55e535226] 2020-12-30 17:21:41 -0800
Branch: REL_12_STABLE [5f95664e1] 2020-12-30 17:21:39 -0800
-->
<para>
Fix possible failure to detect recovery conflicts while deleting an
index entry that references a HOT chain (Peter Geoghegan)
</para>
<para>
The code failed to traverse the HOT chain and might thus compute a
too-old XID horizon, which could lead to incorrect conflict
processing in hot standby. The practical impact of this bug is
limited; in most cases the correct XID horizon would be found anyway
from nearby operations.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [860fe27ee] 2020-12-30 11:38:42 -0500
Branch: REL_13_STABLE [861e96717] 2020-12-30 11:38:42 -0500
Branch: REL_12_STABLE [3ca19490b] 2020-12-30 11:38:42 -0500
-->
<para>
Ensure that a nonempty value
of <varname>krb_server_keyfile</varname> always overrides any
setting of <varname>KRB5_KTNAME</varname> in the server's
environment (Tom Lane)
</para>
<para>
Previously, which setting took precedence depended on whether the
client requests GSS encryption.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3995c4249] 2020-12-28 17:58:58 -0500
Branch: REL_13_STABLE [d05e14d78] 2020-12-28 17:58:58 -0500
Branch: REL_12_STABLE [7ed616f81] 2020-12-28 17:58:58 -0500
-->
<para>
In server log messages about failing to match connections
to <filename>pg_hba.conf</filename> entries, include details about
whether GSS encryption has been activated (Kyotaro Horiguchi, Tom
Lane)
</para>
<para>
This is relevant data if <literal>hostgssenc</literal>
or <literal>hostnogssenc</literal> entries exist.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [622ae4621] 2020-12-28 17:44:17 -0500
Branch: REL_13_STABLE [c1c88bf03] 2020-12-28 17:44:17 -0500
Branch: REL_12_STABLE [4cfdd8a47] 2020-12-28 17:44:17 -0500
-->
<para>
Fix assorted issues in server's support for GSS encryption (Tom Lane)
</para>
<para>
Remove pointless restriction that only GSS authentication
can be used on a GSS-encrypted connection.
Add GSS encryption information to connection-authorized log messages.
Include GSS-related space when computing the required size of
shared memory (this omission could have caused problems with very
high <varname>max_connections</varname> settings).
Avoid possible infinite recursion when reporting an unrecoverable
GSS encryption error.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7519bd16d] 2020-12-24 17:00:43 -0500
Branch: REL_13_STABLE [0217ad806] 2020-12-24 17:00:43 -0500
Branch: REL_12_STABLE [3d8068edc] 2020-12-24 17:00:43 -0500
Branch: REL_11_STABLE [b99b6b9d6] 2020-12-24 17:00:43 -0500
Branch: REL_10_STABLE [1a6b1c460] 2020-12-24 17:00:43 -0500
-->
<para>
Ensure that unserviced requests for background workers are cleaned
up when the postmaster begins a <quote>smart</quote>
or <quote>fast</quote> shutdown sequence (Tom Lane)
</para>
<para>
Previously, there was a race condition whereby a child process that
had requested a background worker just before shutdown could wait
indefinitely, preventing shutdown from completing.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [6db27037b] 2020-12-23 12:51:22 +0900
Branch: REL_13_STABLE [1e54664ee] 2020-12-23 12:51:35 +0900
Branch: REL_12_STABLE [67a9411d2] 2020-12-23 12:51:39 +0900
Branch: REL_11_STABLE [35ad5c7c7] 2020-12-23 12:51:42 +0900
Branch: REL_10_STABLE [f3ee99df7] 2020-12-23 12:51:46 +0900
Branch: REL9_6_STABLE [0b54a80a3] 2020-12-23 12:51:51 +0900
-->
<para>
Fix portability problem in parsing
of <varname>recovery_target_xid</varname> values (Michael Paquier)
</para>
<para>
The target XID is potentially 64 bits wide, but it was parsed
with <function>strtoul()</function>, causing misbehavior on
platforms where <type>long</type> is 32 bits (such as Windows).
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [275b3411d] 2020-11-30 14:38:00 -0500
Branch: REL_13_STABLE [fac31b2cd] 2020-11-30 14:38:00 -0500
Branch: REL_12_STABLE [16a1e1ea4] 2020-11-30 14:38:00 -0500
Branch: REL_11_STABLE [942e441ee] 2020-11-30 14:38:00 -0500
-->
<para>
Avoid trying to use parallel index build in a standalone backend
(Yulin Pei)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [29d29d652] 2020-11-15 16:10:58 -0500
Branch: REL_13_STABLE [7c89246d0] 2020-11-15 16:10:48 -0500
Branch: REL_12_STABLE [4ac8ee9d4] 2020-11-15 16:10:48 -0500
Branch: REL_11_STABLE [9cebe4952] 2020-11-15 16:10:48 -0500
-->
<para>
Allow index AMs to support included columns without necessarily
supporting multiple key columns (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [a3367aa3c] 2021-01-28 10:53:10 +0000
Branch: REL_13_STABLE [75e3cca42] 2021-01-28 11:09:40 +0000
Branch: REL_12_STABLE [30f912a41] 2021-01-28 11:09:49 +0000
Branch: REL_11_STABLE [f7f2a28d4] 2021-01-28 11:09:57 +0000
-->
<para>
Avoid assertion failure during parallel aggregation of an
aggregate with a non-strict deserialization function (Andrew Gierth)
</para>
<para>
No such aggregate functions exist in
core <productname>PostgreSQL</productname>, but some extensions
such as PostGIS provide some. The mistake is harmless anyway in a
non-assert build.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [07d46fceb] 2021-01-25 13:03:43 -0500
Branch: REL_13_STABLE [a26194f22] 2021-01-25 13:03:11 -0500
Branch: REL_12_STABLE [4641b2a30] 2021-01-25 13:03:11 -0500
Branch: REL_11_STABLE [a7cdd3f71] 2021-01-25 13:03:11 -0500
Branch: REL_10_STABLE [d09e8789f] 2021-01-25 13:03:11 -0500
Branch: REL9_6_STABLE [57a7d6f49] 2021-01-25 13:03:12 -0500
Branch: REL9_5_STABLE [41309f716] 2021-01-25 13:03:12 -0500
-->
<para>
Avoid assertion failure in <function>pg_get_functiondef()</function>
when examining a function with a <literal>TRANSFORM</literal> option
(Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ea80d8d94] 2020-12-28 11:41:25 -0500
Branch: REL_13_STABLE [0ea25ed10] 2020-12-28 11:41:25 -0500
Branch: REL_12_STABLE [fd1347f9d] 2020-12-28 11:41:25 -0500
Branch: REL_11_STABLE [2e15f48d9] 2020-12-28 11:41:25 -0500
Branch: master [5f2e09bcc] 2020-12-28 11:55:23 -0500
Branch: REL_13_STABLE [63d78d106] 2020-12-28 11:55:32 -0500
Branch: REL_12_STABLE [d37965965] 2020-12-28 11:55:37 -0500
Branch: REL_11_STABLE [7966b41de] 2020-12-28 11:55:41 -0500
-->
<para>
Fix data structure misallocation in
PL/pgSQL's <command>CALL</command> statement (Tom Lane)
</para>
<para>
A <command>CALL</command> in a PL/pgSQL procedure, to another
procedure that has OUT parameters, would fail if the called
procedure did a <command>COMMIT</command>
or <command>ROLLBACK</command>.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ff6ce9a3a] 2020-12-28 15:43:44 -0500
Branch: REL_13_STABLE [06b844c2b] 2020-12-28 15:43:44 -0500
Branch: REL_12_STABLE [b3a5bf719] 2020-12-28 15:43:44 -0500
-->
<para>
In <application>libpq</application>, do not skip trying SSL after
GSS encryption (Tom Lane)
</para>
<para>
If we successfully made a GSS-encrypted connection, but then failed
during authentication, we would fall back to an unencrypted
connection rather than next trying an SSL-encrypted connection.
This could lead to unexpected connection failure, or to silently
getting an unencrypted connection where an encrypted one is
expected. Fortunately, GSS encryption could only succeed if both
client and server hold valid tickets in the same Kerberos
infrastructure. It seems unlikely for that to be true in an
environment that requires SSL encryption instead.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7e5e1bba0] 2020-11-29 15:22:04 -0500
Branch: REL_13_STABLE [72b930f50] 2020-11-29 15:22:04 -0500
Branch: REL_12_STABLE [3958abdad] 2020-11-29 15:22:04 -0500
Branch: REL_11_STABLE [777ac03a6] 2020-11-29 15:22:04 -0500
Branch: REL_10_STABLE [946277fd4] 2020-11-29 15:22:04 -0500
Branch: REL9_6_STABLE [3f59a05f0] 2020-11-29 15:22:04 -0500
Branch: REL9_5_STABLE [e2d5de150] 2020-11-29 15:22:04 -0500
-->
<para>
In <application>psql</application>, re-allow including a password
in a <replaceable>connection_string</replaceable> argument of a
<command>\connect</command> command (Tom Lane)
</para>
<para>
This used to work, but a recent bug fix caused the password to be
ignored (resulting in prompting for a password).
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [314fb9bae] 2020-11-25 16:19:25 -0500
Branch: REL_13_STABLE [a0ef08172] 2020-11-25 16:19:25 -0500
Branch: REL_12_STABLE [ea7a167da] 2020-11-25 16:19:25 -0500
-->
<para>
In <application>psql</application>'s <command>\d</command> commands,
don't truncate the display of column default values (Tom Lane)
</para>
<para>
Formerly, they were arbitrarily truncated at 128 characters.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f76a85000] 2021-01-26 13:04:52 -0500
Branch: REL_13_STABLE [64bdb6e5f] 2021-01-26 13:04:52 -0500
Branch: REL_12_STABLE [82f97d33f] 2021-01-26 13:04:52 -0500
Branch: REL_11_STABLE [3fa7b9078] 2021-01-26 13:04:52 -0500
Branch: REL_10_STABLE [564cb2579] 2021-01-26 13:04:52 -0500
Branch: REL9_6_STABLE [2c2e134b7] 2021-01-26 13:04:52 -0500
Branch: REL9_5_STABLE [131825cd5] 2021-01-26 13:04:52 -0500
-->
<para>
Fix assorted bugs
in <application>psql</application>'s <command>\help</command>
command (Kyotaro Horiguchi, Tom Lane)
</para>
<para>
<command>\help</command> with two argument words failed to find a
command description using only the first word, for
example <literal>\help reset all</literal> should show the help
for <command>RESET</command> but did not.
Also, <command>\help</command> often failed to invoke the pager when
it should. It also leaked memory.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [0bf83648a] 2021-02-03 11:27:13 +0100
Branch: REL_13_STABLE [1d3ce0223] 2021-02-03 11:43:01 +0100
Branch: REL_12_STABLE [1dd6baf78] 2021-02-03 11:58:15 +0100
-->
<para>
Fix <application>pg_dump</application>'s dumping of inherited
generated columns (Peter Eisentraut)
</para>
<para>
The previous behavior resulted in (harmless) errors during restore.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9eabfe300] 2021-01-12 13:37:38 -0500
Branch: REL_13_STABLE [0011c5a0f] 2021-01-12 13:37:38 -0500
Branch: REL_12_STABLE [436d9c5ca] 2021-01-12 13:37:38 -0500
Branch: REL_11_STABLE [9f15188a1] 2021-01-12 13:37:38 -0500
Branch: master [8e396a773] 2021-01-14 16:19:38 -0500
Branch: REL_13_STABLE [79d3ac72f] 2021-01-14 16:19:38 -0500
Branch: REL_12_STABLE [0d221ecec] 2021-01-14 16:19:38 -0500
Branch: REL_11_STABLE [bb12a7f42] 2021-01-14 16:19:38 -0500
Branch: REL_10_STABLE [1c9791f66] 2021-01-14 16:19:38 -0500
-->
<para>
In <application>pg_dump</application>, ensure that the restore
script runs <command>ALTER PUBLICATION ADD TABLE</command> commands
as the owner of the publication, and similarly runs <command>ALTER
INDEX ATTACH PARTITION</command> commands as the owner of the
partitioned index (Tom Lane)
</para>
<para>
Previously, these commands would be run by the role that started the
restore script; which will usually work, but in corner cases that
role might not have adequate permissions.
</para>
</listitem>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [f713ff7c6] 2021-01-16 12:21:35 -0800
Branch: REL_13_STABLE [b8daf894f] 2021-01-16 12:21:38 -0800
Branch: REL_12_STABLE [a0d31b1c9] 2021-01-16 12:21:39 -0800
Branch: REL_11_STABLE [c6ff165f9] 2021-01-16 12:21:39 -0800
Branch: REL_10_STABLE [b933c9c0b] 2021-01-16 12:21:39 -0800
Branch: REL9_6_STABLE [ad2b7c9bb] 2021-01-16 12:21:39 -0800
-->
<para>
Fix <application>pg_dump</application> to handle <literal>WITH
GRANT OPTION</literal> in an extension's initial privileges
(Noah Misch)
</para>
<para>
If an extension's script creates an object and grants privileges
on it with grant option, then later the user revokes such
privileges, <application>pg_dump</application> would generate
incorrect SQL for reproducing the situation. (Few if any extensions
do this today.)
</para>
</listitem>
<listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [2b4f31303] 2020-12-03 15:57:48 +0200
Branch: REL_13_STABLE [abd0abfb7] 2020-12-03 15:57:52 +0200
Branch: REL_12_STABLE [020f153db] 2020-12-03 15:57:54 +0200
Branch: REL_11_STABLE [63e316f0b] 2020-12-03 15:57:57 +0200
Branch: REL_10_STABLE [8b5c353ec] 2020-12-03 15:58:00 +0200
Branch: REL9_6_STABLE [0740857de] 2020-12-03 15:58:02 +0200
Branch: REL9_5_STABLE [81e3c868f] 2020-12-03 15:58:06 +0200
Branch: master [36a4ac20f] 2020-12-04 18:26:46 +0200
Branch: REL_13_STABLE [e41a2efbc] 2020-12-04 18:24:34 +0200
Branch: REL_12_STABLE [ad3fb04b9] 2020-12-04 18:24:57 +0200
Branch: REL_11_STABLE [cda50f211] 2020-12-04 18:25:12 +0200
Branch: REL_10_STABLE [45d363145] 2020-12-04 18:25:23 +0200
Branch: REL9_6_STABLE [a075c84f2] 2020-12-04 18:25:45 +0200
Branch: REL9_5_STABLE [1dd608bba] 2020-12-04 18:25:54 +0200
Branch: master [6ba581cf1] 2020-12-07 14:50:20 +0200
Branch: REL_13_STABLE [e6dc04d43] 2020-12-07 14:50:37 +0200
Branch: REL_12_STABLE [98f8cdd48] 2020-12-07 14:55:22 +0200
Branch: REL_11_STABLE [10d9c9d03] 2020-12-07 14:55:23 +0200
Branch: REL_10_STABLE [d137b14c3] 2020-12-07 14:55:25 +0200
Branch: REL9_6_STABLE [3ea8e660c] 2020-12-07 14:55:27 +0200
Branch: REL9_5_STABLE [beb6b45ab] 2020-12-07 14:55:28 +0200
-->
<para>
In <application>pg_rewind</application>, ensure that all WAL is
accounted for when rewinding a standby server
(Ian Barwick, Heikki Linnakangas)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c21ea4d53] 2021-01-13 14:52:59 -0500
Branch: REL_13_STABLE [6b045ca6c] 2021-01-13 14:52:49 -0500
Branch: REL_12_STABLE [3e214fafc] 2021-01-13 14:52:49 -0500
Branch: REL_11_STABLE [d8bb22ab3] 2021-01-13 14:52:49 -0500
-->
<para>
In <application>pgbench</application>, disallow a digit as the first
character of a variable name (Fabien Coelho)
</para>
<para>
This prevents trying to substitute variables into timestamp literal
values, which may contain strings like <literal>12:34</literal>.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: REL_13_STABLE [f17e8f33f] 2021-01-26 16:42:13 -0300
Branch: REL_12_STABLE [fdf9d0054] 2021-01-26 16:42:13 -0300
Branch: REL_11_STABLE [fdd405c63] 2021-01-26 16:42:13 -0300
Branch: REL_10_STABLE [11a708f81] 2021-01-26 16:42:13 -0300
Branch: REL9_6_STABLE [bcae842b9] 2021-01-26 16:42:13 -0300
Branch: REL9_5_STABLE [f2dc96236] 2021-01-26 16:42:13 -0300
-->
<para>
Report the correct database name in connection failure error
messages from some client programs (Álvaro Herrera)
</para>
<para>
If the database name was defaulted rather than given on the command
line, <application>pg_dumpall</application>,
<application>pgbench</application>, <application>oid2name</application>,
and <application>vacuumlo</application> would produce misleading
error messages after a connection failure.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5c0f7cc54] 2021-02-02 13:49:08 -0500
Branch: REL_13_STABLE [586891394] 2021-02-02 13:49:08 -0500
Branch: REL_12_STABLE [742846958] 2021-02-02 13:49:08 -0500
Branch: REL_11_STABLE [5fc5ff61c] 2021-02-02 13:49:08 -0500
Branch: REL_10_STABLE [2671125c7] 2021-02-02 13:49:08 -0500
Branch: REL9_6_STABLE [608cf2bfd] 2021-02-02 13:49:08 -0500
Branch: REL9_5_STABLE [f0f9ed68d] 2021-02-02 13:49:08 -0500
-->
<para>
Fix memory leak in <filename>contrib/auto_explain</filename>
(Japin Li)
</para>
<para>
Memory consumed while producing the <literal>EXPLAIN</literal>
output was not freed until the end of the current transaction (for a
top-level statement) or the end of the surrounding statement (for a
nested statement). This was particularly a problem
with <varname>log_nested_statements</varname> enabled.
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [e3ebcca84] 2020-12-28 19:56:13 +0900
Branch: REL_13_STABLE [546f14374] 2020-12-28 19:57:51 +0900
Branch: REL_12_STABLE [e792ca4ac] 2020-12-28 19:59:00 +0900
Branch: REL_11_STABLE [294cdd7d0] 2020-12-28 19:59:40 +0900
Branch: REL_10_STABLE [744357d84] 2020-12-28 20:00:15 +0900
Branch: REL9_6_STABLE [03b7a1ee7] 2020-12-28 20:00:54 +0900
Branch: REL9_5_STABLE [b5c73eef8] 2020-12-28 20:01:31 +0900
-->
<para>
In <filename>contrib/postgres_fdw</filename>, avoid leaking open
connections to remote servers when a user mapping or foreign server
object is dropped (Bharath Rupireddy)
</para>
<para>
Open connections that depend on a dropped user mapping or foreign
server can no longer be referenced, but formerly they were kept
around anyway for the duration of the local session.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [28d1601ad] 2020-12-08 15:22:12 +0900
Branch: REL_13_STABLE [dfd8bf2b9] 2020-12-08 15:22:38 +0900
Branch: REL_12_STABLE [d7ecba937] 2020-12-08 15:22:43 +0900
Branch: REL_11_STABLE [b88afd8b6] 2020-12-08 15:22:48 +0900
Branch: REL_10_STABLE [5ba1df0f1] 2020-12-08 15:22:53 +0900
Branch: REL9_6_STABLE [95992e5ed] 2020-12-08 15:22:59 +0900
Branch: REL9_5_STABLE [f95d9fd81] 2020-12-08 15:23:02 +0900
-->
<para>
In <filename>contrib/pgcrypto</filename>, check for error returns
from OpenSSL's EVP functions (Michael Paquier)
</para>
<para>
We do not really expect errors here, but this change silences
warnings from static analysis tools.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ff769831e] 2020-12-22 13:23:49 -0500
Branch: REL_13_STABLE [4b0292253] 2020-12-22 13:23:49 -0500
Branch: REL_12_STABLE [f581e5383] 2020-12-22 13:23:49 -0500
Branch: REL_11_STABLE [a1bd14d54] 2020-12-22 13:23:49 -0500
-->
<para>
Make <filename>contrib/pg_prewarm</filename> more robust when the
cluster is shut down before prewarming is complete (Tom Lane)
</para>
<para>
Previously, autoprewarm would rewrite its status file with only the
block numbers that it had managed to load so far, thus perhaps
largely disabling the prewarm functionality in the next startup.
Instead, suppress status file updates until the initial loading pass
is complete.
</para>
</listitem>
<listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [3836d4b64] 2020-11-12 14:34:37 +0000
Branch: REL_13_STABLE [48ab1fa30] 2020-11-12 14:59:06 +0000
Branch: REL_12_STABLE [7f69ed4ae] 2020-11-12 14:56:58 +0000
Branch: REL_11_STABLE [7e3dc147d] 2020-11-12 14:57:04 +0000
Branch: REL_10_STABLE [068de9dd4] 2020-11-12 14:57:08 +0000
Branch: REL9_6_STABLE [245a35f96] 2020-11-12 14:57:13 +0000
Branch: REL9_5_STABLE [4b212b7c8] 2020-11-12 14:55:51 +0000
-->
<para>
In <filename>contrib/pg_trgm</filename>'s GiST index support, avoid
crash in the rare case that picksplit is called on exactly two index
items (Andrew Gierth, Alexander Korotkov)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ec29427ce] 2020-11-10 22:51:54 -0500
Branch: REL_13_STABLE [afce7908d] 2020-11-10 22:51:55 -0500
Branch: REL_12_STABLE [171c457cd] 2020-11-10 22:51:55 -0500
Branch: REL_11_STABLE [3a89ea0eb] 2020-11-10 22:51:56 -0500
Branch: REL_10_STABLE [e87139b43] 2020-11-10 22:51:57 -0500
Branch: REL9_6_STABLE [cd39c23a2] 2020-11-10 22:51:57 -0500
Branch: REL9_5_STABLE [210564a74] 2020-11-10 22:51:58 -0500
-->
<para>
Fix miscalculation of timeouts
in <filename>contrib/pg_prewarm</filename>
and <filename>contrib/postgres_fdw</filename>
(Alexey Kondratov, Tom Lane)
</para>
<para>
The main loop in <filename>contrib/pg_prewarm</filename>'s
autoprewarm parent process underestimated its desired sleep time by
a factor of 1000, causing it to consume much more CPU than intended.
When waiting for a result from a remote
server, <filename>contrib/postgres_fdw</filename> overestimated the
desired timeout by a factor of 1000 (though this error had been
mitigated by imposing a clamp to 60 seconds).
</para>
<para>
Both of these errors stemmed from incorrectly converting
seconds-and-microseconds to milliseconds. Introduce a new
API <function>TimestampDifferenceMilliseconds()</function>
to make it easier to get this right in the future.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4823621db] 2021-01-15 11:28:51 -0500
Branch: REL_13_STABLE [f44ae4db5] 2021-01-15 11:29:05 -0500
Branch: REL_12_STABLE [f5d044eae] 2021-01-15 11:29:13 -0500
Branch: REL_11_STABLE [046c8face] 2021-01-15 11:29:18 -0500
Branch: REL_10_STABLE [5fa060c8f] 2021-01-15 11:29:26 -0500
Branch: REL9_6_STABLE [fc6d08b27] 2021-01-15 11:29:34 -0500
Branch: REL9_5_STABLE [3934543c2] 2021-01-15 11:29:43 -0500
Branch: master [9d23c15a0] 2021-01-20 12:07:23 -0500
Branch: REL_13_STABLE [6671e8194] 2021-01-20 12:07:31 -0500
Branch: REL_12_STABLE [561dd8d8a] 2021-01-20 12:07:35 -0500
Branch: REL_11_STABLE [cbcff1729] 2021-01-20 12:07:41 -0500
Branch: REL_10_STABLE [a3345383d] 2021-01-20 12:07:46 -0500
Branch: REL9_6_STABLE [cbcf7b130] 2021-01-20 12:07:52 -0500
Branch: REL9_5_STABLE [175f716a8] 2021-01-20 12:07:57 -0500
-->
<para>
Improve <application>configure</application>'s heuristics for
selecting <varname>PG_SYSROOT</varname> on macOS (Tom Lane)
</para>
<para>
The new method is more likely to produce desirable results when
Xcode is newer than the underlying operating system. Choosing
a sysroot that does not match the OS version may result in
nonfunctional executables.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [49407dc32] 2020-11-20 00:07:09 -0500
Branch: REL_13_STABLE [9e9a31bd0] 2020-11-20 00:58:26 -0500
Branch: REL_12_STABLE [5b8360427] 2020-11-20 00:58:26 -0500
Branch: REL_11_STABLE [d01e37845] 2020-11-20 00:58:26 -0500
Branch: REL_10_STABLE [153bf8d20] 2020-11-20 00:58:26 -0500
Branch: REL9_6_STABLE [e7abc1111] 2020-11-20 00:58:26 -0500
Branch: REL9_5_STABLE [2bb8c0f1d] 2020-11-20 00:58:26 -0500
-->
<para>
While building on macOS, specify <option>-isysroot</option> in
link steps as well as compile steps (James Hilliard)
</para>
<para>
This likewise improves the results when Xcode is out of sync with
the operating system.
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [9543f0861] 2020-12-07 19:34:13 -0800
Branch: REL_13_STABLE [4f64daf73] 2020-12-07 18:32:56 -0800
Branch: REL_12_STABLE [b07490b91] 2020-12-07 18:39:32 -0800
Branch: REL_11_STABLE [f4f924b3e] 2020-12-07 18:40:27 -0800
Branch: master [6c57f2ed1] 2020-11-09 20:01:33 -0800
Branch: REL_13_STABLE [6a192c77d] 2020-12-07 18:32:32 -0800
Branch: REL_12_STABLE [fa7a52fb9] 2020-12-07 18:39:32 -0800
Branch: REL_11_STABLE [90eb343ef] 2020-12-07 18:40:27 -0800
-->
<para>
Fix JIT compilation to be compatible with LLVM 11 and LLVM 12
(Andres Freund)
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [5da871bfa] 2020-12-07 19:34:13 -0800
Branch: REL_13_STABLE [01c6370a3] 2020-12-07 18:33:03 -0800
Branch: REL_12_STABLE [27b57f806] 2020-12-07 18:39:32 -0800
Branch: REL_11_STABLE [1e16ad101] 2020-12-07 18:40:27 -0800
-->
<para>
Fix potential mishandling of references to boolean variables in
JIT expression compilation (Andres Freund)
</para>
<para>
No field reports attributable to this have been seen, but it seems
likely that it could cause problems on some architectures.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ad84ecc98] 2020-11-16 15:16:39 -0500
Branch: REL_13_STABLE [53c7b4f62] 2020-11-16 15:16:39 -0500
Branch: REL_12_STABLE [029fa664e] 2020-11-16 15:16:39 -0500
Branch: REL_11_STABLE [89aa30a17] 2020-11-16 15:16:39 -0500
-->
<para>
Fix compile failure with ICU 68 and later (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [677f74e5b] 2020-12-01 11:46:56 -0300
Branch: REL_13_STABLE [5a1d1b954] 2020-12-01 11:46:56 -0300
Branch: REL_12_STABLE [f0ff52f25] 2020-12-01 11:46:56 -0300
Branch: REL_11_STABLE [49aaabdf8] 2020-12-01 11:46:56 -0300
-->
<para>
Avoid <function>memcpy()</function> with a NULL source pointer and
zero count during partitioned index creation (Álvaro Herrera)
</para>
<para>
While such a call is not known to cause problems in itself, some
compilers assume that the arguments of <function>memcpy()</function>
are never NULL, which could result in incorrect optimization of
nearby code.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c7edf4ac2] 2021-01-24 16:29:47 -0500
Branch: REL_13_STABLE [58a545344] 2021-01-24 16:29:47 -0500
Branch: REL_12_STABLE [5db6ba303] 2021-01-24 16:29:47 -0500
Branch: REL_11_STABLE [c82c015b5] 2021-01-24 16:29:47 -0500
Branch: REL_10_STABLE [728971d5f] 2021-01-24 16:29:48 -0500
Branch: REL9_6_STABLE [7e0786751] 2021-01-24 16:29:48 -0500
Branch: REL9_5_STABLE [c26a0865d] 2021-01-24 16:29:48 -0500
-->
<para>
Update time zone data files to <application>tzdata</application>
release 2021a for DST law changes in Russia (Volgograd zone) and
South Sudan, plus historical corrections for Australia, Bahamas,
Belize, Bermuda, Ghana, Israel, Kenya, Nigeria, Palestine,
Seychelles, and Vanuatu.
</para>
<para>
Notably, the Australia/Currie zone has been corrected to the point
where it is identical to Australia/Hobart.
</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
<sect1 id="release-12-5">
<title>Release 12.5</title>
<formalpara>
<title>Release date:</title>
<para>2020-11-12</para>
</formalpara>
<para>
This release contains a variety of fixes from 12.4.
For information about new features in major release 12, see
<xref linkend="release-12"/>.
</para>
<sect2>
<title>Migration to Version 12.5</title>
<para>
A dump/restore is not required for those running 12.X.
</para>
<para>
However, if you are upgrading from a version earlier than 12.2,
see <xref linkend="release-12-2"/>.
</para>
</sect2>
<sect2>
<title>Changes</title>
<itemizedlist>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [0c3185e96] 2020-11-09 07:32:09 -0800
Branch: REL_13_STABLE [c90c84b3f] 2020-11-09 07:32:12 -0800
Branch: REL_12_STABLE [ac8f6243c] 2020-11-09 07:32:12 -0800
Branch: REL_11_STABLE [43ebfea5a] 2020-11-09 07:32:13 -0800
Branch: REL_10_STABLE [f97ecea1e] 2020-11-09 07:32:13 -0800
Branch: REL9_6_STABLE [ff3de4c21] 2020-11-09 07:32:13 -0800
Branch: REL9_5_STABLE [aefc625de] 2020-11-09 07:32:14 -0800
-->
<para>
Block <command>DECLARE CURSOR ... WITH HOLD</command> and firing of
deferred triggers within index expressions and materialized view
queries (Noah Misch)
</para>
<para>
This is essentially a leak in the <quote>security restricted
operation</quote> sandbox mechanism. An attacker having permission
to create non-temporary SQL objects could parlay this leak to
execute arbitrary SQL code as a superuser.
</para>
<para>
The <productname>PostgreSQL</productname> Project thanks
Etienne Stalmans for reporting this problem.
(CVE-2020-25695)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a45bc8a4f] 2020-09-24 18:19:38 -0400
Branch: REL_13_STABLE [cb8885ac4] 2020-09-24 18:19:38 -0400
Branch: REL_12_STABLE [fb93f784f] 2020-09-24 18:19:38 -0400
Branch: REL_11_STABLE [1738a61c8] 2020-09-24 18:19:39 -0400
Branch: REL_10_STABLE [1888ff8d0] 2020-09-24 18:19:39 -0400
Branch: REL9_6_STABLE [7c154f2fd] 2020-09-24 18:19:39 -0400
Branch: REL9_5_STABLE [56b46d3a1] 2020-09-24 18:19:39 -0400
Branch: master [8e5793ab6] 2020-10-19 19:03:46 -0400
Branch: REL_13_STABLE [1814f915b] 2020-10-19 19:03:46 -0400
Branch: REL_12_STABLE [c6d0b9b16] 2020-10-19 19:03:46 -0400
Branch: REL_11_STABLE [5a9f99bed] 2020-10-19 19:03:47 -0400
Branch: REL_10_STABLE [68f236993] 2020-10-19 19:03:47 -0400
Branch: REL9_6_STABLE [5c78f7977] 2020-10-19 19:03:47 -0400
Branch: REL9_5_STABLE [da129a04a] 2020-10-19 19:03:47 -0400
-->
<para>
Fix usage of complex connection-string parameters
in <application>pg_dump</application>,
<application>pg_restore</application>,
<application>clusterdb</application>,
<application>reindexdb</application>,
and <application>vacuumdb</application> (Tom Lane)
</para>
<para>
The <option>-d</option> parameter
of <application>pg_dump</application>
and <application>pg_restore</application>, or
the <option>--maintenance-db</option> parameter of the other
programs mentioned, can be a <quote>connection string</quote>
containing multiple connection parameters rather than just a
database name. In cases where these programs need to initiate
additional connections, such as parallel processing or processing of
multiple databases, the connection string was forgotten and just the
basic connection parameters (database name, host, port, and
username) were used for the additional connections. This could lead
to connection failures if the connection string included any other
essential information, such as non-default SSL or GSS parameters.
Worse, the connection might succeed but not be encrypted as
intended, or be vulnerable to man-in-the-middle attacks that the
intended connection parameters would have prevented.
(CVE-2020-25694)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [85c54287a] 2020-10-21 16:19:00 -0400
Branch: REL_13_STABLE [2e4af4110] 2020-10-21 16:19:00 -0400
Branch: REL_12_STABLE [f656517ec] 2020-10-21 16:19:01 -0400
Branch: REL_11_STABLE [20be76d5c] 2020-10-21 16:19:01 -0400
Branch: REL_10_STABLE [8175da6e7] 2020-10-21 16:19:02 -0400
Branch: REL9_6_STABLE [870a23230] 2020-10-21 16:18:41 -0400
Branch: REL9_5_STABLE [6997da09a] 2020-10-21 16:18:41 -0400
-->
<para>
When <application>psql</application>'s <command>\connect</command>
command re-uses connection parameters, ensure that all
non-overridden parameters from a previous connection string are
re-used (Tom Lane)
</para>
<para>
This avoids cases where reconnection might fail due to omission of
relevant parameters, such as non-default SSL or GSS options.
Worse, the reconnection might succeed but not be encrypted as
intended, or be vulnerable to man-in-the-middle attacks that the
intended connection parameters would have prevented.
This is largely the same problem as just cited
for <application>pg_dump</application> et al,
although <application>psql</application>'s behavior is more complex
since the user may intentionally override some connection
parameters.
(CVE-2020-25694)
</para>
</listitem>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [098fb0079] 2020-11-09 07:32:09 -0800
Branch: REL_13_STABLE [67029845b] 2020-11-09 07:32:12 -0800
Branch: REL_12_STABLE [3855e5b47] 2020-11-09 07:32:13 -0800
Branch: REL_11_STABLE [7b356c78f] 2020-11-09 07:32:13 -0800
Branch: REL_10_STABLE [a498db87b] 2020-11-09 07:32:13 -0800
Branch: REL9_6_STABLE [12fd81cb7] 2020-11-09 07:32:14 -0800
Branch: REL9_5_STABLE [a54dfbee1] 2020-11-09 07:32:14 -0800
-->
<para>
Prevent <application>psql</application>'s <command>\gset</command>
command from modifying specially-treated variables (Noah Misch)
</para>
<para>
<command>\gset</command> without a prefix would overwrite whatever
variables the server told it to. Thus, a compromised server could
set specially-treated variables such as <varname>PROMPT1</varname>,
giving the ability to execute arbitrary shell code in the user's
session.
</para>
<para>
The <productname>PostgreSQL</productname> Project thanks
Nick Cleaton for reporting this problem.
(CVE-2020-25696)
</para>
</listitem>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [566372b3d] 2020-08-15 10:15:53 -0700
Branch: REL_13_STABLE Release: REL_13_0 [592a589a0] 2020-08-15 10:15:56 -0700
Branch: REL_12_STABLE [30e68a2ab] 2020-08-15 10:15:56 -0700
Branch: REL_11_STABLE [d4031d784] 2020-08-15 10:15:57 -0700
Branch: REL_10_STABLE [e525770dd] 2020-08-15 10:15:57 -0700
Branch: REL9_6_STABLE [5ae01df6f] 2020-08-15 10:15:57 -0700
Branch: REL9_5_STABLE [3fbbf64ce] 2020-08-15 10:15:57 -0700
Branch: REL_12_STABLE [06e50d8f7] 2020-08-15 16:15:59 -0700
Branch: REL_11_STABLE [6af0b12a5] 2020-08-15 16:16:15 -0700
Branch: REL_10_STABLE [e8e44e890] 2020-08-15 16:16:29 -0700
Branch: REL9_6_STABLE [85aa22cb1] 2020-08-15 16:16:34 -0700
Branch: REL9_5_STABLE [d8a22a387] 2020-08-15 16:16:42 -0700
-->
<para>
Prevent possible data loss from concurrent truncations of SLRU logs
(Noah Misch)
</para>
<para>
This rare problem would manifest in later <quote>apparent
wraparound</quote> or <quote>could not access status of
transaction</quote> errors.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [aca74843e] 2020-09-24 10:39:52 +1200
Branch: REL_13_STABLE [052014a20] 2020-09-24 10:27:22 +1200
Branch: REL_12_STABLE [7664cc869] 2020-09-24 10:30:47 +1200
Branch: REL_11_STABLE [c5a5bd0bb] 2020-09-24 10:31:57 +1200
Branch: REL_10_STABLE [dd36d6b00] 2020-09-24 10:33:00 +1200
Branch: REL9_6_STABLE [d38e15979] 2020-09-24 10:35:10 +1200
Branch: REL9_5_STABLE [23d8b3577] 2020-09-24 10:36:27 +1200
-->
<para>
Ensure that SLRU directories are properly fsync'd during checkpoints
(Thomas Munro)
</para>
<para>
This prevents possible data loss in a subsequent operating system
crash.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d907bd054] 2020-11-03 15:41:32 -0500
Branch: REL_13_STABLE [768dbef0d] 2020-11-03 15:41:32 -0500
Branch: REL_12_STABLE [136f87ea5] 2020-11-03 15:41:32 -0500
Branch: REL_11_STABLE [501035a0a] 2020-11-03 15:41:32 -0500
Branch: REL_10_STABLE [df4405b78] 2020-11-03 15:41:32 -0500
Branch: REL9_6_STABLE [04c4b495b] 2020-11-03 15:41:32 -0500
Branch: REL9_5_STABLE [77df80cf6] 2020-11-03 15:41:32 -0500
-->
<para>
Fix <command>ALTER ROLE</command> for users with
the <literal>BYPASSRLS</literal> attribute (Tom Lane, Stephen Frost)
</para>
<para>
The <literal>BYPASSRLS</literal> attribute is only allowed to be
changed by superusers, but other <command>ALTER ROLE</command>
operations, such as password changes, should be allowed with only
ordinary permission checks. The previous coding erroneously
restricted all changes on such a role to superusers.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [bbb927b4d] 2020-10-20 19:22:09 -0300
Branch: REL_13_STABLE [5f6463a20] 2020-10-20 19:22:09 -0300
Branch: REL_12_STABLE [0e6b6f8c7] 2020-10-20 19:22:09 -0300
Branch: REL_11_STABLE [a795f6782] 2020-10-20 19:22:09 -0300
-->
<para>
Ensure that <command>ALTER TABLE ONLY ... ENABLE/DISABLE
TRIGGER</command> does not recurse to child tables
(Álvaro Herrera)
</para>
<para>
Previously the <literal>ONLY</literal> flag was ignored.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e5fac1cb1] 2020-09-16 13:38:26 -0400
Branch: REL_13_STABLE Release: REL_13_0 [17280b31c] 2020-09-16 13:38:26 -0400
Branch: REL_12_STABLE [511690ec5] 2020-09-16 13:38:26 -0400
-->
<para>
Avoid unnecessary recursion to partitions in <command>ALTER TABLE
SET NOT NULL</command>, when the target column is already
marked <literal>NOT NULL</literal> (Tom Lane)
</para>
<para>
This avoids a potential deadlock in
parallel <application>pg_restore</application>.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [502898192] 2020-08-21 15:00:47 -0400
Branch: REL_13_STABLE Release: REL_13_0 [894f5dea7] 2020-08-21 15:00:48 -0400
Branch: REL_12_STABLE [d9253df12] 2020-08-21 15:00:43 -0400
Branch: REL_11_STABLE [373796524] 2020-08-21 15:00:43 -0400
Branch: REL_10_STABLE [e22e29c25] 2020-08-21 15:00:43 -0400
Branch: REL9_6_STABLE [37681d7e9] 2020-08-21 15:00:43 -0400
Branch: REL9_5_STABLE [21f8b1811] 2020-08-21 15:00:43 -0400
Branch: master [19f5a37b9] 2020-09-13 12:51:21 -0400
Branch: REL_13_STABLE Release: REL_13_0 [b380484a8] 2020-09-13 12:51:21 -0400
Branch: REL_12_STABLE [1371a1e41] 2020-09-13 12:51:21 -0400
Branch: REL_11_STABLE [f11210013] 2020-09-13 12:51:21 -0400
Branch: REL_10_STABLE [783a21eff] 2020-09-13 12:51:21 -0400
Branch: REL9_6_STABLE [1a9c93ec3] 2020-09-13 12:51:21 -0400
Branch: REL9_5_STABLE [86b8ef139] 2020-09-13 12:51:21 -0400
-->
<para>
Fix handling of expressions in <command>CREATE TABLE LIKE</command>
with inheritance (Tom Lane)
</para>
<para>
If a <command>CREATE TABLE</command> command uses
both <literal>LIKE</literal> and traditional inheritance, column
references in <literal>CHECK</literal> constraints and expression
indexes that came from a <literal>LIKE</literal> parent table tended
to get mis-numbered, resulting in wrong answers and/or bizarre error
messages. The same could happen in <literal>GENERATED</literal>
expressions, in branches that have that feature.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [afc7e0ad5] 2020-09-01 13:40:43 -0400
Branch: REL_13_STABLE Release: REL_13_0 [15dad5776] 2020-09-01 13:40:43 -0400
Branch: REL_12_STABLE [7067ba1b4] 2020-09-01 13:40:43 -0400
Branch: REL_11_STABLE [f00f5e0c1] 2020-09-01 13:40:43 -0400
-->
<para>
Disallow <command>DROP INDEX CONCURRENTLY</command> on a partitioned
table (Álvaro Herrera, Michael Paquier)
</para>
<para>
This case failed anyway, but with a confusing error message.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5b7bfc397] 2020-11-05 11:44:32 -0500
Branch: REL_13_STABLE [44b973b91] 2020-11-05 11:44:32 -0500
Branch: REL_12_STABLE [0bdf1ef3d] 2020-11-05 11:44:32 -0500
Branch: REL_11_STABLE [7dc18c619] 2020-11-05 11:44:32 -0500
-->
<para>
Allow <command>LOCK TABLE</command> to succeed on a self-referential
view (Tom Lane)
</para>
<para>
It previously threw an error complaining about infinite recursion,
but there seems no need to disallow the case.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [b17ff07aa] 2020-11-01 21:22:07 +0900
Branch: REL_13_STABLE [bb62df46b] 2020-11-01 21:24:10 +0900
Branch: REL_12_STABLE [41a033b50] 2020-11-01 21:24:15 +0900
-->
<para>
Retain statistics about an index across <command>REINDEX
CONCURRENTLY</command> (Michael Paquier, Fabrízio de Royes Mello)
</para>
<para>
Non-concurrent reindexing has always preserved such statistics.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [e66bcfb4c] 2020-09-29 14:15:57 +0900
Branch: REL_13_STABLE [1aedaba78] 2020-09-29 14:16:12 +0900
Branch: REL_12_STABLE [8aa4496dd] 2020-09-29 14:16:18 +0900
-->
<para>
Fix incorrect progress reporting from <command>REINDEX
CONCURRENTLY</command> (Matthias van de Meent, Michael Paquier)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ad77039fa] 2020-10-28 13:47:02 -0400
Branch: REL_13_STABLE [70492195b] 2020-10-28 13:47:02 -0400
Branch: REL_12_STABLE [43330cdd4] 2020-10-28 13:47:02 -0400
-->
<para>
Ensure that <literal>GENERATED</literal> columns are updated when
the column(s) they depend on are updated via a rule or an updatable
view (Tom Lane)
</para>
<para>
This fix also takes care of possible failure to fire a
column-specific trigger in such cases.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [f481d2823] 2020-09-08 19:35:15 -0300
Branch: REL_13_STABLE Release: REL_13_0 [d0230a43f] 2020-09-08 19:35:15 -0300
Branch: REL_12_STABLE [ef1e1250e] 2020-09-08 19:35:15 -0300
-->
<para>
Recheck default partition constraints while routing an inserted or
updated tuple to the correct partition (Amit Langote,
Álvaro Herrera)
</para>
<para>
This fixes race conditions when partitions are added concurrently
with the insertion.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [72647ac3b] 2020-09-28 14:12:38 -0400
Branch: REL_13_STABLE [61a78c71a] 2020-09-28 14:12:38 -0400
Branch: REL_12_STABLE [29f20db85] 2020-09-28 14:12:38 -0400
-->
<para>
Fix failures with collation-dependent partition bound expressions
(Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [560564d3a] 2020-11-04 12:46:28 +0100
Branch: REL_13_STABLE [82d4a2a7d] 2020-11-04 12:46:38 +0100
Branch: REL_12_STABLE [ea9087938] 2020-11-04 12:46:52 +0100
-->
<para>
Support hashing of text arrays (Peter Eisentraut)
</para>
<para>
Array hashing failed if the array element type is collatable.
Notably, this prevented using hash partitioning with a text array
column as partition key.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [489c9c340] 2020-09-30 15:40:23 -0400
Branch: REL_13_STABLE [99fd38c02] 2020-09-30 15:40:23 -0400
Branch: REL_12_STABLE [c5232dca8] 2020-09-30 15:40:23 -0400
Branch: REL_11_STABLE [b0fe0b022] 2020-09-30 15:40:23 -0400
Branch: REL_10_STABLE [db96be24c] 2020-09-30 15:40:23 -0400
Branch: REL9_6_STABLE [19e798268] 2020-09-30 15:40:23 -0400
Branch: REL9_5_STABLE [4857e6fe1] 2020-09-30 15:40:23 -0400
-->
<para>
Fix off-by-one conversion of negative years to BC dates
in <function>to_date()</function>
and <function>to_timestamp()</function> (Dar Alathar-Yemen, Tom Lane)
</para>
<para>
Also, arrange for the combination of a negative year and an
explicit <quote>BC</quote> marker to cancel out and produce AD.
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [fd26f7823] 2020-09-29 16:21:46 +0900
Branch: REL_13_STABLE [059caf36c] 2020-09-29 16:23:57 +0900
Branch: REL_12_STABLE [4d342b9d4] 2020-09-29 16:24:20 +0900
Branch: REL_11_STABLE [462ff7966] 2020-09-29 16:24:47 +0900
Branch: REL_10_STABLE [334417538] 2020-09-29 16:25:08 +0900
Branch: REL9_6_STABLE [7be02a3bf] 2020-09-29 16:25:20 +0900
Branch: REL9_5_STABLE [40a8fb1e0] 2020-09-29 16:25:51 +0900
-->
<para>
Ensure that standby servers will archive WAL timeline history files
when <varname>archive_mode</varname> is set
to <literal>always</literal> (Grigory Smolkin, Fujii Masao)
</para>
<para>
This oversight could lead to failure of subsequent PITR recovery
attempts.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3d65b0593] 2020-09-16 12:07:31 -0400
Branch: REL_13_STABLE Release: REL_13_0 [3e3f8f202] 2020-09-16 12:07:31 -0400
Branch: REL_12_STABLE [8580631ff] 2020-09-16 12:07:31 -0400
Branch: REL_11_STABLE [2c74f7139] 2020-09-16 12:07:31 -0400
Branch: REL_10_STABLE [d6d70f89a] 2020-09-16 12:07:31 -0400
-->
<para>
Fix <quote>cache lookup failed for relation 0</quote>
failures in logical replication workers (Tom Lane)
</para>
<para>
The real-world impact is small, since the failure is unlikely, and
if it does happen the worker would just exit and be restarted.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c8746f999] 2020-09-04 20:33:36 -0400
Branch: REL_13_STABLE Release: REL_13_0 [9b81a30f9] 2020-09-04 20:33:37 -0400
Branch: REL_12_STABLE [9b47ee6e7] 2020-09-04 20:20:05 -0400
Branch: REL_11_STABLE [7156a0eac] 2020-09-04 20:20:05 -0400
Branch: REL_10_STABLE [9b8a8516e] 2020-09-04 20:20:06 -0400
-->
<para>
Prevent logical replication workers from sending redundant ping
requests (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0038f9438] 2020-08-14 13:26:57 -0400
Branch: REL_13_STABLE Release: REL_13_0 [1c6066fbd] 2020-08-14 13:26:57 -0400
Branch: REL_12_STABLE [42566a250] 2020-08-14 13:26:57 -0400
Branch: REL_11_STABLE [250aaa2de] 2020-08-14 13:26:57 -0400
Branch: REL_10_STABLE [326b5fe0f] 2020-08-14 13:26:57 -0400
Branch: REL9_6_STABLE [b4d8be9f6] 2020-08-14 13:26:57 -0400
-->
<para>
During <quote>smart</quote> shutdown, don't terminate background
processes until all client (foreground) sessions are done (Tom Lane)
</para>
<para>
The previous behavior broke parallel query processing, since the
postmaster would terminate parallel workers and refuse to launch any
new ones. It also caused autovacuum to cease functioning, which
could have dire long-term effects if the surviving client sessions
make a lot of data changes.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_13_BR [9abb2bfc0] 2019-10-13 15:48:26 -0400
Branch: REL_12_STABLE [8b53dbada] 2020-10-15 12:50:57 -0400
Branch: REL_11_STABLE [85834023a] 2020-10-15 12:50:57 -0400
Branch: REL_10_STABLE [4e95733b0] 2020-10-15 12:50:57 -0400
Branch: REL9_6_STABLE [7753ca49d] 2020-10-15 12:50:57 -0400
-->
<para>
Avoid recursive consumption of stack space while processing signals
in the postmaster (Tom Lane)
</para>
<para>
Heavy use of parallel processing has been observed to cause
postmaster crashes due to too many concurrent signals requesting
creation of a parallel worker process.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [bedadc732] 2020-09-09 15:32:45 -0400
Branch: REL_13_STABLE Release: REL_13_0 [35e59398a] 2020-09-09 15:32:34 -0400
Branch: REL_12_STABLE [d038c6c63] 2020-09-09 15:32:34 -0400
Branch: REL_11_STABLE [67dde49a3] 2020-09-09 15:32:34 -0400
Branch: REL_10_STABLE [95cd8902e] 2020-09-09 15:32:34 -0400
Branch: REL9_6_STABLE [b2eaddd9b] 2020-09-09 15:32:34 -0400
Branch: REL9_5_STABLE [581855b6a] 2020-09-09 15:32:34 -0400
Branch: master [58c6feccf] 2020-09-10 12:06:37 -0400
Branch: REL_13_STABLE Release: REL_13_0 [3f29aa48b] 2020-09-10 12:06:26 -0400
Branch: REL_12_STABLE [4e10c0c8a] 2020-09-10 12:06:26 -0400
Branch: REL_11_STABLE [93871b693] 2020-09-10 12:06:26 -0400
Branch: REL_10_STABLE [ac695b8f2] 2020-09-10 12:06:26 -0400
Branch: REL9_6_STABLE [dc71c6409] 2020-09-10 12:06:26 -0400
Branch: REL9_5_STABLE [e2c9bedc9] 2020-09-10 12:06:26 -0400
-->
<para>
Avoid running <systemitem>atexit</systemitem> handlers when exiting
due to SIGQUIT (Kyotaro Horiguchi, Tom Lane)
</para>
<para>
Most server processes followed this practice already, but the
archiver process was overlooked. Backends that were still waiting
for a client startup packet got it wrong, too.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4d346def1] 2020-08-22 14:46:40 -0400
Branch: REL_13_STABLE Release: REL_13_0 [de627adaa] 2020-08-22 14:46:40 -0400
Branch: REL_12_STABLE [6b701eaaa] 2020-08-22 14:46:40 -0400
Branch: REL_11_STABLE [b439adcab] 2020-08-22 14:46:40 -0400
Branch: REL_10_STABLE [6fa403e61] 2020-08-22 14:46:40 -0400
Branch: REL9_6_STABLE [d3701bc8a] 2020-08-22 14:46:40 -0400
Branch: REL9_5_STABLE [7edd36eae] 2020-08-22 14:46:40 -0400
-->
<para>
Avoid misoptimization of subquery qualifications that reference
apparently-constant grouping columns (Tom Lane)
</para>
<para>
A <quote>constant</quote> subquery output column isn't really
constant if it is a grouping column that appears in only some of the
grouping sets.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d7885b1f8] 2020-10-06 11:43:53 -0400
Branch: REL_13_STABLE [b7f166efa] 2020-10-06 11:43:53 -0400
Branch: REL_12_STABLE [3d69efc4f] 2020-10-06 11:43:54 -0400
-->
<para>
Fix possible crash when considering partition-wise joins
during GEQO planning (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [1e7629d2c] 2020-08-14 22:14:03 -0400
Branch: REL_13_STABLE Release: REL_13_0 [b538e83f1] 2020-08-14 22:14:03 -0400
Branch: REL_12_STABLE [912fb290c] 2020-08-14 22:14:03 -0400
Branch: REL_11_STABLE [9d472b51e] 2020-08-14 22:14:03 -0400
Branch: REL_10_STABLE [dea07098a] 2020-08-14 22:14:03 -0400
Branch: REL9_6_STABLE [7241edc4f] 2020-08-14 22:14:03 -0400
Branch: REL9_5_STABLE [5190707d7] 2020-08-14 22:14:03 -0400
-->
<para>
Avoid failure when SQL function inlining changes the shape of a
potentially-hashable subplan comparison expression (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [a811ea5bd] 2020-08-13 17:33:49 -0400
Branch: REL_13_STABLE Release: REL_13_0 [2f29fd4cb] 2020-08-13 17:33:49 -0400
Branch: REL_12_STABLE [1122a903e] 2020-08-13 17:33:49 -0400
Branch: REL_11_STABLE [704de3739] 2020-08-13 17:33:49 -0400
Branch: REL_10_STABLE [385cbe8e4] 2020-08-13 17:33:49 -0400
Branch: REL9_6_STABLE [e5902117d] 2020-08-13 17:33:49 -0400
Branch: REL9_5_STABLE [40bceae7b] 2020-08-13 17:33:49 -0400
Branch: master [6e70443ed] 2020-08-17 16:20:06 -0400
Branch: REL_13_STABLE Release: REL_13_0 [b83f1bcca] 2020-08-17 16:20:06 -0400
Branch: REL_12_STABLE [4f47c8e7d] 2020-08-17 16:20:06 -0400
Branch: REL_11_STABLE [060e5bd70] 2020-08-17 16:20:06 -0400
Branch: REL_10_STABLE [3a45ac076] 2020-08-17 16:20:05 -0400
Branch: REL9_6_STABLE [d4d214903] 2020-08-17 16:20:05 -0400
Branch: REL9_5_STABLE [aa4da2674] 2020-08-17 16:20:05 -0400
-->
<para>
While building or re-building an index, tolerate the appearance of
new HOT chains due to concurrent updates
(Anastasia Lubennikova, Álvaro Herrera)
</para>
<para>
This oversight could lead to <quote>failed to find parent tuple for
heap-only tuple</quote> errors.
</para>
</listitem>
<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [b7f2dd959] 2020-09-17 16:11:48 +0530
Branch: REL_13_STABLE Release: REL_13_0 [0abd9cd2f] 2020-09-17 15:16:46 +0530
Branch: REL_12_STABLE [4bc63462d] 2020-09-17 15:38:47 +0530
Branch: REL_11_STABLE [956891fab] 2020-09-17 15:53:25 +0530
Branch: REL_10_STABLE [fcc3665a0] 2020-09-17 15:59:42 +0530
-->
<para>
Fix failure of parallel B-tree index scans when the index condition
is unsatisfiable (James Hunter)
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [7577dd848] 2020-11-07 00:39:19 +0100
Branch: REL_13_STABLE [6a7b55f37] 2020-11-07 00:40:06 +0100
Branch: REL_12_STABLE [8149e9f9a] 2020-11-07 00:40:40 +0100
Branch: REL_11_STABLE [895d0f0e8] 2020-11-07 00:41:02 +0100
Branch: REL_10_STABLE [0b96fc977] 2020-11-07 00:41:19 +0100
Branch: REL9_6_STABLE [bae31e75f] 2020-11-07 00:41:36 +0100
Branch: REL9_5_STABLE [d2d3a4bd3] 2020-11-07 00:41:52 +0100
-->
<para>
Ensure that data is detoasted before being inserted into a BRIN
index (Tomas Vondra)
</para>
<para>
Index entries are not supposed to contain out-of-line TOAST
pointers, but BRIN didn't get that memo. This could lead to errors
like <quote>missing chunk number 0 for toast value NNN</quote>.
(If you are faced with such an error from an existing
index, <command>REINDEX</command> should be enough to fix it.)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [1f42d35a1] 2020-08-12 15:33:36 -0400
Branch: REL_13_STABLE Release: REL_13_0 [8782ea2f3] 2020-08-12 15:33:36 -0400
Branch: REL_12_STABLE [0426c75e7] 2020-08-12 15:33:36 -0400
Branch: REL_11_STABLE [7af39993a] 2020-08-12 15:33:36 -0400
Branch: REL_10_STABLE [721ef4d28] 2020-08-12 15:33:36 -0400
Branch: REL9_6_STABLE [7a3c261fb] 2020-08-12 15:33:36 -0400
Branch: REL9_5_STABLE [ce3a8fde8] 2020-08-12 15:33:36 -0400
-->
<para>
Handle concurrent desummarization correctly during BRIN index scans
(Alexander Lakhin, Álvaro Herrera)
</para>
<para>
Previously, if a page range was desummarized at just the wrong time,
an index scan might falsely raise an error indicating index
corruption.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [10564ee02] 2020-08-27 17:36:13 -0400
Branch: REL_13_STABLE Release: REL_13_0 [1df14a566] 2020-08-27 17:36:13 -0400
Branch: REL_12_STABLE [ff3c16d1e] 2020-08-27 17:36:13 -0400
Branch: REL_11_STABLE [11ecf4bd2] 2020-08-27 17:36:13 -0400
Branch: REL_10_STABLE [0d3ad6540] 2020-08-27 17:36:13 -0400
Branch: REL9_6_STABLE [0dfec43c8] 2020-08-27 17:36:13 -0400
Branch: REL9_5_STABLE [fabd2f9c9] 2020-08-27 17:36:13 -0400
-->
<para>
Fix rare <quote>lost saved point in index</quote> errors in scans of
multicolumn GIN indexes (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [371668a83] 2020-10-12 18:01:34 -0400
Branch: REL_13_STABLE [962ab473e] 2020-10-12 18:01:34 -0400
Branch: REL_12_STABLE [12945874e] 2020-10-12 18:01:34 -0400
-->
<para>
Fix buffered GiST index builds to work when the index has included
columns (Pavel Borisov)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0a4b34031] 2020-11-02 21:11:50 -0500
Branch: REL_13_STABLE [a58a631b4] 2020-11-02 21:11:50 -0500
Branch: REL_12_STABLE [d3befe9b9] 2020-11-02 21:11:50 -0500
Branch: REL_11_STABLE [f28b089cb] 2020-11-02 21:11:50 -0500
Branch: REL_10_STABLE [7827497ba] 2020-11-02 21:11:50 -0500
-->
<para>
Fix unportable use of <function>getnameinfo()</function>
in <structname>pg_hba_file_rules</structname> view (Tom Lane)
</para>
<para>
On FreeBSD 11, and possibly other platforms, the
view's <structfield>address</structfield>
and <structfield>netmask</structfield> columns were always null due
to this error.
</para>
</listitem>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [f90e80b91] 2020-10-31 08:43:28 -0700
Branch: REL_13_STABLE [ab2e2ce46] 2020-10-31 08:43:32 -0700
Branch: REL_12_STABLE [741b84e9f] 2020-10-31 08:44:13 -0700
Branch: REL_11_STABLE [045466675] 2020-10-31 08:45:19 -0700
-->
<para>
Avoid crash if <varname>debug_query_string</varname> is NULL
when starting a parallel worker (Noah Misch)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [ced138e8c] 2020-09-15 21:03:14 -0300
Branch: REL_13_STABLE Release: REL_13_0 [873cb8fca] 2020-09-15 21:03:14 -0300
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL_12_STABLE [93f726c04] 2020-10-27 15:37:13 -0400
Branch: REL_11_STABLE [66c036b4f] 2020-10-27 15:37:13 -0400
Branch: REL_10_STABLE [41c742a43] 2020-10-27 15:37:13 -0400
Branch: REL9_6_STABLE [cc623ed2f] 2020-10-27 15:37:13 -0400
Branch: REL9_5_STABLE [7978ad025] 2020-10-27 15:37:13 -0400
-->
<para>
Fix use-after-free hazard when an event trigger monitors
an <command>ALTER TABLE</command> operation (Jehan-Guillaume de
Rorthais)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ba9f18abd] 2020-10-25 13:57:46 -0400
Branch: REL_13_STABLE [d88d8ad28] 2020-10-25 13:57:46 -0400
Branch: REL_12_STABLE [de78c1007] 2020-10-25 13:57:46 -0400
Branch: master [20d3fe900] 2020-10-26 11:36:53 -0400
Branch: master [8b39345a9] 2020-11-08 13:08:36 -0500
Branch: REL_13_STABLE [7aeb6404f] 2020-11-08 13:08:36 -0500
Branch: REL_12_STABLE [94ec005f3] 2020-11-08 13:08:36 -0500
-->
<para>
Avoid failures when a <literal>BEFORE ROW UPDATE</literal> trigger
returns the <quote>old</quote> row of a table having dropped
or <quote>missing</quote> columns (Amit Langote, Tom Lane)
</para>
<para>
This method of suppressing an update could result in crashes,
unexpected <literal>CHECK</literal> constraint failures, or
incorrect <literal>RETURNING</literal> output,
because <quote>missing</quote> columns would read as NULLs for those
purposes. (A column is <quote>missing</quote> for this purpose if
it was added by <command>ALTER TABLE ADD COLUMN</command> with a
non-NULL, but constant, default value.) Dropped columns could cause
trouble as well.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [19ad7e1d7] 2020-09-06 12:55:13 -0400
Branch: REL_13_STABLE Release: REL_13_0 [f04203ab7] 2020-09-06 12:55:28 -0400
Branch: REL_12_STABLE [f45dd3fed] 2020-09-06 12:55:37 -0400
Branch: REL_11_STABLE [baef6e5e9] 2020-09-06 12:55:44 -0400
Branch: REL_10_STABLE [f71b93b86] 2020-09-06 12:55:51 -0400
Branch: REL9_6_STABLE [2939f613f] 2020-09-06 12:55:59 -0400
Branch: REL9_5_STABLE [e0b4c7dd0] 2020-09-06 12:56:10 -0400
-->
<para>
Fix incorrect error message about inconsistent moving-aggregate
data types (Jeff Janes)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [be4b0c007] 2020-09-03 16:52:09 -0400
Branch: REL_13_STABLE Release: REL_13_0 [17424e79d] 2020-09-03 16:52:09 -0400
Branch: REL_12_STABLE [82dd373f2] 2020-09-03 16:52:09 -0400
Branch: REL_11_STABLE [526df0a23] 2020-09-03 16:52:09 -0400
Branch: REL_10_STABLE [2a938c793] 2020-09-03 16:52:09 -0400
Branch: REL9_6_STABLE [2500e51e7] 2020-09-03 16:52:09 -0400
Branch: REL9_5_STABLE [3738651f5] 2020-09-03 16:52:09 -0400
-->
<para>
Avoid lockup when a parallel worker reports a very long error
message (Vignesh C)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: REL_13_STABLE [1f53d0b9f] 2020-10-20 14:09:16 +0200
Branch: REL_12_STABLE [bd0677bb8] 2020-10-20 14:31:52 +0200
Branch: REL_11_STABLE [6e03a8a30] 2020-10-20 14:50:43 +0200
Branch: REL_10_STABLE [f78ebbe68] 2020-10-20 15:19:47 +0200
Branch: REL9_6_STABLE [d4e654d15] 2020-10-20 15:35:31 +0200
Branch: REL9_5_STABLE [d27c18d26] 2020-10-20 17:22:41 +0200
-->
<para>
Avoid unnecessary failure when transferring very large payloads
through shared memory queues (Markus Wanner)
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [72559438f] 2020-10-15 14:29:53 -0700
Branch: REL_13_STABLE [ae3e75aba] 2020-10-15 14:30:40 -0700
Branch: REL_12_STABLE [c8a2bb0f1] 2020-10-15 14:31:32 -0700
Branch: REL_11_STABLE [f3dee5b9a] 2020-10-15 15:06:16 -0700
Branch: master [fe2a16d8b] 2020-10-15 18:17:00 -0700
Branch: REL_13_STABLE [efc9a8e98] 2020-10-15 18:17:00 -0700
Branch: REL_12_STABLE [c835c7ffe] 2020-10-15 18:17:01 -0700
Branch: REL_11_STABLE [4a4f4487d] 2020-10-15 18:17:01 -0700
-->
<para>
Fix incorrect handling of template function attributes in JIT code
generation (Andres Freund)
</para>
<para>
This has been shown to cause crashes on <literal>s390x</literal>,
and very possibly there are other cases on other platforms.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e55f718fc] 2020-09-26 16:04:06 -0400
Branch: REL_13_STABLE [f7873900f] 2020-09-26 16:04:06 -0400
Branch: REL_12_STABLE [bda32733c] 2020-09-26 16:04:06 -0400
Branch: REL_11_STABLE [dd89ba578] 2020-09-26 16:04:06 -0400
Branch: REL_10_STABLE [de6725deb] 2020-09-26 16:04:06 -0400
Branch: REL9_6_STABLE [acab757ce] 2020-09-26 16:04:06 -0400
Branch: REL9_5_STABLE [bf34ae930] 2020-09-26 16:04:06 -0400
-->
<para>
Fix relation cache memory leaks with RLS policies (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [623644f02] 2020-11-06 22:52:16 -0300
Branch: REL_13_STABLE [d94d37f8c] 2020-11-06 22:52:15 -0300
Branch: REL_12_STABLE [8ad6a0c1b] 2020-11-06 22:52:15 -0300
-->
<para>
Fix edge-case memory leak
in <function>index_get_partition()</function> (Justin Pryzby)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [397ea901e] 2020-10-12 13:31:24 -0400
Branch: REL_13_STABLE [9343bfefa] 2020-10-12 13:31:24 -0400
Branch: REL_12_STABLE [f35c11770] 2020-10-12 13:31:24 -0400
Branch: REL_11_STABLE [cfa4cff30] 2020-10-12 13:31:24 -0400
Branch: REL_10_STABLE [a5c77e6b8] 2020-10-12 13:31:24 -0400
Branch: REL9_6_STABLE [c7573ab1e] 2020-10-12 13:31:24 -0400
Branch: REL9_5_STABLE [43ca5e07d] 2020-10-12 13:31:24 -0400
-->
<para>
Fix small memory leak when SIGHUP processing decides that a new GUC
variable value cannot be applied without a restart (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a6b1f5365] 2020-09-29 11:18:30 -0400
Branch: REL_13_STABLE [f0e4ec74e] 2020-09-29 11:18:30 -0400
Branch: REL_12_STABLE [c1e044bb3] 2020-09-29 11:18:31 -0400
Branch: REL_11_STABLE [13a1901ba] 2020-09-29 11:18:31 -0400
-->
<para>
Fix memory leaks
in <application>PL/pgsql</application>'s <command>CALL</command>
processing (Pavel Stehule, Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b55b4dad9] 2020-09-01 13:14:44 -0400
Branch: REL_13_STABLE Release: REL_13_0 [4178b7499] 2020-09-01 13:14:44 -0400
Branch: REL_12_STABLE [55aea0c70] 2020-09-01 13:14:44 -0400
Branch: REL_11_STABLE [df8020b32] 2020-09-01 13:14:44 -0400
Branch: REL_10_STABLE [0c0a3a859] 2020-09-01 13:14:44 -0400
Branch: REL9_6_STABLE [ba23174dd] 2020-09-01 13:14:44 -0400
Branch: REL9_5_STABLE [8d486cfbf] 2020-09-01 13:14:44 -0400
Branch: master [4d41823c5] 2020-09-04 21:01:58 -0400
Branch: REL_13_STABLE Release: REL_13_0 [8df601bd4] 2020-09-04 21:01:59 -0400
Branch: REL_12_STABLE [fc37c6f61] 2020-09-04 21:01:59 -0400
Branch: REL_11_STABLE [d7ae549e3] 2020-09-04 21:01:59 -0400
Branch: REL_10_STABLE [546479f34] 2020-09-04 21:01:59 -0400
-->
<para>
Make <application>libpq</application> support arbitrary-length lines
in <filename>.pgpass</filename> files (Tom Lane)
</para>
<para>
This is mostly useful to allow using very long security tokens as
passwords.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7d00a6b2d] 2020-10-17 16:53:48 -0400
Branch: REL_13_STABLE [d2074daeb] 2020-10-19 11:23:51 -0400
Branch: REL_12_STABLE [407580aab] 2020-10-19 11:23:51 -0400
Branch: REL_11_STABLE [883226441] 2020-10-19 11:23:52 -0400
Branch: REL_10_STABLE [6670e9107] 2020-10-19 11:23:52 -0400
Branch: REL9_6_STABLE [cdc7ace16] 2020-10-19 11:23:52 -0400
Branch: REL9_5_STABLE [6acc31a20] 2020-10-19 11:23:52 -0400
-->
<para>
In <application>libpq</application> for Windows,
call <function>WSAStartup()</function> once per process
and <function>WSACleanup()</function> not at all (Tom Lane,
Alexander Lakhin)
</para>
<para>
Previously, <application>libpq</application>
invoked <function>WSAStartup()</function> at connection start
and <function>WSACleanup()</function> at connection cleanup.
However, it appears that calling <function>WSACleanup()</function>
can interfere with other program operations; notably, we have
observed rare failures to emit expected output to stdout. There
appear to be no ill effects from omitting the call, so do that.
(This also eliminates a performance issue from repeated DLL loads and
unloads when a program performs a series of database connections.)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [21d36747d] 2020-10-24 13:12:08 -0400
Branch: REL_13_STABLE [fd048e0cb] 2020-10-24 13:12:19 -0400
Branch: REL_12_STABLE [bdc79ddd1] 2020-10-24 13:12:26 -0400
Branch: REL_11_STABLE [12a73f29f] 2020-10-24 13:12:31 -0400
Branch: REL_10_STABLE [f38b66ec0] 2020-10-24 13:12:41 -0400
Branch: REL9_6_STABLE [379c43bda] 2020-10-24 13:12:47 -0400
Branch: REL9_5_STABLE [758b45e83] 2020-10-24 13:12:53 -0400
-->
<para>
Fix <application>ecpg</application> library's per-thread
initialization logic for Windows (Tom Lane, Alexander Lakhin)
</para>
<para>
Multi-threaded <application>ecpg</application> applications could
suffer rare misbehavior due to incorrect locking.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [66f8687a8] 2020-10-28 14:35:53 -0400
Branch: REL_13_STABLE [ba4f5413e] 2020-10-28 14:35:53 -0400
Branch: REL_12_STABLE [cb0982ba9] 2020-10-28 14:35:53 -0400
Branch: REL_11_STABLE [9eb250339] 2020-10-28 14:35:53 -0400
Branch: REL_10_STABLE [504f963f7] 2020-10-28 14:35:53 -0400
Branch: REL9_6_STABLE [204d77969] 2020-10-28 14:35:53 -0400
Branch: REL9_5_STABLE [aff06436c] 2020-10-28 14:35:53 -0400
-->
<para>
On Windows, make <application>psql</application> read the output of
a backtick command in text mode, not binary mode (Tom Lane)
</para>
<para>
This ensures proper handling of newlines.
</para>
</listitem>
<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [3eb3d3e78] 2020-09-04 13:54:54 -0400
Branch: REL_13_STABLE Release: REL_13_0 [72857482c] 2020-09-04 13:55:11 -0400
Branch: REL_12_STABLE [616110eac] 2020-09-04 13:55:03 -0400
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [9e5f1f21a] 2020-10-07 12:51:02 -0400
Branch: REL_13_STABLE [2ea624b4b] 2020-10-07 12:51:03 -0400
Branch: REL_12_STABLE [d8c2a2199] 2020-10-07 12:51:04 -0400
Branch: REL_11_STABLE [f2c6e94f0] 2020-10-07 12:51:05 -0400
Branch: REL_10_STABLE [0c79dcb36] 2020-10-07 12:51:05 -0400
Branch: REL9_6_STABLE [710c0a66d] 2020-10-07 12:51:06 -0400
Branch: REL9_5_STABLE [0bfe356c5] 2020-10-07 12:51:06 -0400
-->
<para>
Ensure that <application>pg_dump</application> collects per-column
information about extension configuration tables (Fabrízio de
Royes Mello, Tom Lane)
</para>
<para>
Failure to do this led to crashes when
specifying <option>--inserts</option>, or underspecified (though
usually correct) <command>COPY</command> commands when
using <command>COPY</command> to reload the tables' data.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [2ba5b2db7] 2020-08-14 17:33:31 -0400
Branch: REL_13_STABLE Release: REL_13_0 [b7cc21c57] 2020-08-14 17:33:31 -0400
Branch: REL_12_STABLE [3dadcb2b3] 2020-08-14 17:33:31 -0400
-->
<para>
Ensure that parallel <application>pg_restore</application> processes
foreign keys referencing partitioned tables in the correct order
(Álvaro Herrera)
</para>
<para>
Previously, it might try to restore a foreign key constraint before
the required indexes were all in place, leading to an error.
</para>
</listitem>
<listitem>
<!--
Author: Bruce Momjian <bruce@momjian.us>
Branch: master [3c0471b5f] 2020-10-15 19:33:46 -0400
Branch: REL_13_STABLE [59cfff65b] 2020-10-15 19:33:45 -0400
Branch: REL_12_STABLE [a106236d8] 2020-10-15 19:33:43 -0400
Branch: REL_11_STABLE [eb421c83b] 2020-10-15 19:33:42 -0400
Branch: REL_10_STABLE [85fedf39f] 2020-10-15 19:33:36 -0400
Branch: REL9_6_STABLE [39c23c199] 2020-10-15 19:33:36 -0400
Branch: REL9_5_STABLE [d9ae2297b] 2020-10-15 19:33:36 -0400
Branch: master [536de14e2] 2020-10-15 20:37:20 -0400
Branch: REL_13_STABLE [79fe23465] 2020-10-15 20:37:20 -0400
Branch: REL_12_STABLE [0ab7ca98a] 2020-10-15 20:37:20 -0400
Branch: REL_11_STABLE [16be4e435] 2020-10-15 20:37:19 -0400
Branch: REL_10_STABLE [6e34cc8ab] 2020-10-15 20:37:19 -0400
Branch: REL9_6_STABLE [9dcffe69a] 2020-10-15 20:37:19 -0400
Branch: REL9_5_STABLE [b05672c72] 2020-10-15 20:37:19 -0400
-->
<para>
Make <application>pg_upgrade</application> check for pre-existence
of tablespace directories in the target cluster (Bruce Momjian)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [ca2a12c93] 2020-10-19 09:36:56 +0900
Branch: REL_13_STABLE [1bd9b2b23] 2020-10-19 09:37:50 +0900
Branch: REL_12_STABLE [57bdf29dd] 2020-10-19 09:37:55 +0900
Branch: REL_11_STABLE [914139081] 2020-10-19 09:38:01 +0900
Branch: REL_10_STABLE [e8d36f9ec] 2020-10-19 09:38:06 +0900
Branch: REL9_6_STABLE [994a02f7f] 2020-10-19 09:38:13 +0900
Branch: REL9_5_STABLE [099238322] 2020-10-19 09:38:18 +0900
-->
<para>
Fix potential memory leak in <filename>contrib/pgcrypto</filename>
(Michael Paquier)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [02a75f836] 2020-10-16 11:59:13 -0400
Branch: REL_13_STABLE [3d338a46a] 2020-10-16 11:59:25 -0400
Branch: REL_12_STABLE [7004ce758] 2020-10-16 11:59:31 -0400
Branch: REL_11_STABLE [1eb2d7e3e] 2020-10-16 11:59:36 -0400
Branch: REL_10_STABLE [3e1a4c260] 2020-10-16 11:59:41 -0400
Branch: REL9_6_STABLE [e15115b4d] 2020-10-16 11:59:47 -0400
Branch: REL9_5_STABLE [9c3032881] 2020-10-16 11:59:52 -0400
-->
<para>
Add check for an unlikely failure case
in <filename>contrib/pgcrypto</filename> (Daniel Gustafsson)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4a071afbd] 2020-10-29 15:28:14 -0400
Branch: REL_13_STABLE [ee03baad2] 2020-10-29 15:28:28 -0400
Branch: REL_12_STABLE [25b587f03] 2020-10-29 15:28:35 -0400
Branch: REL_11_STABLE [24d769b90] 2020-10-29 15:28:41 -0400
Branch: REL_10_STABLE [c39f4e81d] 2020-10-29 15:28:47 -0400
-->
<para>
Fix recently-added <type>timetz</type> test case so it works when
the USA is not observing daylight savings time (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c4a803ac7] 2020-10-16 21:53:33 -0400
Branch: REL_13_STABLE [3f26dca76] 2020-10-16 21:53:43 -0400
Branch: REL_12_STABLE [b39c94097] 2020-10-16 21:53:50 -0400
Branch: REL_11_STABLE [2b9166dbc] 2020-10-16 21:53:55 -0400
Branch: REL_10_STABLE [aae4097b0] 2020-10-16 21:54:03 -0400
Branch: REL9_6_STABLE [13dbf4ab8] 2020-10-16 21:54:09 -0400
Branch: REL9_5_STABLE [c8cb243cb] 2020-10-16 21:54:14 -0400
Branch: master [7d6d6bce4] 2020-10-22 21:23:47 -0400
Branch: REL_13_STABLE [96ed2ae93] 2020-10-22 21:24:01 -0400
Branch: REL_12_STABLE [78ccf7f42] 2020-10-22 21:24:07 -0400
Branch: REL_11_STABLE [02f86d523] 2020-10-22 21:24:12 -0400
Branch: REL_10_STABLE [a357cc05d] 2020-10-22 21:24:17 -0400
Branch: REL9_6_STABLE [05a36321a] 2020-10-22 21:24:23 -0400
Branch: REL9_5_STABLE [0abebb58f] 2020-10-22 21:24:28 -0400
-->
<para>
Update time zone data files to <application>tzdata</application>
release 2020d for DST law changes in Fiji, Morocco, Palestine, the
Canadian Yukon, Macquarie Island, and Casey Station (Antarctica);
plus historical corrections for France, Hungary, Monaco, and
Palestine.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ce0e97f80] 2020-10-16 21:40:16 -0400
Branch: REL_13_STABLE [e0cf5e9b2] 2020-10-16 21:40:16 -0400
Branch: REL_12_STABLE [3d13a8307] 2020-10-16 21:40:16 -0400
Branch: REL_11_STABLE [4a2528bfa] 2020-10-16 21:40:16 -0400
Branch: REL_10_STABLE [41eeeb348] 2020-10-16 21:40:16 -0400
Branch: REL9_6_STABLE [5515c73a6] 2020-10-16 21:40:16 -0400
Branch: REL9_5_STABLE [38fac9c1f] 2020-10-16 21:40:16 -0400
Branch: master [c5054da0d] 2020-10-22 21:15:22 -0400
Branch: REL_13_STABLE [0e551533b] 2020-10-22 21:15:37 -0400
Branch: REL_12_STABLE [f56c42e50] 2020-10-22 21:16:04 -0400
Branch: REL_11_STABLE [d2ffe0a00] 2020-10-22 21:16:16 -0400
Branch: REL_10_STABLE [34285083b] 2020-10-22 21:16:23 -0400
Branch: REL9_6_STABLE [58f9f52a3] 2020-10-22 21:16:31 -0400
Branch: REL9_5_STABLE [ff26f804a] 2020-10-22 21:16:38 -0400
-->
<para>
Sync our copy of the timezone library with IANA tzcode release 2020d
(Tom Lane)
</para>
<para>
This absorbs upstream's change of <application>zic</application>'s
default output option from <quote>fat</quote>
to <quote>slim</quote>. That's just cosmetic for our purposes, as
we continue to select the <quote>fat</quote> mode in pre-v13
branches. This change also ensures
that <function>strftime()</function> does not
change <varname>errno</varname> unless it fails.
</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
<sect1 id="release-12-4">
<title>Release 12.4</title>
<formalpara>
<title>Release date:</title>
<para>2020-08-13</para>
</formalpara>
<para>
This release contains a variety of fixes from 12.3.
For information about new features in major release 12, see
<xref linkend="release-12"/>.
</para>
<sect2>
<title>Migration to Version 12.4</title>
<para>
A dump/restore is not required for those running 12.X.
</para>
<para>
However, if you are upgrading from a version earlier than 12.2,
see <xref linkend="release-12-2"/>.
</para>
</sect2>
<sect2>
<title>Changes</title>
<itemizedlist>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [11da97024] 2020-08-10 09:22:54 -0700
Branch: REL_13_STABLE [412c5c401] 2020-08-10 09:22:58 -0700
Branch: REL_12_STABLE [64a71062e] 2020-08-10 09:22:58 -0700
Branch: REL_11_STABLE [5a936d64c] 2020-08-10 09:22:59 -0700
Branch: REL_10_STABLE [dd5d99516] 2020-08-10 09:22:59 -0700
Branch: master [cec57b1a0] 2020-08-10 09:22:54 -0700
Branch: REL_13_STABLE [b601f24c8] 2020-08-10 09:22:58 -0700
Branch: REL_12_STABLE [515ee4a7e] 2020-08-10 09:22:58 -0700
Branch: REL_11_STABLE [613ed8a58] 2020-08-10 09:22:59 -0700
Branch: REL_10_STABLE [b793d6af9] 2020-08-10 09:22:59 -0700
-->
<para>
Set a secure <varname>search_path</varname> in logical replication
walsenders and apply workers (Noah Misch)
</para>
<para>
A malicious user of either the publisher or subscriber database
could potentially cause execution of arbitrary SQL code by the role
running replication, which is often a superuser. Some of the risks
here are equivalent to those described in CVE-2018-1058, and are
mitigated in this patch by ensuring that the replication sender and
receiver execute with empty <varname>search_path</varname> settings.
(As with CVE-2018-1058, that change might cause problems for
under-qualified names used in replicated tables' DDL.) Other risks
are inherent in replicating objects that belong to untrusted roles;
the most we can do is document that there is a hazard to consider.
(CVE-2020-14349)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7eeb1d986] 2020-08-10 10:44:42 -0400
Branch: REL_13_STABLE [98ca64899] 2020-08-10 10:44:42 -0400
Branch: REL_12_STABLE [3ba967084] 2020-08-10 10:44:42 -0400
Branch: REL_11_STABLE [afa358786] 2020-08-10 10:44:43 -0400
Branch: REL_10_STABLE [96cbfe92d] 2020-08-10 10:44:43 -0400
Branch: REL9_6_STABLE [2ea8a60fc] 2020-08-10 10:44:43 -0400
Branch: REL9_5_STABLE [6b11a4687] 2020-08-10 10:44:43 -0400
-->
<para>
Make contrib modules' installation scripts more secure (Tom Lane)
</para>
<para>
Attacks similar to those described in CVE-2018-1058 could be carried
out against an extension installation script, if the attacker can
create objects in either the extension's target schema or the schema
of some prerequisite extension. Since extensions often require
superuser privilege to install, this can open a path to obtaining
superuser privilege. To mitigate this risk, be more careful about
the <varname>search_path</varname> used to run an installation
script; disable <varname>check_function_bodies</varname> within the
script; and fix catalog-adjustment queries used in some contrib
modules to ensure they are secure. Also provide documentation to
help third-party extension authors make their installation scripts
secure. This is not a complete solution; extensions that depend on
other extensions can still be at risk if installed carelessly.
(CVE-2020-14350)
</para>
</listitem>
<listitem>
<!--
Author: Etsuro Fujita <efujita@postgresql.org>
Branch: master [13838740f] 2020-07-28 11:00:00 +0900
Branch: REL_13_STABLE [cebe10a5f] 2020-07-28 11:00:00 +0900
Branch: REL_12_STABLE [62c4a7729] 2020-07-28 11:00:02 +0900
Branch: REL_11_STABLE [bead29dec] 2020-07-28 11:00:03 +0900
Branch: master [199cec977] 2020-08-07 14:45:00 +0900
Branch: REL_13_STABLE [79a3ab1e9] 2020-08-07 14:45:01 +0900
Branch: REL_12_STABLE [4f2693229] 2020-08-07 14:45:02 +0900
Branch: REL_11_STABLE [1db9c80f8] 2020-08-07 14:45:04 +0900
-->
<para>
Fix edge cases in partition pruning (Etsuro Fujita, Dmitry Dolgov)
</para>
<para>
When there are multiple partition key columns, generation of pruning
tests could misbehave if some columns had no
constraining <literal>WHERE</literal> clauses or multiple
constraining clauses. This could lead to server crashes, incorrect
query results, or assertion failures.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [689696c71] 2020-07-14 18:56:56 -0400
Branch: REL_13_STABLE [e38705b5c] 2020-07-14 18:56:49 -0400
Branch: REL_12_STABLE [de797e823] 2020-07-14 18:56:49 -0400
Branch: REL_11_STABLE [e9f031172] 2020-07-14 18:56:49 -0400
-->
<para>
Fix construction of parameterized BitmapAnd and BitmapOr index scans
on the inside of partition-wise nestloop joins (Tom Lane)
</para>
<para>
A plan in which such a scan needed to use a value from the outside
of the join would usually crash at execution.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7a980dfc6] 2020-08-05 15:38:55 -0400
Branch: REL_13_STABLE [c43a36fa8] 2020-08-05 15:38:55 -0400
Branch: REL_12_STABLE [f992da210] 2020-08-05 15:38:55 -0400
-->
<para>
Fix incorrect plan execution when a partitioned table is subject to
both static and run-time partition pruning in the same query, and a
new partition is added concurrently with the query (Amit Langote,
Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [470687b4a] 2020-08-08 12:31:55 -0400
Branch: REL_13_STABLE [900429d0c] 2020-08-08 12:31:55 -0400
Branch: REL_12_STABLE [85cb4ec50] 2020-08-08 12:31:55 -0400
Branch: REL_11_STABLE [1fa6eec97] 2020-08-08 12:31:55 -0400
Branch: REL_10_STABLE [d81387da9] 2020-08-08 12:31:55 -0400
Branch: REL9_6_STABLE [55d42c917] 2020-08-08 12:31:55 -0400
Branch: REL9_5_STABLE [ca8e87ea0] 2020-08-08 12:31:55 -0400
-->
<para>
In logical replication walsender, fix failure to send feedback
messages after sending a keepalive message (Álvaro Herrera)
</para>
<para>
This is a relatively minor problem when using built-in logical
replication, because the built-in walreceiver will send a feedback
reply (which clears the incorrect state) fairly frequently anyway.
But with some other replication systems, such
as <application>pglogical</application>, it causes significant
performance issues.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d5daae47d] 2020-07-20 13:40:16 -0400
Branch: REL_13_STABLE [2f1f189cf] 2020-07-20 13:40:16 -0400
Branch: REL_12_STABLE [71e561bd4] 2020-07-20 13:40:16 -0400
Branch: REL_11_STABLE [e8de627a3] 2020-07-20 13:40:16 -0400
Branch: REL_10_STABLE [39d6aec19] 2020-07-20 13:40:16 -0400
-->
<para>
Fix firing of column-specific <literal>UPDATE</literal> triggers in
logical replication subscribers (Tom Lane)
</para>
<para>
The code neglected to account for the possibility of column numbers
being different between the publisher and subscriber tables, so that
if those were indeed different, wrong decisions might be made about
which triggers to fire.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [b48df818d] 2020-06-18 16:34:59 +0900
Branch: REL_13_STABLE [43e70addf] 2020-06-18 16:35:29 +0900
Branch: REL_12_STABLE [16f43122d] 2020-06-18 16:35:32 +0900
Branch: REL_11_STABLE [1657e14b5] 2020-06-18 16:35:36 +0900
-->
<para>
Update oldest xmin and LSN values
during <function>pg_replication_slot_advance()</function> (Michael
Paquier)
</para>
<para>
This function previously failed to do that, possibly preventing
resource cleanup (such as removal of no-longer-needed WAL segments)
after manual advancement of a replication slot.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [78e73e875] 2020-07-31 11:43:12 -0400
Branch: REL_13_STABLE [11dce63d6] 2020-07-31 11:43:12 -0400
Branch: REL_12_STABLE [70248d8f5] 2020-07-31 11:43:12 -0400
Branch: REL_11_STABLE [da596fb4b] 2020-07-31 11:43:12 -0400
Branch: REL_10_STABLE [5e724125a] 2020-07-31 11:43:12 -0400
Branch: REL9_6_STABLE [8ab00b9fe] 2020-07-31 11:43:13 -0400
-->
<para>
Fix slow execution of <function>ts_headline()</function> (Tom Lane)
</para>
<para>
The phrase-search fix added in our previous set of minor releases
could cause <function>ts_headline()</function> to take unreasonable
amounts of time for long documents; to make matters worse, the query
was not cancellable within the troublesome loop.
</para>
</listitem>
<listitem>
<!--
Author: Joe Conway <mail@joeconway.com>
Branch: master Release: REL_13_BR [887cdff4d] 2020-05-28 13:19:00 -0400
Branch: REL_12_STABLE [3ccae5445] 2020-05-28 13:19:10 -0400
Branch: REL_11_STABLE [36758c472] 2020-05-28 13:19:16 -0400
Branch: REL_10_STABLE [2cbe3a954] 2020-05-28 13:17:11 -0400
Branch: REL9_6_STABLE [28e2c6eac] 2020-05-28 13:17:20 -0400
Branch: REL9_5_STABLE [bfb9595a7] 2020-05-28 13:17:28 -0400
-->
<para>
Ensure the <function>repeat()</function> function can be interrupted
by query cancel (Joe Conway)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [183926da3] 2020-07-09 16:02:23 -0400
Branch: REL_13_STABLE [601d419b2] 2020-07-09 16:02:23 -0400
Branch: REL_12_STABLE [2564e2d08] 2020-07-09 16:02:23 -0400
Branch: REL_11_STABLE [90b418f81] 2020-07-09 16:02:23 -0400
Branch: REL_10_STABLE [765ad260a] 2020-07-09 16:02:23 -0400
-->
<para>
Fix <function>pg_current_logfile()</function> to not include a
carriage return (<literal>\r</literal>) in its result on Windows
(Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Joe Conway <mail@joeconway.com>
Branch: master [96d1f423f] 2020-07-04 06:26:53 -0400
Branch: REL_13_STABLE [0025c3a2c] 2020-07-04 06:28:21 -0400
Branch: REL_12_STABLE [015e899a7] 2020-07-04 06:28:44 -0400
Branch: REL_11_STABLE [c2cdaf0cb] 2020-07-04 06:29:03 -0400
Branch: master [1d05627fc] 2020-07-04 13:46:31 -0400
Branch: REL_13_STABLE [c536da177] 2020-07-04 13:47:07 -0400
Branch: REL_12_STABLE [b615b2365] 2020-07-04 13:47:21 -0400
Branch: REL_11_STABLE [1243aa9b2] 2020-07-04 13:47:31 -0400
-->
<para>
Ensure that <function>pg_read_file()</function> and related
functions read until EOF is reached (Joe Conway)
</para>
<para>
Previously, if not given a specific data length to read, these
functions would stop at whatever file length was reported
by <function>stat()</function>. That's unhelpful for pipes and
other sorts of virtual files.
</para>
</listitem>
<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
Branch: master [df646509f] 2020-07-11 03:21:00 +0300
Branch: REL_13_STABLE [89a0b1a7c] 2020-07-11 03:21:48 +0300
Branch: REL_12_STABLE [f4ae676e3] 2020-07-11 03:21:57 +0300
-->
<para>
Forbid numeric <literal>NaN</literal> values in <type>jsonpath</type>
computations (Alexander Korotkov)
</para>
<para>
Neither SQL nor JSON have the concept of <literal>NaN</literal>
(not-a-number), but the <type>jsonpath</type> code attempted to
allow such values anyway. This necessarily leads to nonstandard
behavior, so it seems better to reject such values at the outset.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [03109a530] 2020-06-13 13:43:40 -0400
Branch: REL_13_STABLE [33dd9bb3b] 2020-06-13 13:43:40 -0400
Branch: REL_12_STABLE [874372a94] 2020-06-13 13:43:24 -0400
-->
<para>
Handle single <literal>Inf</literal> or <literal>NaN</literal>
inputs correctly in floating-point aggregates (Tom Lane)
</para>
<para>
The affected aggregates are
<function>corr()</function>,
<function>covar_pop()</function>,
<function>regr_intercept()</function>,
<function>regr_r2()</function>,
<function>regr_slope()</function>,
<function>regr_sxx()</function>,
<function>regr_sxy()</function>,
<function>regr_syy()</function>,
<function>stddev_pop()</function>, and
<function>var_pop()</function>.
The correct answer in such cases is <literal>NaN</literal>, but an
algorithmic change introduced in <productname>PostgreSQL</productname>
v12 had caused these aggregates to produce zero instead.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [77a3be32f] 2020-06-11 17:38:42 -0400
Branch: REL_13_STABLE [ee788ba99] 2020-06-11 17:38:42 -0400
Branch: REL_12_STABLE [4284e1184] 2020-06-11 17:38:42 -0400
Branch: REL_11_STABLE [49e0a42dd] 2020-06-11 17:38:42 -0400
Branch: REL_10_STABLE [411a4626e] 2020-06-11 17:38:42 -0400
Branch: REL9_6_STABLE [36df06e25] 2020-06-11 17:38:42 -0400
-->
<para>
Fix mis-handling of <literal>NaN</literal> inputs during parallel
aggregation on <type>numeric</type>-type columns (Tom Lane)
</para>
<para>
If some partial aggregation workers found only <literal>NaN</literal>s
while others found only non-<literal>NaN</literal>s, the results
were combined incorrectly, possibly leading to the wrong overall
result (i.e., not <literal>NaN</literal> when it should be).
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_13_BR [a9632830b] 2020-06-04 16:42:23 -0400
Branch: REL_12_STABLE [a958b07bc] 2020-06-04 16:42:08 -0400
Branch: REL_11_STABLE [6490376e5] 2020-06-04 16:42:08 -0400
Branch: REL_10_STABLE [b2c64f571] 2020-06-04 16:42:08 -0400
Branch: REL_10_STABLE [9a9ba4c4d] 2020-06-04 17:57:19 -0400
-->
<para>
Reject time-of-day values greater than 24 hours (Tom Lane)
</para>
<para>
The intention of the datetime input code is to
allow <quote>24:00:00</quote> or
equivalently <quote>23:59:60</quote>, but no larger value.
However, the range check was miscoded so that it would
accept <quote>23:59:60.<replaceable>nnn</replaceable></quote> with
nonzero fractional-second <replaceable>nnn</replaceable>. In
timestamp values this would result in wrapping into the first second
of the next day. In <type>time</type> and <type>timetz</type>
values, the stored value would actually be more than 24 hours,
causing dump/reload failures and possibly other misbehavior.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [63d2ac23b] 2020-06-22 11:46:41 -0400
Branch: REL_13_STABLE [57f8b9913] 2020-06-22 11:46:41 -0400
Branch: REL_12_STABLE [d3d875518] 2020-06-22 11:46:41 -0400
Branch: REL_11_STABLE [35a8e227e] 2020-06-22 11:46:41 -0400
Branch: REL_10_STABLE [6d9f7a094] 2020-06-22 11:46:41 -0400
Branch: REL9_6_STABLE [bd53ea2b2] 2020-06-22 11:46:41 -0400
Branch: REL9_5_STABLE [dda25c599] 2020-06-22 11:46:41 -0400
-->
<para>
Undo double-quoting of index names in <command>EXPLAIN</command>'s
non-text output formats (Tom Lane, Euler Taveira)
</para>
</listitem>
<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [2a2494229] 2020-07-25 10:20:39 +0530
Branch: REL_13_STABLE [b15367ae3] 2020-07-25 10:31:19 +0530
Branch: REL_12_STABLE [bdaa84e38] 2020-07-25 10:38:46 +0530
Branch: REL_11_STABLE [603c18b7e] 2020-07-25 10:48:09 +0530
Branch: REL_10_STABLE [f963b5bc0] 2020-07-25 10:57:20 +0530
-->
<para>
Fix <command>EXPLAIN</command>'s accounting for resource usage,
particularly buffer accesses, in parallel workers in a plan
using <literal>Gather Merge</literal> nodes
(Jehan-Guillaume de Rorthais)
</para>
</listitem>
<listitem>
<!--
Author: David Rowley <drowley@postgresql.org>
Branch: master [f1fcf2d3b] 2020-07-14 16:55:35 +1200
Branch: REL_13_STABLE [b82730429] 2020-07-14 16:57:41 +1200
Branch: REL_12_STABLE [1231a0b0e] 2020-07-14 17:03:12 +1200
Branch: REL_11_STABLE [d2761b680] 2020-07-14 16:59:57 +1200
Branch: REL_10_STABLE [4e02f88a4] 2020-07-14 17:00:28 +1200
Branch: REL9_6_STABLE [c732df133] 2020-07-14 17:00:57 +1200
Branch: REL9_5_STABLE [e20003fa0] 2020-07-14 17:01:25 +1200
-->
<para>
Fix timing of constraint revalidation in <command>ALTER
TABLE</command> (David Rowley)
</para>
<para>
If <command>ALTER TABLE</command> needs to fully rewrite the table's
contents (for example, due to change of a column's data type) and
also needs to scan the table to re-validate foreign keys
or <literal>CHECK</literal> constraints, it sometimes did things in
the wrong order, leading to odd errors such as <quote>could not read
block 0 in file "base/nnnnn/nnnnn": read only 0 of 8192 bytes</quote>.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master Release: REL_13_BR [1127f0e39] 2020-06-05 10:26:02 +0900
Branch: REL_12_STABLE [75f147924] 2020-06-05 10:29:27 +0900
-->
<para>
Fix <command>REINDEX CONCURRENTLY</command> to preserve the index's
replication identity flag (Michael Paquier)
</para>
<para>
Previously, reindexing a table's replica identity index caused the
setting to be lost, preventing old tuple values from being included
in future logical-decoding output.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: REL_12_STABLE [798b4faef] 2020-07-20 15:54:24 -0400
Branch: REL_11_STABLE [855195a7b] 2020-07-20 15:54:24 -0400
Branch: REL_12_STABLE [b7103bbe3] 2020-07-21 11:40:46 -0400
Branch: REL_11_STABLE [99b0c5da3] 2020-07-21 11:40:47 -0400
Branch: REL_10_STABLE [ae3d40b0c] 2020-07-21 11:40:47 -0400
-->
<para>
Work around incorrect not-null markings for
<structname>pg_subscription</structname>.<structfield>subslotname</structfield>
and <structname>pg_subscription_rel</structname>.<structfield>srsublsn</structfield>
(Tom Lane)
</para>
<para>
The bootstrap catalog data incorrectly marks these two catalog
columns as always non-null. There's no easy way to correct that
mistake in existing installations (though v13 and later will have
the correct markings). The main place that depends on that marking
being correct is JIT-enabled tuple deconstruction, so teach it to
explicitly ignore the marking for these two columns. Also adjust
some C code that accessed <structfield>srsublsn</structfield> without
checking to see if it's null; a crash from that is improbable but
perhaps not impossible.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a742ecf9c] 2020-07-13 20:38:20 -0400
Branch: REL_13_STABLE [0734dbc45] 2020-07-13 20:38:20 -0400
Branch: REL_12_STABLE [d3b642ad9] 2020-07-13 20:38:21 -0400
Branch: REL_11_STABLE [3753df8f8] 2020-07-13 20:38:21 -0400
Branch: REL_10_STABLE [6443cd2e2] 2020-07-13 20:38:21 -0400
Branch: REL9_6_STABLE [dc6bb0994] 2020-07-13 20:38:21 -0400
Branch: REL9_5_STABLE [80d8f6d1d] 2020-07-13 20:38:21 -0400
-->
<para>
Cope with <literal>LATERAL</literal> references in restriction
clauses attached to an un-flattened sub-<literal>SELECT</literal> in
the <literal>FROM</literal> clause (Tom Lane)
</para>
<para>
This oversight could result in assertion failures or crashes at
query execution.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_13_BR [044c99bc5] 2020-06-05 16:18:50 -0400
Branch: REL_12_STABLE [022cd0bfd] 2020-06-05 16:18:50 -0400
Branch: master [bd0d893aa] 2020-07-21 19:41:03 -0400
Branch: REL_13_STABLE [cc4dd2a7a] 2020-07-21 19:40:44 -0400
Branch: REL_12_STABLE [171633ff5] 2020-07-21 19:40:44 -0400
-->
<para>
Use the query-specified collation for operators invoked during
selectivity estimation (Tom Lane)
</para>
<para>
Previously, the collation of the underlying database column was
used. But using the query's collation is arguably more correct.
More importantly, now that we have nondeterministic collations,
there are cases where an operator will fail outright if given a
nondeterministic collation. We don't want planning to fail in cases
where the query itself would work, so this means that we must use
the query's collation when invoking operators for estimation
purposes.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ca5e93f76] 2020-07-03 19:01:21 -0400
Branch: REL_13_STABLE [9233624b1] 2020-07-03 19:01:21 -0400
Branch: REL_12_STABLE [153c14cdd] 2020-07-03 19:01:21 -0400
Branch: REL_11_STABLE [ef799bdd0] 2020-07-03 19:01:21 -0400
Branch: REL_10_STABLE [5144a40f3] 2020-07-03 19:01:22 -0400
Branch: REL9_6_STABLE [69a3fe6e6] 2020-07-03 19:01:22 -0400
Branch: REL9_5_STABLE [d83d59e42] 2020-07-03 19:01:22 -0400
-->
<para>
Avoid believing that a never-analyzed foreign table has zero tuples
(Tom Lane)
</para>
<para>
This primarily affected the planner's estimate of the number of
groups that would be obtained by <literal>GROUP BY</literal>.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [986529ce4] 2020-07-09 20:13:25 -0400
Branch: REL_13_STABLE [c3a79e719] 2020-07-09 20:13:25 -0400
Branch: REL_12_STABLE [ca5001a36] 2020-07-09 20:13:25 -0400
Branch: REL_11_STABLE [907283576] 2020-07-09 20:13:25 -0400
Branch: REL_10_STABLE [40316dfed] 2020-07-09 20:13:24 -0400
-->
<para>
Remove bogus warning about <quote>leftover placeholder tuple</quote>
in BRIN index de-summarization (Álvaro Herrera)
</para>
<para>
The case can occur legitimately after a cancelled vacuum, so warning
about it is overly noisy.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f7b5988cc] 2020-07-03 17:01:34 -0400
Branch: REL_13_STABLE [cfe89f5e6] 2020-07-03 17:01:34 -0400
Branch: REL_12_STABLE [8b83e0160] 2020-07-03 17:01:34 -0400
Branch: REL_11_STABLE [79ed1d99d] 2020-07-03 17:01:34 -0400
Author: Magnus Hagander <magnus@hagander.net>
Branch: master [ecd9e9f0b] 2020-07-03 15:09:06 +0200
Branch: REL_13_STABLE [1d94c3965] 2020-07-03 15:10:12 +0200
Branch: REL_12_STABLE [28a862e9d] 2020-07-03 15:10:33 +0200
Branch: REL_11_STABLE [4aa02d072] 2020-07-03 15:10:41 +0200
-->
<para>
Fix selection of tablespaces for <quote>shared fileset</quote>
temporary files (Magnus Hagander, Tom Lane)
</para>
<para>
If <varname>temp_tablespaces</varname> is empty or explicitly names
the database's primary tablespace, such files got placed into
the <literal>pg_default</literal> tablespace rather than the
database's primary tablespace as expected.
</para>
</listitem>
<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
Branch: master [a44dd932f] 2020-06-20 17:34:51 +0300
Branch: REL_13_STABLE [39aafc88c] 2020-06-20 18:14:51 +0300
Branch: REL_12_STABLE [396a44a01] 2020-06-20 17:35:55 +0300
Branch: REL_11_STABLE [3f88e2d78] 2020-06-20 17:35:59 +0300
-->
<para>
Fix corner-case error in masking of SP-GiST index pages during WAL
consistency checking (Alexander Korotkov)
</para>
<para>
This could cause false failure reports
when <varname>wal_consistency_checking</varname> is enabled.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [7897e3bb9] 2020-06-16 16:59:07 +1200
Branch: REL_13_STABLE [3e0b08c40] 2020-06-16 17:00:06 +1200
Branch: REL_12_STABLE [28ee12669] 2020-06-16 17:00:21 +1200
Branch: REL_11_STABLE [9c14d6024] 2020-06-16 17:00:37 +1200
Branch: REL_10_STABLE [95647a1c7] 2020-06-16 17:00:53 +1200
Branch: REL9_6_STABLE [02b71f06b] 2020-06-16 17:01:07 +1200
Branch: REL9_5_STABLE [89020a92f] 2020-06-16 17:01:22 +1200
Branch: master [42dee8b8e] 2020-07-23 21:10:49 +1200
Branch: REL_13_STABLE [6b366190d] 2020-07-23 21:15:01 +1200
Branch: REL_12_STABLE [8bf4e69a7] 2020-07-23 21:17:47 +1200
Branch: REL_11_STABLE [028f0c3a8] 2020-07-23 21:18:02 +1200
Branch: REL_10_STABLE [fac4145bf] 2020-07-23 21:18:13 +1200
Branch: REL9_6_STABLE [47adb2488] 2020-07-23 21:18:25 +1200
Branch: REL9_5_STABLE [3725c8ce4] 2020-07-23 21:18:34 +1200
-->
<para>
Improve error handling in the server's <filename>buffile</filename>
module (Thomas Munro)
</para>
<para>
Fix some cases where I/O errors were indistinguishable from reaching
EOF, or were not reported at all. Also add details such as block
numbers and byte counts where appropriate.
</para>
</listitem>
<listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
Branch: master [5940ffb22] 2020-06-11 10:09:47 -0700
Branch: REL_13_STABLE [6df7105e5] 2020-06-11 10:09:45 -0700
Branch: REL_12_STABLE [e620a38c2] 2020-06-11 10:09:43 -0700
Branch: REL_11_STABLE [dd616f2ec] 2020-06-11 10:09:40 -0700
Branch: REL_10_STABLE [19a6e1bc3] 2020-06-11 10:09:37 -0700
Branch: REL9_6_STABLE [e81dc2b7e] 2020-06-11 10:09:35 -0700
Branch: REL9_5_STABLE [c05f6b354] 2020-06-11 10:09:32 -0700
-->
<para>
Fix conflict-checking anomalies in <literal>SERIALIZABLE</literal>
isolation mode (Peter Geoghegan)
</para>
<para>
If a concurrently-inserted tuple was updated by a different
concurrent transaction, and neither tuple version was visible to the
current transaction's snapshot, serialization conflict checking
could draw the wrong conclusions about whether the tuple was relevant
to the results of the current transaction. This could allow a
serializable transaction to commit when it should have failed with a
serialization error.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master Release: REL_13_BR [242dfcbaf] 2020-05-15 16:50:34 -0400
Branch: REL_12_STABLE [1d84751c6] 2020-05-15 16:50:34 -0400
Branch: REL_11_STABLE [37b5c5fde] 2020-05-15 16:50:34 -0400
Branch: REL_10_STABLE [09f2752b0] 2020-05-15 16:50:34 -0400
Branch: REL9_6_STABLE [4649eb919] 2020-05-15 16:50:34 -0400
Branch: REL9_5_STABLE [0a319699d] 2020-05-15 16:50:34 -0400
-->
<para>
Avoid repeated marking of dead btree index entries as dead (Masahiko
Sawada)
</para>
<para>
While functionally harmless, this led to useless WAL traffic when
checksums are enabled or <varname>wal_log_hints</varname> is on.
</para>
</listitem>
<listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master Release: REL_13_BR [e8abf585a] 2020-05-14 08:39:26 +0300
Branch: REL_12_STABLE [891a2007e] 2020-05-14 08:40:19 +0300
-->
<para>
Fix checkpointer process to discard file sync requests
when <varname>fsync</varname> is off (Heikki Linnakangas)
</para>
<para>
Such requests are treated as no-ops if <varname>fsync</varname> is
off, but we forgot to remove them from the checkpointer's table of
pending actions. This would lead to bloat of that table, as well as
possible assertion failures if <varname>fsync</varname> is later
re-enabled.
</para>
</listitem>
<listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master Release: REL_13_BR [303640199] 2019-12-19 09:06:54 -0500
Branch: REL_12_STABLE [bcbc27251] 2020-08-06 13:58:23 -0400
Branch: REL_11_STABLE [f7013683d] 2020-08-06 14:06:24 -0400
Branch: master Release: REL_13_BR [f05798014] 2020-04-26 13:48:33 +0200
Branch: REL_12_STABLE [7c78040f6] 2020-08-06 14:55:00 -0400
Branch: REL_11_STABLE [495a9b1fb] 2020-08-06 15:01:55 -0400
-->
<para>
Avoid trouble during cleanup of a non-exclusive backup when JIT
compilation has been activated during the backup (Robert Haas)
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [57cb80630] 2020-06-08 13:57:24 +1200
Branch: REL_13_STABLE [acefa2cca] 2020-06-08 13:58:10 +1200
Branch: REL_12_STABLE [72766ad63] 2020-06-08 13:58:35 +1200
Branch: REL_11_STABLE [48eb6a3c8] 2020-06-08 13:59:57 +1200
Branch: REL_10_STABLE [fd11b842e] 2020-06-08 14:01:07 +1200
Branch: REL9_6_STABLE [644cac32a] 2020-06-08 14:01:51 +1200
Branch: REL9_5_STABLE [09dc17486] 2020-06-08 14:02:20 +1200
-->
<para>
Fix failure of some code paths to acquire the correct lock before
modifying <filename>pg_control</filename> (Nathan Bossart, Fujii
Masao)
</para>
<para>
This oversight could allow <filename>pg_control</filename> to be
written out with an inconsistent checksum, possibly causing trouble
later, including inability to restart the database if it crashed
before the next <filename>pg_control</filename> update.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master Release: REL_13_BR [ce1c5b9ae] 2020-06-01 14:41:18 +0900
Branch: REL_12_STABLE [894041eb2] 2020-06-01 14:41:25 +0900
Branch: REL_11_STABLE [8bc74490d] 2020-06-01 14:41:32 +0900
Branch: REL_10_STABLE [a36f21620] 2020-06-01 14:41:37 +0900
Branch: REL9_6_STABLE [e2fa9732f] 2020-06-01 14:41:42 +0900
Branch: REL9_5_STABLE [a8c6eb5b4] 2020-06-01 14:41:46 +0900
Author: Michael Paquier <michael@paquier.xyz>
Branch: master Release: REL_13_BR [e786be5fc] 2020-06-01 10:32:06 +0900
Branch: REL_12_STABLE [95e389b3c] 2020-06-01 10:32:53 +0900
-->
<para>
Fix errors in <function>currtid()</function>
and <function>currtid2()</function> (Michael Paquier)
</para>
<para>
These functions (which are undocumented and used only by ancient
versions of the ODBC driver) contained coding errors that could
result in crashes, or in confusing error messages such as <quote>could
not open file</quote> when applied to a relation having no storage.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master Release: REL_13_BR [c1669fd58] 2020-06-04 10:17:49 +0900
Branch: REL_12_STABLE [03aa25b6e] 2020-06-04 10:18:02 +0900
Branch: REL_11_STABLE [b41a85f53] 2020-06-04 10:18:06 +0900
Branch: REL_10_STABLE [5ed8b4a98] 2020-06-04 10:18:11 +0900
Branch: REL9_6_STABLE [e7a134b58] 2020-06-04 10:18:17 +0900
Branch: REL9_5_STABLE [4a9809e34] 2020-06-04 10:18:27 +0900
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_13_BR [f88bd3139] 2020-06-03 12:36:23 -0400
Branch: REL_12_STABLE [3d474a079] 2020-06-03 12:36:24 -0400
Branch: REL_11_STABLE [7a8cb4a61] 2020-06-03 12:36:00 -0400
Branch: REL_10_STABLE [0c735c686] 2020-06-03 12:36:00 -0400
-->
<para>
Avoid calling <function>elog()</function>
or <function>palloc()</function> while holding a spinlock (Michael
Paquier, Tom Lane)
</para>
<para>
Logic associated with replication slots had several violations of
this coding rule. While the odds of trouble are quite low, an error
in the called function would lead to a stuck spinlock.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master Release: REL_13_BR [7ccb2f54d] 2020-05-16 18:15:18 +0900
Branch: REL_12_STABLE [b4ded2f22] 2020-05-16 18:16:31 +0900
Branch: REL_11_STABLE [70ae82b9b] 2020-05-16 18:16:37 +0900
Branch: REL_10_STABLE [3acb30b49] 2020-05-16 18:16:41 +0900
-->
<para>
Fix assertion in logical replication subscriber to allow use
of <literal>REPLICA IDENTITY FULL</literal> (Euler Taveira)
</para>
<para>
This was just an incorrect assertion, so it has no impact on
standard production builds.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master Release: REL_13_BR [7247e243a] 2020-06-07 13:44:13 -0400
Branch: REL_12_STABLE [2edf14f5a] 2020-06-07 13:44:13 -0400
-->
<para>
Ensure that <application>libpq</application> continues to try to
read from the database connection socket after a write failure
(Tom Lane)
</para>
<para>
This is important not only to ensure that we collect any final error
message from a dying server process, but because we do not consider
the connection lost until we see a read failure. This oversight
allowed <application>libpq</application> to continue trying to
send <command>COPY</command> data indefinitely after a mid-transfer
loss of connection, rather than reporting failure to the application.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [25fe5ac45] 2020-07-13 11:58:08 -0400
Branch: REL_13_STABLE [8e6f134a9] 2020-07-13 11:58:09 -0400
Branch: REL_12_STABLE [e8b22a8a2] 2020-07-13 11:57:55 -0400
-->
<para>
Fix bugs in <application>libpq</application>'s management of GSS
encryption state (Tom Lane)
</para>
<para>
A connection using GSS encryption could freeze up when attempting to
reset it after a server restart, or when moving on to the next one of
a list of candidate servers.
</para>
</listitem>
<listitem>
<!--
Author: Michael Meskes <meskes@postgresql.org>
Branch: master [e576f71fb] 2020-06-30 18:34:41 +0200
Branch: REL_13_STABLE [70dc45e8c] 2020-06-30 19:35:22 +0200
Branch: REL_12_STABLE [6425d6f6a] 2020-06-30 18:35:21 +0200
-->
<para>
Fix <application>ecpg</application> crash with <type>bytea</type>
and cursor variables (Jehan-Guillaume de Rorthais)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [ae3259c55] 2020-06-19 16:46:07 -0400
Branch: REL_13_STABLE [e74559c97] 2020-06-19 16:46:07 -0400
Branch: REL_12_STABLE [5b52008a6] 2020-06-19 16:46:07 -0400
Branch: REL_11_STABLE [2e155d90d] 2020-06-19 16:46:07 -0400
Branch: REL_10_STABLE [411febd53] 2020-06-19 16:46:07 -0400
Branch: REL9_6_STABLE [83762d0a9] 2020-06-19 16:46:07 -0400
Branch: REL9_5_STABLE [bbbce94dc] 2020-06-19 16:46:06 -0400
-->
<para>
Report out-of-disk-space errors properly
in <application>pg_dump</application>
and <application>pg_basebackup</application> (Justin Pryzby, Tom
Lane, Álvaro Herrera)
</para>
<para>
Some code paths could produce silly reports like <quote>could not
write file: Success</quote>.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f009591d6] 2020-07-17 13:04:05 -0400
Branch: REL_13_STABLE [71e8e66f7] 2020-07-17 13:04:06 -0400
Branch: REL_12_STABLE [66232220e] 2020-07-17 13:03:50 -0400
Branch: master [a8d0732ac] 2020-07-17 13:04:05 -0400
Branch: REL_13_STABLE [447cf2f8e] 2020-07-17 13:04:06 -0400
Branch: REL_12_STABLE [39a068ce6] 2020-07-17 12:14:28 -0400
-->
<para>
Make <application>pg_restore</application> cope with
data-offset-less custom-format archive files when it needs to
restore data items out of order (David Gilman, Tom Lane)
</para>
<para>
<application>pg_dump</application> will produce such files if it
cannot seek its output (for example, if the output is piped to
something). This fix primarily improves the ability to do a
parallel restore from such a file.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [ea9125304] 2020-07-11 13:36:50 -0400
Branch: REL_13_STABLE [bc9aaac1a] 2020-07-11 13:36:50 -0400
Branch: REL_12_STABLE [5fea14f4b] 2020-07-11 13:36:50 -0400
Branch: REL_11_STABLE [4fdc559c8] 2020-07-11 13:36:50 -0400
Branch: REL_10_STABLE [2d43c3057] 2020-07-11 13:36:51 -0400
Branch: REL9_6_STABLE [303322c5a] 2020-07-11 13:36:51 -0400
Branch: REL9_5_STABLE [db820b9a9] 2020-07-11 13:36:51 -0400
-->
<para>
Fix parallel restore of tables having both table-level privileges
and per-column privileges (Tom Lane)
</para>
<para>
The table-level privilege grants have to be applied first, but a
parallel restore did not reliably order them that way; this could
lead to <quote>tuple concurrently updated</quote> errors, or to
disappearance of some per-column privilege grants. The fix for this
is to include dependency links between such entries in the archive
file, meaning that a new dump has to be taken with a
corrected <application>pg_dump</application> to ensure that the
problem will not recur.
</para>
</listitem>
<listitem>
<!--
Author: Bruce Momjian <bruce@momjian.us>
Branch: master [3f5863e15] 2020-06-15 20:59:40 -0400
Branch: REL_13_STABLE [a2c72851a] 2020-06-15 20:59:40 -0400
Branch: REL_12_STABLE [8e933596c] 2020-06-15 20:59:40 -0400
Branch: REL_11_STABLE [aeb785c0f] 2020-06-15 20:59:40 -0400
Branch: REL_10_STABLE [9170da96d] 2020-06-15 20:59:40 -0400
Branch: REL9_6_STABLE [5c1bfd627] 2020-06-15 20:59:40 -0400
Branch: REL9_5_STABLE [39c698cff] 2020-06-15 20:59:40 -0400
-->
<para>
Ensure that <application>pg_upgrade</application> runs
with <varname>vacuum_defer_cleanup_age</varname> set to zero in the
target cluster (Bruce Momjian)
</para>
<para>
If the target cluster's configuration has been modified to
set <varname>vacuum_defer_cleanup_age</varname> to a nonzero value,
that prevented freezing of the system catalogs from working properly,
which caused the upgrade to fail in confusing ways. Ensure that any
such setting is overridden for the duration of the upgrade.
</para>
</listitem>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master Release: REL_13_BR [cee9cadb5] 2020-05-13 20:42:09 -0700
Branch: REL_12_STABLE [73a5c0d81] 2020-05-13 20:42:24 -0700
Branch: REL_11_STABLE [a26789452] 2020-05-13 20:42:37 -0700
Branch: REL_10_STABLE [970ed4493] 2020-05-13 20:42:42 -0700
Branch: REL9_6_STABLE [1ab5b672e] 2020-05-13 20:42:46 -0700
Branch: REL9_5_STABLE [595b4115c] 2020-05-13 20:42:49 -0700
Author: Noah Misch <noah@leadboat.com>
Branch: master Release: REL_13_BR [8222a9d9a] 2020-05-13 20:42:09 -0700
Branch: REL_12_STABLE [7130be8aa] 2020-05-13 20:42:23 -0700
Branch: REL_11_STABLE [357012e17] 2020-05-13 20:42:34 -0700
Branch: REL_10_STABLE [a28db2081] 2020-05-13 20:42:42 -0700
-->
<para>
Fix <application>pg_recvlogical</application> to drain pending
messages before exiting (Noah Misch)
</para>
<para>
Without this, the replication sender might detect a send failure and
exit without making the expected final update to the replication
slot's LSN position. That led to re-transmitting data after the
next connection. It was also possible to miss error messages sent
after the last data that <application>pg_recvlogical</application>
wants to consume.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [1d09fb1f0] 2020-07-15 15:17:23 +0900
Branch: REL_13_STABLE [5f89bb4cf] 2020-07-15 15:17:32 +0900
Branch: REL_12_STABLE [92927477f] 2020-07-15 15:17:36 +0900
Branch: REL_11_STABLE [c6d33d144] 2020-07-15 15:17:44 +0900
Branch: REL_10_STABLE [23924feca] 2020-07-15 15:17:49 +0900
Branch: REL9_6_STABLE [14fe80413] 2020-07-15 15:17:55 +0900
Branch: REL9_5_STABLE [18ec25412] 2020-07-15 15:18:01 +0900
-->
<para>
Fix <application>pg_rewind</application>'s handling of just-deleted
files in the source data directory (Justin Pryzby, Michael Paquier)
</para>
<para>
When working with an on-line source database, concurrent file
deletions are possible, but <application>pg_rewind</application>
would get confused if deletion happened between seeing a file's
directory entry and examining it with <function>stat()</function>.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [932f9fb50] 2020-07-16 15:52:37 +0900
Branch: REL_13_STABLE [beebbb39d] 2020-07-16 15:52:54 +0900
Branch: REL_12_STABLE [cd113a0b4] 2020-07-16 15:52:58 +0900
Branch: REL_11_STABLE [de559c2b0] 2020-07-16 15:53:01 +0900
Branch: REL_10_STABLE [800ec48f5] 2020-07-16 15:53:04 +0900
Branch: REL9_6_STABLE [a452b239e] 2020-07-16 15:53:09 +0900
Branch: REL9_5_STABLE [ab7ce97ec] 2020-07-16 15:53:12 +0900
-->
<para>
Make <application>pg_test_fsync</application> use binary I/O mode on
Windows (Michael Paquier)
</para>
<para>
Previously it wrote the test file in text mode, which is not an
accurate reflection of <productname>PostgreSQL</productname>'s
actual usage.
</para>
</listitem>
<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
Branch: master Release: REL_13_BR [34dae902c] 2020-05-14 12:44:44 +0300
Branch: REL_12_STABLE [ae1f9b0a9] 2020-05-14 12:46:08 +0300
Branch: REL_11_STABLE [b9a45d8db] 2020-05-14 12:46:15 +0300
-->
<para>
Fix <filename>contrib/amcheck</filename> to not complain about
deleted index pages that are empty (Alexander Korotkov)
</para>
<para>
This state of affairs is normal during WAL replay.
</para>
</listitem>
<listitem>
<!--
Author: Joe Conway <mail@joeconway.com>
Branch: master Release: REL_13_BR [9003b76e1] 2020-05-28 13:44:54 -0400
Branch: REL_12_STABLE [e8eb48595] 2020-05-28 13:44:59 -0400
Branch: REL_11_STABLE [49a00e07c] 2020-05-28 13:45:02 -0400
Branch: REL_10_STABLE [43d3d7318] 2020-05-28 13:45:06 -0400
Branch: REL9_6_STABLE [43d7934a3] 2020-05-28 13:45:11 -0400
Branch: REL9_5_STABLE [f140d9b6e] 2020-05-28 13:45:15 -0400
-->
<para>
Fix failure to initialize local state correctly
in <filename>contrib/dblink</filename> (Joe Conway)
</para>
<para>
With the right combination of circumstances, this could lead to
<function>dblink_close()</function> issuing an unexpected
remote <command>COMMIT</command>.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b9b610577] 2020-07-23 17:20:01 -0400
Branch: REL_13_STABLE [7dab4569d] 2020-07-23 17:20:01 -0400
Branch: REL_12_STABLE [3d4a77815] 2020-07-23 17:20:02 -0400
Branch: REL_11_STABLE [475c69c97] 2020-07-23 17:20:03 -0400
Branch: REL_10_STABLE [d8ec3b126] 2020-07-23 17:20:03 -0400
Branch: REL9_6_STABLE [ccf964a80] 2020-07-23 17:20:04 -0400
Branch: REL9_5_STABLE [d0519e9fe] 2020-07-23 17:20:04 -0400
-->
<para>
Fix <filename>contrib/pgcrypto</filename>'s misuse
of <function>deflate()</function> (Tom Lane)
</para>
<para>
The <function>pgp_sym_encrypt</function> functions could produce
incorrect compressed data due to mishandling
of <application>zlib</application>'s API requirements. We have no
reports of this error manifesting with
stock <application>zlib</application>, but it can be seen when using
IBM's <application>zlibNX</application> implementation.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [a3ab7a707] 2020-07-27 15:58:32 +0900
Branch: REL_13_STABLE [0caf1fc6e] 2020-07-27 15:58:54 +0900
Branch: REL_12_STABLE [5bd087eb5] 2020-07-27 15:58:59 +0900
Branch: REL_11_STABLE [202fc4ca5] 2020-07-27 15:59:03 +0900
Branch: REL_10_STABLE [9729f9979] 2020-07-27 15:59:07 +0900
Branch: REL9_6_STABLE [8a60f541f] 2020-07-27 15:59:13 +0900
Branch: REL9_5_STABLE [aaa132a65] 2020-07-27 15:59:22 +0900
Branch: REL_11_STABLE [1785ac8ad] 2020-08-02 11:00:12 -0400
Branch: REL_10_STABLE [e1b4135cf] 2020-08-02 11:00:12 -0400
-->
<para>
Fix corner case in decompression logic
in <filename>contrib/pgcrypto</filename>'s
<function>pgp_sym_decrypt</function> functions (Kyotaro Horiguchi,
Michael Paquier)
</para>
<para>
A compressed stream can validly end with an empty packet, but the
decompressor failed to handle this and would complain about corrupt
data.
</para>
</listitem>
<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master Release: REL_13_BR [a16915545] 2020-05-14 09:24:33 +0530
Branch: REL_12_STABLE [98171e59a] 2020-05-14 09:34:46 +0530
Branch: REL_11_STABLE [1fbfc3d8a] 2020-05-14 09:39:04 +0530
Branch: REL_10_STABLE [33b772801] 2020-05-14 09:44:21 +0530
Branch: REL9_6_STABLE [a1466e194] 2020-05-14 09:50:10 +0530
Branch: REL9_5_STABLE [650952aeb] 2020-05-14 09:55:04 +0530
-->
<para>
Support building our NLS code with Microsoft Visual Studio 2015 or
later (Juan José Santamaría Flecha, Davinder Singh,
Amit Kapila)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master Release: REL_13_BR [d2a995990] 2020-05-21 14:41:15 +0900
Branch: REL_12_STABLE [089baec6f] 2020-05-21 14:41:30 +0900
Branch: REL_11_STABLE [bb24af50d] 2020-05-21 14:41:33 +0900
Branch: REL_10_STABLE [8dfc7d888] 2020-05-21 14:41:36 +0900
Branch: REL9_6_STABLE [57dc672c2] 2020-05-21 14:41:40 +0900
Branch: REL9_5_STABLE [8de137017] 2020-05-21 14:41:43 +0900
-->
<para>
Avoid possible failure of our MSVC install script when there is a
file named <filename>configure</filename> several levels above the
source code tree (Arnold Müller)
</para>
<para>
This could confuse some logic that looked
for <filename>configure</filename> to identify the top level of the
source tree.
</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
<sect1 id="release-12-3">
<title>Release 12.3</title>
<formalpara>
<title>Release date:</title>
<para>2020-05-14</para>
</formalpara>
<para>
This release contains a variety of fixes from 12.2.
For information about new features in major release 12, see
<xref linkend="release-12"/>.
</para>
<sect2>
<title>Migration to Version 12.3</title>
<para>
A dump/restore is not required for those running 12.X.
</para>
<para>
However, if you are upgrading from a version earlier than 12.2,
see <xref linkend="release-12-2"/>.
</para>
</sect2>
<sect2>
<title>Changes</title>
<itemizedlist>
<listitem>
<!--
Author: David Rowley <drowley@postgresql.org>
Branch: master [3cb02e307] 2020-04-18 14:10:37 +1200
Branch: REL_12_STABLE [a375f11c4] 2020-04-18 14:11:21 +1200
-->
<para>
Fix possible failure with <literal>GENERATED</literal> columns
(David Rowley)
</para>
<para>
If a <literal>GENERATED</literal> column's value is an exact copy of
another column of the table (and it is a pass-by-reference data
type), it was possible to crash or insert corrupted data into the
table. While it would be rather pointless for
a <literal>GENERATED</literal> expression to just duplicate another
column, an expression using a function that sometimes returns its
input unchanged could create the situation.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [086ffddf3] 2020-05-08 11:31:57 +0200
Branch: REL_12_STABLE [14751c340] 2020-05-08 11:31:46 +0200
-->
<para>
Handle inheritance of generated columns better (Peter Eisentraut)
</para>
<para>
When a table column is inherited during <command>CREATE TABLE
... INHERITS</command>, disallow changing any generation properties
when the parent column is already
marked <literal>GENERATED</literal>; but allow a child column to be
marked <literal>GENERATED</literal> when its parent is not.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [e92e4a2b6] 2020-04-09 16:36:45 +0200
Branch: REL_12_STABLE [f06d583c5] 2020-04-09 16:34:30 +0200
-->
<para>
Fix cross-column references in <command>CREATE TABLE LIKE INCLUDING
GENERATED</command> (Peter Eisentraut)
</para>
<para>
<command>CREATE TABLE ... LIKE</command> failed when trying to copy
a <literal>GENERATED</literal> expression that references a
physically-later column.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [501e41dd3] 2020-05-08 08:39:17 +0200
Branch: REL_12_STABLE [bf7233ee4] 2020-05-08 09:18:15 +0200
Branch: REL_11_STABLE [03a8a5f2d] 2020-05-08 09:30:57 +0200
-->
<para>
Propagate <command>ALTER TABLE ... SET STORAGE</command> to indexes
(Peter Eisentraut)
</para>
<para>
Non-expression index columns have always copied
the <structfield>attstorage</structfield> property of their table
column at creation. Update them when <command>ALTER TABLE ... SET
STORAGE</command> is done, to maintain consistency.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [a40caf5f8] 2020-04-06 11:03:49 +0900
Branch: REL_12_STABLE [3e62dd3a9] 2020-04-06 11:05:47 +0900
Branch: REL_11_STABLE [41faafbd7] 2020-04-06 11:05:54 +0900
Branch: REL_10_STABLE [cef2b8d52] 2020-04-06 11:05:57 +0900
Branch: REL9_6_STABLE [61a161fe4] 2020-04-06 11:06:04 +0900
Branch: REL9_5_STABLE [3f77a6702] 2020-04-06 11:06:07 +0900
-->
<para>
Preserve the <structfield>indisclustered</structfield> setting of
indexes rewritten by <command>ALTER TABLE</command> (Amit Langote,
Justin Pryzby)
</para>
<para>
Previously, <command>ALTER TABLE</command> lost track of which index
had been used for <command>CLUSTER</command>.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [1cc9c2412] 2020-03-13 11:57:06 +0100
Branch: REL_12_STABLE [c9ef507e8] 2020-03-13 11:57:20 +0100
Branch: REL_11_STABLE [15cbbf81a] 2020-03-13 12:24:44 +0100
Branch: REL_10_STABLE [02530da73] 2020-03-13 13:03:28 +0100
Branch: REL9_6_STABLE [2f0dd9d93] 2020-03-13 13:21:05 +0100
Branch: REL9_5_STABLE [c15d35041] 2020-03-13 13:21:30 +0100
-->
<para>
Preserve the replica identity properties of indexes rewritten
by <command>ALTER TABLE</command> (Quan Zongliang, Peter Eisentraut)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [d79fb88ac] 2020-03-03 10:12:28 +0900
Branch: REL_12_STABLE [f087d63a4] 2020-03-03 10:12:49 +0900
-->
<para>
Preserve the <structfield>indisclustered</structfield> setting of
indexes rebuilt by <command>REINDEX CONCURRENTLY</command>
(Justin Pryzby)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [5be594caf] 2020-05-06 12:29:41 -0400
Branch: REL_12_STABLE [2eea49471] 2020-05-06 12:29:41 -0400
Branch: REL_11_STABLE [59273a7ce] 2020-05-06 12:29:41 -0400
Branch: REL_10_STABLE [4d21263ff] 2020-05-06 12:29:41 -0400
Branch: REL9_6_STABLE [2bf56f50e] 2020-05-06 12:29:41 -0400
Branch: REL9_5_STABLE [91d97462c] 2020-05-06 12:29:41 -0400
-->
<para>
Lock objects sooner during <command>DROP OWNED BY</command>
(Álvaro Herrera)
</para>
<para>
This avoids failures in race-condition cases where another session is
deleting some of the same objects.
</para>
</listitem>
<listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [d9a4cce29] 2020-04-25 05:09:30 +0100
Branch: REL_12_STABLE [d0360632d] 2020-04-25 05:10:24 +0100
Branch: REL_11_STABLE [0f4970d1a] 2020-04-25 05:10:19 +0100
Branch: REL_10_STABLE [287f6d2d9] 2020-04-25 05:10:13 +0100
Branch: REL9_6_STABLE [86b7a4e6f] 2020-04-25 05:10:10 +0100
Branch: REL9_5_STABLE [b3824ca22] 2020-04-25 05:10:05 +0100
-->
<para>
Fix error-case processing for <command>CREATE ROLE ... IN
ROLE</command> (Andrew Gierth)
</para>
<para>
Some error cases would be reported as <quote>unexpected node
type</quote> or the like, instead of the intended message.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [afccd76f1] 2020-04-21 13:57:00 -0400
Branch: REL_12_STABLE [e26c8a6b3] 2020-04-21 13:57:00 -0400
Branch: REL_11_STABLE [0b83c4721] 2020-04-21 13:57:00 -0400
-->
<para>
Ensure that when a partition is detached, any triggers cloned from
its formerly-parent table are removed (Justin Pryzby)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [c0187869a] 2020-04-08 15:04:51 +0900
Branch: REL_12_STABLE [0a9ae1800] 2020-04-08 15:04:57 +0900
-->
<para>
Fix crash when <literal>COLLATE</literal> is applied to a
non-collatable type in a partition bound expression (Dmitry Dolgov)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [501b01879] 2020-04-01 14:49:49 -0400
Branch: REL_12_STABLE [76ea60696] 2020-04-01 14:49:49 -0400
Branch: REL_11_STABLE [76ddc88f4] 2020-04-01 14:49:49 -0400
-->
<para>
Ensure that unique indexes over partitioned tables match the
equality semantics of the partitioning key (Guancheng Luo)
</para>
<para>
This would only be an issue with index opclasses that have unusual
notions of equality, but it's wrong in theory, so check.
</para>
</listitem>
<listitem>
<!--
Author: Magnus Hagander <magnus@hagander.net>
Branch: master [7e4e57474] 2020-04-20 12:53:40 +0200
Branch: REL_12_STABLE [212e712a5] 2020-04-20 12:56:26 +0200
Branch: REL_11_STABLE [3d4652f67] 2020-04-20 12:57:12 +0200
Branch: REL_10_STABLE [d0bb66572] 2020-04-20 12:57:24 +0200
-->
<para>
Ensure that members of the <literal>pg_read_all_stats</literal> role
can read all statistics views, as expected (Magnus Hagander)
</para>
<para>
The functions underlying
the <structname>pg_stat_progress_*</structname> views had not gotten
this memo.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [baf17ad9d] 2020-04-24 12:02:36 -0400
Branch: REL_12_STABLE [64e49a67e] 2020-04-24 12:02:36 -0400
Branch: REL_11_STABLE [776f6d3d0] 2020-04-24 12:02:36 -0400
-->
<para>
Repair performance regression in
<structname>information_schema</structname>.<structname>triggers</structname>
view (Tom Lane)
</para>
<para>
This patch redefines that view so that an
outer <literal>WHERE</literal> clause constraining the table name
can be pushed down into the view, allowing its calculations to be
done only for triggers belonging to the table of interest rather
than all triggers in the database. In a database with many triggers
this would make a significant speed difference for queries of that
form. Since things worked that way before v11, this is a potential
performance regression. Users who find this to be a problem can fix
it by replacing the view definition (or, perhaps, just deleting and
reinstalling the whole <structname>information_schema</structname>
schema).
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [607f8ce74] 2020-02-13 13:37:43 -0500
Branch: REL_12_STABLE [764a554d6] 2020-02-13 13:37:43 -0500
-->
<para>
Repair performance regression in floating point overflow/underflow
detection (Emre Hasegeli)
</para>
<para>
Previous refactoring had resulted in <function>isinf()</function>
being called extra times in some hot code paths.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e81e5741a] 2020-04-27 12:21:04 -0400
Branch: REL_12_STABLE [18f7e856c] 2020-04-27 12:21:04 -0400
Branch: REL_11_STABLE [98a4d6950] 2020-04-27 12:21:04 -0400
Branch: REL_10_STABLE [072a86327] 2020-04-27 12:21:04 -0400
Branch: REL9_6_STABLE [22dcb6c20] 2020-04-27 12:21:04 -0400
-->
<para>
Fix full text search to handle NOT above a phrase search correctly
(Tom Lane)
</para>
<para>
Queries such as <literal>!(foo<->bar)</literal> failed to find
matching rows when implemented as a GiST or GIN index search.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [db89f0e3a] 2020-05-07 15:59:51 -0400
Branch: REL_12_STABLE [e1d70ba43] 2020-05-07 15:59:51 -0400
Branch: REL_11_STABLE [5db48808c] 2020-05-07 15:59:52 -0400
Branch: REL_10_STABLE [26cf16a93] 2020-05-07 15:59:52 -0400
Branch: REL9_6_STABLE [7c9d9aa5c] 2020-05-07 15:59:52 -0400
-->
<para>
Fix full text search for cases where a phrase search includes an
item with both prefix matching and a weight restriction (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c9b0c678d] 2020-04-09 13:19:23 -0400
Branch: REL_12_STABLE [841378947] 2020-04-09 13:19:23 -0400
Branch: REL_11_STABLE [91be1d190] 2020-04-09 13:19:23 -0400
Branch: REL_10_STABLE [5f7247b3b] 2020-04-09 13:19:23 -0400
Branch: REL9_6_STABLE [c81de3a82] 2020-04-09 13:19:23 -0400
Branch: master [2e0e409e3] 2020-04-09 15:38:43 -0400
Branch: REL_12_STABLE [07453e9e3] 2020-04-09 15:38:52 -0400
Branch: REL_11_STABLE [d9a3fe4c5] 2020-04-09 15:38:57 -0400
Branch: REL_10_STABLE [9be664d71] 2020-04-09 15:39:02 -0400
Branch: REL9_6_STABLE [c2599b93d] 2020-04-09 15:39:09 -0400
Branch: master [b10f8bb9f] 2020-04-09 12:36:59 -0400
Branch: REL_12_STABLE [1306edeae] 2020-04-09 12:36:59 -0400
Branch: REL_11_STABLE [ff081d6bb] 2020-04-09 12:37:00 -0400
Branch: REL_10_STABLE [afab39986] 2020-04-09 12:37:00 -0400
Branch: REL9_6_STABLE [638519156] 2020-04-09 12:37:00 -0400
-->
<para>
Fix <function>ts_headline()</function> to make better headline
selections when working with phrase queries (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e41955faf] 2020-04-03 13:15:45 -0400
Branch: REL_12_STABLE [05f4a8818] 2020-04-03 13:15:30 -0400
Branch: REL_11_STABLE [0912fb39c] 2020-04-03 13:15:30 -0400
Branch: REL_10_STABLE [44c763fe9] 2020-04-03 13:15:30 -0400
Branch: REL9_6_STABLE [49b0d13d7] 2020-04-03 13:15:30 -0400
Branch: REL9_5_STABLE [8150f7813] 2020-04-03 13:15:30 -0400
Branch: REL9_5_STABLE [e82b6e00a] 2020-04-06 12:29:54 -0400
-->
<para>
Fix bugs in <varname>gin_fuzzy_search_limit</varname> processing
(Adé Heyward, Tom Lane)
</para>
<para>
A small value of <varname>gin_fuzzy_search_limit</varname> could
result in unexpected slowness due to unintentionally rescanning the
same index page many times. Another code path failed to apply the
intended filtering at all, possibly returning too many values.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [41a194f49] 2020-04-07 20:50:28 -0400
Branch: REL_12_STABLE [35d1eefb2] 2020-04-07 20:50:02 -0400
Branch: REL_11_STABLE [5fae66410] 2020-04-07 20:50:02 -0400
Branch: REL_10_STABLE [4c7a311a2] 2020-04-07 20:50:02 -0400
Branch: REL9_6_STABLE [049e9f48e] 2020-04-07 20:50:02 -0400
Branch: REL9_5_STABLE [ebd194ac5] 2020-04-07 20:50:02 -0400
-->
<para>
Allow input of type <type>circle</type> to accept the format
<quote><literal>(<replaceable>x</replaceable>,<replaceable>y</replaceable>),<replaceable>r</replaceable></literal></quote>
as the documentation says it does (David Zhang)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [26a944cf2] 2020-04-07 15:57:58 -0400
Branch: REL_12_STABLE [6e6b74a20] 2020-04-07 16:30:55 -0400
Branch: REL_11_STABLE [5d79fc60c] 2020-04-07 16:30:55 -0400
Branch: REL_10_STABLE [889786e0e] 2020-04-07 16:30:55 -0400
Branch: REL9_6_STABLE [e40c4d491] 2020-04-07 16:30:55 -0400
Branch: REL9_5_STABLE [dbb121038] 2020-04-07 16:30:55 -0400
-->
<para>
Make the <function>get_bit()</function>
and <function>set_bit()</function> functions cope
with <type>bytea</type> strings longer than 256MB (Movead Li)
</para>
<para>
Since the bit number argument is only <type>int4</type>, it's
impossible to use these functions to access bits beyond the first
256MB of a long <type>bytea</type>. We'll widen the argument
to <type>int8</type> in v13, but in the meantime, allow these
functions to work on the initial substring of a
long <type>bytea</type>.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [82e801852] 2020-03-31 12:57:55 -0400
Branch: REL_12_STABLE [ee40e8975] 2020-03-31 12:57:55 -0400
Branch: REL_11_STABLE [5b22ff764] 2020-03-31 12:57:55 -0400
Branch: REL_10_STABLE [83f7761d8] 2020-03-31 12:57:55 -0400
-->
<para>
Ignore file-not-found errors in <function>pg_ls_waldir()</function>
and allied functions (Tom Lane)
</para>
<para>
This prevents a race condition failure if a file is removed between
when we see its directory entry and when we attempt
to <function>stat()</function> it.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [085b6b667] 2020-03-11 15:27:59 -0400
Branch: REL_12_STABLE [3c8864fc1] 2020-03-11 15:27:59 -0400
Branch: REL_11_STABLE [63b51dfec] 2020-03-11 15:27:59 -0400
Branch: REL_10_STABLE [05283dd5b] 2020-03-11 15:28:00 -0400
Branch: master [a029a0641] 2020-03-11 18:24:11 -0400
Branch: REL_12_STABLE [630590d6f] 2020-03-11 18:24:13 -0400
Branch: REL_11_STABLE [13f353b0e] 2020-03-11 18:24:14 -0400
Branch: REL_10_STABLE [064e029e6] 2020-03-11 18:24:15 -0400
Branch: master [b4570d33a] 2020-03-16 21:05:52 -0400
Branch: REL_12_STABLE [2a89455aa] 2020-03-16 21:05:53 -0400
Branch: REL_11_STABLE [819d55257] 2020-03-16 21:05:54 -0400
Branch: REL_10_STABLE [5e4a0b719] 2020-03-16 21:05:55 -0400
Branch: REL9_6_STABLE [cd6a05187] 2020-03-16 21:05:56 -0400
Branch: REL9_5_STABLE [da254148f] 2020-03-16 21:05:29 -0400
-->
<para>
Avoid possibly leaking an open-file descriptor for a directory
in <function>pg_ls_dir()</function>,
<function>pg_timezone_names()</function>,
<function>pg_tablespace_databases()</function>, and allied functions
(Justin Pryzby)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4dbcb3f84] 2020-03-14 14:42:22 -0400
Branch: REL_12_STABLE [390984f92] 2020-03-14 14:42:22 -0400
Branch: REL_11_STABLE [540ef37cc] 2020-03-14 14:42:22 -0400
Branch: REL_10_STABLE [61d14971d] 2020-03-14 14:42:22 -0400
Branch: REL9_6_STABLE [30e491653] 2020-03-14 14:42:22 -0400
Branch: REL9_5_STABLE [a1ef0f373] 2020-03-14 14:42:22 -0400
-->
<para>
Fix polymorphic-function type resolution to correctly infer the
actual type of an <type>anyarray</type> output when given only
an <type>anyrange</type> input (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Stephen Frost <sfrost@snowman.net>
Branch: master [b68a560f8] 2020-05-02 11:39:26 -0400
Branch: REL_12_STABLE [79e594cf0] 2020-05-02 11:39:32 -0400
-->
<para>
Fix server's connection-startup logic for case where a GSSAPI
connection is rejected because support is not compiled in, and the
client then tries SSL instead (Andrew Gierth)
</para>
<para>
This led to a bogus <quote>unsupported frontend protocol</quote>
failure.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [46da7bf67] 2020-05-05 13:10:17 -0400
Branch: REL_12_STABLE [987717d7c] 2020-05-05 13:10:09 -0400
-->
<para>
Fix memory leakage during GSSAPI encryption (Tom Lane)
</para>
<para>
Both the backend and libpq would leak memory equivalent to the total
amount of data sent during the session, if GSSAPI encryption is in use.
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [299298bc8] 2020-04-22 19:53:06 -0700
Branch: REL_12_STABLE [95695c784] 2020-04-22 19:55:53 -0700
-->
<para>
Fix query-lifespan memory leak for a set-returning function used in
a query's <literal>FROM</literal> clause (Andres Freund)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [58c47ccff] 2020-02-29 13:48:09 -0500
Branch: REL_12_STABLE [96d783ae5] 2020-02-29 13:48:10 -0500
Branch: REL_11_STABLE [9eb6b652a] 2020-02-29 13:48:10 -0500
-->
<para>
Avoid leakage of a hashed subplan's hash tables across multiple
executions (Andreas Karlsson, Tom Lane)
</para>
<para>
This mistake could result in severe memory bloat if a query
re-executed a hashed subplan enough times.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a477bfc1d] 2020-02-26 18:14:12 -0500
Branch: REL_12_STABLE [30d5c6bf2] 2020-02-26 18:14:13 -0500
-->
<para>
Improve planner's handling of no-op domain coercions (Tom Lane)
</para>
<para>
Fix some cases where a domain coercion that does nothing was not
completely removed from expressions.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d12bdba77] 2020-04-21 15:58:42 -0400
Branch: REL_12_STABLE [5a4efd100] 2020-04-21 15:58:42 -0400
Branch: REL_11_STABLE [56259c377] 2020-04-21 15:58:42 -0400
Branch: REL_10_STABLE [e6c17c85a] 2020-04-21 15:58:42 -0400
Branch: REL9_6_STABLE [5c1c27eef] 2020-04-21 15:58:43 -0400
Branch: REL9_5_STABLE [36714f8ca] 2020-04-21 15:58:43 -0400
-->
<para>
Avoid unlikely crash when <command>REINDEX</command> is terminated
by a session-shutdown signal (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5c27bce7f] 2020-04-11 12:29:06 -0400
Branch: REL_12_STABLE [8ffb86644] 2020-04-11 12:29:06 -0400
Branch: REL_11_STABLE [f3d06e524] 2020-04-11 12:29:06 -0400
Branch: REL_10_STABLE [1e6bb6125] 2020-04-11 12:29:06 -0400
Branch: REL9_6_STABLE [242ca479f] 2020-04-11 12:29:06 -0400
Branch: REL9_5_STABLE [30ce86367] 2020-04-11 12:29:06 -0400
-->
<para>
Prevent printout of possibly-incorrect hash join table statistics
in <command>EXPLAIN</command> (Konstantin Knizhnik, Tom Lane, Thomas
Munro)
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [007491979] 2020-02-19 20:37:26 +0900
Branch: REL_12_STABLE [16e6c968b] 2020-02-19 20:38:38 +0900
Branch: REL_11_STABLE [414ed1ca2] 2020-02-19 20:39:02 +0900
Branch: REL_10_STABLE [79f344d52] 2020-02-19 20:39:37 +0900
Branch: REL9_6_STABLE [307c27037] 2020-02-19 20:40:38 +0900
Branch: REL9_5_STABLE [4a3f164b7] 2020-02-19 20:43:59 +0900
-->
<para>
Fix reporting of elapsed time for heap truncation steps
in <command>VACUUM VERBOSE</command> (Tatsuhito Kasahara)
</para>
</listitem>
<listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
Branch: master [73a076b03] 2020-05-01 09:51:09 -0700
Branch: REL_12_STABLE [40708eaaf] 2020-05-01 09:51:08 -0700
Branch: REL_11_STABLE [d3944c364] 2020-05-01 09:51:06 -0700
-->
<para>
Fix possible undercounting of deleted B-tree index pages
in <command>VACUUM VERBOSE</command> output (Peter Geoghegan)
</para>
</listitem>
<listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
Branch: master [b0229f26d] 2020-05-01 08:39:52 -0700
Branch: REL_12_STABLE [05b73261c] 2020-05-01 08:39:51 -0700
Branch: REL_11_STABLE [e4fa6c929] 2020-05-01 08:39:49 -0700
Branch: master [69cf853fe] 2020-05-01 12:19:44 -0700
Branch: REL_12_STABLE [e1477db92] 2020-05-01 12:19:42 -0700
Branch: REL_11_STABLE [573478564] 2020-05-01 12:19:39 -0700
-->
<para>
Fix wrong bookkeeping for oldest deleted page in a B-tree index
(Peter Geoghegan)
</para>
<para>
This could cause subtly wrong decisions about
when <command>VACUUM</command> can skip an index cleanup scan;
although it appears there may be no significant user-visible effects
from that.
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [f2ff20359] 2020-05-08 10:36:40 +0900
Branch: REL_12_STABLE [a354d0153] 2020-05-08 10:38:01 +0900
Branch: REL_11_STABLE [cc534fc3b] 2020-05-08 10:38:45 +0900
Branch: REL_10_STABLE [3a48740e8] 2020-05-08 10:39:08 +0900
-->
<para>
Ensure that TimelineHistoryRead and TimelineHistoryWrite wait states
are reported in all code paths that read or write timeline history
files (Masahiro Ikeda)
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [17d3fcdc3] 2020-03-10 00:14:43 +0900
Branch: REL_12_STABLE [82c04e483] 2020-03-10 00:15:25 +0900
Branch: REL_11_STABLE [e54183cb0] 2020-03-10 00:16:48 +0900
Branch: REL_10_STABLE [e9c4eaacd] 2020-03-10 00:18:24 +0900
Branch: REL9_6_STABLE [d1b414e7e] 2020-03-10 00:19:57 +0900
Branch: REL9_5_STABLE [c9a47b81e] 2020-03-10 00:23:22 +0900
-->
<para>
Avoid possibly showing <quote>waiting</quote> twice in a process's
PS status (Masahiko Sawada)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [fe3036527] 2020-03-31 17:06:22 -0400
Branch: REL_12_STABLE [6c426cd43] 2020-03-31 17:06:22 -0400
-->
<para>
Avoid race condition when <command>ANALYZE</command> replaces the
catalog tuple for extended statistics data (Dean Rasheed)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [dd9ac7d5d] 2020-03-31 08:27:47 +0900
Branch: REL_12_STABLE [3ec8576a0] 2020-03-31 08:27:54 +0900
-->
<para>
Remove ill-considered skip of <quote>redundant</quote>
anti-wraparound vacuums (Michael Paquier)
</para>
<para>
This avoids a corner case where autovacuum could get into a loop of
repeatedly trying and then skipping the same vacuum job.
</para>
</listitem>
<listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
Branch: master [4b42a8993] 2020-03-30 12:03:59 -0700
Branch: REL_12_STABLE [97cda93d8] 2020-03-30 12:03:57 -0700
-->
<para>
Ensure INCLUDE'd columns are always removed from B-tree pivot tuples
(Peter Geoghegan)
</para>
<para>
This mistake wasted space in some rare cases, but was otherwise
harmless.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [61d7c7bce] 2020-03-10 15:38:17 +0900
Branch: REL_12_STABLE [8bca5f935] 2020-03-10 15:38:34 +0900
-->
<para>
Cope with invalid TOAST indexes that could be left over after a
failed <command>REINDEX CONCURRENTLY</command> (Julien Rouhaud)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [fbcf08711] 2020-03-05 12:50:15 +0900
Branch: REL_12_STABLE [26876127b] 2020-03-05 12:50:23 +0900
-->
<para>
Ensure that valid index dependencies are left behind after a
failed <command>REINDEX CONCURRENTLY</command> (Michael Paquier)
</para>
<para>
Previously the old index could be left with
no <structname>pg_depend</structname> links at all, so that for
example it would not get dropped if the parent table is dropped.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [80d76be51] 2020-02-28 20:28:34 -0500
Branch: REL_12_STABLE [d7684c38a] 2020-02-28 20:28:34 -0500
Branch: REL_11_STABLE [7ea20a2bc] 2020-02-28 20:28:34 -0500
-->
<para>
Avoid failure if autovacuum tries to access a just-dropped temporary
schema (Tom Lane)
</para>
<para>
This hazard only arises if a superuser manually drops a temporary
schema; which isn't normal practice, but should work.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [4e87c4836] 2020-04-24 08:48:28 +0900
Branch: REL_12_STABLE [22db5269b] 2020-04-24 08:48:35 +0900
Branch: REL_11_STABLE [2d24ca00b] 2020-04-24 08:48:40 +0900
Branch: REL_10_STABLE [02657c421] 2020-04-24 08:48:45 +0900
Branch: REL9_6_STABLE [c2d8ae0df] 2020-04-24 08:48:51 +0900
Branch: REL9_5_STABLE [9eff11653] 2020-04-24 08:48:55 +0900
Branch: master [f9c1b8dba] 2020-04-24 11:33:41 +0900
Branch: REL_12_STABLE [26057550d] 2020-04-24 11:33:58 +0900
Branch: REL_11_STABLE [0d04e9d76] 2020-04-24 11:34:03 +0900
Branch: REL_10_STABLE [3d9cae5ad] 2020-04-24 11:34:06 +0900
Branch: REL9_6_STABLE [11f004699] 2020-04-24 11:34:11 +0900
Branch: REL9_5_STABLE [a4726998d] 2020-04-24 11:34:16 +0900
-->
<para>
Avoid premature recycling of WAL segments during crash recovery
(Jehan-Guillaume de Rorthais)
</para>
<para>
WAL segments that become ready to be archived during crash recovery
were potentially recycled without being archived.
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [4bd0ad9e4] 2020-04-08 00:49:29 +0900
Branch: REL_12_STABLE [683e0ef55] 2020-05-09 12:00:27 +0900
Branch: REL_11_STABLE [dcd1569fb] 2020-05-09 12:04:51 +0900
Branch: REL_10_STABLE [660f1fc40] 2020-05-09 12:11:11 +0900
Branch: REL9_6_STABLE [70b597974] 2020-05-09 12:16:37 +0900
Branch: REL9_5_STABLE [e3f5b148e] 2020-05-09 12:19:47 +0900
-->
<para>
Avoid scanning irrelevant timelines during archive recovery (Kyotaro
Horiguchi)
</para>
<para>
This can eliminate many attempts to fetch non-existent WAL files from
archive storage, which is helpful if archive access is slow.
</para>
</listitem>
<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [e3ff789ac] 2020-02-19 08:15:49 +0530
Branch: REL_12_STABLE [59112f235] 2020-02-19 08:27:15 +0530
Branch: REL_11_STABLE [bff456d7a] 2020-02-19 08:35:16 +0530
Branch: REL_10_STABLE [b448aa441] 2020-02-19 08:44:16 +0530
Branch: REL9_6_STABLE [59c1a03f0] 2020-02-19 08:52:08 +0530
Branch: REL9_5_STABLE [05555f7aa] 2020-02-19 08:59:18 +0530
-->
<para>
Remove bogus <quote>subtransaction logged without previous top-level
txn record</quote> error check in logical decoding (Arseny Sher,
Amit Kapila)
</para>
<para>
This condition is legitimately reachable in various scenarios, so
remove the check.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [bcd1c3630] 2020-03-17 16:13:18 -0300
Branch: REL_12_STABLE [e58e13e84] 2020-03-17 16:13:18 -0300
-->
<para>
Avoid possible failure after a replication slot copy, due to
premature removal of WAL data (Masahiko Sawada, Arseny Sher)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [49bf81536] 2020-03-26 13:29:20 +0100
Branch: REL_12_STABLE [223e9c77d] 2020-03-26 13:31:07 +0100
Branch: REL_11_STABLE [ba4cc05ce] 2020-03-26 13:51:07 +0100
Branch: REL_10_STABLE [f36a10434] 2020-03-26 13:51:22 +0100
Branch: REL9_6_STABLE [2d8597ba6] 2020-03-26 14:01:56 +0100
Branch: REL9_5_STABLE [ce28a43ff] 2020-03-26 14:08:15 +0100
Branch: master [a9d9bdd3a] 2020-04-05 10:02:00 +0200
Branch: REL_12_STABLE [d278d4e1a] 2020-04-05 10:03:04 +0200
Branch: REL_11_STABLE [250041a56] 2020-04-05 10:03:41 +0200
Branch: REL_10_STABLE [038c9bbe9] 2020-04-05 10:04:13 +0200
Branch: REL9_6_STABLE [3dcaea4b0] 2020-04-05 10:04:26 +0200
Branch: REL9_5_STABLE [72b2b9c52] 2020-04-05 10:05:18 +0200
-->
<para>
Ensure that a replication
slot's <literal>io_in_progress_lock</literal> is released in failure
code paths (Pavan Deolasee)
</para>
<para>
This could result in a walsender later becoming stuck waiting for
the lock.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [ad3ae6477] 2020-02-17 15:20:57 +0100
Branch: REL_12_STABLE [4a97f647d] 2020-02-17 15:21:12 +0100
-->
<para>
Ensure that generated columns are correctly handled during updates
issued by logical replication (Peter Eisentraut)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f332241a6] 2020-04-18 14:02:44 -0400
Branch: REL_12_STABLE [00ef5d52c] 2020-04-18 14:02:44 -0400
Branch: REL_11_STABLE [b3fa6d016] 2020-04-18 14:02:44 -0400
Branch: REL_10_STABLE [63ecdaf75] 2020-04-18 14:02:44 -0400
Branch: REL9_6_STABLE [c65c1aa82] 2020-04-18 14:02:45 -0400
-->
<para>
Fix race conditions in synchronous standby management (Tom Lane)
</para>
<para>
During a change in the <varname>synchronous_standby_names</varname>
setting, there was a window in which wrong decisions could be made
about whether it is OK to release transactions that are waiting for
synchronous commit. Another hazard for similarly wrong decisions
existed if a walsender process exited and was immediately replaced
by another.
</para>
</listitem>
<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [b4f140869] 2020-03-18 09:27:14 +0530
Branch: REL_12_STABLE [e37824136] 2020-03-18 09:33:01 +0530
Branch: REL_11_STABLE [18c41cb6b] 2020-03-18 09:37:08 +0530
Branch: REL_10_STABLE [569f9354b] 2020-03-18 09:46:52 +0530
Branch: REL9_6_STABLE [fe27ce1c1] 2020-03-18 10:08:56 +0530
Branch: REL9_5_STABLE [6bdfe428d] 2020-03-18 10:10:27 +0530
-->
<para>
Add missing SQLSTATE values to a few error reports (Sawada Masahiko)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [761a5688b] 2020-02-19 14:45:17 -0500
Branch: REL_12_STABLE [32aa14d40] 2020-02-19 14:44:58 -0500
Branch: REL_11_STABLE [612d207bc] 2020-02-19 14:44:58 -0500
Branch: REL_10_STABLE [6af63cf8c] 2020-02-19 14:44:58 -0500
Branch: REL9_6_STABLE [3e5308969] 2020-02-19 14:44:58 -0500
Branch: REL9_5_STABLE [bbefb1154] 2020-02-19 14:44:58 -0500
-->
<para>
Fix PL/pgSQL to reliably refuse to execute an event trigger function
as a plain function (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [27dbe1a18] 2020-04-22 07:27:03 +0900
Branch: REL_12_STABLE [e1c08722a] 2020-04-22 07:27:45 +0900
Branch: REL_11_STABLE [35d08658d] 2020-04-22 07:27:49 +0900
Branch: REL_10_STABLE [1bb0293d8] 2020-04-22 07:27:53 +0900
Branch: REL9_6_STABLE [c9c15790d] 2020-04-22 07:28:00 +0900
Branch: REL9_5_STABLE [e5e295d50] 2020-04-22 07:28:04 +0900
-->
<para>
Fix memory leak in <application>libpq</application> when
using <literal>sslmode=verify-full</literal> (Roman Peshkurov)
</para>
<para>
Certificate verification during connection startup could leak some
memory. This would become an issue if a client process opened many
database connections during its lifetime.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [980a70b97] 2020-03-23 11:58:00 -0400
Branch: REL_12_STABLE [036fdf6be] 2020-03-23 11:58:01 -0400
Branch: REL_11_STABLE [aae7e8530] 2020-03-23 11:58:01 -0400
Branch: REL_10_STABLE [ef7d6d79a] 2020-03-23 11:58:01 -0400
Branch: REL9_6_STABLE [c0eb57dd9] 2020-03-23 11:58:01 -0400
Branch: REL9_5_STABLE [5f9eace5d] 2020-03-23 11:58:01 -0400
-->
<para>
Fix <application>ecpg</application> to treat an argument of
just <quote><literal>-</literal></quote> as meaning <quote>read
from stdin</quote> on all platforms (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [8d84dd001] 2020-04-01 14:45:45 +0900
Branch: REL_12_STABLE [f79bea4b6] 2020-04-01 14:45:57 +0900
-->
<para>
Fix crash in <application>psql</application> when attempting to
re-establish a failed connection (Michael Paquier)
</para>
</listitem>
<listitem>
<!--
Author: Bruce Momjian <bruce@momjian.us>
Branch: master [08481eedd] 2020-03-31 23:01:34 -0400
Branch: REL_12_STABLE [6a50f1af4] 2020-03-31 23:01:33 -0400
Branch: REL_11_STABLE [7054e12e0] 2020-03-31 23:01:33 -0400
Branch: REL_10_STABLE [a936012d6] 2020-03-31 23:01:33 -0400
-->
<para>
Allow tab-completion of the filename argument
to <application>psql</application>'s <command>\gx</command> command
(Vik Fearing)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [b08dee24a] 2020-03-11 16:54:54 -0300
Branch: REL_12_STABLE [f977e6dec] 2020-03-11 16:54:54 -0300
Branch: REL_11_STABLE [e70187c9b] 2020-03-11 16:54:54 -0300
Branch: REL_10_STABLE [d04e342ba] 2020-03-11 16:54:54 -0300
Branch: REL9_6_STABLE [2b9d70159] 2020-03-11 16:54:54 -0300
Branch: master [046001fe3] 2020-03-16 16:27:13 -0300
Branch: REL_12_STABLE [cf72898c6] 2020-03-16 16:27:13 -0300
Branch: REL_11_STABLE [55978e28c] 2020-03-16 16:27:13 -0300
Branch: REL_10_STABLE [c6b75b3f1] 2020-03-16 16:27:13 -0300
Branch: REL9_6_STABLE [7984c7e9f] 2020-03-16 16:27:13 -0300
Branch: master [899a04f5e] 2020-03-11 11:04:59 -0300
Branch: REL_12_STABLE [b7739ebec] 2020-03-11 11:04:59 -0300
Branch: REL_11_STABLE [7c094a11c] 2020-03-11 11:04:59 -0300
Branch: REL_10_STABLE [3dfd2d6cd] 2020-03-11 11:04:59 -0300
Branch: REL9_6_STABLE [73b31e784] 2020-03-11 11:04:59 -0300
-->
<para>
Add <application>pg_dump</application> support for <command>ALTER
... DEPENDS ON EXTENSION</command> (Álvaro Herrera)
</para>
<para>
<application>pg_dump</application> previously ignored dependencies added
this way, causing them to be forgotten during dump/restore or
<application>pg_upgrade</application>.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [f31364676] 2020-02-17 18:40:02 -0500
Branch: REL_12_STABLE [6da7d3630] 2020-02-17 18:40:02 -0500
Branch: REL_11_STABLE [bd2cd138f] 2020-02-17 18:40:02 -0500
Branch: REL_10_STABLE [f9d7bb68d] 2020-02-17 18:40:02 -0500
Branch: REL9_6_STABLE [3380b9931] 2020-02-17 18:40:02 -0500
Branch: REL9_5_STABLE [d9ec8d1d7] 2020-02-17 18:40:02 -0500
-->
<para>
Fix <application>pg_dump</application> to dump comments on RLS
policy objects (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8728b2c70] 2020-03-09 14:58:26 -0400
Branch: REL_12_STABLE [4c40b27b5] 2020-03-09 14:58:11 -0400
Branch: REL_11_STABLE [f5d49f226] 2020-03-09 14:58:11 -0400
Branch: REL_10_STABLE [475b061c8] 2020-03-09 14:58:11 -0400
Branch: REL9_6_STABLE [fab545635] 2020-03-09 14:58:11 -0400
Branch: REL9_5_STABLE [0b0247644] 2020-03-09 14:58:11 -0400
Branch: master [a9d70c108] 2020-04-08 11:23:39 -0400
Branch: REL_12_STABLE [983ed99a6] 2020-04-08 11:23:39 -0400
Branch: REL_11_STABLE [d050c6113] 2020-04-08 11:23:39 -0400
Branch: REL_10_STABLE [830471e0d] 2020-04-08 11:23:39 -0400
Branch: REL9_6_STABLE [778066052] 2020-04-08 11:23:40 -0400
Branch: REL9_5_STABLE [564c1e6d7] 2020-04-08 11:23:40 -0400
-->
<para>
In <application>pg_dump</application>, postpone restore of event
triggers till the end (Fabrízio de Royes Mello, Hamid Akhtar,
Tom Lane)
</para>
<para>
This minimizes the risk that an event trigger could interfere with
the restoration of other objects.
</para>
</listitem>
<listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
Branch: master [0278d3f79] 2020-04-27 13:04:35 -0400
Branch: REL_12_STABLE [a08bfe742] 2020-04-27 14:00:36 -0400
-->
<para>
Ensure that <application>pg_basebackup</application> generates valid
tar files (Robert Haas)
</para>
<para>
In some cases a partial block of zeroes would be added to the end of
the file. While this seems to be harmless with common versions of
tar, it's not OK per the POSIX file format spec.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [428a2609e] 2020-02-27 15:31:27 +0900
Branch: REL_12_STABLE [f6e8e8b38] 2020-02-27 15:31:48 +0900
Branch: REL_11_STABLE [8f9aba187] 2020-02-27 15:31:52 +0900
-->
<para>
Make <application>pg_checksums</application> skip tablespace
subdirectories that belong to a
different <productname>PostgreSQL</productname> major version
(Michael Banck, Bernd Helmle)
</para>
<para>
Such subdirectories don't really belong to our database cluster, and
so must not be processed.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [bf883b211] 2020-02-24 18:13:25 +0900
Branch: REL_12_STABLE [a8beece95] 2020-02-24 18:14:16 +0900
Branch: REL_11_STABLE [da2a7180a] 2020-02-24 18:14:22 +0900
-->
<para>
Ignore temporary copies of <filename>pg_internal.init</filename>
in <application>pg_checksums</application> and related
programs (Michael Paquier)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [008cf0409] 2020-02-27 11:20:46 +0900
Branch: REL_12_STABLE [943affb3d] 2020-02-27 11:21:00 +0900
Branch: REL_11_STABLE [83bd732eb] 2020-02-27 11:21:07 +0900
Branch: REL_10_STABLE [240c7c75f] 2020-02-27 11:21:14 +0900
Branch: REL9_6_STABLE [3340034f2] 2020-02-27 11:21:23 +0900
Branch: REL9_5_STABLE [49300e4cf] 2020-02-27 11:21:28 +0900
Branch: master [c4b0edb07] 2020-02-27 21:58:37 +0900
Branch: REL_12_STABLE [aeb846edb] 2020-02-27 21:58:45 +0900
Branch: REL_11_STABLE [8e076f4f9] 2020-02-27 21:58:50 +0900
-->
<para>
Fix quoting of <option>--encoding</option>, <option>--lc-ctype</option>
and <option>--lc-collate</option> values
in <application>createdb</application> utility (Michael Paquier)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6dd9f3577] 2020-04-03 11:24:56 -0400
Branch: REL_12_STABLE [d56657c35] 2020-04-03 11:24:56 -0400
Branch: REL_11_STABLE [7b1552283] 2020-04-03 11:24:56 -0400
Branch: REL_10_STABLE [85f0d4703] 2020-04-03 11:24:56 -0400
Branch: REL9_6_STABLE [a9f821f48] 2020-04-03 11:24:56 -0400
Branch: REL9_5_STABLE [82bc56e63] 2020-04-03 11:24:56 -0400
-->
<para>
<filename>contrib/lo</filename>'s <function>lo_manage()</function>
function crashed if called directly rather than as a trigger (Tom
Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [95f7ddfda] 2020-03-28 17:09:51 -0400
Branch: REL_12_STABLE [2bb6bdbe5] 2020-03-28 17:09:51 -0400
Branch: REL_11_STABLE [5feb3d0b3] 2020-03-28 17:09:51 -0400
Branch: REL_10_STABLE [2618ac6c6] 2020-03-28 17:09:51 -0400
Branch: REL9_6_STABLE [39491aa0d] 2020-03-28 17:09:51 -0400
Branch: REL9_5_STABLE [8e1e630d0] 2020-03-28 17:09:52 -0400
-->
<para>
In <filename>contrib/ltree</filename>,
protect against overflow of <type>ltree</type>
and <type>lquery</type> length fields (Nikita Glukhov)
</para>
</listitem>
<listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
Branch: REL_12_STABLE [393b449f1] 2020-03-11 14:15:02 -0700
Branch: REL_11_STABLE [c788115b5] 2020-03-11 14:15:00 -0700
-->
<para>
Work around failure in <filename>contrib/pageinspect</filename>'s
<function>bt_metap()</function> function when an oldest_xact value
exceeds 2^31-1 (Peter Geoghegan)
</para>
<para>
Such XIDs will now be reported as negative integers, which isn't
great but it beats throwing an error. v13 will widen the output
argument to <type>int8</type> to provide saner reporting.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [fc576b7c4] 2020-04-16 14:45:54 -0400
Branch: REL_12_STABLE [687e566b9] 2020-04-16 14:45:54 -0400
Branch: REL_11_STABLE [cc2737ab0] 2020-04-16 14:45:54 -0400
Branch: REL_10_STABLE [f4a420056] 2020-04-16 14:45:54 -0400
Branch: REL9_6_STABLE [3cdf2421a] 2020-04-16 14:45:54 -0400
Branch: REL9_5_STABLE [46b1b6379] 2020-04-16 14:45:54 -0400
-->
<para>
Fix cache reference leak in <filename>contrib/sepgsql</filename>
(Michael Luo)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e02ea141e] 2020-02-16 12:20:18 -0500
Branch: REL_12_STABLE [de5e03f7f] 2020-02-16 12:20:18 -0500
-->
<para>
On Windows, avoid premature creation of postmaster's log file
during <literal>pg_ctl start</literal> (Alexander Lakhin)
</para>
<para>
The previous coding could allow the file to be created with
permissions that wouldn't allow the postmaster to write on it.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8c49454ca] 2020-03-30 11:14:58 -0400
Branch: REL_12_STABLE [de5b9db36] 2020-03-30 11:14:58 -0400
Branch: REL_11_STABLE [4bc3a1667] 2020-03-30 11:14:58 -0400
Branch: REL_10_STABLE [d59e83cf5] 2020-03-30 11:14:58 -0400
Branch: REL9_6_STABLE [f15f5edee] 2020-03-30 11:14:58 -0400
Branch: REL9_5_STABLE [6dac1e858] 2020-03-30 11:14:58 -0400
-->
<para>
Avoid failures when dealing with Unix-style locale names on
Windows (Juan José Santamaría Flecha)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [3b77dce86] 2020-03-02 15:45:34 +0900
Branch: REL_12_STABLE [3b5709e66] 2020-03-02 15:46:24 +0900
-->
<para>
On Windows, set console VT100 compatibility mode in
programs that support <varname>PG_COLOR</varname> colorization
(Juan José Santamaría Flecha)
</para>
<para>
Without this, the colorization option doesn't actually work.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e3a87b499] 2020-03-24 11:49:00 -0400
Branch: REL_12_STABLE [a86715451] 2020-03-24 11:48:33 -0400
-->
<para>
Stop requiring extra parentheses in <function>ereport()</function>
calls (Andres Freund, Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0bc8cebdb] 2020-03-17 12:09:26 -0400
Branch: REL_12_STABLE [d8e7f8149] 2020-03-17 12:09:26 -0400
Branch: REL_11_STABLE [9af2f7dc9] 2020-03-17 12:09:27 -0400
Branch: REL_10_STABLE [d67d7243f] 2020-03-17 12:09:27 -0400
-->
<para>
Use <application>pkg-config</application>, if available, to
locate <application>libxml2</application>
during <application>configure</application> (Hugh McMaster, Tom
Lane, Peter Eisentraut)
</para>
<para>
If <application>pkg-config</application> is not present or lacks
knowledge of <application>libxml2</application>, we still
query <application>xml2-config</application> as before.
</para>
<para>
This change could break build processes that try to
make <productname>PostgreSQL</productname> use a non-default version
of <application>libxml2</application> by putting that
version's <application>xml2-config</application> into
the <varname>PATH</varname>. Instead,
set <varname>XML2_CONFIG</varname> to point to the
non-default <application>xml2-config</application>. That method
will work with either older or
newer <productname>PostgreSQL</productname> releases.
</para>
</listitem>
<listitem>
<!--
Author: Bruce Momjian <bruce@momjian.us>
Branch: master [051fd5e0f] 2020-03-31 14:17:32 -0400
Branch: REL_12_STABLE [297a174d2] 2020-03-31 14:17:32 -0400
-->
<para>
Fix Makefile dependencies for <application>libpq</application>
and <application>ecpg</application> (Dagfinn Ilmari Mannsåker)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [beb2516e9] 2020-05-06 21:08:15 +0900
Branch: REL_12_STABLE [8c0939dad] 2020-05-06 21:08:22 +0900
Branch: REL_11_STABLE [984aca448] 2020-05-06 21:08:26 +0900
Branch: REL_10_STABLE [307ed98b0] 2020-05-06 21:08:31 +0900
Branch: REL9_6_STABLE [e07fdc126] 2020-05-06 21:08:38 +0900
Branch: REL9_5_STABLE [ad53d6efe] 2020-05-06 21:08:42 +0900
-->
<para>
In MSVC builds, cope with spaces in the path name for Python
(Victor Wagner)
</para>
</listitem>
<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [a9659fb65] 2020-04-17 14:44:33 -0400
Branch: REL_12_STABLE [6b02bee66] 2020-04-17 14:52:42 -0400
Branch: REL_11_STABLE [758814224] 2020-04-17 14:53:56 -0400
Branch: REL_10_STABLE [ddac64f2d] 2020-04-17 14:55:55 -0400
Branch: REL9_6_STABLE [4c9239d08] 2020-04-17 14:56:56 -0400
Branch: REL9_5_STABLE [3ca17999f] 2020-04-17 14:57:15 -0400
-->
<para>
In MSVC builds, fix detection of Visual Studio version to work with
more language settings (Andrew Dunstan)
</para>
</listitem>
<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [71c2fd0c0] 2020-03-20 13:55:15 -0400
Branch: REL_12_STABLE [d0747714e] 2020-03-20 14:02:05 -0400
Branch: REL_11_STABLE [e8a6391fc] 2020-03-20 14:02:15 -0400
Branch: REL_10_STABLE [3163349fd] 2020-03-20 14:02:43 -0400
Branch: REL9_6_STABLE [80370836f] 2020-03-20 14:03:13 -0400
Branch: REL9_5_STABLE [467b40832] 2020-03-20 14:03:31 -0400
-->
<para>
In MSVC builds, use <literal>-Wno-deprecated</literal> with bison
versions newer than 3.0, as non-Windows builds already do (Andrew
Dunstan)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4cac3a49e] 2020-04-24 10:54:47 -0400
Branch: REL_12_STABLE [c820692bd] 2020-04-24 10:55:00 -0400
Branch: REL_11_STABLE [eb335bc62] 2020-04-24 10:55:05 -0400
Branch: REL_10_STABLE [898921a18] 2020-04-24 10:55:10 -0400
Branch: REL9_6_STABLE [66be99742] 2020-04-24 10:55:17 -0400
Branch: REL9_5_STABLE [39006ae7a] 2020-04-24 10:55:23 -0400
Branch: master [6c5f91616] 2020-04-24 17:53:23 -0400
Branch: REL_12_STABLE [1e07e3fc0] 2020-04-24 17:53:23 -0400
Branch: REL_11_STABLE [b31f9fd63] 2020-04-24 17:53:23 -0400
Branch: REL_10_STABLE [40d4bc5ac] 2020-04-24 17:53:23 -0400
Branch: REL9_6_STABLE [f65f3a5d8] 2020-04-24 17:53:23 -0400
Branch: REL9_5_STABLE [3cdb45c54] 2020-04-24 17:53:23 -0400
Branch: master [bd8c5cee9] 2020-04-24 17:21:44 -0400
Branch: REL_12_STABLE [a2342c658] 2020-04-24 17:21:44 -0400
Branch: REL_11_STABLE [99c9ed224] 2020-04-24 17:21:44 -0400
Branch: REL_10_STABLE [4985b3b84] 2020-04-24 17:21:44 -0400
Branch: REL9_6_STABLE [351252904] 2020-04-24 17:21:44 -0400
Branch: REL9_5_STABLE [3f3ab184c] 2020-04-24 17:21:44 -0400
-->
<para>
Update time zone data files to <application>tzdata</application>
release 2020a for DST law changes in Morocco and the Canadian Yukon,
plus historical corrections for Shanghai.
</para>
<para>
The America/Godthab zone has been renamed to America/Nuuk to reflect
current English usage; however, the old name remains available as a
compatibility link.
</para>
<para>
Also, update <application>initdb</application>'s list of known
Windows time zone names to include recent additions, improving the
odds that it will correctly translate the system time zone setting
on that platform.
</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
<sect1 id="release-12-2">
<title>Release 12.2</title>
<formalpara>
<title>Release date:</title>
<para>2020-02-13</para>
</formalpara>
<para>
This release contains a variety of fixes from 12.1.
For information about new features in major release 12, see
<xref linkend="release-12"/>.
</para>
<sect2>
<title>Migration to Version 12.2</title>
<para>
A dump/restore is not required for those running 12.X.
</para>
<para>
However, if you have any foreign key constraints referencing
partitioned tables, see the two entries below about bugs in that
feature.
</para>
</sect2>
<sect2>
<title>Changes</title>
<itemizedlist>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [b048f558d] 2020-02-10 11:47:09 -0300
Branch: REL_12_STABLE [2ad125322] 2020-02-10 11:47:09 -0300
Branch: REL_11_STABLE [bdd19e48a] 2020-02-10 11:47:09 -0300
Branch: REL_10_STABLE [ac1a998ed] 2020-02-10 11:47:09 -0300
Branch: REL9_6_STABLE [e8b8eb937] 2020-02-10 12:06:25 -0300
-->
<para>
Add missing permissions checks for <command>ALTER ... DEPENDS ON
EXTENSION</command> (Álvaro Herrera)
</para>
<para>
Marking an object as dependent on an extension did not have any
privilege check whatsoever. This oversight allowed any user to mark
routines, triggers, materialized views, or indexes as droppable by
anyone able to drop an extension. Require that the calling user own
the specified object (and hence have privilege to drop it).
(CVE-2020-1720)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [9710d3d4a] 2020-02-07 17:09:36 -0300
Branch: REL_12_STABLE [ce054a8cd] 2020-02-07 17:09:36 -0300
-->
<para>
Fix <command>TRUNCATE ... CASCADE</command> to ensure all relevant
partitions are truncated (Jehan-Guillaume de Rorthais)
</para>
<para>
If a partition of a partitioned table is truncated with
the <literal>CASCADE</literal> option, and the partitioned table has
a foreign-key reference from another table, that table must also be
truncated. The need to check this was missed if the referencing
table was itself partitioned, possibly allowing rows to survive that
violate the foreign-key constraint.
</para>
<para>
Hence, if you have foreign key constraints between partitioned
tables, and you have done any
partition-level <command>TRUNCATE</command> on the referenced table,
you should check to see if any foreign key violations exist. The
simplest way is to add a new instance of the foreign key constraint
(and, once that succeeds, drop it or the original constraint).
That may be prohibitive from a locking standpoint, however, in which
case you might prefer to manually query for unmatched rows.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [55173d2e6] 2020-02-07 18:27:18 -0300
Branch: REL_12_STABLE [2c80a656c] 2020-02-07 18:27:18 -0300
-->
<para>
Fix failure to attach foreign key constraints to sub-partitions
(Jehan-Guillaume de Rorthais)
</para>
<para>
When adding a partition to a level below the first level of a
multi-level partitioned table, foreign key constraints referencing
the top partitioned table were not cloned to the new partition,
leading to possible constraint violations later. Detaching and
re-attaching the new partition is the cheapest way to fix this.
However, if there are many partitions to be fixed, adding a new
instance of the foreign key constraint might be preferable.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [01d9676a5] 2020-01-28 17:26:37 -0500
Branch: REL_12_STABLE [87fed2a19] 2020-01-28 17:26:37 -0500
-->
<para>
Fix possible crash during concurrent update on a partitioned table
or inheritance tree (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [1fa846f1c] 2020-01-02 17:04:24 -0300
Branch: REL_12_STABLE [d73214839] 2020-01-02 17:04:24 -0300
Branch: REL_11_STABLE [adc9cb6f2] 2020-01-02 17:04:24 -0300
-->
<para>
Ensure that row triggers on partitioned tables are correctly
cloned to sub-partitions when appropriate
(Álvaro Herrera)
</para>
<para>
User-defined triggers (but not triggers for foreign key or deferred
unique constraints) might be missed when creating or attaching a
partition.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [b9c130a1f] 2020-01-06 08:40:00 +0100
Branch: REL_12_STABLE [8c2bfd9f9] 2020-01-06 10:43:55 +0100
Branch: REL_11_STABLE [7474393e0] 2020-01-06 11:38:24 +0100
Branch: REL_10_STABLE [66fd0adc7] 2020-01-06 11:38:33 +0100
-->
<para>
Fix logical replication subscriber code to execute
per-column <literal>UPDATE</literal> triggers when appropriate
(Peter Eisentraut)
</para>
</listitem>
<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [d20703805] 2020-01-02 11:41:04 +0530
Branch: REL_12_STABLE [f8a6d8e71] 2020-01-02 11:53:53 +0530
Branch: REL_11_STABLE [3e3a79735] 2020-01-02 12:04:13 +0530
Branch: REL_10_STABLE [27b5f48c7] 2020-01-02 12:11:55 +0530
Branch: REL9_6_STABLE [ba5b4e506] 2020-01-02 11:29:50 +0530
Branch: REL9_5_STABLE [a6f4f407a] 2020-01-02 12:28:02 +0530
Branch: REL9_4_STABLE [1ad47e875] 2020-01-02 12:38:29 +0530
Branch: master [ed7bb5c31] 2020-01-14 07:53:50 +0530
Branch: REL_12_STABLE [fa1eaebfa] 2020-01-14 08:05:05 +0530
Branch: REL_11_STABLE [17869eca7] 2020-01-14 08:12:12 +0530
Branch: REL_10_STABLE [f9e95252a] 2020-01-14 08:20:11 +0530
-->
<para>
Avoid failure in logical decoding when a large transaction must be
spilled into many separate temporary files (Amit Khandekar)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4d9ceb001] 2019-11-22 11:31:19 -0500
Branch: REL_12_STABLE [a2aa224e0] 2019-11-22 11:31:19 -0500
Branch: REL_11_STABLE [b72a44c51] 2019-11-22 11:31:19 -0500
Branch: REL_10_STABLE [5d3fcb53a] 2019-11-22 11:31:19 -0500
-->
<para>
Fix possible crash or data corruption when a logical replication
subscriber processes a row update (Tom Lane, Tomas Vondra)
</para>
<para>
This bug caused visible problems only if the subscriber's table
contained columns that were not being copied from the publisher and
had pass-by-reference data types.
</para>
</listitem>
<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [04c8a69c0] 2019-12-18 07:49:18 +0530
Branch: REL_12_STABLE [c74111d8b] 2019-12-18 07:57:01 +0530
Branch: REL_11_STABLE [046830164] 2019-12-18 08:16:31 +0530
Branch: REL_10_STABLE [d6eca4958] 2019-12-18 08:27:41 +0530
-->
<para>
Fix crash in logical replication subscriber after DDL changes on a
subscribed relation (Jehan-Guillaume de Rorthais, Vignesh C)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [15cac3a52] 2020-01-17 18:00:39 -0300
Branch: REL_12_STABLE [bc2140627] 2020-01-17 18:00:39 -0300
Branch: REL_11_STABLE [fe955ebee] 2020-01-17 18:00:39 -0300
Branch: REL_10_STABLE [e3154aae3] 2020-01-17 18:00:39 -0300
Branch: REL9_6_STABLE [cdb14154b] 2020-01-17 18:00:39 -0300
Branch: REL9_5_STABLE [58997ace5] 2020-01-17 18:00:39 -0300
Branch: REL9_4_STABLE [20a1dc1e3] 2020-01-17 18:00:39 -0300
-->
<para>
Fix failure in logical replication publisher after a database crash
and restart (Vignesh C)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [b0afdcad2] 2020-01-30 11:14:02 +0900
Branch: REL_12_STABLE [3228512b7] 2020-01-30 11:15:28 +0900
Branch: REL_11_STABLE [374464c3e] 2020-01-30 11:15:35 +0900
Branch: master [7ca8c9706] 2020-01-31 13:57:56 +0900
Branch: REL_12_STABLE [706ad6a4d] 2020-01-31 13:58:05 +0900
Branch: REL_11_STABLE [8b29c75f6] 2020-01-31 13:58:11 +0900
-->
<para>
Ensure that the effect
of <function>pg_replication_slot_advance()</function> on a physical
replication slot will persist across restarts (Alexey Kondratov,
Michael Paquier)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [1c7a0b387] 2020-02-03 18:59:12 -0300
Branch: REL_12_STABLE [42e3187a8] 2020-02-03 18:59:12 -0300
Branch: REL_11_STABLE [beefab654] 2020-02-03 18:59:12 -0300
Branch: REL_10_STABLE [380bc8829] 2020-02-03 18:59:12 -0300
-->
<para>
Improve efficiency of logical replication with <literal>REPLICA
IDENTITY FULL</literal> (Konstantin Knizhnik)
</para>
<para>
When searching for an existing tuple during an update or delete
operation, return the first matching tuple not the last one.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [259bbe177] 2020-01-13 13:41:12 +0100
Branch: REL_12_STABLE [bf65f3c88] 2020-01-13 13:41:09 +0100
-->
<para>
Fix base backup to handle database OIDs larger
than <literal>INT32_MAX</literal> (Peter Eisentraut)
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [76cbfcdf3] 2019-11-16 10:11:30 +1300
Branch: REL_12_STABLE [24897e1a1] 2019-11-16 10:18:45 +1300
Branch: REL_11_STABLE [bc049d0d4] 2019-11-16 10:19:16 +1300
-->
<para>
Ensure parallel plans are always shut down at the correct time
(Kyotaro Horiguchi)
</para>
<para>
This oversight is known to result in <quote>temporary file
leak</quote> warnings from multi-batch parallel hash joins.
</para>
</listitem>
<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [080313f82] 2019-11-26 08:30:24 +0530
Branch: REL_12_STABLE [1cc3a90c7] 2019-11-26 08:55:06 +0530
Branch: REL_11_STABLE [d0ccfa9d6] 2019-11-26 09:07:35 +0530
Branch: REL_10_STABLE [f7ae68aac] 2019-11-26 09:23:45 +0530
Branch: REL9_6_STABLE [1ad0df67c] 2019-11-26 09:41:41 +0530
-->
<para>
Prevent premature shutdown of a Gather or GatherMerge plan node that
is underneath a Limit node (Amit Kapila)
</para>
<para>
This avoids failure if such a plan node needs to be scanned more
than once, as for instance if it is on the inside of a nestloop.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [3e4818e9d] 2020-01-27 15:07:03 +1300
Branch: REL_12_STABLE [f9d0be241] 2020-01-27 14:11:24 +1300
Branch: REL_11_STABLE [6a9fc75d0] 2020-01-27 14:12:18 +1300
-->
<para>
Improve efficiency of parallel hash join on CPUs with many cores
(Gang Deng, Thomas Munro)
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [74618e77b] 2020-01-31 10:25:34 +1300
Branch: REL_12_STABLE [1fcf62e0b] 2020-01-31 10:27:53 +1300
Branch: REL_11_STABLE [2c56b3ac4] 2020-01-31 11:12:21 +1300
Branch: master [d9fe702a2] 2020-02-05 12:27:00 +1300
Branch: REL_12_STABLE [2e2351bd6] 2020-02-05 12:28:33 +1300
Branch: REL_11_STABLE [c4a2041a4] 2020-02-05 12:30:06 +1300
-->
<para>
Avoid crash in parallel <command>CREATE INDEX</command> when there
are no free dynamic shared memory slots (Thomas Munro)
</para>
<para>
Fall back to a non-parallel index build, instead.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [93745f1e0] 2020-02-01 14:29:13 +1300
Branch: REL_12_STABLE [24dd34af1] 2020-02-01 14:49:57 +1300
Branch: REL_11_STABLE [600387f5d] 2020-02-01 22:57:46 +1300
Branch: REL_10_STABLE [aab30cd4e] 2020-02-01 14:54:48 +1300
Branch: REL9_6_STABLE [93be45245] 2020-02-01 14:57:40 +1300
Branch: REL9_5_STABLE [a5f45c3dd] 2020-02-01 14:59:58 +1300
Branch: REL9_4_STABLE [95936c795] 2020-02-01 15:10:20 +1300
-->
<para>
Avoid memory leak when there are no free dynamic shared memory slots
(Thomas Munro)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [a904abe2e] 2020-01-22 09:49:18 +0900
Branch: REL_12_STABLE [817a1b88a] 2020-01-22 09:49:24 +0900
Branch: REL_11_STABLE [5b4b07fa9] 2020-01-22 09:49:28 +0900
Branch: REL_10_STABLE [9055344b4] 2020-01-22 09:49:33 +0900
Branch: REL9_6_STABLE [ef33edeb5] 2020-01-22 09:49:39 +0900
Branch: REL9_5_STABLE [c39f45598] 2020-01-22 09:49:44 +0900
Branch: REL9_4_STABLE [d76652edc] 2020-01-22 09:49:48 +0900
-->
<para>
Ignore the <literal>CONCURRENTLY</literal> option when performing an
index creation, drop, or rebuild on a temporary table (Michael
Paquier, Heikki Linnakangas, Andres Freund)
</para>
<para>
This avoids strange failures if the temporary table has
an <literal>ON COMMIT</literal> action. There is no benefit in
using <literal>CONCURRENTLY</literal> for a temporary table anyway,
since other sessions cannot access the table, making the extra
processing pointless.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c35b714ca] 2019-12-01 13:09:26 -0500
Branch: REL_12_STABLE [b154d70f7] 2019-12-01 13:09:26 -0500
Branch: REL_11_STABLE [768a401e2] 2019-12-01 13:09:26 -0500
Branch: REL_10_STABLE [25c7183c0] 2019-12-01 13:09:27 -0500
Branch: REL9_6_STABLE [283f095d0] 2019-12-01 13:09:27 -0500
Branch: REL9_5_STABLE [cfffa8a6b] 2019-12-01 13:09:27 -0500
Branch: REL9_4_STABLE [0c84e992c] 2019-12-01 13:09:27 -0500
-->
<para>
Fix possible failure when resetting expression indexes on temporary
tables that are marked <literal>ON COMMIT DELETE ROWS</literal>
(Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [4c8701098] 2020-01-20 10:36:35 +0200
Branch: REL_12_STABLE [fd436bba0] 2020-01-20 10:36:45 +0200
Branch: REL_11_STABLE [da7abcf0f] 2020-01-20 10:36:47 +0200
Branch: REL_10_STABLE [ff0c567cb] 2020-01-20 10:36:50 +0200
Branch: REL9_6_STABLE [e96f30d89] 2020-01-20 10:36:52 +0200
Branch: REL9_5_STABLE [98f0d2837] 2020-01-20 10:36:55 +0200
-->
<para>
Fix possible crash in BRIN index operations
with <type>box</type>, <type>range</type> and <type>inet</type> data
types (Heikki Linnakangas)
</para>
</listitem>
<listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
Branch: master [a7ee7c851] 2019-12-13 23:58:10 +0200
Branch: REL_12_STABLE [70c4f500e] 2019-12-13 23:59:00 +0200
Branch: master [741b88435] 2019-12-16 13:57:41 +0200
Branch: REL_12_STABLE [42d1acd2e] 2019-12-16 13:58:07 +0200
-->
<para>
Fix crash during recursive page split in GiST index build (Heikki
Linnakangas)
</para>
</listitem>
<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
Branch: master [b10714080] 2019-11-20 00:12:33 +0300
Branch: REL_12_STABLE [a64e7e05a] 2019-11-20 00:17:58 +0300
Branch: REL_11_STABLE [7d467dee0] 2019-11-20 00:18:02 +0300
Branch: master [e14641197] 2019-11-20 00:04:09 +0300
Branch: REL_12_STABLE [051c50c01] 2019-11-20 00:04:53 +0300
Branch: REL_11_STABLE [9f2927989] 2019-11-20 00:05:12 +0300
Branch: REL_10_STABLE [21ad61ab3] 2019-11-20 00:05:35 +0300
Branch: master [d5ad7a09a] 2019-11-20 00:04:22 +0300
Branch: REL_12_STABLE [ee437ca74] 2019-11-20 00:05:01 +0300
Branch: REL_11_STABLE [c0bf35421] 2019-11-20 00:05:21 +0300
Branch: REL_10_STABLE [ab64b474d] 2019-11-20 00:05:42 +0300
Branch: REL9_6_STABLE [99f5888d3] 2019-11-19 23:47:29 +0300
Branch: REL9_5_STABLE [4fc485684] 2019-11-20 00:01:55 +0300
Branch: REL9_4_STABLE [1414821e1] 2019-11-20 00:03:04 +0300
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4093ff573] 2020-02-09 12:02:57 -0500
Branch: REL_12_STABLE [baf487123] 2020-02-09 12:02:57 -0500
Branch: REL_11_STABLE [f91706b00] 2020-02-09 12:02:57 -0500
-->
<para>
Fix handling of deleted pages in GIN indexes (Alexander Korotkov)
</para>
<para>
Avoid possible deadlocks, incorrect updates of a deleted page's
state, and failure to traverse through a recently-deleted page.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [41c6f9db2] 2020-01-17 16:17:31 -0500
Branch: REL_12_STABLE [2e2646060] 2020-01-17 16:17:32 -0500
Branch: REL_11_STABLE [d8e877b86] 2020-01-17 16:17:33 -0500
Branch: REL_10_STABLE [167fd022f] 2020-01-17 16:17:35 -0500
Branch: REL9_6_STABLE [45f03cfa5] 2020-01-17 16:17:36 -0500
Branch: REL9_5_STABLE [396472278] 2020-01-17 16:17:37 -0500
Branch: REL9_4_STABLE [eb9d1f050] 2020-01-17 16:17:39 -0500
-->
<para>
Fix possible crash with a SubPlan (sub-<literal>SELECT</literal>)
within a multi-row <literal>VALUES</literal> list (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4ac8aaa36] 2020-01-08 09:42:53 -0500
Branch: REL_12_STABLE [c24f3b70e] 2020-01-08 09:42:53 -0500
-->
<para>
Fix failure in <command>ALTER TABLE</command> when a column
referenced in a <literal>GENERATED</literal> expression has been
added or changed in type earlier in the
same <command>ALTER</command> command (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [bf6cc19e3] 2020-02-05 20:21:20 +0000
Branch: REL_12_STABLE [0e37489ed] 2020-02-05 20:08:11 +0000
Branch: REL_11_STABLE [d8f1c03a4] 2020-02-05 20:15:13 +0000
-->
<para>
Fix failure to insert default values for <quote>missing</quote>
attributes during tuple conversion (Vik Fearing, Andrew Gierth)
</para>
<para>
This could result in values incorrectly reading as NULL, when
they come from columns that had been added by <literal>ALTER
TABLE ADD COLUMN</literal> with a constant default.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [7bb3102ce] 2019-12-14 16:32:03 +1300
Branch: REL_12_STABLE [c3dc0cdd6] 2019-12-14 16:34:21 +1300
Branch: master [7c85be08a] 2019-12-14 18:35:58 +1300
Branch: REL_12_STABLE [fd005e1a8] 2019-12-14 19:03:44 +1300
-->
<para>
Fix unlikely panic in the checkpointer process, caused by opening
relation segments that might already have been removed (Thomas Munro)
</para>
</listitem>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [38fc05607] 2020-01-10 18:31:22 -0800
Branch: REL_12_STABLE [93078e63f] 2020-01-10 18:31:25 -0800
Branch: REL_11_STABLE [2e86e154d] 2020-01-10 18:31:26 -0800
Branch: REL_10_STABLE [cb9774245] 2020-01-10 18:31:26 -0800
-->
<para>
Fix crash after FileClose() failure (Noah Misch)
</para>
<para>
This issue could only be observed
with <varname>data_sync_retry</varname> enabled, since otherwise
FileClose() failure would be reported as a PANIC.
</para>
</listitem>
<listitem>
<!--
Author: Etsuro Fujita <efujita@postgresql.org>
Branch: master [5a20b0219] 2019-12-10 18:00:30 +0900
Branch: REL_12_STABLE [547e454cb] 2019-12-10 18:00:31 +0900
-->
<para>
Fix handling of multiple <literal>AFTER ROW</literal> triggers on a
foreign table (Etsuro Fujita)
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [affdde2e1] 2020-01-20 23:26:51 -0800
Branch: REL_12_STABLE [21fdfd0e8] 2020-01-20 23:29:35 -0800
Branch: REL_11_STABLE [c8e0e560e] 2020-01-20 23:29:38 -0800
Branch: REL_10_STABLE [8bb006a41] 2020-01-20 23:30:47 -0800
Branch: REL9_6_STABLE [d4c339924] 2020-01-20 23:31:48 -0800
Branch: REL9_5_STABLE [f651976d9] 2020-01-20 23:31:52 -0800
Branch: REL9_4_STABLE [ba1dfbe22] 2020-01-20 23:32:21 -0800
-->
<para>
Fix unlikely crash with pass-by-reference aggregate transition
states (Andres Freund, Teodor Sigaev)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4c70098ff] 2020-01-23 13:42:09 -0500
Branch: REL_12_STABLE [be13f227f] 2020-01-23 13:42:10 -0500
Branch: REL_11_STABLE [fb12aefaa] 2020-01-23 13:42:10 -0500
Branch: REL_10_STABLE [212b870d6] 2020-01-23 13:42:10 -0500
Branch: REL9_6_STABLE [9e24575f6] 2020-01-23 13:42:10 -0500
Branch: REL9_5_STABLE [a576f2a8f] 2020-01-23 13:42:10 -0500
Branch: REL9_4_STABLE [600b953d7] 2020-01-23 13:42:10 -0500
Branch: master [9a3a75cb8] 2020-01-23 16:15:32 -0500
Branch: REL_12_STABLE [f309c812e] 2020-01-23 16:15:32 -0500
Branch: REL_11_STABLE [7a9fef299] 2020-01-23 16:15:32 -0500
Branch: REL_10_STABLE [d6a9548b2] 2020-01-23 16:15:32 -0500
Branch: REL9_6_STABLE [451f50813] 2020-01-23 16:15:32 -0500
Branch: REL9_5_STABLE [0e63d9641] 2020-01-23 16:15:32 -0500
Branch: REL9_4_STABLE [8fc33e6cc] 2020-01-23 16:15:32 -0500
-->
<para>
Improve error reporting in <function>to_date()</function>
and <function>to_timestamp()</function>
(Tom Lane, Álvaro Herrera)
</para>
<para>
Reports about incorrect month or day names in input strings could
truncate the input in the middle of a multi-byte character, leading
to an improperly encoded error message that could cause follow-on
failures. Truncate at the next whitespace instead.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [1a3efa1eb] 2019-12-12 12:30:43 -0500
Branch: REL_12_STABLE [07c4b6ac7] 2019-12-12 12:30:44 -0500
Branch: REL_11_STABLE [332584da9] 2019-12-12 12:30:44 -0500
Branch: REL_10_STABLE [c965c42a5] 2019-12-12 12:30:44 -0500
Branch: REL9_6_STABLE [6e2ac8d66] 2019-12-12 12:30:44 -0500
Branch: REL9_5_STABLE [323c47925] 2019-12-12 12:30:44 -0500
Branch: REL9_4_STABLE [6aa126311] 2019-12-12 12:30:44 -0500
-->
<para>
Fix off-by-one result for <literal>EXTRACT(ISOYEAR
FROM <replaceable>timestamp</replaceable>)</literal> for BC dates
(Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d57d61533] 2019-11-13 15:53:53 -0500
Branch: REL_12_STABLE [5a6eea092] 2019-11-13 15:53:53 -0500
-->
<para>
Ensure that the <literal><></literal> operator for
type <type>char</type> reports indeterminate-collation errors as
such, rather than as <quote>cache lookup failed for collation
0</quote> (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [cb5b28613] 2020-02-07 22:06:31 +0900
Branch: REL_12_STABLE [598b466e8] 2020-02-07 22:07:44 +0900
Branch: REL_12_STABLE [4faea7fdf] 2020-02-08 12:29:38 +0900
-->
<para>
Avoid treating TID scans as sequential scans (Tatsuhito Kasahara)
</para>
<para>
A refactoring oversight caused TID scans (selection by CTID) to be
counted as sequential scans in the statistics views, and to take
whole-table predicate locks as sequential scans do. The latter
behavior could cause unnecessary serialization errors in
serializable transaction mode.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4a0aab14d] 2019-11-21 16:21:43 -0500
Branch: REL_12_STABLE [5186f7625] 2019-11-21 16:21:43 -0500
Branch: REL_11_STABLE [669138ebd] 2019-11-21 16:21:44 -0500
Branch: REL_10_STABLE [b9f3d7a53] 2019-11-21 16:21:44 -0500
Branch: REL9_6_STABLE [52434ba73] 2019-11-21 16:21:44 -0500
Branch: REL9_5_STABLE [bcd541897] 2019-11-21 16:21:44 -0500
Branch: REL9_4_STABLE [f09829017] 2019-11-21 16:21:44 -0500
-->
<para>
Avoid stack overflow in <literal>information_schema</literal> views
when a self-referential view exists in the system catalogs
(Tom Lane)
</para>
<para>
A self-referential view can't work; it will always result in
infinite recursion. We handled that situation correctly when
trying to execute the view, but not when inquiring whether it is
automatically updatable.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [b175bd59f] 2020-01-07 17:38:48 -0300
Branch: REL_12_STABLE [fce9ba819] 2020-01-07 17:38:48 -0300
Branch: REL_11_STABLE [896db774e] 2020-01-07 17:38:48 -0300
Branch: REL_10_STABLE [8de3b68fa] 2020-01-07 17:55:21 -0300
Branch: master [f5d28710c] 2020-01-08 14:33:49 -0300
Branch: REL_12_STABLE [20c4df8c8] 2020-01-08 14:33:49 -0300
Branch: REL_11_STABLE [af43581e8] 2020-01-08 14:33:49 -0300
Branch: REL_10_STABLE [da42b9f3f] 2020-01-08 14:33:49 -0300
-->
<para>
Ensure that walsender processes always show NULL for transaction
start time in <structname>pg_stat_activity</structname>
(Álvaro Herrera)
</para>
<para>
Previously, the <structfield>xact_start</structfield> column would
sometimes show the process start time.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [e69d64454] 2019-12-24 13:05:43 +1300
Branch: REL_12_STABLE [8052aaf52] 2019-12-24 13:07:54 +1300
Branch: REL_11_STABLE [9e551a14c] 2019-12-24 13:09:56 +1300
Branch: REL_10_STABLE [8e89bc6df] 2019-12-24 13:11:13 +1300
Branch: REL9_6_STABLE [15861deb6] 2019-12-24 13:12:50 +1300
Branch: REL9_5_STABLE [893eaf0be] 2019-12-24 13:13:13 +1300
Branch: REL9_4_STABLE [5c0a132cf] 2019-12-24 13:13:30 +1300
-->
<para>
Improve performance of hash joins with very large inner relations
(Thomas Munro)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e369f3708] 2020-01-06 16:42:20 -0500
Branch: REL_12_STABLE [b89845267] 2020-01-06 16:42:20 -0500
-->
<para>
Reduce spinlock contention when there are many active walsender
processes (Pierre Ducroquet)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7d91b604d] 2020-02-04 13:07:13 -0500
Branch: REL_12_STABLE [9a85860e1] 2020-02-04 13:07:13 -0500
Branch: REL_11_STABLE [842a23efa] 2020-02-04 13:07:13 -0500
-->
<para>
Fix placement of <quote>Subplans Removed</quote> field
in <command>EXPLAIN</command> output (Daniel Gustafsson, Tom Lane)
</para>
<para>
In non-text output formats, this field was emitted inside
the <quote>Plans</quote> sub-group, resulting in syntactically
invalid output. Attach it to the parent Append or MergeAppend plan
node as intended. This causes the field to change position in text
output format too: if there are any InitPlans attached to the same
plan node, <quote>Subplans Removed</quote> will now appear before
those.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3ec20c709] 2020-01-26 16:32:19 -0500
Branch: REL_12_STABLE [bad494380] 2020-01-26 16:31:48 -0500
-->
<para>
Fix <command>EXPLAIN</command>'s <literal>SETTINGS</literal> option
to print as empty in non-text output formats (Tom Lane)
</para>
<para>
In the non-text output formats, fields are supposed to appear when
requested, even if they have empty or zero values.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [553d2ec27] 2019-11-26 14:41:48 -0500
Branch: REL_12_STABLE [21a4edd12] 2019-11-26 14:41:48 -0500
Branch: REL_11_STABLE [1d9056f56] 2019-11-26 14:41:48 -0500
-->
<para>
Allow the planner to apply potentially-leaky tests to child-table
statistics, if the user can read the corresponding column of the
table that's actually named in the query (Dilip Kumar, Amit Langote)
</para>
<para>
This change fixes a performance problem for partitioned tables that
was created by the fix for CVE-2017-7484. That security fix
disallowed applying leaky operators to statistics for columns that
the current user doesn't have permission to read directly. However,
it's somewhat common to grant permissions only on the parent
partitioned table and not bother to do so on individual partitions.
In such cases, the user can read the column via the parent, so
there's no point in this security restriction; it only results in
poorer planner estimates than necessary.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6ea364e7e] 2019-12-14 13:49:15 -0500
Branch: REL_12_STABLE [d04e2553d] 2019-12-14 13:49:15 -0500
-->
<para>
Fix planner errors induced by overly-aggressive collapsing of joins
to single-row subqueries (Tom Lane)
</para>
<para>
This mistake led to errors such as <quote>failed to construct the
join relation</quote>.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [b3c265d7b] 2019-11-19 17:03:34 -0500
Branch: REL_12_STABLE [bffe18e3e] 2019-11-19 17:03:35 -0500
-->
<para>
Fix <quote>no = operator for
opfamily <replaceable>NNNN</replaceable></quote> planner error when
trying to match a <literal>LIKE</literal> or regex pattern-match
operator to a binary-compatible index opclass (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [652686a33] 2020-01-12 14:36:59 -0500
Branch: REL_12_STABLE [70c17a812] 2020-01-12 14:37:00 -0500
Branch: REL_11_STABLE [5832be6ca] 2020-01-12 14:37:00 -0500
Branch: REL_10_STABLE [8c8b456b5] 2020-01-12 14:37:00 -0500
Branch: REL9_6_STABLE [2dd10477c] 2020-01-12 14:37:00 -0500
Branch: REL9_5_STABLE [784c58da1] 2020-01-12 14:37:00 -0500
Branch: REL9_4_STABLE [6bd567b65] 2020-01-12 14:37:00 -0500
-->
<para>
Fix edge-case crashes and misestimations in selectivity calculations
for the <literal><@</literal> and <literal>@></literal> range
operators (Michael Paquier, Andrey Borodin, Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [c676e659b] 2019-11-28 22:20:45 +0100
Branch: REL_12_STABLE [ef3fed2ce] 2019-11-28 22:26:25 +0100
Branch: master [6d61c3f1c] 2019-11-28 23:25:14 +0100
Branch: REL_12_STABLE [79d6e6afa] 2019-11-28 23:28:53 +0100
-->
<para>
Fix incorrect estimation for <literal>OR</literal> clauses when
using most-common-value extended statistics (Tomas Vondra)
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [d482f7f86] 2019-11-16 01:17:15 +0100
Branch: REL_12_STABLE [28555a53c] 2019-11-16 01:25:14 +0100
Branch: REL_11_STABLE [25a9ff6ca] 2019-11-16 01:58:38 +0100
Branch: REL_10_STABLE [0b0f281cc] 2019-11-16 01:42:20 +0100
-->
<para>
Ignore system columns when applying most-common-value
extended statistics (Tomas Vondra)
</para>
<para>
This prevents <quote>negative bitmapset member not allowed</quote>
planner errors for affected queries.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [168d20640] 2019-11-21 10:23:28 +0900
Branch: REL_12_STABLE [c644407f7] 2019-11-21 10:23:38 +0900
Branch: REL_11_STABLE [62074a343] 2019-11-21 10:23:43 +0900
Branch: REL_10_STABLE [f4095026c] 2019-11-21 10:23:49 +0900
-->
<para>
Fix BRIN index logic to support hypothetical BRIN indexes
(Julien Rouhaud, Heikki Linnakangas)
</para>
<para>
Previously, if an <quote>index adviser</quote> extension tried to
get the planner to produce a plan involving a hypothetical BRIN
index, that would fail, because the BRIN cost estimation code would
always try to physically access the index's metapage. Now it checks
to see if the index is only hypothetical, and uses default
assumptions about the index parameters if so.
</para>
</listitem>
<listitem>
<!--
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
Branch: master [d751ba523] 2020-01-14 09:52:21 +0000
Branch: REL_12_STABLE [fd5476b79] 2020-01-14 09:51:28 +0000
Branch: REL_11_STABLE [9bdb1f0e3] 2020-01-14 09:50:51 +0000
Branch: REL_10_STABLE [353cd826f] 2020-01-14 09:50:13 +0000
Branch: REL9_6_STABLE [fd87262de] 2020-01-14 09:49:23 +0000
Branch: REL9_5_STABLE [bb09a9414] 2020-01-14 09:48:44 +0000
Branch: REL9_4_STABLE [9be6fcb3e] 2020-01-14 09:47:44 +0000
-->
<para>
Improve error reporting for attempts to use automatic updating of
views with conditional <literal>INSTEAD</literal> rules (Dean Rasheed)
</para>
<para>
This has never been supported, but previously the error was thrown
only at execution time, so that it could be masked by planner errors.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [fc7695891] 2019-12-23 12:08:23 -0500
Branch: REL_12_STABLE [976cb11f6] 2019-12-23 12:08:23 -0500
Branch: REL_11_STABLE [31dfa40a8] 2019-12-23 12:08:24 -0500
Branch: REL_10_STABLE [4af2531d0] 2019-12-23 12:08:24 -0500
Branch: REL9_6_STABLE [354d913f9] 2019-12-23 12:08:24 -0500
Branch: REL9_5_STABLE [6609c3ad9] 2019-12-23 12:08:24 -0500
Branch: REL9_4_STABLE [0d245d13c] 2019-12-23 12:08:24 -0500
Branch: master [74b35eb46] 2020-01-31 17:03:55 -0500
Branch: REL_12_STABLE [65aa15513] 2020-01-31 17:03:55 -0500
Branch: REL_11_STABLE [25dc267a1] 2020-01-31 17:03:55 -0500
Branch: REL_10_STABLE [de3d2df75] 2020-01-31 17:03:55 -0500
Branch: REL9_6_STABLE [742c646c1] 2020-01-31 17:03:55 -0500
Branch: REL9_5_STABLE [59047b6d0] 2020-01-31 17:03:55 -0500
Branch: REL9_4_STABLE [f521ef0ae] 2020-01-31 17:03:55 -0500
-->
<para>
Prevent a composite type from being included in itself indirectly
via a range type (Tom Lane, Julien Rouhaud)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [39ebb943d] 2019-12-23 12:53:12 -0500
Branch: REL_12_STABLE [7fbb39a96] 2019-12-23 12:53:13 -0500
Branch: REL_11_STABLE [281dd22ac] 2019-12-23 12:53:13 -0500
Branch: REL_10_STABLE [ea1205a02] 2019-12-23 12:53:13 -0500
-->
<para>
Disallow partition key expressions that return pseudo-types, such
as <type>record</type> (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [2acab054b] 2019-12-17 17:44:27 -0500
Branch: REL_12_STABLE [97ba30fab] 2019-12-17 17:44:28 -0500
Branch: REL_11_STABLE [fc449abc3] 2019-12-17 17:44:28 -0500
Branch: REL_10_STABLE [5c5a268c6] 2019-12-17 17:44:28 -0500
Branch: REL9_6_STABLE [275a8ac4f] 2019-12-17 17:44:28 -0500
Branch: REL9_5_STABLE [da5dd4218] 2019-12-17 17:44:28 -0500
Branch: REL9_4_STABLE [298d056d9] 2019-12-17 17:44:28 -0500
-->
<para>
Fix error reporting for index expressions of prohibited types
(Amit Langote)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [bf2efc55d] 2019-11-16 20:00:19 -0500
Branch: REL_12_STABLE [fcaf29d87] 2019-11-16 20:00:19 -0500
Branch: REL_11_STABLE [d898edf4f] 2019-11-16 20:00:19 -0500
Branch: REL_10_STABLE [a1b2cf095] 2019-11-16 20:00:19 -0500
Branch: REL9_6_STABLE [e4865bbdc] 2019-11-16 20:00:19 -0500
Branch: REL9_5_STABLE [ecb533af6] 2019-11-16 20:00:20 -0500
Branch: REL9_4_STABLE [65da6dd1d] 2019-11-16 20:00:20 -0500
-->
<para>
Fix dumping of views that contain only a <literal>VALUES</literal>
list to handle cases where a view output column has been renamed
(Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [2c7b5dad6] 2019-11-13 12:11:49 -0500
Branch: REL_12_STABLE [eec569fac] 2019-11-13 12:11:49 -0500
Branch: REL_11_STABLE [94a9cb43f] 2019-11-13 12:11:49 -0500
Branch: REL_10_STABLE [e25c4b3b2] 2019-11-13 12:11:50 -0500
-->
<para>
Ensure that data types and collations used
in <literal>XMLTABLE</literal> constructs are accounted for when
computing dependencies of a view or rule (Tom Lane)
</para>
<para>
Previously it was possible to break a view
using <literal>XMLTABLE</literal> by dropping a type, if the type
was not otherwise referenced in the view. This fix does not
correct the dependencies already recorded for existing views, only
for newly-created ones.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [7618eaf5f] 2019-11-13 13:41:04 -0500
Branch: REL_12_STABLE [d9802590a] 2019-11-13 13:41:04 -0500
Branch: REL_11_STABLE [d66e68207] 2019-11-13 13:41:04 -0500
Branch: REL_10_STABLE [4be69e2ea] 2019-11-13 13:41:04 -0500
-->
<para>
Prevent unwanted downcasing and truncation of RADIUS authentication
parameters (Marcos David)
</para>
<para>
The <filename>pg_hba.conf</filename> parser mistakenly treated these
fields as SQL identifiers, which in general they aren't.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [790026972] 2019-11-24 14:42:59 -0500
Branch: REL_12_STABLE [c47f498c9] 2019-11-24 14:42:59 -0500
Branch: REL_11_STABLE [377d1b95b] 2019-11-24 14:42:59 -0500
Branch: REL_10_STABLE [dbe15524b] 2019-11-24 14:42:59 -0500
Branch: REL9_6_STABLE [111298aa6] 2019-11-24 14:42:59 -0500
-->
<para>
Transmit incoming <command>NOTIFY</command> messages to the client
before sending <literal>ReadyForQuery</literal>, rather than after
(Tom Lane)
</para>
<para>
This change ensures that, with libpq and other client libraries that
act similarly to it, any notifications received during a transaction
will be available by the time the client thinks the transaction is
complete. This probably makes no difference in practical
applications (which would need to cope with asynchronous
notifications in any case); but it makes it easier to build test
cases with reproducible behavior.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [2c0cdc818] 2020-01-11 17:14:08 -0500
Branch: REL_12_STABLE [fde155424] 2020-01-11 17:14:08 -0500
-->
<para>
Fix bugs in handling of non-blocking I/O when using GSSAPI
encryption (Tom Lane)
</para>
<para>
These errors could result in dropping data (usually leading to
subsequent wire-protocol-violation errors) or in
a <quote>livelock</quote> situation where a sending process goes to
sleep although not all its data has been sent.
Moreover, <application>libpq</application> failed to keep separate
encryption state for each connection, creating the possibility for
failures in applications using multiple encrypted database
connections.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [e60b480d3] 2019-12-20 15:34:07 -0500
Branch: REL_12_STABLE [e8f60e6fe] 2019-12-20 15:34:07 -0500
Branch: REL_11_STABLE [1a77ea02d] 2019-12-20 15:34:08 -0500
Branch: REL_10_STABLE [d09cfa3e2] 2019-12-20 15:34:08 -0500
Branch: REL9_6_STABLE [c11bd6c10] 2019-12-20 15:34:08 -0500
Branch: REL9_5_STABLE [5e22a1111] 2019-12-20 15:34:08 -0500
Branch: REL9_4_STABLE [875c7d70d] 2019-12-20 15:34:08 -0500
-->
<para>
Allow <application>libpq</application> to parse all GSS-related
connection parameters even when the GSSAPI code hasn't been compiled
in (Tom Lane)
</para>
<para>
This makes the behavior similar to our SSL support, where it was
long ago deemed to be a good idea to always accept all the related
parameters, even if some are ignored or restricted due to lack of
the feature in a particular build.
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [3ff660bbe] 2019-11-30 14:51:27 +0100
Branch: REL_12_STABLE [0dafed6fe] 2019-11-30 15:04:02 +0100
Branch: REL_11_STABLE [9668bf5d5] 2019-11-30 15:05:31 +0100
Branch: REL_10_STABLE [f71b22f53] 2019-11-30 15:07:47 +0100
Branch: REL9_6_STABLE [c59414da7] 2019-11-30 15:10:14 +0100
Branch: REL9_5_STABLE [a17602de1] 2019-11-30 15:14:12 +0100
Branch: REL9_4_STABLE [d9b974e99] 2019-11-30 15:16:58 +0100
-->
<para>
Fix incorrect handling of <literal>%b</literal>
and <literal>%B</literal> format codes
in <application>ecpg</application>'s
<function>PGTYPEStimestamp_fmt_asc()</function> function
(Tomas Vondra)
</para>
<para>
Due to an off-by-one error, these codes would print the wrong month
name, or possibly crash.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [44f1fc8df] 2020-01-19 19:15:15 -0500
Branch: REL_12_STABLE [c7c2cc670] 2020-01-19 19:15:15 -0500
-->
<para>
Avoid crash after an out-of-memory failure
in <application>ecpglib</application> (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [2425f8f71] 2020-01-31 14:41:49 -0500
Branch: REL_12_STABLE [0c84199f7] 2020-01-31 14:41:49 -0500
Branch: REL_11_STABLE [63634883f] 2020-01-31 14:41:49 -0500
Branch: REL_10_STABLE [8b1d447a7] 2020-01-31 14:41:49 -0500
Branch: REL9_6_STABLE [cb4c04a4e] 2020-01-31 14:41:49 -0500
Branch: REL9_5_STABLE [1b78759a6] 2020-01-31 14:41:49 -0500
Branch: REL9_4_STABLE [5d60df830] 2020-01-31 14:41:49 -0500
-->
<para>
Fix
parallel <application>pg_dump</application>/<application>pg_restore</application>
to more gracefully handle failure to create worker processes
(Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [cd23a2019] 2020-01-20 12:57:17 -0500
Branch: REL_12_STABLE [71b121f42] 2020-01-20 12:57:17 -0500
Branch: REL_11_STABLE [4ea5cf403] 2020-01-20 12:57:17 -0500
Branch: REL_10_STABLE [6f6daa1be] 2020-01-20 12:57:17 -0500
Branch: REL9_6_STABLE [208e262f9] 2020-01-20 12:57:17 -0500
Branch: REL9_5_STABLE [b1392a950] 2020-01-20 12:57:17 -0500
Branch: REL9_4_STABLE [42e538fe6] 2020-01-20 12:57:18 -0500
-->
<para>
Prevent possible crash or lockup when attempting to terminate a
parallel <application>pg_dump</application>/<application>pg_restore</application>
run via a signal (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [29aeda6e4] 2019-11-13 11:35:37 -0500
Branch: REL_12_STABLE [1cd57b05e] 2019-11-13 11:35:37 -0500
Branch: REL_11_STABLE [8e4ef3287] 2019-11-13 11:35:37 -0500
Branch: REL_10_STABLE [c443e3c43] 2019-11-13 11:35:37 -0500
Branch: REL9_6_STABLE [f378d4dac] 2019-11-13 11:35:37 -0500
Branch: REL9_5_STABLE [fb26754af] 2019-11-13 11:35:37 -0500
Branch: REL9_4_STABLE [56c06999d] 2019-11-13 11:35:37 -0500
-->
<para>
In <application>pg_upgrade</application>, look inside arrays and
ranges while searching for non-upgradable data types in tables
(Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [8fa8e0115] 2020-02-10 12:14:58 -0300
Branch: REL_12_STABLE [87d014da9] 2020-02-10 12:14:58 -0300
Branch: REL_11_STABLE [ca902add6] 2020-02-10 12:14:58 -0300
Branch: REL_10_STABLE [163161723] 2020-02-10 12:14:58 -0300
Branch: REL9_6_STABLE [5575fc208] 2020-02-10 12:14:58 -0300
Branch: REL9_5_STABLE [1b2ae4bcd] 2020-02-10 12:16:40 -0300
Branch: REL9_4_STABLE [6f1e443a6] 2020-02-10 12:14:58 -0300
-->
<para>
Apply more thorough syntax checking
to <application>createuser</application>'s
<option>--connection-limit</option> option (Álvaro Herrera)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [4ba4bfaf2] 2019-12-26 15:19:39 -0500
Branch: REL_12_STABLE [883c27a1c] 2019-12-26 15:19:39 -0500
Branch: REL_11_STABLE [ee206cb83] 2019-12-26 15:19:39 -0500
-->
<para>
Cope with changes of the specific type referenced by a PL/pgSQL
composite-type variable in more cases (Ashutosh Sharma, Tom Lane)
</para>
<para>
Dropping and re-creating the composite type referenced by a PL/pgSQL
variable could lead to <quote>could not open relation with
OID <replaceable>NNNN</replaceable></quote> errors.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [215824f91] 2020-01-26 14:31:08 -0500
Branch: REL_12_STABLE [7294f99a0] 2020-01-26 14:31:08 -0500
Branch: REL_11_STABLE [5220ced0d] 2020-01-26 14:31:08 -0500
Branch: REL_10_STABLE [603e03b4c] 2020-01-26 14:31:08 -0500
Branch: REL9_6_STABLE [43a648f57] 2020-01-26 14:31:08 -0500
-->
<para>
Avoid crash in <filename>postgres_fdw</filename> when trying to
send a command like <literal>UPDATE remote_tab SET (x,y) = (SELECT
...)</literal> to the remote server (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [b52739436] 2019-12-03 18:40:07 +0100
Branch: REL_12_STABLE [a8a8c6b29] 2019-12-03 18:40:48 +0100
Branch: REL_11_STABLE [267eb954c] 2019-12-03 18:41:29 +0100
Branch: REL_10_STABLE [46ce37b67] 2019-12-03 18:41:50 +0100
Branch: REL9_6_STABLE [fabdad822] 2019-12-03 18:42:25 +0100
Branch: REL9_5_STABLE [a2fdeb786] 2019-12-03 18:42:54 +0100
Branch: REL9_4_STABLE [44381b1af] 2019-12-03 18:43:15 +0100
-->
<para>
In <filename>contrib/dict_int</filename>,
reject <varname>maxlen</varname> settings less than one
(Tomas Vondra)
</para>
<para>
This prevents a possible crash with silly settings for that parameter.
</para>
</listitem>
<listitem>
<!--
Author: Joe Conway <mail@joeconway.com>
Branch: master [d5b9c2baf] 2019-12-23 13:33:25 -0500
Branch: REL_12_STABLE [b5e7569dd] 2019-12-23 13:33:34 -0500
Branch: REL_11_STABLE [f49e5efbc] 2019-12-23 13:33:42 -0500
Branch: REL_10_STABLE [81be0c57e] 2019-12-23 13:33:50 -0500
Branch: REL9_6_STABLE [3757c1640] 2019-12-23 13:33:57 -0500
Branch: REL9_5_STABLE [70fc6c4ef] 2019-12-23 13:34:05 -0500
Branch: REL9_4_STABLE [4a3cdb531] 2019-12-23 13:34:12 -0500
-->
<para>
Disallow NULL category values
in <filename>contrib/tablefunc</filename>'s
<function>crosstab()</function> function (Joe Conway)
</para>
<para>
This case never worked usefully, and it would crash on some
platforms.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [7d0bcb047] 2019-12-06 15:13:55 +0900
Branch: REL_12_STABLE [902276ff1] 2019-12-06 15:14:26 +0900
Branch: REL_11_STABLE [7ad544fd8] 2019-12-06 15:14:31 +0900
-->
<para>
Fix <application>configure</application>'s probe for
OpenSSL's <function>SSL_clear_options()</function> function so that
it works with OpenSSL versions before 1.1.0 (Michael Paquier, Daniel
Gustafsson)
</para>
<para>
This problem could lead to failure to set the SSL compression option
as desired, when <productname>PostgreSQL</productname> is built against
an old version of OpenSSL.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [62c9b5223] 2020-01-21 13:46:39 +0900
Branch: REL_12_STABLE [ef8e6b2c2] 2020-01-21 13:46:55 +0900
Branch: REL_11_STABLE [7c7026bb7] 2020-01-21 13:47:01 +0900
Branch: REL_10_STABLE [1ef7332b7] 2020-01-21 13:47:05 +0900
Branch: REL9_6_STABLE [9740cdbe5] 2020-01-21 13:47:10 +0900
Branch: REL9_5_STABLE [4a49149b9] 2020-01-21 13:47:13 +0900
Branch: REL9_4_STABLE [dbe405b78] 2020-01-21 13:47:17 +0900
-->
<para>
Mark some timeout and statistics-tracking GUC variables
as <literal>PGDLLIMPORT</literal>, to allow extensions to access
them on Windows (Pascal Legrand)
</para>
<para>
This applies to
<literal>idle_in_transaction_session_timeout</literal>,
<literal>lock_timeout</literal>,
<literal>statement_timeout</literal>,
<literal>track_activities</literal>,
<literal>track_counts</literal>, and
<literal>track_functions</literal>.
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [543852fd8] 2020-01-17 15:29:11 +0100
Branch: REL_12_STABLE [162c951df] 2020-01-17 15:30:51 +0100
Branch: REL_11_STABLE [8c37e4469] 2020-01-17 15:31:33 +0100
Branch: REL_10_STABLE [a801452c9] 2020-01-17 15:32:03 +0100
-->
<para>
Avoid memory leak in sanity checks for <quote>slab</quote> memory
contexts (Tomas Vondra)
</para>
<para>
This isn't an issue for production builds, since they wouldn't
ordinarily have memory context checking enabled; but the leak could
be quite severe in a debug build.
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [3ccc66dac] 2020-02-06 14:43:21 +0900
Branch: REL_12_STABLE [3d214a8e5] 2020-02-06 14:44:22 +0900
Branch: REL_11_STABLE [ac25e1044] 2020-02-06 14:44:40 +0900
Branch: REL_10_STABLE [c17abac60] 2020-02-06 14:44:59 +0900
-->
<para>
Fix multiple statistics entries reported by the LWLock statistics
mechanism (Fujii Masao)
</para>
<para>
The LWLock statistics code (which is not built by default; it
requires compiling with <option>-DLWLOCK_STATS</option>)
could report multiple entries for the same LWLock and backend
process, as a result of faulty hashtable key creation.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [28e6a2fd6] 2019-12-09 15:03:51 -0500
Branch: REL_12_STABLE [001362cfd] 2019-12-09 15:03:51 -0500
Branch: REL_11_STABLE [2ed302ab9] 2019-12-09 15:03:51 -0500
Branch: REL_10_STABLE [096ea540e] 2019-12-09 15:03:52 -0500
Branch: REL9_6_STABLE [df44e411c] 2019-12-09 15:03:52 -0500
Branch: REL9_5_STABLE [1a0c65120] 2019-12-09 15:03:52 -0500
Branch: REL9_4_STABLE [7309e75fa] 2019-12-09 15:03:52 -0500
-->
<para>
Fix race condition that led to delayed delivery of interprocess
signals on Windows (Amit Kapila)
</para>
<para>
This caused visible timing oddities in <command>NOTIFY</command>,
and perhaps other misbehavior.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [6969deeb8] 2019-11-20 18:29:37 +1300
Branch: REL_12_STABLE [2189f49c4] 2019-11-20 18:30:56 +1300
-->
<para>
Fix handling of a corner-case error result from
Windows' <function>ReadFile()</function> function
(Thomas Munro, Juan José Santamaría Flecha)
</para>
<para>
So far as is known, this oversight just resulted in noisy log
messages, not any actual query misbehavior.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [6d7547c21] 2019-12-16 15:10:55 -0500
Branch: REL_12_STABLE [95f43fee9] 2019-12-16 15:10:55 -0500
Branch: REL_11_STABLE [2cf51809b] 2019-12-16 15:10:55 -0500
Branch: REL_10_STABLE [81b052c31] 2019-12-16 15:10:55 -0500
Branch: REL9_6_STABLE [65cb25e4f] 2019-12-16 15:10:55 -0500
Branch: REL9_5_STABLE [cd0380351] 2019-12-16 15:10:55 -0500
Branch: REL9_4_STABLE [cfb2a4cce] 2019-12-16 15:10:56 -0500
Branch: master [5406513e9] 2019-12-21 17:39:36 -0500
Branch: REL_12_STABLE [90281a3a2] 2019-12-21 17:39:36 -0500
Branch: REL_11_STABLE [b3c4e2418] 2019-12-21 17:39:36 -0500
Branch: REL_10_STABLE [a69f5697a] 2019-12-21 17:39:36 -0500
Branch: REL9_6_STABLE [739201b0e] 2019-12-21 17:39:36 -0500
Branch: REL9_5_STABLE [35b28d983] 2019-12-21 17:39:37 -0500
Branch: REL9_4_STABLE [f1a4020ef] 2019-12-21 17:39:37 -0500
-->
<para>
On Windows, retry a few times after
an <literal>ERROR_ACCESS_DENIED</literal> file access failure
(Alexander Lakhin, Tom Lane)
</para>
<para>
This helps cope with cases where a file open attempt fails because
the targeted file is flagged for deletion but not yet actually gone.
<application>pg_ctl</application>, for example, frequently failed
with such an error when probing to see if the postmaster had shut
down yet.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [0da33c762] 2019-12-10 13:17:08 -0500
Branch: REL_12_STABLE [be9d4b928] 2019-12-10 13:17:08 -0500
-->
<para>
On Windows, work around sharing violations for the postmaster's log
file when <application>pg_ctl</application> is used to start the
postmaster very shortly after it's been stopped, for example by
<literal>pg_ctl restart</literal> (Alexander Lakhin)
</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
<sect1 id="release-12-1">
<title>Release 12.1</title>
<formalpara>
<title>Release date:</title>
<para>2019-11-14</para>
</formalpara>
<para>
This release contains a variety of fixes from 12.0.
For information about new features in major release 12, see
<xref linkend="release-12"/>.
</para>
<sect2>
<title>Migration to Version 12.1</title>
<para>
A dump/restore is not required for those running 12.X.
</para>
</sect2>
<sect2>
<title>Changes</title>
<itemizedlist>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [93765bd95] 2019-10-09 22:00:50 -0700
Branch: REL_12_STABLE [f224c7c11] 2019-10-09 22:13:48 -0700
Branch: master [ae5cae54c] 2019-10-16 02:37:34 -0700
Branch: REL_12_STABLE [3b25de620] 2019-10-16 02:38:13 -0700
-->
<para>
Fix crash when <command>ALTER TABLE</command> adds a column without
a default value along with making other changes that require a table
rewrite (Andres Freund)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [5d3500da7] 2019-10-23 15:04:48 +0900
Branch: REL_12_STABLE [7668d4847] 2019-10-23 15:05:09 +0900
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [8270a0d9a] 2019-10-25 10:20:08 +0900
Branch: REL_12_STABLE [7f84b0ef0] 2019-10-25 10:20:16 +0900
-->
<para>
Fix lock handling in <command>REINDEX CONCURRENTLY</command>
(Michael Paquier)
</para>
<para>
<command>REINDEX CONCURRENTLY</command> neglected to take a
session-level lock on the new index version, potentially allowing
other sessions to manipulate it too soon.
Also, a query-cancel or session-termination interrupt arriving at the
wrong time could result in failure to release the session-level
locks that <command>REINDEX CONCURRENTLY</command> does hold.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [0d21f919e] 2019-10-16 14:51:34 +0200
Branch: REL_12_STABLE [1cd5bc3cc] 2019-10-16 14:51:23 +0200
-->
<para>
Avoid crash due to race condition when reporting the progress of
a <command>CREATE INDEX CONCURRENTLY</command> or <command>REINDEX
CONCURRENTLY</command> command (Álvaro Herrera)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [68ac9cf24] 2019-10-28 11:57:31 +0900
Branch: REL_12_STABLE [5e5f32284] 2019-10-28 11:58:29 +0900
-->
<para>
Avoid creating duplicate dependency entries during <command>REINDEX
CONCURRENTLY</command> (Michael Paquier)
</para>
<para>
This bug resulted in bloat in <structname>pg_depend</structname>,
but no worse consequences than that.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [6bda2af03] 2019-10-17 09:59:21 +1300
Branch: REL_12_STABLE [486a8f152] 2019-10-17 11:08:49 +1300
Branch: REL_11_STABLE [6f1e336de] 2019-10-17 11:01:35 +1300
Branch: REL_10_STABLE [583d86f92] 2019-10-17 10:55:26 +1300
Branch: REL9_6_STABLE [0640f032a] 2019-10-17 11:57:33 +1300
Branch: REL9_5_STABLE [c1443eebe] 2019-10-17 10:28:28 +1300
Branch: REL9_4_STABLE [080cf32d2] 2019-10-17 10:14:51 +1300
-->
<para>
Prevent <command>VACUUM</command> from trying to freeze
an old multixact ID involving a still-running transaction
(Nathan Bossart, Jeremy Schneider)
</para>
<para>
This case would lead to <command>VACUUM</command> failing until the
old transaction terminates.
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [cef82eda1] 2019-10-15 10:40:13 -0700
Branch: REL_12_STABLE [6d3fe6b6b] 2019-10-15 10:40:51 -0700
-->
<para>
Fix <quote>wrong type of slot</quote> error when trying
to <command>CLUSTER</command> on an expression index (Andres Freund)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [b4bcc6bfd] 2019-11-07 13:59:24 -0300
Branch: REL_12_STABLE [b75ccddcd] 2019-11-07 13:59:24 -0300
Branch: REL_11_STABLE [e4baecf1e] 2019-11-07 14:26:10 -0300
-->
<para>
<command>SET CONSTRAINTS ... DEFERRED</command> failed on
partitioned tables, incorrectly complaining about lack of triggers
(Álvaro Herrera)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [dc816e581] 2019-11-02 14:16:04 +0900
Branch: REL_12_STABLE [7963c4c4b] 2019-11-02 14:16:11 +0900
Branch: REL_11_STABLE [f10815c5b] 2019-11-02 14:17:12 +0900
-->
<para>
Fix failure when creating indexes for a partition, if the parent
partitioned table contains any dropped columns (Michael Paquier)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [1df5875d3] 2019-10-13 17:51:55 +0900
Branch: REL_12_STABLE [3a58c5f14] 2019-10-13 17:53:08 +0900
Branch: master [14ac4237c] 2019-10-14 08:58:38 +0900
Branch: REL_12_STABLE [9fd9af97f] 2019-10-14 08:58:47 +0900
-->
<para>
Fix dropping of indexed columns in partitioned tables
(Amit Langote, Michael Paquier)
</para>
<para>
Previously this might fail with an error message complaining about
the dependencies of the indexes. It should automatically drop the
indexes, instead.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [d80be6f2f] 2019-10-29 11:08:09 +0900
Branch: REL_12_STABLE [eae1ba65f] 2019-10-29 11:08:16 +0900
-->
<para>
Ensure that a partition index can be dropped after a failure to
reindex it concurrently (Michael Paquier)
</para>
<para>
The
index's <structname>pg_class</structname>.<structfield>relispartition</structfield>
flag was left in the wrong state in such a case,
causing <command>DROP INDEX</command> to fail.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [529ebb20a] 2019-11-05 11:42:24 -0500
Branch: REL_12_STABLE [a9db37a18] 2019-11-05 11:42:25 -0500
-->
<para>
Fix handling of equivalence class members for partition-wise joins
(Amit Langote)
</para>
<para>
This oversight could lead either to failure to use a feasible
partition-wise join plan, or to a <quote>could not find pathkey item
to sort</quote> planner failure.
</para>
</listitem>
<listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [b7a1c5539] 2019-10-03 10:54:52 +0100
Branch: REL_12_STABLE [0b11dc019] 2019-10-03 11:12:39 +0100
Branch: REL_11_STABLE [0a445f279] 2019-10-03 11:14:30 +0100
Branch: REL_10_STABLE [ede0ab6cc] 2019-10-03 11:15:38 +0100
Branch: REL9_6_STABLE [6db0d7f35] 2019-10-03 11:17:38 +0100
Branch: REL9_5_STABLE [d2427f11b] 2019-10-03 11:18:15 +0100
Branch: REL9_4_STABLE [3473f81dd] 2019-10-03 11:18:20 +0100
-->
<para>
Ensure that offset expressions in <literal>WINDOW</literal> clauses
are processed when a query's expressions are manipulated (Andrew Gierth)
</para>
<para>
This oversight could result in assorted failures when the offsets
are nontrivial expressions. One example is that a function
parameter reference in such an expression would fail if the function
was inlined.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3887e9455] 2019-10-07 12:39:09 -0400
Branch: REL_12_STABLE [7e8d0eb63] 2019-10-07 12:39:09 -0400
Branch: REL_11_STABLE [021065aac] 2019-10-07 12:39:09 -0400
Branch: REL_10_STABLE [1b5c2ddcd] 2019-10-07 12:39:09 -0400
Branch: REL9_6_STABLE [c69e982a6] 2019-10-07 12:39:09 -0400
Branch: REL9_5_STABLE [8c2910ce5] 2019-10-07 12:39:10 -0400
-->
<para>
Avoid postmaster failure if a parallel query requests a background
worker when no postmaster child process array slots remain free
(Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [d986d4e87] 2019-10-04 13:50:49 -0700
Branch: REL_12_STABLE [60e97d63e] 2019-10-04 13:57:37 -0700
-->
<para>
Fix crash triggered by an EvalPlanQual recheck on a table with
a <literal>BEFORE UPDATE</literal> trigger (Andres Freund)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a30531c5c] 2019-11-05 13:40:37 -0500
Branch: REL_12_STABLE [791864193] 2019-11-05 13:40:37 -0500
Branch: REL_11_STABLE [2bfe015b5] 2019-11-05 13:40:37 -0500
-->
<para>
Fix <quote>unexpected relkind</quote> error when a query tries to
access a TOAST table (John Hsu, Michael Paquier, Tom Lane)
</para>
<para>
The error should say that permission is denied, but this case got
broken during code refactoring.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
Branch: master [3c8c55dd5] 2019-10-17 13:47:01 +1300
Branch: REL_12_STABLE [3af7c64fe] 2019-10-17 14:00:15 +1300
Branch: REL_11_STABLE [6737111a7] 2019-10-17 13:58:58 +1300
Branch: REL_10_STABLE [89a3cdb32] 2019-10-17 13:57:23 +1300
Branch: REL9_6_STABLE [fd5ffa425] 2019-10-17 13:52:59 +1300
Branch: REL9_5_STABLE [cdbb39213] 2019-10-17 13:50:59 +1300
-->
<para>
Provide a relevant error context line when an error occurs while
setting GUC parameters during parallel worker startup (Thomas Munro)
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [a586cc4b6] 2019-10-04 13:34:28 -0700
Branch: REL_12_STABLE [c025165da] 2019-10-04 13:34:39 -0700
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [b8e19b932] 2019-10-09 13:30:43 +0900
Branch: REL_12_STABLE [07c314968] 2019-10-09 13:31:13 +0900
Branch: REL_11_STABLE [e34358c43] 2019-10-09 13:31:17 +0900
Branch: REL_10_STABLE [fbfc835b4] 2019-10-09 13:31:22 +0900
Branch: REL9_6_STABLE [4e7a8874a] 2019-10-09 13:31:27 +0900
Branch: REL9_5_STABLE [c50f95272] 2019-10-09 13:31:33 +0900
Branch: REL9_4_STABLE [59800f7ce] 2019-10-09 13:31:38 +0900
-->
<para>
Ensure that <function>fsync()</function> is applied only to files
that are opened read/write (Andres Freund, Michael Paquier)
</para>
<para>
Some code paths tried to do this after opening a file read-only,
but on some platforms that causes <quote>bad file descriptor</quote>
or similar errors.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8e10405c7] 2019-10-03 17:34:25 -0400
Branch: REL_12_STABLE [8381242df] 2019-10-03 17:34:25 -0400
Branch: REL_11_STABLE [e5ff97571] 2019-10-03 17:34:25 -0400
Branch: REL_10_STABLE [226551e7c] 2019-10-03 17:34:26 -0400
Branch: REL9_6_STABLE [677989cc0] 2019-10-03 17:34:26 -0400
Branch: REL9_5_STABLE [54d641da0] 2019-10-03 17:34:26 -0400
Branch: REL9_4_STABLE [6899be289] 2019-10-03 17:34:26 -0400
-->
<para>
Allow encoding conversion to succeed on longer strings than before
(Álvaro Herrera, Tom Lane)
</para>
<para>
Previously, there was a hard limit of 0.25GB on the input string,
but now it will work as long as the converted output is not over 1GB.
</para>
</listitem>
<listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
Branch: master [a9056cc63] 2019-11-06 04:13:30 +0000
Branch: REL_12_STABLE [f57c63107] 2019-11-06 04:33:35 +0000
Branch: REL_11_STABLE [be99485b9] 2019-11-06 04:33:42 +0000
Branch: REL_10_STABLE [6da5310e8] 2019-11-06 04:33:49 +0000
Branch: REL9_6_STABLE [747aac88f] 2019-11-06 04:33:55 +0000
-->
<para>
Avoid creating unnecessarily-bulky tuple stores for window functions
(Andrew Gierth)
</para>
<para>
In some cases the tuple storage would include all columns of the
source table(s), not just the ones that are needed by the query.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c477f3e44] 2019-10-03 13:56:26 -0400
Branch: REL_12_STABLE [9a407209a] 2019-10-03 13:56:26 -0400
Branch: REL_11_STABLE [82d0a46ea] 2019-10-03 13:56:26 -0400
Branch: REL_10_STABLE [9ad1b572d] 2019-10-03 13:56:26 -0400
Branch: REL9_6_STABLE [e5e4f12a5] 2019-10-03 13:56:26 -0400
Branch: REL9_5_STABLE [1534531fe] 2019-10-03 13:56:26 -0400
Branch: REL9_4_STABLE [4829576ba] 2019-10-03 13:56:27 -0400
-->
<para>
Allow <function>repalloc()</function> to give back space when a
large chunk is reduced in size (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [df86e52ca] 2019-10-02 15:53:07 +0900
Branch: REL_12_STABLE [2a724cdbf] 2019-10-02 15:53:51 +0900
Branch: REL_11_STABLE [b978de0eb] 2019-10-02 15:53:56 +0900
Branch: REL_10_STABLE [7ca35472c] 2019-10-02 15:54:01 +0900
Branch: REL9_6_STABLE [ac1efdd08] 2019-10-02 15:54:11 +0900
Branch: REL9_5_STABLE [ae205dfe6] 2019-10-02 15:54:16 +0900
-->
<para>
Ensure that temporary WAL and history files are removed at the end
of archive recovery (Sawada Masahiko)
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [ec1259e88] 2019-10-18 22:32:18 +0900
Branch: REL_12_STABLE [9dfbf9a04] 2019-10-18 22:34:05 +0900
Branch: REL_11_STABLE [f7b70700b] 2019-10-18 22:35:07 +0900
Branch: REL_10_STABLE [c455ee88c] 2019-10-18 22:35:19 +0900
Branch: REL9_6_STABLE [579996bc2] 2019-10-18 22:35:30 +0900
Branch: REL9_5_STABLE [1b2ba8874] 2019-10-18 22:35:41 +0900
Branch: REL9_4_STABLE [14c59185b] 2019-10-18 22:35:52 +0900
-->
<para>
Avoid failure in archive recovery
if <varname>recovery_min_apply_delay</varname> is enabled
(Fujii Masao)
</para>
<para>
<varname>recovery_min_apply_delay</varname> is not typically used in
this configuration, but it should work.
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [20961ceaf] 2019-10-11 15:47:59 +0900
Branch: REL_12_STABLE [fcf7f8d92] 2019-10-11 15:49:32 +0900
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [9b95a36be] 2019-10-18 22:24:18 +0900
Branch: REL_12_STABLE [03666dfa1] 2019-10-18 22:25:42 +0900
-->
<para>
Ignore <varname>restore_command</varname>,
<varname>recovery_end_command</varname>,
and <varname>recovery_min_apply_delay</varname> settings during
crash recovery (Fujii Masao)
</para>
<para>
Now that these settings can be specified
in <filename>postgresql.conf</filename>, they could be turned on
during crash recovery, but honoring them then is undesirable.
Ignore these settings until crash recovery is complete.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
Branch: master [1c60e40ad] 2019-11-09 08:35:44 +0100
Branch: REL_12_STABLE [d891d2c89] 2019-11-09 08:35:51 +0100
Branch: REL_11_STABLE [7961da188] 2019-11-09 08:36:11 +0100
Branch: REL_10_STABLE [2e00d5976] 2019-11-09 09:15:35 +0100
Branch: master [ef8fcbff5] 2019-11-09 13:19:27 +0100
Branch: REL_12_STABLE [f96756304] 2019-11-09 16:00:34 +0100
Branch: REL_11_STABLE [aa9884578] 2019-11-09 16:01:23 +0100
Branch: REL_10_STABLE [806f9dc02] 2019-11-09 16:03:00 +0100
-->
<para>
Fix logical replication failure when publisher and subscriber have
different ideas about a table's replica identity columns
(Jehan-Guillaume de Rorthais, Peter Eisentraut)
</para>
<para>
Declaring a column as part of the replica identity on the
subscriber, when it does not exist at all on the publisher, led
to <quote>negative bitmapset member not allowed</quote> errors.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [38ddeab13] 2019-10-17 15:06:06 +0200
Branch: REL_12_STABLE [1391c13ce] 2019-10-17 15:06:06 +0200
Branch: REL_11_STABLE [45e4067c0] 2019-10-17 15:06:05 +0200
Branch: REL_10_STABLE [0d9fcbada] 2019-10-17 15:06:05 +0200
Branch: REL9_6_STABLE [5f038991e] 2019-10-17 15:06:05 +0200
Branch: REL9_5_STABLE [b2ab06e02] 2019-10-17 15:06:05 +0200
Branch: REL9_4_STABLE [abd5071d2] 2019-10-17 15:06:05 +0200
-->
<para>
Avoid unwanted delay during shutdown of a logical replication
walsender (Craig Ringer, Álvaro Herrera)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [3f60f690f] 2019-10-18 14:26:29 +0900
Branch: REL_12_STABLE [04510dbe3] 2019-10-18 14:26:53 +0900
Branch: REL_11_STABLE [feed5ee47] 2019-10-18 14:27:00 +0900
Branch: REL_10_STABLE [47698b4b6] 2019-10-18 14:27:04 +0900
-->
<para>
Fix timeout handling in logical replication walreceiver processes
(Julien Rouhaud)
</para>
<para>
Erroneous logic prevented <varname>wal_receiver_timeout</varname>
from working in logical replication deployments.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [5f6b1eb0c] 2019-11-06 16:12:21 +0900
Branch: REL_12_STABLE [9ae4bdadf] 2019-11-06 16:12:28 +0900
Branch: REL_11_STABLE [cb6d7f985] 2019-11-06 16:12:34 +0900
Branch: REL_10_STABLE [f7b0d0704] 2019-11-06 16:12:40 +0900
Branch: REL9_6_STABLE [16b43e091] 2019-11-06 16:12:47 +0900
Branch: REL9_5_STABLE [404d25f3c] 2019-11-06 16:12:51 +0900
Branch: REL9_4_STABLE [15d90a02a] 2019-11-06 16:12:56 +0900
-->
<para>
Correctly time-stamp replication messages for logical
decoding (Jeff Janes)
</para>
<para>
This oversight resulted, for example,
in <structname>pg_stat_subscription</structname>.<structfield>last_msg_send_time</structfield>
usually reading as NULL.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [20345197f] 2019-11-01 22:38:32 +0900
Branch: REL_12_STABLE [7b8c2de64] 2019-11-01 22:38:45 +0900
Branch: REL_11_STABLE [61f238392] 2019-11-01 22:38:51 +0900
Branch: REL_10_STABLE [b99bfc3c9] 2019-11-01 22:38:55 +0900
Branch: REL9_6_STABLE [52684bc7d] 2019-11-01 22:39:01 +0900
Branch: REL9_5_STABLE [0927d0c25] 2019-11-01 22:39:05 +0900
Branch: REL9_4_STABLE [f88f7206e] 2019-11-01 22:39:09 +0900
-->
<para>
Fix race condition during backend exit, when the backend process has
previously waited for synchronous replication to occur (Dongming Liu)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [3affe76ef] 2019-11-05 14:27:37 -0500
Branch: REL_12_STABLE [f9bd3b6d9] 2019-11-05 14:27:37 -0500
Branch: REL_11_STABLE [97ddc47b9] 2019-11-05 14:27:37 -0500
Branch: REL_10_STABLE [0238a5028] 2019-11-05 14:27:37 -0500
Branch: REL9_6_STABLE [383602f9a] 2019-11-05 14:27:37 -0500
Branch: REL9_5_STABLE [970372037] 2019-11-05 14:27:37 -0500
Branch: REL9_4_STABLE [762b25653] 2019-11-05 14:27:38 -0500
-->
<para>
Avoid logging complaints about abandoned connections when using PAM
authentication (Tom Lane)
</para>
<para>
libpq-based clients will typically make two connection attempts when
a password is required, since they don't prompt their user for a
password until their first connection attempt fails. Therefore the
server is coded not to generate useless log spam when a client
closes the connection upon being asked for a password. However,
the PAM authentication code hadn't gotten that memo, and would
generate several messages about a phantom authentication failure.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5ac0d9360] 2019-09-22 17:45:59 -0400
Branch: REL_12_STABLE Release: REL_12_0 [860216efa] 2019-09-22 17:46:00 -0400
Branch: REL_11_STABLE [7e7abed05] 2019-09-22 17:46:00 -0400
Branch: REL_10_STABLE [096d34c3b] 2019-09-22 17:46:00 -0400
Branch: REL9_6_STABLE [6ddd164aa] 2019-09-22 17:46:00 -0400
Branch: REL9_5_STABLE [35eb13270] 2019-09-22 17:46:00 -0400
Branch: REL9_4_STABLE [8a17afe84] 2019-09-22 17:46:00 -0400
Branch: master [61aa9f544] 2019-10-04 10:34:40 -0400
Branch: REL_12_STABLE [6c3b6406d] 2019-10-04 10:34:21 -0400
Branch: REL_11_STABLE [b8ddf0bdf] 2019-10-04 10:34:21 -0400
Branch: REL_10_STABLE [9faa9794f] 2019-10-04 10:34:21 -0400
Branch: REL9_6_STABLE [30e5b3bbe] 2019-10-04 10:34:21 -0400
Branch: REL9_5_STABLE [8b77f783b] 2019-10-04 10:34:21 -0400
Branch: REL9_4_STABLE [b6a6c129f] 2019-10-04 10:34:21 -0400
-->
<para>
Fix misbehavior of <function>bitshiftright()</function> (Tom Lane)
</para>
<para>
The bitstring right shift operator failed to zero out padding space
that exists in the last byte of the result when the bitstring length
is not a multiple of 8. While invisible to most operations, any
nonzero bits there would result in unexpected comparison behavior,
since bitstring comparisons don't bother to ignore the extra bits,
expecting them to always be zero.
</para>
<para>
If you have inconsistent data as a result of saving the output
of <function>bitshiftright()</function> in a table, it's possible to
fix it with something like
<programlisting>
UPDATE mytab SET bitcol = ~(~bitcol) WHERE bitcol != ~(~bitcol);
</programlisting>
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [bd1ef5799] 2019-10-28 12:21:13 -0400
Branch: REL_12_STABLE [43e43771b] 2019-10-28 12:21:13 -0400
-->
<para>
Fix result of text <function>position()</function> function (also
known as <function>strpos()</function>) for an empty search string
(Tom Lane)
</para>
<para>
Historically, and per the SQL standard, the result should be one in
such cases, but 12.0 returned zero.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [a7145f6bc] 2019-11-07 11:22:58 -0500
Branch: REL_12_STABLE [f6e72dc9c] 2019-11-07 11:22:59 -0500
Branch: REL_11_STABLE [b49b7f944] 2019-11-07 11:23:00 -0500
Branch: REL_10_STABLE [5f794f757] 2019-11-07 11:23:02 -0500
Branch: REL9_6_STABLE [15783d057] 2019-11-07 11:23:03 -0500
Branch: REL9_5_STABLE [84780d468] 2019-11-07 11:23:04 -0500
Branch: REL9_4_STABLE [8d380864a] 2019-11-07 11:23:06 -0500
Branch: REL9_6_STABLE [a55018760] 2019-11-09 15:50:16 -0500
Branch: REL9_5_STABLE [30f6998ff] 2019-11-09 15:50:16 -0500
Branch: REL9_4_STABLE [18622caa3] 2019-11-09 15:50:16 -0500
-->
<para>
Fix detection of edge-case integer overflow in interval
multiplication (Yuya Watari)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [8af1624e3] 2019-11-02 16:45:32 -0400
Branch: REL_12_STABLE [43753c2cf] 2019-11-02 16:45:32 -0400
Branch: REL_11_STABLE [65cdf8bc1] 2019-11-02 16:45:32 -0400
Branch: REL_10_STABLE [680aabd2f] 2019-11-02 16:45:32 -0400
Branch: REL9_6_STABLE [51b9ac558] 2019-11-02 16:45:32 -0400
Branch: master [db27b60f0] 2019-11-03 16:10:23 -0500
Branch: REL_12_STABLE [6dd92138d] 2019-11-03 16:10:38 -0500
Branch: REL_11_STABLE [88d03d73c] 2019-11-03 16:10:45 -0500
Branch: REL_10_STABLE [4077e9ae1] 2019-11-03 16:10:56 -0500
Branch: REL9_6_STABLE [d43bd9dce] 2019-11-03 16:11:05 -0500
-->
<para>
Avoid crashes if <literal>ispell</literal> text search dictionaries
contain wrong affix data (Arthur Zakirov)
</para>
</listitem>
<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
Branch: master [70a6c37d5] 2019-10-21 08:57:32 +0530
Branch: REL_12_STABLE [62f4dd379] 2019-10-21 09:04:35 +0530
-->
<para>
Avoid memory leak while vacuuming a GiST index (Dilip Kumar)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [db477b691] 2019-10-21 14:18:01 -0400
Branch: REL_12_STABLE [4f2ad5226] 2019-10-21 14:18:16 -0400
Branch: REL_11_STABLE [a05a04d0e] 2019-10-21 14:18:31 -0400
Branch: REL_10_STABLE [aebe3ef0e] 2019-10-21 14:18:38 -0400
Branch: REL9_6_STABLE [185253ab8] 2019-10-21 14:18:47 -0400
Branch: REL9_5_STABLE [e3267407e] 2019-10-21 14:18:55 -0400
Branch: REL9_4_STABLE [fedcab352] 2019-10-21 14:19:03 -0400
-->
<para>
On Windows, recognize additional spellings of the <quote>Norwegian
(Bokmål)</quote> locale name (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [4f4061b2d] 2019-10-21 11:17:13 +0900
Branch: REL_12_STABLE [2b0f959b5] 2019-10-21 11:17:43 +0900
Branch: master [57379cd5a] 2019-10-23 11:34:18 +0900
Branch: REL_12_STABLE [a6a95d4f3] 2019-10-23 11:34:42 +0900
-->
<para>
Fix <application>libpq</application> to allow trailing whitespace in
the string values of integer parameters (Michael Paquier)
</para>
<para>
Version 12 tightened <application>libpq</application>'s validation
of integer parameters, but disallowing trailing whitespace seems
undesirable.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [ba19a6b73] 2019-10-21 11:39:15 +0900
Branch: REL_12_STABLE [ed5109a61] 2019-10-21 11:39:28 +0900
-->
<para>
In <application>libpq</application>, correctly
report <literal>CONNECTION_BAD</literal> connection status after a
failure caused by a syntactically
invalid <option>connect_timeout</option> parameter value (Lars Kanis)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [c8cb98ec4] 2019-11-07 14:21:52 -0500
Branch: REL_12_STABLE [101654987] 2019-11-07 14:21:52 -0500
Branch: REL_11_STABLE [89f56fc22] 2019-11-07 14:21:52 -0500
Branch: REL_10_STABLE [831ca9513] 2019-11-07 14:21:52 -0500
Branch: REL9_6_STABLE [baa483984] 2019-11-07 14:21:52 -0500
Branch: REL9_5_STABLE [b705d6391] 2019-11-07 14:21:52 -0500
Branch: REL9_4_STABLE [b20233aac] 2019-11-07 14:21:52 -0500
-->
<para>
Avoid compile failure if an ECPG client
includes <filename>ecpglib.h</filename> while
having <literal>ENABLE_NLS</literal> defined (Tom Lane)
</para>
<para>
This risk was created by a misplaced
declaration: <function>ecpg_gettext()</function> should not be
visible to client code.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Branch: master [1752e3516] 2019-10-17 09:58:01 +0200
Branch: REL_12_STABLE [b304b2b65] 2019-10-17 09:58:01 +0200
-->
<para>
Fix scheduling of parallel restore of a foreign key constraint on a
partitioned table (Álvaro Herrera)
</para>
<para>
<application>pg_dump</application> failed to emit full dependency
information for partitioned tables' foreign keys. This could allow
parallel <application>pg_restore</application> to try to recreate a
foreign key constraint too soon.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [5102f3944] 2019-11-04 16:25:05 -0500
Branch: REL_12_STABLE [ca27a84c9] 2019-11-04 16:25:05 -0500
Branch: REL_11_STABLE [078f5bc8e] 2019-11-04 16:25:05 -0500
Branch: REL_10_STABLE [ee8b95f26] 2019-11-04 16:25:05 -0500
Branch: REL9_6_STABLE [648f17879] 2019-11-04 16:25:05 -0500
Branch: REL9_5_STABLE [74d32ee70] 2019-11-04 16:25:05 -0500
Branch: REL9_4_STABLE [da5cd7a68] 2019-11-04 16:25:05 -0500
-->
<para>
In <application>pg_dump</application>, ensure stable output order
for similarly-named triggers and row-level-security policy objects
(Benjie Gillam)
</para>
<para>
Previously, if two triggers on different tables had the same names,
they would be sorted in OID-based order, which is less desirable
than sorting them by table name. Likewise for RLS policies.
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [0ccfc2822] 2019-10-14 22:31:56 +0200
Branch: REL_12_STABLE [eaf900e84] 2019-10-14 23:40:58 +0200
Branch: master [3a0e85739] 2019-10-15 00:25:04 +0200
Branch: REL_12_STABLE [702fd3b71] 2019-10-15 00:35:51 +0200
-->
<para>
In <application>pg_upgrade</application>, reject tables with
columns of type <type>sql_identifier</type>, as that has changed
representation in version 12 (Tomas Vondra)
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [8d48e6a72] 2019-10-16 13:23:14 +0200
Branch: REL_12_STABLE [ebb4caa91] 2019-10-16 13:25:25 +0200
Branch: REL_11_STABLE [a970b6cde] 2019-10-16 13:26:22 +0200
Branch: REL_10_STABLE [2218fdca4] 2019-10-16 13:26:53 +0200
Branch: REL9_6_STABLE [0a643de08] 2019-10-16 13:27:24 +0200
Branch: REL9_5_STABLE [f57b01dd7] 2019-10-16 13:27:51 +0200
Branch: REL9_4_STABLE [235a52ca0] 2019-10-16 13:31:00 +0200
Branch: REL9_6_STABLE [e09ab32a2] 2019-10-16 16:20:07 +0200
Branch: REL9_5_STABLE [984aa0ede] 2019-10-16 16:23:09 +0200
Branch: REL9_4_STABLE [bc3a94dc0] 2019-10-16 16:28:48 +0200
Author: Tomas Vondra <tomas.vondra@postgresql.org>
Branch: master [a524f50d0] 2019-10-16 13:23:18 +0200
Branch: REL_12_STABLE [a8e49ae0c] 2019-10-16 13:25:37 +0200
Branch: REL_11_STABLE [d071a2539] 2019-10-16 13:26:26 +0200
Branch: REL_10_STABLE [e86ece221] 2019-10-16 13:26:56 +0200
-->
<para>
Improve <application>pg_upgrade</application>'s checks for the use
of a data type that has changed representation, such
as <type>line</type> (Tomas Vondra)
</para>
<para>
The previous coding could be fooled by cases where the data type of
interest underlies a stored column of a domain or composite type.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
Branch: master [6f3823b03] 2019-10-04 09:14:51 +0900
Branch: REL_12_STABLE [c2e3b311d] 2019-10-04 09:16:03 +0900
-->
<para>
In <application>pg_rewind</application>
with the <option>--dry-run</option> option, avoid
updating <filename>pg_control</filename>
(Alexey Kondratov)
</para>
<para>
This could lead to failures in
subsequent <application>pg_rewind</application> attempts.
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
Branch: master [a0c96856e] 2019-11-07 16:31:36 +0900
Branch: REL_12_STABLE [e5cfb8cbb] 2019-11-07 16:32:37 +0900
Branch: REL_11_STABLE [fb53c4c07] 2019-11-07 16:32:58 +0900
Branch: REL_10_STABLE [127ad57f5] 2019-11-07 16:33:06 +0900
Branch: REL9_6_STABLE [aa7cd6a8e] 2019-11-07 16:33:23 +0900
Branch: REL9_5_STABLE [b1bebc2ce] 2019-11-07 16:33:47 +0900
Branch: REL9_4_STABLE [1accf9974] 2019-11-07 16:33:58 +0900
-->
<para>
Fix failure in <application>pg_waldump</application> with
the <option>-s</option> option, when a continuation WAL record ends
exactly at a page boundary (Andrey Lepikhov)
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [e4d92126f] 2019-10-29 22:53:05 -0700
Branch: REL_12_STABLE [d4b5206b2] 2019-10-29 22:53:30 -0700
Branch: REL_11_STABLE [3b24cf732] 2019-10-29 22:53:33 -0700
Branch: REL_10_STABLE [82200115e] 2019-10-29 22:53:37 -0700
Branch: REL9_6_STABLE [bc4f56c18] 2019-10-29 22:54:36 -0700
Branch: REL9_5_STABLE [39ff656a4] 2019-10-29 22:55:19 -0700
-->
<para>
In <application>pg_waldump</application> with
the <option>--bkp-details</option> option, avoid emitting extra
newlines for WAL records involving full-page writes (Andres Freund)
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
Branch: master [e0f76f204] 2019-10-29 19:18:07 -0700
Branch: REL_12_STABLE [4ab353c47] 2019-10-29 19:28:34 -0700
Branch: REL_11_STABLE [af67aee69] 2019-10-29 19:28:34 -0700
Branch: REL_10_STABLE [e3ff8c360] 2019-10-29 19:28:34 -0700
Branch: REL9_6_STABLE [95f2efd50] 2019-10-29 19:28:34 -0700
Branch: REL9_5_STABLE [c3882f8b8] 2019-10-29 19:28:34 -0700
-->
<para>
Fix small memory leak in <application>pg_waldump</application>
(Andres Freund)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [06a367c38] 2019-10-10 14:24:56 -0400
Branch: REL_12_STABLE [7ed1bcaed] 2019-10-10 14:24:57 -0400
-->
<para>
Put back <function>pqsignal()</function> as an
exported <application>libpq</application> symbol (Tom Lane)
</para>
<para>
This function was removed on the grounds that no clients should be
using it, but that turns out to break usage of
current <application>libpq</application> with very old versions
of <application>psql</application>, and perhaps other applications.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
Branch: master [d995fd667] 2019-10-21 13:52:25 -0400
Branch: REL_12_STABLE [ca658c91a] 2019-10-21 13:52:25 -0400
Branch: REL_11_STABLE [4e19bd41d] 2019-10-21 13:52:25 -0400
Branch: REL_10_STABLE [328b81348] 2019-10-21 13:52:25 -0400
Branch: REL9_6_STABLE [34621cb12] 2019-10-21 13:52:25 -0400
Branch: REL9_5_STABLE [8835e0bd4] 2019-10-21 13:52:26 -0400
Branch: REL9_4_STABLE [6d2b18d07] 2019-10-21 13:52:26 -0400
Branch: master [44273ce4f] 2019-10-21 12:32:35 -0400
Branch: REL_12_STABLE [aa5bb828a] 2019-10-21 12:32:35 -0400
Branch: REL_11_STABLE [99c51d5ed] 2019-10-21 12:32:36 -0400
Branch: REL_10_STABLE [e167b1ae3] 2019-10-21 12:32:36 -0400
Branch: REL9_6_STABLE [62ca50ad7] 2019-10-21 12:32:36 -0400
Branch: REL9_5_STABLE [11330c311] 2019-10-21 12:32:36 -0400
Branch: REL9_4_STABLE [727c2ccfe] 2019-10-21 12:32:36 -0400
-->
<para>
Fix <application>configure</application>'s test for presence of
libperl so that it works on recent Red Hat releases (Tom Lane)
</para>
<para>
Previously, it could fail if the user sets <literal>CFLAGS</literal>
to <literal>-O0</literal>.
</para>
</listitem>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [89b4d7744] 2019-10-18 20:20:28 -0700
Branch: REL_12_STABLE [ef13f914e] 2019-10-18 20:20:31 -0700
Branch: REL_11_STABLE [af4477b00] 2019-10-18 20:20:32 -0700
Branch: REL_10_STABLE [083929372] 2019-10-18 20:20:32 -0700
Branch: REL9_6_STABLE [09d74aef3] 2019-10-18 20:20:32 -0700
Branch: REL9_5_STABLE [62e881946] 2019-10-18 20:20:32 -0700
Branch: REL9_4_STABLE [930787c7f] 2019-10-18 20:20:33 -0700
-->
<para>
Ensure correct code generation for spinlocks on PowerPC (Noah Misch)
</para>
<para>
The previous spinlock coding allowed the compiler to select register
zero for use with an assembly instruction that does not accept that
register, causing a build failure. We have seen only one long-ago
report that matches this bug, but it could cause problems for people
trying to build modified <productname>PostgreSQL</productname> code
or use atypical compiler options.
</para>
</listitem>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
Branch: master [5f3d271d0] 2019-10-12 00:21:47 -0700
Branch: REL_12_STABLE [3fb14cfcb] 2019-10-12 00:21:50 -0700
Branch: REL_11_STABLE [e5b4926ef] 2019-10-12 00:21:50 -0700
Branch: REL_10_STABLE [77cc4a595] 2019-10-12 00:21:50 -0700
Branch: REL9_6_STABLE [c73f4f680] 2019-10-12 00:21:50 -0700
Branch: REL9_5_STABLE [e40eb31c0] 2019-10-12 00:21:51 -0700
Branch: REL9_4_STABLE [b705582b4] 2019-10-12 00:21:51 -0700
-->
<para>
On AIX, don't use the compiler option <option>-qsrcmsg</option>
(Noah Misch)
</para>
<para>
This avoids an internal compiler error with xlc v16.1.0, with little
consequence other than changing the format of compiler error messages.
</para>
</listitem>
<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
Branch: master [ad7595b89] 2019-10-04 15:34:40 -0400
Branch: REL_12_STABLE [ec38d2311] 2019-10-04 15:39:27 -0400
Branch: REL_11_STABLE [3b9c22700] 2019-10-04 15:39:19 -0400
Branch: REL_10_STABLE [62d2caed6] 2019-10-04 15:39:12 -0400
Branch: REL9_6_STABLE [1e9a0487d] 2019-10-04 15:39:02 -0400
Branch: REL9_5_STABLE [6ca51b155] 2019-10-04 15:38:48 -0400
Branch: REL9_4_STABLE [8f8809091] 2019-10-04 15:38:36 -0400
-->
<para>
Fix MSVC build process to cope with spaces in the file path of
OpenSSL (Andrew Dunstan)
</para>
</listitem>
</itemizedlist>
</sect2>
</sect1>
<sect1 id="release-12">
<title>Release 12</title>
<formalpara>
<title>Release date:</title>
<para>2019-10-03</para>
</formalpara>
<sect2>
<title>Overview</title>
<para>
Major enhancements in <productname>PostgreSQL</productname> 12 include:
</para>
<!-- Items in this list summarize one or more items below -->
<itemizedlist>
<listitem>
<para>
General performance improvements, including:
<itemizedlist>
<listitem>
<para>
Optimizations to space utilization and read/write performance for
B-tree indexes
</para>
</listitem>
<listitem>
<para>
Partitioning performance enhancements, including improved query
performance on tables with thousands of partitions, improved
insertion performance with <xref linkend="sql-insert"/> and <xref
linkend="sql-copy"/>, and the ability to execute <link
linkend="sql-altertable-attach-partition"><command>ALTER TABLE ATTACH
PARTITION</command></link> without blocking queries
</para>
</listitem>
<listitem>
<para>
Automatic (but overridable) inlining
of <link linkend="queries-with">common table expressions</link>
(<acronym>CTEs</acronym>)
</para>
</listitem>
<listitem>
<para>
Reduction of <acronym>WAL</acronym> overhead for creation of
<link linkend="gist">GiST</link>, <link linkend="gin">GIN</link>, and
<link linkend="spgist">SP-GiST</link> indexes
</para>
</listitem>
<listitem>
<para>
Support for covering <link linkend="gist">GiST</link> indexes, via
the <link linkend="indexes-index-only-scans"><literal>INCLUDE</literal></link>
clause
</para>
</listitem>
<listitem>
<para>
Multi-column most-common-value (MCV) statistics can be defined
via <xref linkend="sql-createstatistics"/>, to support better
plans for queries that test several non-uniformly-distributed
columns
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
Enhancements to administrative functionality, including:
<itemizedlist>
<listitem>
<para>
<link linkend="sql-reindex-concurrently"><command>REINDEX
CONCURRENTLY</command></link> can rebuild an index without
blocking writes to its table
</para>
</listitem>
<listitem>
<para>
<xref linkend="app-pgchecksums"/> can enable/disable page checksums
(used for detecting data corruption) in an offline cluster
</para>
</listitem>
<listitem>
<para>
Progress reporting statistics for <xref linkend="sql-createindex"/>,
<xref linkend="sql-reindex"/>, <xref linkend="sql-cluster"/>,
<link linkend="sql-vacuum">VACUUM FULL</link>, and
<xref linkend="app-pgchecksums"/>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
<listitem>
<para>
Support for the <link
linkend="functions-sqljson-path"><acronym>SQL/JSON</acronym>
path</link> language
</para>
</listitem>
<listitem>
<para>
Stored <link linkend="ddl-generated-columns">generated columns</link>
</para>
</listitem>
<listitem>
<para>
<link linkend="collation-nondeterministic">Nondeterministic</link> ICU
collations, enabling case-insensitive and accent-insensitive grouping
and ordering
</para>
</listitem>
<listitem>
<para>
New authentication features, including:
<itemizedlist>
<listitem>
<para>
Encryption of TCP/IP connections when using
<link linkend="gssapi-auth"><acronym>GSSAPI</acronym></link>
authentication
</para>
</listitem>
<listitem>
<para>
Discovery of LDAP servers using <acronym>DNS SRV</acronym> records
</para>
</listitem>
<listitem>
<para>
Multi-factor authentication, using the <link linkend="auth-cert">
<literal>clientcert=verify-full</literal></link> option combined
with an additional authentication method in
<filename>pg_hba.conf</filename>
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</itemizedlist>
<para>
The above items are explained in more detail in the sections below.
</para>
</sect2>
<sect2>
<title>Migration to Version 12</title>
<para>
A dump/restore using <xref linkend="app-pg-dumpall"/> or use of <xref
linkend="pgupgrade"/> or logical replication is required for those
wishing to migrate data from any previous release. See <xref
linkend="upgrading"/> for general information on migrating to new major
releases.
</para>
<para>
Version 12 contains a number of changes that may affect compatibility
with previous releases. Observe the following incompatibilities:
</para>
<itemizedlist>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2018-11-20 [578b22971] Remove WITH OIDS support, change oid catalog column visi
-->
<para>
Remove the special behavior of <link
linkend="datatype-oid">oid</link> columns (Andres Freund,
John Naylor)
</para>
<para>
Previously, a normally-invisible <structfield>oid</structfield>
column could be specified during table creation using <literal>WITH
OIDS</literal>; that ability has been removed. Columns can still be
explicitly declared as type <type>oid</type>. Operations on tables
that have columns created using <literal>WITH OIDS</literal> will
need adjustment.
</para>
<para>
The system catalogs that previously had
hidden <structfield>oid</structfield> columns now have
ordinary <structfield>oid</structfield> columns.
Hence, <command>SELECT *</command> will now output those columns,
whereas previously they would be displayed only if selected
explicitly.
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2018-10-11 [cda6a8d01] Remove deprecated abstime, reltime, tinterval datatypes.
-->
<para>
Remove data types <type>abstime</type>, <type>reltime</type>,
and <type>tinterval</type> (Andres Freund)
</para>
<para>
These are obsoleted by SQL-standard types such
as <type>timestamp</type>.
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2018-10-11 [2d10defa7] Remove timetravel extension.
-->
<para>
Remove the <filename>timetravel</filename> extension
(Andres Freund)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
2018-11-25 [2dedf4d9a] Integrate recovery.conf into postgresql.conf
-->
<para>
Move <filename>recovery.conf</filename> settings into <link
linkend="runtime-config-wal-archive-recovery"><filename>postgresql.conf</filename></link>
(Masao Fujii, Simon Riggs, Abhijit Menon-Sen, Sergei Kornilov)
</para>
<para>
<filename>recovery.conf</filename> is no longer used,
and the server will not start if that file exists. <link
linkend="runtime-config-wal-archive-recovery">recovery.signal</link>
and <filename>standby.signal</filename> files are now used to switch
into non-primary mode. The <varname>trigger_file</varname> setting
has been renamed to <xref linkend="guc-promote-trigger-file"/>. The
<varname>standby_mode</varname> setting has been removed.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
2018-11-28 [f2cbffc7a] Only allow one recovery target setting
-->
<para>
Do not allow multiple conflicting <link
linkend="runtime-config-wal-recovery-target"><varname>recovery_target</varname>*</link>
specifications (Peter Eisentraut)
</para>
<para>
Specifically, only allow one of <xref
linkend="guc-recovery-target"/>, <xref
linkend="guc-recovery-target-lsn"/>,
<xref linkend="guc-recovery-target-name"/>,
<xref linkend="guc-recovery-target-time"/>, and <xref
linkend="guc-recovery-target-xid"/>. Previously, multiple different
instances of these parameters could be specified, and the last one
was honored. Now, only one can be specified, though the same one can
be specified multiple times and the last specification is honored.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-01-13 [0acb3bc33] Change default of recovery_target_timeline to <literal>latest</literal>
-->
<para>
Cause recovery to advance to the latest timeline by default
(Peter Eisentraut)
</para>
<para>
Specifically, <xref linkend="guc-recovery-target-timeline"/> now
defaults to <literal>latest</literal>. Previously, it defaulted
to <literal>current</literal>.
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2018-07-29 [a7dc63d90] Refactor geometric functions and operators
2018-08-16 [c4c340088] Use the built-in float datatypes to implement geometric
2018-09-26 [2e2a392de] Fix problems in handling the line data type
-->
<para>
Refactor code for <link linkend="functions-geometry">geometric
functions and operators</link> (Emre Hasegeli)
</para>
<para>
This could lead to more accurate, but slightly different, results
compared to previous releases. Notably, cases involving NaN,
underflow, overflow, and division by zero are handled more
consistently than before.
</para>
</listitem>
<listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
2019-02-13 [02ddd4993] Change floating-point output format for improved perform
2018-10-12 [f1885386f] Make float exponent output on Windows look the same as e
-->
<para>
Improve performance by using a new algorithm for output
of <link linkend="datatype-float"><type>real</type></link>
and <type>double precision</type> values (Andrew Gierth)
</para>
<para>
Previously, displayed floating-point values were rounded to 6
(for <type>real</type>) or 15 (for <type>double precision</type>)
digits by default, adjusted by the value of
<xref linkend="guc-extra-float-digits"/>. Now,
whenever <varname>extra_float_digits</varname> is more than zero (as
it now is by default), only the minimum number of digits required to
preserve the exact binary value are output. The behavior is the
same as before when <varname>extra_float_digits</varname> is set to
zero or less.
</para>
<para>
Also, formatting of floating-point exponents is now uniform across
platforms: two digits are used unless three are necessary. In
previous releases, Windows builds always printed three digits.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-12-29 [6645ad6bd] Use a separate random seed for SQL random()/setseed() fu
2018-12-29 [4203842a1] Use pg_strong_random() to select each server process's r
-->
<para>
<link linkend="functions-math-random-table"><function>random()</function></link>
and <function>setseed()</function> now behave uniformly across
platforms (Tom Lane)
</para>
<para>
The sequence of <function>random()</function> values generated
following a <function>setseed()</function> call with a particular
seed value is likely to be different now than before. However, it
will also be repeatable, which was not previously guaranteed because
of interference from other uses of random numbers inside the server.
The SQL <function>random()</function> function now has its own
private per-session state to forestall that.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-05-14 [7c850320d] Fix SQL-style substring() to have spec-compliant greedin
-->
<para>
Change SQL-style
<link linkend="functions-similarto-regexp"><function>substring()</function></link>
to have standard-compliant greediness behavior (Tom Lane)
</para>
<para>
In cases where the pattern can be matched in more than one way, the
initial sub-pattern is now treated as matching the least possible
amount of text rather than the greatest; for example, a pattern such
as <literal>%#"aa*#"%</literal> now selects the first group
of <literal>a</literal>'s from the input, not the last group.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-04-23 [c06e3550d] Don't request pretty-printed output from xmlNodeDump().
-->
<para>
Do not pretty-print the result
of <link linkend="functions-xml"><function>xpath()</function></link>
or the <literal>XMLTABLE</literal> construct (Tom Lane)
</para>
<para>
In some cases, these functions would insert extra whitespace
(newlines and/or spaces) in nodeset values. This is undesirable
since depending on usage, the whitespace might be considered
semantically significant.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-03-13 [6dd263cfa] Rename pg_verify_checksums to pg_checksums
-->
<para>
Rename command-line tool
<application>pg_verify_checksums</application> to <xref
linkend="app-pgchecksums"/> (Michaël Paquier)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-04-04 [413ccaa74] pg_restore: Require -f - to mean stdout
-->
<para>
In <xref linkend="app-pgrestore"/>, require specification of
<literal>-f -</literal> to send the dump contents to standard output
(Euler Taveira)
</para>
<para>
Previously, this happened by default if no destination was
specified, but that was deemed to be unfriendly.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-11-14 [eaf746a5b] Make psql's "\pset format" command reject non-unique abb
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-11-26 [a7eece4fc] Fix breakage of "\pset format latex".
-->
<para>
Disallow non-unique abbreviations
in <application>psql</application>'s <command>\pset format</command>
command (Daniel Vérité)
</para>
<para>
Previously, for example, <command>\pset format a</command> chose
<literal>aligned</literal>; it will now fail since that could
equally well mean <literal>asciidoc</literal>.
</para>
</listitem>
<listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
2019-03-20 [dd299df81] Make heap TID a tiebreaker nbtree index column.
-->
<para>
In new btree indexes, the maximum index entry length is
reduced by eight bytes, to improve handling of duplicate entries
(Peter Geoghegan)
</para>
<para>
This means that a <xref linkend="sql-reindex"/> operation on an
index <application>pg_upgrade</application>'d from a previous
release could potentially fail.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-03-21 [bfb456c1b] Improve error reporting for DROP FUNCTION/PROCEDURE/AGGR
-->
<para>
Cause <link linkend="sql-dropfunction"><command>DROP IF EXISTS
FUNCTION</command></link>/<literal>PROCEDURE</literal>/<literal>AGGREGATE</literal>/<literal>ROUTINE</literal>
to generate an error if no argument list is supplied and there are
multiple matching objects (David Rowley)
</para>
<para>
Also improve the error message in such cases.
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2019-06-16 [6cbfb784c] Rework the pg_statistic_ext catalog
2019-06-16 [aa087ec64] Add pg_stats_ext view for extended statistics
-->
<para>
Split the <link
linkend="catalog-pg-statistic-ext"><structname>pg_statistic_ext</structname></link>
catalog into two catalogs, and add the <link
linkend="view-pg-stats-ext"><structname>pg_stats_ext</structname></link>
view of it (Dean Rasheed, Tomas Vondra)
</para>
<para>
This change supports hiding potentially-sensitive statistics data
from unprivileged users.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
2018-11-01 [96b00c433] Remove obsolete pg_constraint.consrc column
-->
<para>
Remove obsolete <link
linkend="catalog-pg-constraint"><structname>pg_constraint</structname></link>.<structfield>consrc</structfield>
column (Peter Eisentraut)
</para>
<para>
This column has been deprecated for a long time, because it did not
update in response to other catalog changes (such as column renamings).
The recommended way to get a text version of a check constraint's
expression from <structname>pg_constraint</structname>
is <literal>pg_get_expr(conbin, conrelid)</literal>.
<function>pg_get_constraintdef()</function> is also a useful
alternative.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
2018-11-01 [fe5038236] Remove obsolete pg_attrdef.adsrc column
-->
<para>
Remove obsolete <link
linkend="catalog-pg-attrdef"><structname>pg_attrdef</structname></link>.<structfield>adsrc</structfield>
column (Peter Eisentraut)
</para>
<para>
This column has been deprecated for a long time, because it did not
update in response to other catalog changes (such as column renamings).
The recommended way to get a text version of a default-value expression
from <structname>pg_attrdef</structname> is <literal>pg_get_expr(adbin,
adrelid)</literal>.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-12-19 [586b98fdf] Make type "name" collation-aware.
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-04-05 [478cacb50] Ensure consistent name matching behavior in processSQLNa
-->
<para>
Mark table columns of type <link
linkend="datatype-character-special-table">name</link> as having
<quote>C</quote> collation by default (Tom Lane, Daniel Vérité)
</para>
<para>
The comparison operators for data type <type>name</type> can now use
any collation, rather than always using <quote>C</quote> collation.
To preserve the previous semantics of queries, columns of
type <type>name</type> are now explicitly marked as
having <quote>C</quote> collation. A side effect of this is that
regular-expression operators on <type>name</type> columns will now
use the <quote>C</quote> collation by default, not the database
collation, to determine the behavior of locale-dependent regular
expression patterns (such as <literal>\w</literal>). If you want
non-C behavior for a regular expression on a <type>name</type>
column, attach an explicit <literal>COLLATE</literal> clause. (For
user-defined <type>name</type> columns, another possibility is to
specify a different collation at table creation time; but that just
moves the non-backwards-compatibility to the comparison operators.)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-12-20 [7c15cef86] Base information_schema.sql_identifier domain on name, n
2018-12-20 [5bbee34d9] Avoid producing over-length specific_name outputs in inf
2018-12-18 [6b0faf723] Make collation-aware system catalog columns use "C" coll
-->
<para>
Treat object-name columns in
the <link linkend="information-schema"><structname>information_schema</structname></link>
views as being of type <type>name</type>, not <type>varchar</type>
(Tom Lane)
</para>
<para>
Per the SQL standard, object-name columns in
the <structname>information_schema</structname> views are declared
as being of domain type <type>sql_identifier</type>.
In <productname>PostgreSQL</productname>, the underlying catalog
columns are really of type <type>name</type>. This change
makes <type>sql_identifier</type> be a domain
over <type>name</type>, rather than <type>varchar</type> as before.
This eliminates a semantic mismatch in comparison and sorting
behavior, which can greatly improve the performance of queries
on <structname>information_schema</structname> views that restrict
an object-name column. Note however that inequality restrictions,
for example
<programlisting>
SELECT ... FROM information_schema.tables WHERE table_name < 'foo';
</programlisting>
will now use <quote>C</quote>-locale comparison semantics by
default, rather than the database's default collation as before.
Sorting on these columns will also follow <quote>C</quote> ordering
rules. The previous behavior (and inefficiency) can be enforced by
adding a <literal>COLLATE "default"</literal> clause.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
2018-07-10 [bcbd94080] Remove dynamic_shared_memory_type=none
-->
<para>
Remove the ability to disable dynamic shared memory (Kyotaro
Horiguchi)
</para>
<para>
Specifically, <xref linkend="guc-dynamic-shared-memory-type"/>
can no longer be set to <literal>none</literal>.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-09-12 [e7a221797] Parse more strictly integer parameters from connection s
-->
<para>
Parse libpq integer connection parameters more strictly (Fabien
Coelho)
</para>
<para>
In previous releases, using an incorrect integer value for
connection parameters <literal>connect_timeout</literal>,
<literal>keepalives</literal>, <literal>keepalives_count</literal>,
<literal>keepalives_idle</literal>,
<literal>keepalives_interval</literal> and <literal>port</literal>
resulted in libpq either ignoring those values or failing with
incorrect error messages.
</para>
</listitem>
</itemizedlist>
</sect2>
<sect2>
<title>Changes</title>
<para>
Below you will find a detailed account of the changes between
<productname>PostgreSQL</productname> 12 and the previous
major release.
</para>
<sect3>
<title>Server</title>
<sect4>
<title><link linkend="ddl-partitioning">Partitioning</link></title>
<itemizedlist>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-11-07 [c6e4133fa] Postpone calculating total_table_pages until after pruni
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-11-15 [34c9e455d] Improve performance of partition pruning remapping a lit
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2018-11-16 [3f2393ede] Redesign initialization of partition routing structures
Author: Robert Haas <rhaas@postgresql.org>
2019-02-21 [9eefba181] Delay lock acquisition for partitions until we route a t
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-03-30 [428b260f8] Speed up planning when partitions can be pruned at plan
-->
<para>
Improve performance of many operations on partitioned tables
(Amit Langote, David Rowley, Tom Lane, Álvaro Herrera)
</para>
<para>
Allow tables with thousands of child partitions to be processed
efficiently by operations that only affect a small number of
partitions.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-04-03 [f56f8f8da] Support foreign keys that reference partitioned tables
-->
<para>
Allow <link linkend="ddl-constraints-fk">foreign keys</link>
to reference partitioned tables (Álvaro Herrera)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
2018-08-01 [0d5f05cde] Allow multi-inserts during COPY into a partitioned table
-->
<para>
Improve speed of <command>COPY</command> into partitioned tables
(David Rowley)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-01-25 [7c079d741] Allow generalized expression syntax for partition bounds
-->
<para>
Allow partition bounds to be any expression (Kyotaro Horiguchi,
Tom Lane, Amit Langote)
</para>
<para>
Such expressions are evaluated at partitioned-table creation time.
Previously, only simple constants were allowed as partition bounds.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2018-12-17 [ca4103025] Fix tablespace handling for partitioned tables
-->
<para>
Allow <command>CREATE TABLE</command>'s tablespace specification
for a partitioned table to affect the tablespace of its children
(David Rowley, Álvaro Herrera)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-04-05 [959d00e9d] Use Append rather than MergeAppend for scanning ordered
-->
<para>
Avoid sorting when partitions are already being scanned in the
necessary order (David Rowley)
</para>
</listitem>
<listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2019-03-07 [898e5e329] Allow ATTACH PARTITION with only ShareUpdateExclusiveLoc
-->
<para>
<link linkend="sql-altertable"><command>ALTER TABLE ATTACH
PARTITION</command></link> is now performed with reduced locking
requirements (Robert Haas)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-02-08 [3677a0b26] Add pg_partition_root to display top-most parent of a pa
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-03-04 [b96f6b194] pg_partition_ancestors
Author: Michael Paquier <michael@paquier.xyz>
2018-10-30 [d5eec4eef] Add pg_partition_tree to display information about parti
-->
<para>
Add partition introspection functions (Michaël Paquier, Álvaro
Herrera, Amit Langote)
</para>
<para>
The new function <link
linkend="functions-info-partition"><function>pg_partition_root()</function></link>
returns the top-most parent of a partition tree, <link
linkend="functions-info-partition"><function>pg_partition_ancestors()</function></link>
reports all ancestors of a partition, and <link
linkend="functions-info-partition"><function>pg_partition_tree()</function></link>
displays information about partitions.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-12-18 [f94cec644] Include partitioned indexes to system view pg_indexes
-->
<para>
Include partitioned indexes in the system view <link
linkend="view-pg-indexes"><structname>pg_indexes</structname></link>
(Suraj Kharage)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-04-07 [1c5d9270e] psql \dP: list partitioned tables and indexes
-->
<para>
Add <application>psql</application> command <command>\dP</command>
to list partitioned tables and indexes (Pavel Stehule)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2018-11-19 [d56e0fde8] psql: Describe partitioned tables/indexes as such
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-03-26 [1af25ca0c] Improve psql's \d display of foreign key constraints
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-04-17 [b036982db] psql: display tablespace for partitioned indexes
-->
<para>
Improve <application>psql</application> <command>\d</command>
and <command>\z</command> display of partitioned tables (Pavel
Stehule, Michaël Paquier, Álvaro Herrera)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-02-11 [1d92a0c9f] Redesign the partition dependency mechanism.
-->
<para>
Fix bugs that could cause <command>ALTER TABLE DETACH
PARTITION</command> to leave behind incorrect dependency state,
allowing subsequent operations to misbehave, for example by not
dropping a former partition child index when its table is dropped
(Tom Lane)
</para>
</listitem>
</itemizedlist>
</sect4>
<sect4>
<title>Indexes</title>
<itemizedlist>
<listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
2019-03-20 [dd299df81] Make heap TID a tiebreaker nbtree index column.
Author: Peter Geoghegan <pg@bowt.ie>
2019-03-20 [fab250243] Consider secondary factors during nbtree splits.
Author: Peter Geoghegan <pg@bowt.ie>
2019-03-25 [f21668f32] Add "split after new tuple" nbtree optimization.
-->
<para>
Improve performance and space utilization of btree indexes with
many duplicates (Peter Geoghegan, Heikki Linnakangas)
</para>
<para>
Previously, duplicate index entries were stored unordered within
their duplicate groups. This caused overhead during index
inserts, wasted space due to excessive page splits, and it reduced
<command>VACUUM</command>'s ability to recycle entire pages.
Duplicate index entries are now sorted in heap-storage order.
</para>
<para>
Indexes <application>pg_upgrade</application>'d from previous
releases will not have these benefits.
</para>
</listitem>
<listitem>
<!--
see commits above
-->
<para>
Allow multi-column btree indexes to be smaller (Peter Geoghegan,
Heikki Linnakangas)
</para>
<para>
Internal pages and min/max leaf page indicators now only store
index keys until the change key, rather than all indexed keys.
This also improves the locality of index access.
</para>
<para>
Indexes <application>pg_upgrade</application>'d from previous
releases will not have these benefits.
</para>
</listitem>
<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2018-07-28 [d2086b08b] Reduce path length for locking leaf B-tree pages during
-->
<para>
Improve speed of btree index insertions by reducing locking
overhead (Alexander Korotkov)
</para>
</listitem>
<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2019-03-10 [f2e403803] Support for INCLUDE attributes in GiST indexes
-->
<para>
Support <link
linkend="indexes-index-only-scans"><literal>INCLUDE</literal></link> columns
in <link linkend="gist">GiST</link> indexes (Andrey Borodin)
</para>
</listitem>
<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2018-09-19 [2a6368343] Add support for nearest-neighbor (KNN) searches to SP-Gi
-->
<para>
Add support for nearest-neighbor (<acronym>KNN</acronym>) searches
of <link linkend="spgist">SP-GiST</link> indexes (Nikita Glukhov,
Alexander Korotkov, Vlad Sterzhanov)
</para>
</listitem>
<listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
2019-04-03 [9155580fd] Generate less WAL during GiST, GIN and SP-GiST index bui
-->
<para>
Reduce the <acronym>WAL</acronym> write overhead
of <acronym>GiST</acronym>, <acronym>GIN</acronym>, and
<acronym>SP-GiST</acronym> index creation (Anastasia Lubennikova,
Andrey V. Lepikhov)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-03-03 [80b9e9c46] Improve performance of index-only scans with many index
-->
<para>
Allow index-only scans to be more efficient on indexes with many
columns (Konstantin Knizhnik)
</para>
</listitem>
<listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
2019-03-05 [fe280694d] Scan GiST indexes in physical order during VACUUM.
-->
<para>
Improve the performance of vacuum scans of GiST indexes (Andrey
Borodin, Konstantin Kuznetsov, Heikki Linnakangas)
</para>
</listitem>
<listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
2019-03-22 [7df159a62] Delete empty pages during GiST VACUUM.
-->
<para>
Delete empty leaf pages during <acronym>GiST</acronym>
<command>VACUUM</command> (Andrey Borodin)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
2018-11-14 [1b5d797cd] Lower lock level for renaming indexes
-->
<para>
Reduce locking requirements for index renaming (Peter Eisentraut)
</para>
</listitem>
</itemizedlist>
</sect4>
<sect4>
<title>Optimizer</title>
<itemizedlist>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2019-03-27 [7300a6995] Add support for multivariate MCV lists
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2019-03-27 [a63b29a1d] Minor improvements for the multivariate MCV lists
-->
<para>
Allow <xref linkend="sql-createstatistics"/> to create
most-common-value statistics for multiple columns (Tomas Vondra)
</para>
<para>
This improves optimization for queries that test several columns,
requiring an estimate of the combined effect of
several <literal>WHERE</literal> clauses. If the columns are
correlated and have non-uniform distributions then multi-column
statistics will allow much better estimates.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-02-16 [608b167f9] Allow user control of CTE materialization, and change th
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-04-09 [947613127] Prevent inlining of multiply-referenced CTEs with outer
-->
<para>
Allow <link linkend="queries-with">common table expressions</link>
(<acronym>CTEs</acronym>) to be inlined into the outer query
(Andreas Karlsson, Andrew Gierth, David Fetter, Tom Lane)
</para>
<para>
Specifically, <acronym>CTE</acronym>s are automatically inlined if
they have no side-effects, are not recursive, and are referenced
only once in the query. Inlining can be prevented by
specifying <literal>MATERIALIZED</literal>, or forced for
multiply-referenced <acronym>CTE</acronym>s by
specifying <literal>NOT MATERIALIZED</literal>. Previously,
<acronym>CTE</acronym>s were never inlined and were always
evaluated before the rest of the query.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
2018-07-16 [f7cb2842b] Add plan_cache_mode setting
-->
<para>
Allow control over when generic plans are used for prepared
statements (Pavel Stehule)
</para>
<para>
This is controlled by the <xref linkend="guc-plan-cache_mode"/>
server parameter.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-03-25 [8edd0e794] Suppress Append and MergeAppend plan nodes that have a s
-->
<para>
Improve optimization of partition and <literal>UNION ALL</literal>
queries that have only a single child (David Rowley)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-12-13 [04fe805a1] Drop no-op CoerceToDomain nodes from expressions at plan
-->
<para>
Improve processing of <link linkend="domains">domains</link> that
have no check constraints (Tom Lane)
</para>
<para>
Domains that are being used purely as type aliases no longer cause
optimization difficulties.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-12-30 [6f19a8c41] Teach eval_const_expressions to constant-fold LEAST/GREA
-->
<para>
Pre-evaluate calls of <link
linkend="functions-greatest-least"><literal>LEAST</literal></link>
and <literal>GREATEST</literal> when their arguments are constants
(Vik Fearing)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-02-20 [e04a3905e] Improve planner's understanding of strictness of type co
2019-03-01 [65ce07e02] Teach optimizer's predtest.c more things about ScalarArr
-->
<para>
Improve optimizer's ability to verify that partial indexes
with <literal>IS NOT NULL</literal> conditions are usable in
queries (Tom Lane, James Coleman)
</para>
<para>
Usability can now be recognized in more cases where the calling
query involves casts or
large <literal><replaceable>x</replaceable> IN
(<replaceable>array</replaceable>)</literal> clauses.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-12-14 [5e0928005] Make pg_statistic and related code account more honestly
-->
<para>
Compute <command>ANALYZE</command> statistics using the collation
defined for each column (Tom Lane)
</para>
<para>
Previously, the database's default collation was used for all
statistics. This potentially gives better optimizer behavior for
columns with non-default collations.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-03-25 [f7111f72d] Improve planner's selectivity estimates for inequalities
-->
<para>
Improve selectivity estimates for inequality comparisons
on <link linkend="ddl-system-columns"><structfield>ctid</structfield></link>
columns (Edmund Horner)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-12-30 [b5415e3c2] Support parameterized TidPaths.
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-12-30 [0a6ea4001] Add a hash opclass for type "tid".
-->
<para>
Improve optimization of joins on columns of type <link
linkend="datatype-oid"><type>tid</type></link>
(Tom Lane)
</para>
<para>
These changes primarily improve the efficiency of self-joins
on <structfield>ctid</structfield> columns.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-07-11 [39a96512b] Mark built-in btree comparison functions as leakproof wh
2019-09-21 [d9110d7e1] Straighten out leakproofness markings on text comparison
-->
<para>
Fix the leakproofness designations of some btree comparison operators
and support functions (Tom Lane)
</para>
<para>
This allows some optimizations that previously would not have been
applied in the presence of security barrier views or row-level
security.
</para>
</listitem>
</itemizedlist>
</sect4>
<sect4>
<title>General Performance</title>
<itemizedlist>
<listitem>
<!--
Author: Bruce Momjian <bruce@momjian.us>
2018-09-21 [1f7fc7670] doc: JIT is enabled by default in PG 12
-->
<para>
Enable <link linkend="jit">Just-in-Time</link>
(<acronym>JIT</acronym>) compilation by default, if the server
has been built with support for it (Andres Freund)
</para>
<para>
Note that this support is not built by default, but has to be
selected explicitly while configuring the build.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-01-06 [afb0d0712] Replace the data structure used for keyword lookup.
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-01-09 [c64d0cd5c] Use perfect hashing, instead of binary search, for keywo
-->
<para>
Speed up keyword lookup (John Naylor, Joerg Sonnenberger, Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
2019-01-25 [9556aa01c] Use single-byte Boyer-Moore-Horspool search even with mu
-->
<para>
Improve search performance for multi-byte characters
in <function>position()</function> and related functions (Heikki
Linnakangas)
</para>
</listitem>
<listitem>
<!--
Author: Stephen Frost <sfrost@snowman.net>
2019-04-02 [4d0e994ee] Add support for partial TOAST decompression
-->
<para>
Allow <link linkend="storage-toast">toasted</link>
values to be minimally decompressed (Paul Ramsey)
</para>
<para>
This is useful for routines that only need to examine the initial
portion of a toasted field.
</para>
</listitem>
<listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2019-03-13 [bbb96c370] Allow ALTER TABLE .. SET NOT NULL to skip provably unnec
-->
<para>
Allow <link linkend="sql-altertable"><command>ALTER TABLE ... SET
NOT NULL</command></link> to avoid unnecessary table scans (Sergei
Kornilov)
</para>
<para>
This can be optimized when the table's column constraints can be
recognized as disallowing nulls.
</para>
</listitem>
<listitem>
<!--
Author: Noah Misch <noah@leadboat.com>
2019-03-08 [3c5926301] Avoid some table rewrites for ALTER TABLE .. SET DATA TY
-->
<para>
Allow <command>ALTER TABLE ... SET DATA TYPE</command> changing between
<type>timestamp</type> and <type>timestamptz</type> to avoid a
table rewrite when the session time zone is <acronym>UTC</acronym>
(Noah Misch)
</para>
<para>
In the <acronym>UTC</acronym> time zone, these two data types are
binary compatible.
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2018-07-22 [86eaf208e] Hand code string to integer conversion for performance.
-->
<para>
Improve speed in converting strings to
<type>int2</type> or <type>int4</type> integers (Andres Freund)
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2019-03-15 [bb16aba50] Enable parallel query with SERIALIZABLE isolation.
-->
<para>
Allow parallelized queries when in <link
linkend="xact-serializable"><literal>SERIALIZABLE</literal></link>
isolation mode (Thomas Munro)
</para>
<para>
Previously, parallelism was disabled when in this mode.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2018-11-07 [3fd2a7932] Provide pg_pread() and pg_pwrite() for random I/O.
Author: Thomas Munro <tmunro@postgresql.org>
2018-11-07 [c24dcd0cf] Use pg_pread() and pg_pwrite() for data files and WAL.
-->
<para>
Use <function>pread()</function> and <function>pwrite()</function>
for random I/O (Oskari Saarenmaa, Thomas Munro)
</para>
<para>
This reduces the number of system calls required for I/O.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2018-07-24 [1bc180cd2] Use setproctitle_fast() to update the ps status, if avai
-->
<para>
Improve the speed of setting the <link
linkend="guc-update-process-title">process title</link> on
<systemitem class="osname">FreeBSD</systemitem> (Thomas Munro)
</para>
</listitem>
</itemizedlist>
</sect4>
<sect4>
<title>Monitoring</title>
<itemizedlist>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-04-03 [799e22034] Log all statements from a sample of transactions
-->
<para>
Allow logging of statements from only a percentage of transactions
(Adrien Nayrat)
</para>
<para>
The parameter <xref linkend="guc-log-transaction-sample-rate"/>
controls this.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-04-02 [ab0dfc961] Report progress of CREATE INDEX operations
Author: Peter Eisentraut <peter@eisentraut.org>
2019-04-07 [03f9e5cba] Report progress of REINDEX operations
-->
<para>
Add progress reporting to <command>CREATE INDEX</command> and
<command>REINDEX</command> operations (Álvaro Herrera, Peter
Eisentraut)
</para>
<para>
Progress is reported in the <link
linkend="create-index-progress-reporting"><structname>pg_stat_progress_create_index</structname></link>
system view.
</para>
</listitem>
<listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2019-03-25 [6f97457e0] Add progress reporting for CLUSTER and VACUUM FULL.
-->
<para>
Add progress reporting to <command>CLUSTER</command> and
<command>VACUUM FULL</command> (Tatsuro Yamada)
</para>
<para>
Progress is reported in the <link
linkend="cluster-progress-reporting"><structname>pg_stat_progress_cluster</structname></link>
system view.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-04-02 [280e5f140] Add progress reporting to pg_checksums
-->
<para>
Add progress reporting to <xref linkend="app-pgchecksums"/>
(Michael Banck, Bernd Helmle)
</para>
<para>
This is enabled with the option <option>--progress</option>.
</para>
</listitem>
<listitem>
<!--
Author: Magnus Hagander <magnus@hagander.net>
2019-03-09 [6b9e875f7] Track block level checksum failures in pg_stat_database
-->
<para>
Add counter of checksum failures to
<structname>pg_stat_database</structname> (Magnus Hagander)
</para>
</listitem>
<listitem>
<!--
Author: Magnus Hagander <magnus@hagander.net>
2019-04-12 [77bd49adb] Show shared object statistics in pg_stat_database
-->
<para>
Add tracking of global objects in system view
<structname>pg_stat_database</structname> (Julien Rouhaud)
</para>
<para>
Global objects are shown with a <link
linkend="pg-stat-database-view"><structname>pg_stat_database</structname></link>.<structfield>datid</structfield>
value of zero.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-10-09 [c48101620] Add pg_ls_archive_statusdir function
-->
<para>
Add the ability to list the contents of the archive directory
(Christoph Moench-Tegeder)
</para>
<para>
The function is <link
linkend="functions-admin-genfile-table"><function>pg_ls_archive_statusdir()</function></link>.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-10-05 [9cd92d1a3] Add pg_ls_tmpdir function
-->
<para>
Add the ability to list the contents of temporary directories
(Nathan Bossart)
</para>
<para>
The function, <link
linkend="functions-admin-genfile-table"><function>pg_ls_tmpdir()</function></link>,
optionally allows specification of a tablespace.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-02-01 [f60a0e967] Add more columns to pg_stat_ssl
-->
<para>
Add information about the client certificate to the system view <link
linkend="pg-stat-ssl-view"><structname>pg_stat_ssl</structname></link>
(Peter Eisentraut)
</para>
<para>
The new columns are <structfield>client_serial</structfield>
and <structfield>issuer_dn</structfield>. Column
<structfield>clientdn</structfield> has been renamed to
<structfield>client_dn</structfield> for clarity.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-02-21 [f9692a769] Hide other user's pg_stat_ssl rows
-->
<para>
Restrict visibility of rows in <structname>pg_stat_ssl</structname>
for unprivileged users (Peter Eisentraut)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-01-30 [689d15e95] Log PostgreSQL version number on startup
-->
<para>
At server start, emit a log message including the server
version number (Christoph Berg)
</para>
</listitem>
<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
2019-03-06 [342cb650e] Don't log incomplete startup packet if it's empty
-->
<para>
Prevent logging <quote>incomplete startup packet</quote> if a new
connection is immediately closed (Tom Lane)
</para>
<para>
This avoids log spam from certain forms of monitoring.
</para>
</listitem>
<listitem>
<!--
Author: Stephen Frost <sfrost@snowman.net>
2018-09-28 [8bddc8640] Add application_name to connection authorized msg
-->
<para>
Include the <xref linkend="guc-application-name"/>, if set,
in <xref linkend="guc-log-connections"/> log messages (Don Seiler)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-02-27 [6ae578a91] Set fallback_application_name for a walreceiver to clust
-->
<para>
Make the walreceiver set its application name to the cluster name,
if set (Peter Eisentraut)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-12-09 [7fee252f6] Add timestamp of last received message from standby to p
-->
<para>
Add the timestamp of the last received standby message to <link
linkend="pg-stat-replication-view"><structname>pg_stat_replication</structname></link>
(Lim Myungkyu)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-07-02 [c55de5e51] Add wait event for fsync of WAL segments
-->
<para>
Add a <link linkend="wait-event-table">wait event</link> for fsync
of <acronym>WAL</acronym> segments (Konstantin Knizhnik)
</para>
</listitem>
</itemizedlist>
</sect4>
<sect4>
<title><acronym>Authentication</acronym></title>
<itemizedlist>
<listitem>
<!--
Author: Stephen Frost <sfrost@snowman.net>
2019-04-03 [b0b39f72b] GSSAPI encryption support
-->
<para>
Add <link linkend="gssapi-auth"><acronym>GSSAPI</acronym></link>
encryption support (Robbie Harwood, Stephen Frost)
</para>
<para>
This feature allows TCP/IP connections to be encrypted when using
GSSAPI authentication, without having to set up a separate
encryption facility such as SSL.
In support of this, add <literal>hostgssenc</literal>
and <literal>hostnogssenc</literal> record types in <link
linkend="auth-pg-hba-conf"><filename>pg_hba.conf</filename></link>
for selecting connections that do or do not use GSSAPI encryption,
corresponding to the existing <literal>hostssl</literal>
and <literal>hostnossl</literal> record types.
There is also a new <xref linkend="libpq-connect-gssencmode"/>
libpq option, and a <xref linkend="pg-stat-gssapi-view"/> system
view.
</para>
</listitem>
<listitem>
<!--
Author: Magnus Hagander <magnus@hagander.net>
2019-03-09 [0516c61b7] Add new clientcert hba option verify-full
-->
<para>
Allow the <link
linkend="auth-cert"><literal>clientcert</literal></link>
<filename>pg_hba.conf</filename> option to check that the database
user name matches the client certificate's common name
(Julian Markwort, Marius Timmer)
</para>
<para>
This new check is enabled with
<literal>clientcert=verify-full</literal>.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2019-03-21 [0f086f84a] Add DNS SRV support for LDAP server discovery.
-->
<para>
Allow discovery of an <link
linkend="auth-ldap"><acronym>LDAP</acronym></link> server using
<acronym>DNS SRV</acronym> records (Thomas Munro)
</para>
<para>
This avoids the requirement of specifying
<literal>ldapserver</literal>. It is only supported if
<productname>PostgreSQL</productname> is compiled with
<productname>OpenLDAP</productname>.
</para>
</listitem>
</itemizedlist>
</sect4>
<sect4>
<title>Server Configuration</title>
<itemizedlist>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-03-23 [ed308d783] Add options to enable and disable checksums in pg_checks
-->
<para>
Add ability to enable/disable cluster checksums using <xref
linkend="app-pgchecksums"/> (Michael Banck, Michaël Paquier)
</para>
<para>
The cluster must be shut down for these operations.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-03-10 [cbccac371] Reduce the default value of autovacuum_vacuum_cost_delay
-->
<para>
Reduce the default value of <xref
linkend="guc-autovacuum-vacuum-cost-delay"/> to 2ms (Tom Lane)
</para>
<para>
This allows autovacuum operations to proceed faster by default.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-03-10 [caf626b2c] Convert [autovacuum_]vacuum_cost_delay into floating-poi
-->
<para>
Allow <xref linkend="guc-vacuum-cost-delay"/> to specify
sub-millisecond delays, by accepting fractional values (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-03-10 [caf626b2c] Convert [autovacuum_]vacuum_cost_delay into floating-poi
-->
<para>
Allow time-based server parameters to use units of <link
linkend="config-setting">microseconds</link>
(<literal>us</literal>) (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-03-11 [1a83a80a2] Allow fractional input values for integer GUCs, and impr
-->
<para>
Allow fractional input for integer server parameters (Tom Lane)
</para>
<para>
For example, <command>SET work_mem = '30.1GB'</command> is now
allowed, even though <varname>work_mem</varname> is an integer
parameter. The value will be rounded to an integer after any
required units conversion.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-03-10 [caf626b2c] Convert [autovacuum_]vacuum_cost_delay into floating-poi
-->
<para>
Allow units to be defined for floating-point server parameters
(Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2019-04-02 [475861b26] Add wal_recycle and wal_init_zero GUCs.
-->
<para>
Add <xref linkend="guc-wal-recycle"/> and <xref
linkend="guc-wal-init-zero"/> server parameters to control
<acronym>WAL</acronym> file recycling (Jerry Jelinek)
</para>
<para>
Avoiding file recycling can be beneficial on copy-on-write file
systems like <productname>ZFS</productname>.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-04-06 [249d64999] Add support TCP user timeout in libpq and the backend se
-->
<para>
Add server parameter <xref linkend="guc-tcp-user-timeout"/> to
control the server's <acronym>TCP</acronym> timeout (Ryohei Nagaura)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
2018-11-20 [e73e67c71] Add settings to control SSL/TLS protocol version
-->
<para>
Allow control of the minimum and maximum <acronym>SSL</acronym>
protocol versions (Peter Eisentraut)
</para>
<para>
The server parameters are <xref
linkend="guc-ssl-min-protocol-version"/> and <xref
linkend="guc-ssl-max-protocol-version"/>.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
2018-07-30 [98efa76fe] Add ssl_library preset parameter
-->
<para>
Add server parameter <xref linkend="guc-ssl-library"/> to report
the <acronym>SSL</acronym> library version used by the server
(Peter Eisentraut)
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2019-02-03 [f1bebef60] Add shared_memory_type GUC.
-->
<para>
Add server parameter <xref linkend="guc-shared-memory-type"/>
to control the type of shared memory to use (Andres Freund)
</para>
<para>
This allows selection of <productname>System V</productname>
shared memory, if desired.
</para>
</listitem>
</itemizedlist>
</sect4>
</sect3>
<sect3>
<title>Streaming Replication and Recovery</title>
<itemizedlist>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-02-07 [13b89f96d] Allow some recovery parameters to be changed with reload
-->
<para>
Allow some recovery parameters to be changed with reload (Peter
Eisentraut)
</para>
<para>
These parameters are <xref linkend="guc-archive-cleanup-command"/>,
<xref linkend="guc-promote-trigger-file"/>, <xref
linkend="guc-recovery-end-command"/>, and <xref
linkend="guc-recovery-min-apply-delay"/>.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-09-22 [db361db2f] Make GUC wal_sender_timeout user-settable
-->
<para>
Allow the streaming replication timeout (<xref
linkend="guc-wal-sender-timeout"/>) to be set per connection
(Takayuki Tsunakawa)
</para>
<para>
Previously, this could only be set cluster-wide.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-10-25 [10074651e] Add pg_promote function
Author: Michael Paquier <michael@paquier.xyz>
2018-11-06 [8f045e242] Switch pg_promote to be parallel-safe
-->
<para>
Add function <link
linkend="functions-recovery-control"><function>pg_promote()</function></link>
to promote standbys to primaries (Laurenz Albe, Michaël Paquier)
</para>
<para>
Previously, this operation was only possible by using <xref
linkend="app-pg-ctl"/> or creating a trigger file.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-04-05 [9f06d79ef] Add facility to copy replication slots
-->
<para>
Allow replication slots to be copied (Masahiko Sawada)
</para>
<para>
The functions for this are <link
linkend="functions-replication-table"><function>pg_copy_physical_replication_slot()</function></link>
and <function>pg_copy_logical_replication_slot()</function>.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-02-12 [ea92368cd] Move max_wal_senders out of max_connections for connecti
-->
<para>
Make <xref linkend="guc-max-wal-senders"/> not count as part of
<xref linkend="guc-max-connections"/> (Alexander Kukushkin)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-01-11 [ff8530605] Add value 'current' for recovery_target_timeline
-->
<para>
Add an explicit value of <literal>current</literal> for <xref
linkend="guc-recovery-target-timeline"/> (Peter Eisentraut)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-09-07 [8582b4d04] Improve handling of corrupted two-phase state files at r
-->
<para>
Make recovery fail if a <link
linkend="sql-prepare-transaction">two-phase transaction</link>
status file is corrupt (Michaël Paquier)
</para>
<para>
Previously, a warning was logged and recovery continued,
allowing the transaction to be lost.
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>Utility Commands</title>
<itemizedlist>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-03-29 [5dc92b844] REINDEX CONCURRENTLY
-->
<para>
Add <xref linkend="sql-reindex"/> <literal>CONCURRENTLY</literal>
option to allow reindexing without locking out writes (Michaël
Paquier, Andreas Karlsson, Peter Eisentraut)
</para>
<para>
This is also controlled by the <xref linkend="app-reindexdb"/>
application's <option>--concurrently</option> option.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-03-30 [fc22b6623] Generated columns
-->
<para>
Add support for <link linkend="ddl-generated-columns">generated
columns</link> (Peter Eisentraut)
</para>
<para>
The content of generated columns are computed from expressions
(including references to other columns in the same table)
rather than being specified by <command>INSERT</command> or
<command>UPDATE</command> commands.
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2019-01-20 [31f381740] Allow COPY FROM to filter data using WHERE conditions
-->
<para>
Add a <literal>WHERE</literal> clause
to <link linkend="sql-copy"><command>COPY FROM</command></link> to
control which rows are accepted (Surafel Temesgen)
</para>
<para>
This provides a simple way to filter incoming data.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2018-10-09 [212fab992] Relax transactional restrictions on ALTER TYPE ... ADD V
-->
<para>
Allow enumerated values to be added more flexibly
(Andrew Dunstan, Tom Lane, Thomas Munro)
</para>
<para>
Previously, <link linkend="sql-altertype"><command>ALTER TYPE
... ADD VALUE</command></link> could not be called in a transaction
block, unless it was part of the same transaction that created the
enumerated type. Now it can be called in a later transaction, so
long as the new enumerated value is not referenced until after it is
committed.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-03-24 [280a408b4] Transaction chaining
-->
<para>
Add commands to end a transaction and start a new one (Peter
Eisentraut)
</para>
<para>
The commands are <link linkend="sql-commit"><command>COMMIT AND
CHAIN</command></link>
and <link linkend="sql-rollback"><command>ROLLBACK AND
CHAIN</command></link>.
</para>
</listitem>
<listitem>
<!--
Author: Fujii Masao <fujii@postgresql.org>
2019-04-08 [119dcfad9] Add vacuum_truncate reloption.
Author: Fujii Masao <fujii@postgresql.org>
2019-05-08 [b84dbc8eb] Add TRUNCATE parameter to VACUUM.
-->
<para>
Add <xref linkend="sql-vacuum"/> and <command>CREATE
TABLE</command> options to prevent <command>VACUUM</command>
from truncating trailing empty pages (Takayuki Tsunakawa)
</para>
<para>
These options are <varname>vacuum_truncate</varname> and
<varname>toast.vacuum_truncate</varname>. Use of these options
reduces <command>VACUUM</command>'s locking requirements, but
prevents returning disk space to the operating system.
</para>
</listitem>
<listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2019-04-04 [a96c41fee] Allow VACUUM to be run with index cleanup disabled.
Author: Michael Paquier <michael@paquier.xyz>
2019-06-25 [ce59b75d4] Add toast-level reloption for vacuum_index_cleanup
-->
<para>
Allow <command>VACUUM</command> to skip index cleanup
(Masahiko Sawada)
</para>
<para>
This change adds a <command>VACUUM</command> command
option <literal>INDEX_CLEANUP</literal> as well as a table storage
option <literal>vacuum_index_cleanup</literal>. Use of this option
reduces the ability to reclaim space and can lead to index bloat,
but it is helpful when the main goal is to freeze old tuples.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-10-04 [803b1301e] Add option SKIP_LOCKED to VACUUM and ANALYZE
-->
<para>
Add the ability to skip <command>VACUUM</command> and
<command>ANALYZE</command> operations on tables that cannot be
locked immediately (Nathan Bossart)
</para>
<para>
This option is called <literal>SKIP_LOCKED</literal>.
</para>
</listitem>
<listitem>
<!--
Author: Robert Haas <rhaas@postgresql.org>
2019-03-29 [41b54ba78] Allow existing VACUUM options to take a Boolean argument
-->
<para>
Allow <command>VACUUM</command> and <command>ANALYZE</command>
to take optional Boolean argument specifications (Masahiko Sawada)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-08-10 [f841ceb26] Improve TRUNCATE by avoiding early lock queue
2018-08-27 [a556549d7] Improve VACUUM and ANALYZE by avoiding early lock queue
-->
<para>
Prevent <xref linkend="sql-truncate"/>,
<command>VACUUM</command> and <command>ANALYZE</command>
from requesting a lock on
tables for which the user lacks permission (Michaël Paquier)
</para>
<para>
This prevents unauthorized locking, which could interfere with
user queries.
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2019-04-04 [ea569d64a] Add SETTINGS option to EXPLAIN, to print modified settin
-->
<para>
Add <xref linkend="sql-explain"/> option
<literal>SETTINGS</literal> to output non-default optimizer
settings (Tomas Vondra)
</para>
<para>
This output can also be obtained when using <xref linkend="auto-explain"/>
by setting <varname>auto_explain.log_settings</varname>.
</para>
</listitem>
<listitem>
<!--
Author: Andrew Gierth <rhodiumtoad@postgresql.org>
2019-03-19 [01bde4fa4] Implement OR REPLACE option for CREATE AGGREGATE.
-->
<para>
Add <literal>OR REPLACE</literal> option to
<xref linkend="sql-createaggregate"/>
(Andrew Gierth)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-03-19 [590a87025] Ignore attempts to add TOAST table to shared or catalog
-->
<para>
Allow modifications of system catalogs' options using <xref
linkend="sql-altertable"/> (Peter Eisentraut)
</para>
<para>
Modifications of catalogs' <literal>reloptions</literal> and
autovacuum settings are now supported. (Setting <xref
linkend="guc-allow-system-table-mods"/> is still required.)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-03-13 [f177660ab] Include all columns in default names for foreign key con
-->
<para>
Use all key columns' names when selecting default constraint
names for foreign keys (Peter Eisentraut)
</para>
<para>
Previously, only the first column name was included in the constraint
name, resulting in ambiguity for multi-column foreign keys.
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>Data Types</title>
<itemizedlist>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-06-19 [d8594d123] Update list of combining characters
2019-06-24 [82be666ee] Update unicode_norm_table.h to Unicode 12.1.0
-->
<para>
Update assorted knowledge about Unicode to match Unicode 12.1.0
(Peter Eisentraut)
</para>
<para>
This fixes, for example, cases
where <application>psql</application> would misformat output
involving combining characters.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-09-24 [fd582317e] Sync our Snowball stemmer dictionaries with current upst
-->
<para>
Update Snowball stemmer dictionaries with support for new languages
(Arthur Zakirov)
</para>
<para>
This adds word stemming support for Arabic, Indonesian, Irish,
Lithuanian, Nepali, and Tamil to <link linkend="textsearch">full
text search</link>.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-03-22 [5e1963fb7] Collations with nondeterministic comparison
-->
<para>
Allow creation of <link
linkend="collation">collations</link> that report
string equality for strings that are not bit-wise equal (Peter
Eisentraut)
</para>
<para>
This feature supports <quote>nondeterministic</quote> collations
that can define case- and accent-agnostic equality comparisons.
Thus, for example, a case-insensitive uniqueness constraint on a
text column can be made more easily than before. This is only
supported for <acronym>ICU</acronym> collations.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-03-17 [b8f9a2a69] Add support for collation attributes on older ICU versio
-->
<para>
Add support for <acronym>ICU</acronym> collation attributes on older
ICU versions (Peter Eisentraut)
</para>
<para>
This allows customization of the collation rules in a consistent way
across all ICU versions.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-12-19 [2ece7c07d] Add text-vs-name cross-type operators, and unify name_op
-->
<para>
Allow data
type <link linkend="datatype-character-special-table">name</link>
to more seamlessly be compared to other text types (Tom Lane)
</para>
<para>
Type <type>name</type> now behaves much like a domain over
type <type>text</type> that has default collation <quote>C</quote>.
This allows cross-type comparisons to be processed more efficiently.
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>Functions</title>
<itemizedlist>
<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2019-03-16 [72b646033] Partial implementation of SQL/JSON path language
Author: Alexander Korotkov <akorotkov@postgresql.org>
2019-03-16 [16d489b0f] Numeric error suppression in jsonpath
Author: Alexander Korotkov <akorotkov@postgresql.org>
2019-04-01 [0a02e2ae0] GIN support for @@ and @? jsonpath operators
-->
<para>
Add support for the <acronym>SQL/JSON</acronym> <link
linkend="functions-sqljson-path">path</link> language
(Nikita Glukhov, Teodor Sigaev, Alexander Korotkov, Oleg Bartunov,
Liudmila Mantrova)
</para>
<para>
This allows execution of complex queries on <type>JSON</type>
values using an <acronym>SQL</acronym>-standard language.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-03-12 [f1d85aa98] Add support for hyperbolic functions, as well as log10()
-->
<para>
Add support for <link linkend="functions-math-hyp-table">hyperbolic
functions</link> (Lætitia Avrot)
</para>
<para>
Also add <function>log10()</function> as an alias for
<function>log()</function>, for standards compliance.
</para>
</listitem>
<listitem>
<!--
Author: Dean Rasheed <dean.a.rasheed@gmail.com>
2018-10-06 [e954a727f] Improve the accuracy of floating point statistical aggre
-->
<para>
Improve the accuracy of statistical aggregates like <link
linkend="functions-aggregate-statistics-table"><function>variance()</function></link>
by using more precise algorithms (Dean Rasheed)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-11-14 [600b04d6b] Add a timezone-specific variant of date_trunc().
-->
<para>
Allow <link
linkend="functions-datetime-table"><function>date_trunc()</function></link>
to have an additional argument to control the time zone (Vik
Fearing, Tom Lane)
</para>
<para>
This is faster and simpler than using the <literal>AT TIME
ZONE</literal> clause.
</para>
</listitem>
<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2018-09-09 [cf9846724] Improve behavior of to_timestamp()/to_date() functions
-->
<para>
Adjust <link
linkend="functions-formatting-table"><function>to_timestamp()</function></link>/<function>to_date()</function>
functions to be more forgiving of template mismatches (Artur
Zakirov, Alexander Korotkov, Liudmila Mantrova)
</para>
<para>
This new behavior more closely matches the
<productname>Oracle</productname> functions of the same name.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-03-07 [251cf2e27] Fix minor deficiencies in XMLTABLE, xpath(), xmlexists()
-->
<para>
Fix assorted bugs in <link
linkend="functions-xml"><acronym>XML</acronym> functions</link>
(Pavel Stehule, Markus Winand, Chapman Flack)
</para>
<para>
Specifically, in <literal>XMLTABLE</literal>,
<function>xpath()</function>, and <function>xmlexists()</function>,
fix some cases where nothing was output for a node, or an
unexpected error was thrown, or necessary escaping of XML special
characters was omitted.
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-03-07 [eaaa5986a] Fix the BY {REF,VALUE} clause of XMLEXISTS/XMLTABLE
-->
<para>
Allow the <literal>BY VALUE</literal> clause
in <function>XMLEXISTS</function> and <function>XMLTABLE</function>
(Chapman Flack)
</para>
<para>
This SQL-standard clause has no effect
in <productname>PostgreSQL</productname>'s implementation, but it
was unnecessarily being rejected.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-03-27 [5bde1651b] Switch function current_schema[s]() to be parallel-unsaf
-->
<para>
Prevent <link
linkend="functions-info-session-table"><function>current_schema()</function></link>
and <function>current_schemas()</function> from being run by
parallel workers, as they are not parallel-safe (Michaël Paquier)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-01-30 [5f5c01459] Allow RECORD and RECORD[] to be specified in function co
-->
<para>
Allow <type>RECORD</type> and <type>RECORD[]</type> to be used
as column types in a query's column definition list for a <link
linkend="queries-tablefunctions">table function</link> that is declared
to return <type>RECORD</type> (Elvis Pranskevichus)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title><link linkend="plpgsql">PL/pgSQL</link></title>
<itemizedlist>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-01-04 [4879a5172] Support plpgsql variable names that conflict with unrese
-->
<para>
Allow SQL commands and variables with the same names as those
commands to be used in the same PL/pgSQL function (Tom Lane)
</para>
<para>
For example, allow a variable called <varname>comment</varname> to
exist in a function that calls
the <command>COMMENT</command> <acronym>SQL</acronym> command.
Previously this combination caused a parse error.
</para>
</listitem>
<listitem>
<!--
Author: Tomas Vondra <tomas.vondra@postgresql.org>
2018-07-25 [167075be3] Add strict_multi_assignment and too_many_rows plpgsql ch
-->
<para>
Add new optional warning and error checks to PL/pgSQL (Pavel
Stehule)
</para>
<para>
The new checks allow for run-time validation of
<literal>INTO</literal> column counts and single-row results.
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>Client Interfaces</title>
<itemizedlist>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-04-06 [249d64999] Add support TCP user timeout in libpq and the backend se
-->
<para>
Add connection parameter <xref linkend="libpq-tcp-user-timeout"/>
to control <application>libpq</application>'s <acronym>TCP</acronym>
timeout (Ryohei Nagaura)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-04-04 [7bac3acab] Add a "SQLSTATE-only" error verbosity option to libpq an
-->
<para>
Allow <application>libpq</application> (and thus
<application>psql</application>) to report only the
<literal>SQLSTATE</literal> value in error messages (Didier Gautheron)
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-09-11 [2970afa6c] Add PQresultMemorySize function to report allocated size
-->
<para>
Add <application>libpq</application>
function <link linkend="libpq-pqresultmemorysize"><function>PQresultMemorySize()</function></link>
to report the memory used by a query result (Lars Kanis, Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
2018-09-07 [1fea1e325] libpq: Change "options" dispchar to normal
-->
<para>
Remove the no-display/debug flag from <application>libpq</application>'s
<literal>options</literal> connection parameter (Peter Eisentraut)
</para>
<para>
This allows this parameter to be set by
<application>postgres_fdw</application>.
</para>
</listitem>
<listitem>
<!--
Author: Michael Meskes <meskes@postgresql.org>
2019-02-18 [050710b36] Add bytea datatype to ECPG.
-->
<para>
Allow <xref linkend="app-ecpg"/> to create variables of data type
<type>bytea</type> (Ryo Matsumura)
</para>
<para>
This allows ECPG clients to interact with <type>bytea</type> data
directly, rather than using an encoded form.
</para>
</listitem>
<listitem>
<!--
Author: Michael Meskes <meskes@postgresql.org>
2019-05-22 [a1dc6ab46] Implement PREPARE AS statement for ECPG.
-->
<para>
Add <command>PREPARE AS</command> support to
<productname>ECPG</productname> (Ryo Matsumura)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>Client Applications</title>
<itemizedlist>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-01-31 [00d1e88d3] Add - -min-xid-age and - -min-mxid-age options to vacuumdb
-->
<para>
Allow <xref linkend="app-vacuumdb"/> to select tables for vacuum
based on their wraparound horizon (Nathan Bossart)
</para>
<para>
The options are <option>--min-xid-age</option> and
<option>--min-mxid-age</option>.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-01-08 [354e95d1f] Add - -disable-page-skipping and - -skip-locked to vacuumd
-->
<para>
Allow <application>vacuumdb</application> to disable waiting for locks
or skipping all-visible pages (Nathan Bossart)
</para>
<para>
The options are <option>--skip-locked</option> and
<option>--disable-page-skipping</option>.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-04-01 [cc8d41511] Unified logging system for command-line programs
-->
<para>
Add colorization to the output of command-line utilities (Peter
Eisentraut)
</para>
<para>
This is enabled by setting the environment variable
<envar>PG_COLOR</envar> to <literal>always</literal>
or <literal>auto</literal>. The specific colors used can be
adjusted by setting the environment variable
<envar>PG_COLORS</envar>, using ANSI escape codes for colors.
For example, the default behavior is equivalent to
<literal>PG_COLORS="error=01;31:warning=01;35:locus=01"</literal>.
</para>
</listitem>
</itemizedlist>
<sect4>
<title><xref linkend="app-psql"/></title>
<itemizedlist>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-11-26 [aa2ba50c2] Add CSV table output mode in psql.
-->
<para>
Add <acronym>CSV</acronym> table output mode in
<application>psql</application> (Daniel Vérité)
</para>
<para>
This is controlled by <command>\pset format csv</command> or the
command-line <option>--csv</option> option.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-03-11 [27f3dea64] psql: Add documentation URL to \help output
-->
<para>
Show the manual page <acronym>URL</acronym> in
<application>psql</application>'s <command>\help</command> output
for a SQL command (Peter Eisentraut)
</para>
</listitem>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2018-11-19 [6e5f8d489] psql: Show IP address in \conninfo
2019-06-14 [313f56ce2] Tweak libpq's PQhost, PQhostaddr, and psql's \connect
-->
<para>
Display the <acronym>IP</acronym> address in
<application>psql</application>'s <command>\conninfo</command>
(Fabien Coelho)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-12-23 [11a60d496] Add completion for storage parameters after CREATE TABLE
Author: Michael Paquier <michael@paquier.xyz>
2018-10-26 [5953c9969] Improve tab completion of CREATE EVENT TRIGGER in psql
Author: Michael Paquier <michael@paquier.xyz>
2018-10-26 [292ef6e27] Add tab completion of EXECUTE FUNCTION for CREATE TRIGGE
Author: Michael Paquier <michael@paquier.xyz>
2019-01-28 [23349b18d] Add tab completion for ALTER INDEX ALTER COLUMN in psql
Author: Michael Paquier <michael@paquier.xyz>
2018-12-20 [4cba9c2a3] Add more tab completion for CREATE TABLE in psql
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-09-20 [a7c4dad1a] Fix psql's tab completion for ALTER DATABASE ... SET TAB
Author: Michael Paquier <michael@paquier.xyz>
2018-12-25 [f89ae34ab] Improve tab completion of ALTER INDEX/TABLE with SET STA
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-09-20 [c9a8a401f] Fix psql's tab completion for TABLE.
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-09-21 [121213d9d] Improve tab completion for ANALYZE, EXPLAIN, and VACUUM.
-->
<para>
Improve tab completion of <command>CREATE TABLE</command>,
<command>CREATE TRIGGER</command>,
<command>CREATE EVENT TRIGGER</command>,
<command>ANALYZE</command>, <command>EXPLAIN</command>,
<command>VACUUM</command>, <command>ALTER TABLE</command>,
<command>ALTER INDEX</command>, <command>ALTER DATABASE</command>,
and <command>ALTER INDEX ALTER COLUMN</command>
(Dagfinn Ilmari Mannsåker, Tatsuro Yamada, Michaël Paquier,
Tom Lane, Justin Pryzby)
</para>
</listitem>
</itemizedlist>
</sect4>
<sect4>
<title><link linkend="pgbench"><application>pgbench</application></link></title>
<itemizedlist>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-01-10 [6260cc550] pgbench: add \cset and \gset commands
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-03-25 [25ee70511] pgbench: Remove \cset
-->
<para>
Allow values produced by queries to be assigned
to <application>pgbench</application> variables (Fabien Coelho,
Álvaro Herrera)
</para>
<para>
The command for this is <command>\gset</command>.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-09-25 [5b7e03670] Avoid unnecessary precision loss for pgbench's - -rate ta
-->
<para>
Improve precision of <application>pgbench</application>'s
<option>--rate</option> option (Tom Lane)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
2018-10-15 [5b75a4f82] pgbench: Report errors during run better
-->
<para>
Improve <application>pgbench</application>'s error reporting with
clearer messages and return codes (Peter Eisentraut)
</para>
</listitem>
</itemizedlist>
</sect4>
</sect3>
<sect3>
<title>Server Applications</title>
<itemizedlist>
<listitem>
<!--
Author: Alexander Korotkov <akorotkov@postgresql.org>
2018-09-01 [ec7436993] Implement "pg_ctl logrotate" command
-->
<para>
Allow control of log file rotation via <xref linkend="app-pg-ctl"/>
(Kyotaro Horiguchi, Alexander Kuzmenkov, Alexander Korotkov)
</para>
<para>
Previously, this was only possible via an <acronym>SQL</acronym>
function or a process signal.
</para>
</listitem>
<listitem>
<!--
Author: Heikki Linnakangas <heikki.linnakangas@iki.fi>
2019-01-14 [bb24439ce] Detach postmaster process from pg_ctl's session at serve
-->
<para>
Properly detach the new server process
during <literal><application>pg_ctl</application> start</literal>
(Paul Guo)
</para>
<para>
This prevents the server from being shut down if the shell script
that invoked <application>pg_ctl</application> is interrupted later.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter_e@gmx.net>
2018-11-07 [3a769d823] pg_upgrade: Allow use of file cloning
-->
<para>
Allow <xref linkend="pgupgrade"/> to use the file system's cloning
feature, if there is one (Peter Eisentraut)
</para>
<para>
The <option>--clone</option> option has the advantages of
<option>--link</option>, while preventing the old cluster from
being changed after the new cluster has started.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-12-01 [2d34ad843] Add a - -socketdir option to pg_upgrade.
-->
<para>
Allow specification of the socket directory to use
in <application>pg_upgrade</application> (Daniel Gustafsson)
</para>
<para>
This is controlled by <option>--socketdir</option>; the default
is the current directory.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-03-23 [e0090c869] Add option -N/- -no-sync to pg_checksums
-->
<para>
Allow <xref linkend="app-pgchecksums"/> to disable fsync operations
(Michaël Paquier)
</para>
<para>
This is controlled by the <option>--no-sync</option> option.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-07-10 [8a00b96aa] Add pg_rewind - -no-sync
-->
<para>
Allow <xref linkend="app-pgrewind"/> to disable fsync operations
(Michaël Paquier)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-09-14 [0ba06e0bf] Allow concurrent-safe open() and fopen() in frontend
2018-09-20 [40cfe8606] Enforce translation mode for Windows frontends to text
-->
<para>
Fix <xref linkend="pgtestfsync"/> to report accurate
<literal>open_datasync</literal> durations on
<productname>Windows</productname> (Laurenz Albe)
</para>
</listitem>
</itemizedlist>
<sect4>
<title><link linkend="app-pgdump"><application>pg_dump</application></link>,
<link linkend="app-pg-dumpall"><application>pg_dumpall</application></link>,
<link linkend="app-pgrestore"><application>pg_restore</application></link></title>
<itemizedlist>
<listitem>
<!--
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-03-07 [7e413a0f8] pg_dump: allow multiple rows per insert
2019-06-14 [a193cbec1] Add pg_dumpall rows-per-insert
-->
<para>
When <application>pg_dump</application> emits data
with <command>INSERT</command> commands rather
than <command>COPY</command>, allow more than one data row to be
included in each <command>INSERT</command> (Surafel Temesgen,
David Rowley)
</para>
<para>
The option controlling this is <option>--rows-per-insert</option>.
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2018-07-13 [387a5cfb9] Add pg_dump - -on-conflict-do-nothing option.
-->
<para>
Allow <application>pg_dump</application> to emit <command>INSERT
... ON CONFLICT DO NOTHING</command> (Surafel Temesgen)
</para>
<para>
This avoids conflict failures during restore.
The option is <option>--on-conflict-do-nothing</option>.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-09-14 [548e50976] Improve parallel scheduling logic in pg_dump/pg_restore.
-->
<para>
Decouple the order of operations in a
parallel <application>pg_dump</application> from the order used by
a subsequent parallel <application>pg_restore</application> (Tom
Lane)
</para>
<para>
This allows <application>pg_restore</application> to perform
more-fully-parallelized parallel restores, especially in cases
where the original dump was not done in parallel. Scheduling of a
parallel <application>pg_dump</application> is also somewhat
improved.
</para>
</listitem>
<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
2019-02-18 [af25bc03e] Provide an extra-float-digits setting for pg_dump / pg_d
-->
<para>
Allow the <xref linkend="guc-extra-float-digits"/> setting to be
specified for <application>pg_dump</application> and
<application>pg_dumpall</application> (Andrew Dunstan)
</para>
<para>
This is primarily useful for making dumps that are exactly
comparable across different source server versions. It is not
recommended for normal use, as it may result in loss of precision
when the dump is restored.
</para>
</listitem>
<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
2019-03-01 [f092de050] Add - -exclude-database option to pg_dumpall
-->
<para>
Add <option>--exclude-database</option> option to
<application>pg_dumpall</application> (Andrew Dunstan)
</para>
</listitem>
</itemizedlist>
</sect4>
</sect3>
<sect3>
<title>Source Code</title>
<itemizedlist>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2018-11-16 [4da597edf] Make TupleTableSlots extensible, finish split of
Author: Andres Freund <andres@anarazel.de>
2019-03-06 [8586bf7ed] tableam: introduce table AM infrastructure.
Author: Andres Freund <andres@anarazel.de>
2019-03-06 [3b925e905] tableam: Add pg_dump support.
Author: Andres Freund <andres@anarazel.de>
2019-03-11 [c2fe139c2] tableam: Add and use scan APIs.
Author: Andres Freund <andres@anarazel.de>
2019-03-23 [5db6df0c0] tableam: Add tuple_{insert, delete, update, lock} and us
Author: Andres Freund <andres@anarazel.de>
2019-03-28 [d25f51910] tableam: relation creation, VACUUM FULL/CLUSTER, SET TAB
Author: Andres Freund <andres@anarazel.de>
2019-03-29 [d3a5fc17e] Show table access methods as such in psql's \dA.
Author: Andres Freund <andres@anarazel.de>
2019-03-31 [73c954d24] tableam: sample scan.
Author: Andres Freund <andres@anarazel.de>
2019-03-31 [bfbcad478] tableam: bitmap table scan.
existin
-->
<para>
Add <xref linkend="sql-create-access-method"/> command to create
new table types (Andres Freund, Haribabu Kommi, Álvaro Herrera,
Alexander Korotkov, Dmitry Dolgov)
</para>
<para>
This enables the development of new <link linkend="tableam">table
access methods</link>, which can optimize storage for different
use cases. The existing <literal>heap</literal> access method
remains the default.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-02-09 [1fb57af92] Create the infrastructure for planner support functions.
2019-02-09 [a391ff3c3] Build out the planner support function infrastructure.
2019-02-11 [74dfe58a5] Allow extensions to generate lossy index conditions.
-->
<para>
Add <link linkend="xfunc-optimization">planner support
function</link> interfaces to improve optimizer estimates,
inlining, and indexing for functions (Tom Lane)
</para>
<para>
This allows extensions to create planner support functions that
can provide function-specific selectivity, cost, and row-count
estimates that can depend on the function's arguments. Support
functions can also supply simplified representations and index
conditions, greatly expanding optimization possibilities.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2019-03-12 [a6417078c] Create a script that can renumber manually-assigned OIDs
2019-03-12 [3aa0395d4] Remove remaining hard-wired OID references in the initia
-->
<para>
Simplify renumbering manually-assigned OIDs, and establish a new
project policy for management of such OIDs (John Naylor, Tom Lane)
</para>
<para>
Patches that manually assign OIDs for new built-in objects (such as
new functions) should now randomly choose OIDs in the range
8000—9999. At the end of a development cycle, the OIDs used
by committed patches will be renumbered down to lower numbers,
currently somewhere in the 4<replaceable>xxx</replaceable> range,
using the new <link
linkend="system-catalog-oid-assignment"><command>renumber_oids.pl</command></link>
script. This approach should greatly reduce the odds of OID
collisions between different in-process patches.
</para>
<para>
While there is no specific policy reserving any OIDs for external
use, it is recommended that forks and other projects needing
private manually-assigned OIDs use numbers in the high
7<replaceable>xxx</replaceable> range. This will avoid conflicts
with recently-merged patches, and it should be a long time before
the core project reaches that range.
</para>
</listitem>
<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
2018-10-02 [a33245a85] Don't build static libraries on Cygwin
-->
<para>
Build <productname>Cygwin</productname> binaries using dynamic
instead of static libraries (Marco Atzeri)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-01-01 [1707a0d2a] Remove configure switch - -disable-strong-random
-->
<para>
Remove <application>configure</application> switch
<option>--disable-strong-random</option> (Michaël Paquier)
</para>
<para>
A strong random-number source is now required.
</para>
</listitem>
<listitem>
<!--
Author: Tom Lane <tgl@sss.pgh.pa.us>
2018-09-26 [96bf88d52] Always use our own versions of *printf().
2018-09-26 [26e9d4d4e] Convert elog.c's useful_strerror() into a globally-used
2018-09-26 [758ce9b77] Incorporate strerror_r() into src/port/snprintf.c, too.
2018-09-26 [d6c55de1f] Implement %m in src/port/snprintf.c, and teach elog.c to
-->
<para>
<function>printf</function>-family functions, as well
as <function>strerror</function>
and <function>strerror_r</function>, now behave uniformly across
platforms within Postgres code (Tom Lane)
</para>
<para>
Notably, <function>printf</function>
understands <literal>%m</literal> everywhere; on
Windows, <function>strerror</function> copes with Winsock error
codes (it used to do so in backend but not frontend code);
and <function>strerror_r</function> always follows the GNU return
convention.
</para>
</listitem>
<listitem>
<!--
Author: Andres Freund <andres@anarazel.de>
2018-08-23 [d9dd406fe] Require C99 (and thus MSCV 2013 upwards).
-->
<para>
Require a C99-compliant compiler, and <acronym>MSVC</acronym>
2013 or later on <productname>Windows</productname> (Andres Freund)
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-01-11 [96b8b8b6f] Create INSTALL file using Pandoc
2019-03-27 [2488ea7a9] Use Pandoc also for plain-text documentation output
-->
<para>
Use <application>pandoc</application>,
not <application>lynx</application>, for generating plain-text
documentation output files (Peter Eisentraut)
</para>
<para>
This affects only the <filename>INSTALL</filename> file generated
during <literal>make dist</literal> and the seldom-used
plain-text <filename>postgres.txt</filename> output file.
Pandoc produces better output than lynx and avoids some
locale/encoding issues. Pandoc version 1.13 or later is required.
</para>
</listitem>
<listitem>
<!--
Author: Peter Eisentraut <peter@eisentraut.org>
2019-03-27 [ea55aec0a] doc: Add some images
-->
<para>
Support use of images in the <productname>PostgreSQL</productname>
documentation (Jürgen Purtz)
</para>
</listitem>
</itemizedlist>
</sect3>
<sect3>
<title>Additional Modules</title>
<itemizedlist>
<listitem>
<!--
Author: Etsuro Fujita <efujita@postgresql.org>
2019-04-02 [ffab494a4] postgres_fdw: Perform the (ORDERED, NULL) upperrel opera
Author: Etsuro Fujita <efujita@postgresql.org>
2019-04-02 [d50d172e5] postgres_fdw: Perform the (FINAL, NULL) upperrel operati
-->
<para>
Allow <literal>ORDER BY</literal> sorts
and <literal>LIMIT</literal> clauses to be pushed
to <xref linkend="postgres-fdw"/> foreign servers in more
cases (Etsuro Fujita)
</para>
</listitem>
<listitem>
<!--
Author: Etsuro Fujita <efujita@postgresql.org>
2018-12-04 [f8f6e4467] postgres_fdw: Improve cost and size estimation for aggre
Author: Etsuro Fujita <efujita@postgresql.org>
2019-01-24 [fd1afdbaf] postgres_fdw: Account for tlist eval costs in estimate_p
Author: Etsuro Fujita <efujita@postgresql.org>
2019-05-09 [edbcbe277] postgres_fdw: Fix cost estimation for aggregate pushdown
-->
<para>
Improve optimizer cost accounting for
<application>postgres_fdw</application> queries (Etsuro Fujita)
</para>
</listitem>
<listitem>
<!--
Author: Jeff Davis <jdavis@postgresql.org>
2018-07-08 [a45adc747] Fix WITH CHECK OPTION on views referencing postgres_fdw
-->
<para>
Properly honor <literal>WITH CHECK OPTION</literal> on views
that reference <application>postgres_fdw</application> tables
(Etsuro Fujita)
</para>
<para>
While <literal>CHECK OPTION</literal>s on
<application>postgres_fdw</application> tables are ignored (because
the reference is foreign), views on such tables are considered
local, so this change enforces <literal>CHECK OPTION</literal>s
on them. Previously, only <command>INSERT</command>s and
<command>UPDATE</command>s with <literal>RETURNING</literal>
clauses that returned <literal>CHECK OPTION</literal> values
were validated.
</para>
</listitem>
<listitem>
<!--
Author: Amit Kapila <akapila@postgresql.org>
2019-01-11 [43cbedab8] Extend pg_stat_statements_reset to reset statistics spec
-->
<para>
Allow <link
linkend="pgstatstatements"><function>pg_stat_statements_reset()</function></link>
to be more granular (Haribabu Kommi, Amit Kapila)
</para>
<para>
The function now allows reset of statistics for specific databases,
users, and queries.
</para>
</listitem>
<listitem>
<!--
Author: Andrew Dunstan <andrew@dunslane.net>
2018-07-31 [2d36a5e9d] Provide a log_level setting for auto_explain
-->
<para>
Allow control of the <xref linkend="auto-explain"/> log level
(Tom Dunstan, Andrew Dunstan)
</para>
<para>
The default is <literal>LOG</literal>.
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2019-01-10 [e1c1d5444] Update unaccent rules with release 34 of CLDR for Latin-
-->
<para>
Update <xref linkend="unaccent"/> rules with new
punctuation and symbols (Hugh Ranalli, Michaël Paquier)
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2019-02-01 [456e3718e] Add combining characters to unaccent.rules.
-->
<para>
Allow <application>unaccent</application> to handle some accents
encoded as combining characters (Hugh Ranalli)
</para>
</listitem>
<listitem>
<!--
Author: Thomas Munro <tmunro@postgresql.org>
2018-09-02 [5e8d670c3] Add Greek characters to unaccent.rules.
-->
<para>
Allow <application>unaccent</application> to remove accents from
Greek characters (Tasos Maschalidis)
</para>
</listitem>
<listitem>
<!--
Author: Peter Geoghegan <pg@bowt.ie>
2019-03-20 [c1afd175b] Allow amcheck to re-find tuples using new search.
-->
<para>
Add a parameter to
<xref linkend="amcheck"/>'s <function>bt_index_parent_check()</function>
function to check each index tuple from the root of the tree
(Peter Geoghegan)
</para>
</listitem>
<listitem>
<!--
Author: Michael Paquier <michael@paquier.xyz>
2018-08-28 [1aaf532de] Rework option set of oid2name
Author: Michael Paquier <michael@paquier.xyz>
2018-08-28 [bfea331a5] Rework option set of vacuumlo
-->
<para>
Improve <xref linkend="oid2name"/> and <xref linkend="vacuumlo"/>
option handling to match other commands (Tatsuro Yamada)
</para>
</listitem>
</itemizedlist>
</sect3>
</sect2>
<sect2 id="release-12-acknowledgements">
<title>Acknowledgments</title>
<para>
The following individuals (in alphabetical order) have contributed to this
release as patch authors, committers, reviewers, testers, or reporters of
issues.
</para>
<simplelist>
<member>Abhijit Menon-Sen</member>
<member>Achilleas Mantzios</member>
<member>Adam Berlin</member>
<member>Adam Bielanski</member>
<member>Aditya Toshniwal</member>
<member>Adrien Nayrat</member>
<member>Alan Jackson</member>
<member>Albert Schabhuetl</member>
<member>Aleksander Alekseev</member>
<member>Alex Aktsipetrov</member>
<member>Alex Kliukin</member>
<member>Alex Macy</member>
<member>Alexander Korotkov</member>
<member>Alexander Kukushkin</member>
<member>Alexander Kuzmenkov</member>
<member>Alexander Lakhin</member>
<member>Alexandra Ryzhevich</member>
<member>Alexey Bashtanov</member>
<member>Alexey Ermakov</member>
<member>Alexey Kondratov</member>
<member>Alexey Kryuchkov</member>
<member>Alexey Stepanov</member>
<member>Allison Kaptur</member>
<member>Álvaro Herrera</member>
<member>Alyssa Ross</member>
<member>Amit Kapila</member>
<member>Amit Khandekar</member>
<member>Amit Langote</member>
<member>Amul Sul</member>
<member>Anastasia Lubennikova</member>
<member>André Hänsel</member>
<member>Andrea Gelmini</member>
<member>Andreas Joseph Krogh</member>
<member>Andreas Karlsson</member>
<member>Andreas Kunert</member>
<member>Andreas Scherbaum</member>
<member>Andreas Seltenreich</member>
<member>Andrei Yahorau</member>
<member>Andres Freund</member>
<member>Andrew Dunstan</member>
<member>Andrew Fletcher</member>
<member>Andrew Gierth</member>
<member>Andrew Krasichkov</member>
<member>Andrey Borodin</member>
<member>Andrey Klychkov</member>
<member>Andrey Lepikhov</member>
<member>Andy Abelisto</member>
<member>Anthony Greene</member>
<member>Anthony Skorski</member>
<member>Antonin Houska</member>
<member>Arne Roland</member>
<member>Arseny Sher</member>
<member>Arthur Zakirov</member>
<member>Ash Marath</member>
<member>Ashutosh Bapat</member>
<member>Ashutosh Sharma</member>
<member>Ashwin Agrawal</member>
<member>Aya Iwata</member>
<member>Bartosz Polnik</member>
<member>Basil Bourque</member>
<member>Bernd Helmle</member>
<member>Brad DeJong</member>
<member>Brigitte Blanc-Lafay</member>
<member>Bruce Klein</member>
<member>Bruce Momjian</member>
<member>Bruno Wolff</member>
<member>Chapman Flack</member>
<member>Chen Huajun</member>
<member>Chris Travers</member>
<member>Chris Wilson</member>
<member>Christian Hofstaedtler</member>
<member>Christoph Berg</member>
<member>Christoph Moench-Tegeder</member>
<member>Clemens Ladisch</member>
<member>Colm McHugh</member>
<member>Corey Huinker</member>
<member>Craig Ringer</member>
<member>Dagfinn Ilmari Mannsåker</member>
<member>Daisuke Higuchi</member>
<member>Daniel Fiori</member>
<member>Daniel Gustafsson</member>
<member>Daniel Vérité</member>
<member>Daniel Westermann</member>
<member>Daniel Wilches</member>
<member>Darafei Praliaskouski</member>
<member>Daryl Waycott</member>
<member>Dave Cramer</member>
<member>David Binderman</member>
<member>David Fetter</member>
<member>David G. Johnston</member>
<member>David Rowley</member>
<member>David Steele</member>
<member>Davy Machado</member>
<member>Dean Rasheed</member>
<member>Derek Hans</member>
<member>Derek Nelson</member>
<member>Devrim Gündüz</member>
<member>Dian Fay</member>
<member>Didier Gautheron</member>
<member>Dilip Kumar</member>
<member>Dmitry Dolgov</member>
<member>Dmitry Marakasov</member>
<member>Dmitry Molotkov</member>
<member>Dmitry Shalashov</member>
<member>Don Seiler</member>
<member>Donald Dong</member>
<member>Doug Rady</member>
<member>Edmund Horner</member>
<member>Eduards Bezverhijs</member>
<member>Elvis Pranskevichus</member>
<member>Emanuel Araújo</member>
<member>Emre Hasegeli</member>
<member>Eric Cyr</member>
<member>Erik Rijkers</member>
<member>Ertugrul Kahveci</member>
<member>Etsuro Fujita</member>
<member>Eugen Konkov</member>
<member>Euler Taveira</member>
<member>Fabien Coelho</member>
<member>Fabrízio de Royes Mello</member>
<member>Feike Steenbergen</member>
<member>Filip Rembialkowski</member>
<member>Gaby Schilders</member>
<member>Geert Lobbestael</member>
<member>George Tarasov</member>
<member>Georgios Kokolatos</member>
<member>Gianni Ciolli</member>
<member>Gilles Darold</member>
<member>Greg Stark</member>
<member>Grigory Smolkin</member>
<member>Guillaume Lelarge</member>
<member>Gunnlaugur Thor Briem</member>
<member>Gurjeet Singh</member>
<member>Hadi Moshayedi</member>
<member>Hailong Li</member>
<member>Hans Buschmann</member>
<member>Haribabu Kommi</member>
<member>Haruka Takatsuka</member>
<member>Hayato Kuroda</member>
<member>Heikki Linnakangas</member>
<member>Hironobu Suzuki</member>
<member>Hubert Lubaczewski</member>
<member>Hugh Ranalli</member>
<member>Ian Barwick</member>
<member>Ibrar Ahmed</member>
<member>Ildar Musin</member>
<member>Insung Moon</member>
<member>Ioseph Kim</member>
<member>Isaac Morland</member>
<member>Ivan Panchenko</member>
<member>Jack Kelly</member>
<member>Jacob Champion</member>
<member>Jaime Casanova</member>
<member>Jakob Egger</member>
<member>Jakub Glapa</member>
<member>Jakub Janecek</member>
<member>James Coleman</member>
<member>James Inform</member>
<member>James Robinson</member>
<member>James Sewell</member>
<member>James Tomson</member>
<member>Jan Chochol</member>
<member>Jaroslav Sivy</member>
<member>Jean-Christophe Arnu</member>
<member>Jean-Marc Voillequin</member>
<member>Jean-Pierre Pelletier</member>
<member>Jeevan Chalke</member>
<member>Jeevan Ladhe</member>
<member>Jeff Davis</member>
<member>Jeff Janes</member>
<member>Jeremy Evans</member>
<member>Jeremy Schneider</member>
<member>Jeremy Smith</member>
<member>Jerry Jelinek</member>
<member>Jesper Pedersen</member>
<member>Jianing Yang</member>
<member>Jie Zhang</member>
<member>Jim Nasby</member>
<member>Jimmy Yih</member>
<member>Joe Conway</member>
<member>Joe Wildish</member>
<member>Joerg Sonnenberger</member>
<member>John Klann</member>
<member>John Naylor</member>
<member>Jonah Harris</member>
<member>Jonathan S. Katz</member>
<member>Jorge Gustavo Rocha</member>
<member>José Arthur Benetasso Villanova</member>
<member>Joshua D. Drake</member>
<member>Juan José Santamaría Flecha</member>
<member>Julian Hsiao</member>
<member>Julian Markwort</member>
<member>Julian Schauder</member>
<member>Julien Rouhaud</member>
<member>Jürgen Purtz</member>
<member>Jürgen Strobel</member>
<member>Justin Pryzby</member>
<member>Kaiting Chen</member>
<member>Karen Huddleston</member>
<member>Karl Czajkowski</member>
<member>Karl O. Pinc</member>
<member>Keiichi Hirobe</member>
<member>Keith Fiske</member>
<member>Ken Tanzer</member>
<member>Kenji Uno</member>
<member>Kevin Grittner</member>
<member>Kevin Hale Boyes</member>
<member>Kieran McCusker</member>
<member>Kirk Jamison</member>
<member>Kohei KaiGai</member>
<member>Konstantin Knizhnik</member>
<member>Konstantin Kuznetsov</member>
<member>Kristjan Tammekivi</member>
<member>Kuntal Ghosh</member>
<member>Kyle Samson</member>
<member>Kyotaro Horiguchi</member>
<member>Lætitia Avrot</member>
<member>Lars Kanis</member>
<member>Laurenz Albe</member>
<member>Lim Myungkyu</member>
<member>Liu Huailing</member>
<member>Liudmila Mantrova</member>
<member>Lloyd Albin</member>
<member>Luca Ferrari</member>
<member>Luis M. Carril</member>
<member>Lukas Eder</member>
<member>Lukas Fittl</member>
<member>Madelaine Thibaut</member>
<member>Madeleine Thompson</member>
<member>Magnus Hagander</member>
<member>Mahendra Singh</member>
<member>Mai Peng</member>
<member>Maksim Milyutin</member>
<member>Maksym Boguk</member>
<member>Malthe Borch</member>
<member>Manuel Rigger</member>
<member>Marco Atzeri</member>
<member>Marco Slot</member>
<member>Marina Polyakova</member>
<member>Mario De Frutos Dieguez</member>
<member>Marius Timmer</member>
<member>Mark Chambers</member>
<member>Mark Dilger</member>
<member>Marko Tiikkaja</member>
<member>Markus Winand</member>
<member>Martín Marqués</member>
<member>Masahiko Sawada</member>
<member>Masao Fujii</member>
<member>Mateusz Guzik</member>
<member>Mathias Brossard</member>
<member>Matt Williams</member>
<member>Matthias Otterbach</member>
<member>Matvey Arye</member>
<member>Melanie Plageman</member>
<member>Mi Tar</member>
<member>Michael Banck</member>
<member>Michael Davidson</member>
<member>Michael Meskes</member>
<member>Michael Paquier</member>
<member>Michael Vitale</member>
<member>Michel Pelletier</member>
<member>Mikalai Keida</member>
<member>Mike Palmiotto</member>
<member>Mithun Cy</member>
<member>Morgan Owens</member>
<member>Murat Kabilov</member>
<member>Nathan Bossart</member>
<member>Nawaz Ahmed</member>
<member>Neeraj Kumar</member>
<member>Nick Barnes</member>
<member>Nico Williams</member>
<member>Nikita Glukhov</member>
<member>Nikolay Shaplov</member>
<member>Ning Yu</member>
<member>Nishant Fnu</member>
<member>Noah Misch</member>
<member>Norbert Benkocs</member>
<member>Noriyoshi Shinoda</member>
<member>Oleg Bartunov</member>
<member>Oleg Samoilov</member>
<member>Oleksii Kliukin</member>
<member>Ondrej Bouda</member>
<member>Oskari Saarenmaa</member>
<member>Pan Bian</member>
<member>Patrick Francelle</member>
<member>Patrick McHardy</member>
<member>Paul A. Jungwirth</member>
<member>Paul Bonaud</member>
<member>Paul Guo</member>
<member>Paul Martinez</member>
<member>Paul Ramsey</member>
<member>Paul Schaap</member>
<member>Paul van der Linden</member>
<member>Pavan Deolasee</member>
<member>Pavel Oskin</member>
<member>Pavel Raiskup</member>
<member>Pavel Stehule</member>
<member>Peifeng Qiu</member>
<member>Peter Billen</member>
<member>Peter Eisentraut</member>
<member>Peter Geoghegan</member>
<member>Peter Neave</member>
<member>Petr Fedorov</member>
<member>Petr Jelínek</member>
<member>Petr Slavov</member>
<member>Petru-Florin Mihancea</member>
<member>Phil Bayer</member>
<member>Phil Florent</member>
<member>Philip Dubé</member>
<member>Pierre Ducroquet</member>
<member>Piotr Gabriel Kosinski</member>
<member>Piotr Stefaniak</member>
<member>Piotr Wlodarczyk</member>
<member>Prabhat Sahu</member>
<member>Quentin Rameau</member>
<member>Rafael Castro</member>
<member>Rafia Sabih</member>
<member>Rahila Syed</member>
<member>Rajkumar Raghuwanshi</member>
<member>Rares Salcudean</member>
<member>Raúl Marín Rodríguez</member>
<member>Regina Obe</member>
<member>Renaud Navarro</member>
<member>Richard Guo</member>
<member>Rick Otten</member>
<member>Rikard Falkeborn</member>
<member>RK Korlapati</member>
<member>Robbie Harwood</member>
<member>Robert Haas</member>
<member>Robert Treat</member>
<member>Robert Vollmert</member>
<member>Roger Curley</member>
<member>Roman Zharkov</member>
<member>Ronan Dunklau</member>
<member>Rui Hai Jiang</member>
<member>Rushabh Lathia</member>
<member>Ryan Lambert</member>
<member>Ryo Matsumura</member>
<member>Ryohei Nagaura</member>
<member>Ryohei Takahashi</member>
<member>Samuel Williams</member>
<member>Sand Stone</member>
<member>Sanyo Capobiango</member>
<member>Satoru Koizumi</member>
<member>Sean Johnston</member>
<member>Serge Latyntsev</member>
<member>Sergei Kornilov</member>
<member>Sergey Pashkov</member>
<member>Sergio Conde Gómez</member>
<member>Shawn Debnath</member>
<member>Shay Rojansky</member>
<member>Sho Kato</member>
<member>Shohei Mochizuki</member>
<member>Shouyu Luo</member>
<member>Simon Riggs</member>
<member>Sivasubramanian Ramasubramanian</member>
<member>Slawomir Chodnicki</member>
<member>Stas Kelvish</member>
<member>Stefan Kadow</member>
<member>Stepan Yankevych</member>
<member>Stephen Amell</member>
<member>Stephen Frost</member>
<member>Steve Rogerson</member>
<member>Steve Singer</member>
<member>Steven Winfield</member>
<member>Surafel Temesgen</member>
<member>Suraj Kharage</member>
<member>Suresh Kumar R</member>
<member>Takayuki Tsunakawa</member>
<member>Takeshi Ideriha</member>
<member>Takuma Hoshiai</member>
<member>Tasos Maschalidis</member>
<member>Tatsuo Ishii</member>
<member>Tatsuro Yamada</member>
<member>Teodor Sigaev</member>
<member>Thom Brown</member>
<member>Thomas Munro</member>
<member>Thomas Poty</member>
<member>Tillmann Schulz</member>
<member>Tim Möhlmann</member>
<member>Timur Birsh</member>
<member>Tobias Bussmann</member>
<member>Tom Cassidy</member>
<member>Tom Dunstan</member>
<member>Tom Gottfried</member>
<member>Tom Lane</member>
<member>Tomas Vondra</member>
<member>Tushar Ahuja</member>
<member>Ulf Adams</member>
<member>Vaishnavi Prabakaran</member>
<member>Victor Petrovykh</member>
<member>Victor Wagner</member>
<member>Victor Yegorov</member>
<member>Vijaykumar Jain</member>
<member>Vik Fearing</member>
<member>Vlad Sterzhanov</member>
<member>Vladimir Baranoff</member>
<member>Vladimir Kriukov</member>
<member>Wu Fei</member>
<member>Yaroslav Schekin</member>
<member>Yi Huang</member>
<member>Yoshikazu Imai</member>
<member>Yugo Nagata</member>
<member>Yulian Khodorkovskiy</member>
<member>Yuming Wang</member>
<member>YunQiang Su</member>
<member>Yuri Kurenkov</member>
<member>Yusuke Egashira</member>
<member>Yuzuko Hosoya</member>
<member>Zhou Digoal</member>
</simplelist>
</sect2>
</sect1>
|