Commit 4800a5d
committed
Refactor InitPostgres() to use bitwise option flags
InitPostgres() has been using a set of boolean arguments to control its
behavior, and a patch under discussion was aiming at expanding it with a
third one. In preparation for expanding this area, this commit switches
all the current boolean arguments of this routine to a single bits32
argument instead. Two values are currently supported for the flags:
- INIT_PG_LOAD_SESSION_LIBS to load [session|local]_preload_libraries at
startup.
- INIT_PG_OVERRIDE_ALLOW_CONNS to allow connection to a database even if
it has !datallowconn. This is used by bgworkers.
Reviewed-by: Bertrand Drouvot
Discussion: https://postgr.es/m/ZSTn66_BXRZCeaqS@paquier.xyz1 parent 2813903 commit 4800a5d
File tree
6 files changed
+31
-20
lines changed- src
- backend
- bootstrap
- postmaster
- tcop
- utils/init
- include
6 files changed
+31
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
348 | | - | |
| 348 | + | |
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
491 | | - | |
| 491 | + | |
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
| |||
1706 | 1706 | | |
1707 | 1707 | | |
1708 | 1708 | | |
1709 | | - | |
1710 | | - | |
| 1709 | + | |
1711 | 1710 | | |
1712 | 1711 | | |
1713 | 1712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5562 | 5562 | | |
5563 | 5563 | | |
5564 | 5564 | | |
| 5565 | + | |
| 5566 | + | |
| 5567 | + | |
| 5568 | + | |
| 5569 | + | |
5565 | 5570 | | |
5566 | 5571 | | |
5567 | 5572 | | |
| |||
5571 | 5576 | | |
5572 | 5577 | | |
5573 | 5578 | | |
5574 | | - | |
5575 | | - | |
| 5579 | + | |
5576 | 5580 | | |
5577 | 5581 | | |
5578 | 5582 | | |
| |||
5589 | 5593 | | |
5590 | 5594 | | |
5591 | 5595 | | |
| 5596 | + | |
| 5597 | + | |
| 5598 | + | |
| 5599 | + | |
| 5600 | + | |
5592 | 5601 | | |
5593 | 5602 | | |
5594 | 5603 | | |
| |||
5598 | 5607 | | |
5599 | 5608 | | |
5600 | 5609 | | |
5601 | | - | |
5602 | | - | |
| 5610 | + | |
5603 | 5611 | | |
5604 | 5612 | | |
5605 | 5613 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4206 | 4206 | | |
4207 | 4207 | | |
4208 | 4208 | | |
| 4209 | + | |
| 4210 | + | |
4209 | 4211 | | |
4210 | 4212 | | |
4211 | 4213 | | |
4212 | | - | |
4213 | | - | |
| 4214 | + | |
4214 | 4215 | | |
4215 | 4216 | | |
4216 | 4217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
684 | | - | |
685 | | - | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
686 | 687 | | |
687 | 688 | | |
688 | 689 | | |
| |||
701 | 702 | | |
702 | 703 | | |
703 | 704 | | |
704 | | - | |
705 | | - | |
| 705 | + | |
| 706 | + | |
706 | 707 | | |
707 | 708 | | |
708 | 709 | | |
| |||
717 | 718 | | |
718 | 719 | | |
719 | 720 | | |
720 | | - | |
721 | | - | |
| 721 | + | |
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| |||
1189 | 1189 | | |
1190 | 1190 | | |
1191 | 1191 | | |
1192 | | - | |
| 1192 | + | |
| 1193 | + | |
1193 | 1194 | | |
1194 | 1195 | | |
1195 | 1196 | | |
| |||
1227 | 1228 | | |
1228 | 1229 | | |
1229 | 1230 | | |
1230 | | - | |
| 1231 | + | |
1231 | 1232 | | |
1232 | 1233 | | |
1233 | 1234 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
466 | 469 | | |
467 | 470 | | |
468 | 471 | | |
469 | 472 | | |
470 | | - | |
471 | | - | |
| 473 | + | |
472 | 474 | | |
473 | 475 | | |
474 | 476 | | |
| |||
0 commit comments