forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitea92368
committed
Move max_wal_senders out of max_connections for connection slot handling
Since its introduction, max_wal_senders is counted as part ofmax_connections when it comes to define how many connection slots can beused for replication connections with a WAL sender context. This canlead to confusion for some users, as it could be possible to block abase backup or replication from happening because other backend sessionsare already taken for other purposes by an application, andsuperuser-only connection slots are not a correct solution to handlethat case.This commit makes max_wal_senders independent of max_connections for itshandling of PGPROC entries in ProcGlobal, meaning that connection slotsfor WAL senders are handled using their own free queue, like autovacuumworkers and bgworkers.One compatibility issue that this change creates is that a standby nowrequires to have a value of max_wal_senders at least equal to itsprimary. So, if a standby created enforces the value ofmax_wal_senders to be lower than that, then this could break failovers.Normally this should not be an issue though, as any settings of astandby are inherited from its primary as postgresql.conf gets normallycopied as part of a base backup, so parameters would be consistent.Author: Alexander KukushkinReviewed-by: Kyotaro Horiguchi, Petr Jelínek, Masahiko Sawada, OleksiiKliukinDiscussion:https://postgr.es/m/CAFh8B=nBzHQeYAu0b8fjK-AF1X4+_p6GRtwG+cCgs6Vci2uRuQ@mail.gmail.com1 parent1d92a0c commitea92368
File tree
15 files changed
+100
-55
lines changed- doc/src/sgml
- src
- backend
- access
- rmgrdesc
- transam
- postmaster
- replication
- storage/lmgr
- utils
- init
- misc
- bin
- pg_controldata
- pg_resetwal
- include
- access
- catalog
- storage
15 files changed
+100
-55
lines changedLines changed: 17 additions & 17 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
697 | 697 |
| |
698 | 698 |
| |
699 | 699 |
| |
700 |
| - | |
701 |
| - | |
| 700 | + | |
702 | 701 |
| |
703 | 702 |
| |
704 | 703 |
| |
| |||
3495 | 3494 |
| |
3496 | 3495 |
| |
3497 | 3496 |
| |
3498 |
| - | |
3499 |
| - | |
3500 |
| - | |
3501 |
| - | |
3502 |
| - | |
3503 |
| - | |
3504 |
| - | |
3505 |
| - | |
3506 |
| - | |
3507 |
| - | |
3508 |
| - | |
3509 |
| - | |
3510 |
| - | |
3511 |
| - | |
3512 |
| - | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
| 3501 | + | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
| 3505 | + | |
| 3506 | + | |
3513 | 3507 |
| |
3514 | 3508 |
| |
3515 | 3509 |
| |
| 3510 | + | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
3516 | 3516 |
| |
3517 | 3517 |
| |
3518 | 3518 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2177 | 2177 |
| |
2178 | 2178 |
| |
2179 | 2179 |
| |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
2180 | 2185 |
| |
2181 | 2186 |
| |
2182 | 2187 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
720 | 720 |
| |
721 | 721 |
| |
722 | 722 |
| |
723 |
| - | |
| 723 | + | |
724 | 724 |
| |
725 | 725 |
| |
726 | 726 |
| |
727 | 727 |
| |
728 | 728 |
| |
729 |
| - | |
| 729 | + | |
730 | 730 |
| |
731 | 731 |
| |
732 | 732 |
| |
| |||
785 | 785 |
| |
786 | 786 |
| |
787 | 787 |
| |
788 |
| - | |
789 |
| - | |
| 788 | + | |
| 789 | + | |
790 | 790 |
| |
791 | 791 |
| |
792 | 792 |
| |
793 | 793 |
| |
794 |
| - | |
| 794 | + | |
795 | 795 |
| |
796 | 796 |
| |
797 | 797 |
| |
|
Lines changed: 4 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
110 | 110 |
| |
111 | 111 |
| |
112 | 112 |
| |
113 |
| - | |
114 |
| - | |
115 |
| - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
116 | 116 |
| |
| 117 | + | |
117 | 118 |
| |
118 | 119 |
| |
119 | 120 |
| |
|
Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5257 | 5257 |
| |
5258 | 5258 |
| |
5259 | 5259 |
| |
| 5260 | + | |
5260 | 5261 |
| |
5261 | 5262 |
| |
5262 | 5263 |
| |
| |||
6170 | 6171 |
| |
6171 | 6172 |
| |
6172 | 6173 |
| |
| 6174 | + | |
| 6175 | + | |
| 6176 | + | |
6173 | 6177 |
| |
6174 | 6178 |
| |
6175 | 6179 |
| |
| |||
9460 | 9464 |
| |
9461 | 9465 |
| |
9462 | 9466 |
| |
| 9467 | + | |
9463 | 9468 |
| |
9464 | 9469 |
| |
9465 | 9470 |
| |
| |||
9478 | 9483 |
| |
9479 | 9484 |
| |
9480 | 9485 |
| |
| 9486 | + | |
9481 | 9487 |
| |
9482 | 9488 |
| |
9483 | 9489 |
| |
| |||
9493 | 9499 |
| |
9494 | 9500 |
| |
9495 | 9501 |
| |
| 9502 | + | |
9496 | 9503 |
| |
9497 | 9504 |
| |
9498 | 9505 |
| |
| |||
9896 | 9903 |
| |
9897 | 9904 |
| |
9898 | 9905 |
| |
| 9906 | + | |
9899 | 9907 |
| |
9900 | 9908 |
| |
9901 | 9909 |
| |
| |||
9927 | 9935 |
| |
9928 | 9936 |
| |
9929 | 9937 |
| |
9930 |
| - | |
| 9938 | + | |
9931 | 9939 |
| |
9932 | 9940 |
| |
9933 | 9941 |
| |
|
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
885 | 885 |
| |
886 | 886 |
| |
887 | 887 |
| |
888 |
| - | |
| 888 | + | |
889 | 889 |
| |
890 |
| - | |
| 890 | + | |
891 | 891 |
| |
892 |
| - | |
| 892 | + | |
893 | 893 |
| |
894 | 894 |
| |
895 | 895 |
| |
| |||
5532 | 5532 |
| |
5533 | 5533 |
| |
5534 | 5534 |
| |
5535 |
| - | |
| 5535 | + | |
5536 | 5536 |
| |
5537 | 5537 |
| |
5538 | 5538 |
| |
|
Lines changed: 4 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2273 | 2273 |
| |
2274 | 2274 |
| |
2275 | 2275 |
| |
2276 |
| - | |
2277 |
| - | |
| 2276 | + | |
| 2277 | + | |
2278 | 2278 |
| |
2279 | 2279 |
| |
2280 | 2280 |
| |
| |||
2310 | 2310 |
| |
2311 | 2311 |
| |
2312 | 2312 |
| |
2313 |
| - | |
2314 |
| - | |
2315 |
| - | |
2316 |
| - | |
2317 |
| - | |
2318 |
| - | |
| 2313 | + | |
| 2314 | + | |
2319 | 2315 |
| |
2320 | 2316 |
| |
2321 | 2317 |
| |
|
Lines changed: 20 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
43 | 43 |
| |
44 | 44 |
| |
45 | 45 |
| |
| 46 | + | |
46 | 47 |
| |
47 | 48 |
| |
48 | 49 |
| |
| |||
147 | 148 |
| |
148 | 149 |
| |
149 | 150 |
| |
150 |
| - | |
151 |
| - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
152 | 154 |
| |
153 | 155 |
| |
154 | 156 |
| |
| |||
180 | 182 |
| |
181 | 183 |
| |
182 | 184 |
| |
| 185 | + | |
183 | 186 |
| |
184 | 187 |
| |
185 | 188 |
| |
| |||
253 | 256 |
| |
254 | 257 |
| |
255 | 258 |
| |
256 |
| - | |
| 259 | + | |
257 | 260 |
| |
258 | 261 |
| |
259 | 262 |
| |
260 | 263 |
| |
261 | 264 |
| |
262 | 265 |
| |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
263 | 273 |
| |
264 | 274 |
| |
265 | 275 |
| |
| |||
311 | 321 |
| |
312 | 322 |
| |
313 | 323 |
| |
| 324 | + | |
| 325 | + | |
314 | 326 |
| |
315 | 327 |
| |
316 | 328 |
| |
| |||
341 | 353 |
| |
342 | 354 |
| |
343 | 355 |
| |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
344 | 361 |
| |
345 | 362 |
| |
346 | 363 |
| |
|
Lines changed: 5 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
527 | 527 |
| |
528 | 528 |
| |
529 | 529 |
| |
530 |
| - | |
| 530 | + | |
531 | 531 |
| |
532 | 532 |
| |
533 | 533 |
| |
| |||
811 | 811 |
| |
812 | 812 |
| |
813 | 813 |
| |
814 |
| - | |
815 |
| - | |
816 |
| - | |
817 |
| - | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
818 | 817 |
| |
819 |
| - | |
| 818 | + | |
820 | 819 |
| |
821 | 820 |
| |
822 | 821 |
| |
|
Lines changed: 17 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
187 | 187 |
| |
188 | 188 |
| |
189 | 189 |
| |
| 190 | + | |
190 | 191 |
| |
191 | 192 |
| |
192 | 193 |
| |
| |||
2090 | 2091 |
| |
2091 | 2092 |
| |
2092 | 2093 |
| |
2093 |
| - | |
| 2094 | + | |
2094 | 2095 |
| |
2095 | 2096 |
| |
2096 | 2097 |
| |
| |||
2608 | 2609 |
| |
2609 | 2610 |
| |
2610 | 2611 |
| |
2611 |
| - | |
2612 | 2612 |
| |
2613 | 2613 |
| |
2614 | 2614 |
| |
2615 | 2615 |
| |
2616 | 2616 |
| |
2617 | 2617 |
| |
2618 |
| - | |
| 2618 | + | |
2619 | 2619 |
| |
2620 | 2620 |
| |
2621 | 2621 |
| |
| |||
10911 | 10911 |
| |
10912 | 10912 |
| |
10913 | 10913 |
| |
10914 |
| - | |
| 10914 | + | |
10915 | 10915 |
| |
10916 | 10916 |
| |
10917 | 10917 |
| |
10918 | 10918 |
| |
10919 | 10919 |
| |
10920 | 10920 |
| |
10921 | 10921 |
| |
10922 |
| - | |
| 10922 | + | |
| 10923 | + | |
| 10924 | + | |
| 10925 | + | |
| 10926 | + | |
| 10927 | + | |
| 10928 | + | |
| 10929 | + | |
| 10930 | + | |
| 10931 | + | |
| 10932 | + | |
10923 | 10933 |
| |
10924 | 10934 |
| |
10925 | 10935 |
| |
| |||
10950 | 10960 |
| |
10951 | 10961 |
| |
10952 | 10962 |
| |
10953 |
| - | |
| 10963 | + | |
| 10964 | + | |
10954 | 10965 |
| |
10955 | 10966 |
| |
10956 | 10967 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
304 | 304 |
| |
305 | 305 |
| |
306 | 306 |
| |
| 307 | + | |
| 308 | + | |
307 | 309 |
| |
308 | 310 |
| |
309 | 311 |
| |
|
0 commit comments
Comments
(0)