forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitff90ee6
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 parent58a359e commitff90ee6
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 | |
---|---|---|---|
| |||
2784 | 2784 |
| |
2785 | 2785 |
| |
2786 | 2786 |
| |
| 2787 | + | |
| 2788 | + | |
| 2789 | + | |
| 2790 | + | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
| 2797 | + | |
| 2798 | + | |
| 2799 | + | |
| 2800 | + | |
| 2801 | + | |
| 2802 | + | |
2787 | 2803 |
| |
2788 | 2804 |
| |
2789 | 2805 |
| |
2790 | 2806 |
| |
2791 | 2807 |
| |
2792 | 2808 |
| |
2793 | 2809 |
| |
2794 |
| - | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
2795 | 2816 |
| |
2796 | 2817 |
| |
2797 | 2818 |
| |
| |||
2816 | 2837 |
| |
2817 | 2838 |
| |
2818 | 2839 |
| |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
2819 | 2844 |
| |
2820 | 2845 |
| |
2821 | 2846 |
| |
|
Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
59 | 59 |
| |
60 | 60 |
| |
61 | 61 |
| |
| 62 | + | |
62 | 63 |
| |
63 | 64 |
| |
64 | 65 |
| |
| |||
924 | 925 |
| |
925 | 926 |
| |
926 | 927 |
| |
927 |
| - | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
928 | 931 |
| |
929 | 932 |
| |
930 | 933 |
| |
| |||
1024 | 1027 |
| |
1025 | 1028 |
| |
1026 | 1029 |
| |
| 1030 | + | |
| 1031 | + | |
1027 | 1032 |
| |
1028 | 1033 |
| |
1029 | 1034 |
| |
| |||
1032 | 1037 |
| |
1033 | 1038 |
| |
1034 | 1039 |
| |
| 1040 | + | |
| 1041 | + | |
1035 | 1042 |
| |
1036 | 1043 |
| |
1037 | 1044 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
69 | 69 |
| |
70 | 70 |
| |
71 | 71 |
| |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
72 | 76 |
| |
73 | 77 |
| |
74 | 78 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 |
| |
| 20 | + | |
| 21 | + |
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 |
| |
| 23 | + | |
| 24 | + |
0 commit comments
Comments
(0)