forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfa0e03c
committed
Remove InitXLOGAccess().
It's not great that RecoveryInProgress() calls InitXLOGAccess(),because a status inquiry function typically shouldn't have the sideeffect of performing initializations. We could fix that by callingInitXLOGAccess() from some other place, but instead, let's remove italtogether.One thing InitXLogAccess() did is initialize wal_segment_size, but itdoesn't need to do that. In the postmaster, PostmasterMain() callsLocalProcessControlFile(), and all child processes will inherit thatvalue -- except in EXEC_BACKEND bulds, but then each backend runsSubPostmasterMain() which also calls LocalProcessControlFile().The other thing InitXLOGAccess() did is update RedoRecPtr anddoPageWrites, but that's not critical, because all code that usesthem will just retry if it turns out that they've changed. Theonly difference is that most code will now see an initial value thatis definitely invalid instead of one that might have just been wayout of date, but that will only happen once per backend lifetime,so it shouldn't be a big deal.Patch by me, reviewed by Nathan Bossart, Michael Paquier, AndresFreund, Heikki Linnakangas, and Álvaro Herrera.Discussion:http://postgr.es/m/CA+TgmoY7b65qRjzHN_tWUk8B4sJqk1vj1d31uepVzmgPnZKeLg@mail.gmail.com1 parent64da07c commitfa0e03c
File tree
4 files changed
+22
-64
lines changed- src
- backend
- access/transam
- postmaster
- utils/init
- include/access
4 files changed
+22
-64
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
350 | 350 |
| |
351 | 351 |
| |
352 | 352 |
| |
353 |
| - | |
354 |
| - | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
355 | 361 |
| |
356 | 362 |
| |
357 | 363 |
| |
358 | 364 |
| |
359 | 365 |
| |
360 | 366 |
| |
361 | 367 |
| |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
362 | 374 |
| |
363 | 375 |
| |
364 | 376 |
| |
| |||
8390 | 8402 |
| |
8391 | 8403 |
| |
8392 | 8404 |
| |
8393 |
| - | |
8394 |
| - | |
8395 |
| - | |
8396 | 8405 |
| |
8397 | 8406 |
| |
8398 | 8407 |
| |
| |||
8414 | 8423 |
| |
8415 | 8424 |
| |
8416 | 8425 |
| |
8417 |
| - | |
8418 |
| - | |
8419 |
| - | |
8420 |
| - | |
8421 |
| - | |
8422 |
| - | |
8423 |
| - | |
8424 |
| - | |
8425 |
| - | |
8426 |
| - | |
8427 |
| - | |
8428 |
| - | |
8429 |
| - | |
8430 |
| - | |
8431 |
| - | |
8432 |
| - | |
8433 |
| - | |
8434 | 8426 |
| |
8435 | 8427 |
| |
8436 | 8428 |
| |
| |||
8547 | 8539 |
| |
8548 | 8540 |
| |
8549 | 8541 |
| |
8550 |
| - | |
8551 |
| - | |
8552 |
| - | |
8553 | 8542 |
| |
8554 | 8543 |
| |
8555 | 8544 |
| |
| |||
8656 | 8645 |
| |
8657 | 8646 |
| |
8658 | 8647 |
| |
8659 |
| - | |
8660 |
| - | |
8661 |
| - | |
8662 |
| - | |
8663 |
| - | |
8664 |
| - | |
8665 |
| - | |
8666 |
| - | |
8667 |
| - | |
8668 |
| - | |
8669 |
| - | |
8670 |
| - | |
8671 |
| - | |
8672 |
| - | |
8673 |
| - | |
8674 |
| - | |
8675 |
| - | |
8676 |
| - | |
8677 |
| - | |
8678 | 8648 |
| |
8679 | 8649 |
| |
8680 | 8650 |
| |
| |||
8706 | 8676 |
| |
8707 | 8677 |
| |
8708 | 8678 |
| |
8709 |
| - | |
8710 |
| - | |
| 8679 | + | |
| 8680 | + | |
| 8681 | + | |
8711 | 8682 |
| |
8712 | 8683 |
| |
8713 | 8684 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
154 | 154 |
| |
155 | 155 |
| |
156 | 156 |
| |
157 |
| - | |
158 | 157 |
| |
159 | 158 |
| |
160 | 159 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
624 | 624 |
| |
625 | 625 |
| |
626 | 626 |
| |
627 |
| - | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
628 | 631 |
| |
629 |
| - | |
630 |
| - | |
631 |
| - | |
632 |
| - | |
633 |
| - | |
634 |
| - | |
635 |
| - | |
636 |
| - | |
637 |
| - | |
638 |
| - | |
639 |
| - | |
| 632 | + | |
640 | 633 |
| |
641 | 634 |
| |
642 |
| - | |
643 |
| - | |
644 |
| - | |
645 |
| - | |
646 | 635 |
| |
647 | 636 |
| |
648 | 637 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
299 | 299 |
| |
300 | 300 |
| |
301 | 301 |
| |
302 |
| - | |
303 | 302 |
| |
304 | 303 |
| |
305 | 304 |
| |
|
0 commit comments
Comments
(0)