forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1025463
committed
In REASSIGN OWNED of a database, lock the tuple as mandated.
Commitaac2c9b mandated such lockingand attempted to fulfill that mandate, but it missed REASSIGN OWNED.Hence, it remained possible to lose VACUUM's inplace update ofdatfrozenxid if a REASSIGN OWNED processed that database at the sametime. This didn't affect the other inplace-updated catalog, pg_class.For pg_class, REASSIGN OWNED calls ATExecChangeOwner() instead of thegeneric AlterObjectOwner_internal(), and ATExecChangeOwner() fulfillsthe locking mandate.Like in GRANT, implement this by following the locking protocol for anycatalog subject to the generic AlterObjectOwner_internal(). It wouldsuffice to do this for IsInplaceUpdateOid() catalogs only. Back-patchto v13 (all supported versions).Kirill Reshke. Reported by Alexander Kukushkin.Discussion:https://postgr.es/m/CAFh8B=mpKjAy4Cuun-HP-f_vRzh2HSvYFG3rhVfYbfEBUhBAGg@mail.gmail.com1 parentba230ce commit1025463
File tree
5 files changed
+51
-2
lines changed- src
- backend
- catalog
- commands
- include/catalog
- test/regress
- expected
- sql
5 files changed
+51
-2
lines changedLines changed: 26 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2705 | 2705 |
| |
2706 | 2706 |
| |
2707 | 2707 |
| |
| 2708 | + | |
| 2709 | + | |
| 2710 | + | |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
2708 | 2724 |
| |
2709 | 2725 |
| |
2710 | 2726 |
| |
2711 | 2727 |
| |
2712 | 2728 |
| |
2713 | 2729 |
| |
2714 | 2730 |
| |
2715 |
| - | |
| 2731 | + | |
| 2732 | + | |
| 2733 | + | |
| 2734 | + | |
| 2735 | + | |
| 2736 | + | |
2716 | 2737 |
| |
2717 | 2738 |
| |
2718 | 2739 |
| |
| |||
2737 | 2758 |
| |
2738 | 2759 |
| |
2739 | 2760 |
| |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
2740 | 2765 |
| |
2741 | 2766 |
| |
2742 | 2767 |
| |
|
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
60 | 60 |
| |
61 | 61 |
| |
62 | 62 |
| |
| 63 | + | |
63 | 64 |
| |
64 | 65 |
| |
65 | 66 |
| |
| |||
945 | 946 |
| |
946 | 947 |
| |
947 | 948 |
| |
948 |
| - | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
949 | 952 |
| |
950 | 953 |
| |
951 | 954 |
| |
| |||
1044 | 1047 |
| |
1045 | 1048 |
| |
1046 | 1049 |
| |
| 1050 | + | |
| 1051 | + | |
1047 | 1052 |
| |
1048 | 1053 |
| |
1049 | 1054 |
| |
| |||
1061 | 1066 |
| |
1062 | 1067 |
| |
1063 | 1068 |
| |
| 1069 | + | |
| 1070 | + | |
1064 | 1071 |
| |
1065 | 1072 |
| |
1066 | 1073 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
71 | 75 |
| |
72 | 76 |
| |
73 | 77 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 |
| |
| 19 | + | |
| 20 | + |
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 |
| |
| 22 | + | |
| 23 | + |
0 commit comments
Comments
(0)