forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit2153837
committed
Disallow SELECT FOR UPDATE/SHARE on sequences.
We can't allow this because such an operation stores its transaction XIDinto the sequence tuple's xmax. Because VACUUM doesn't process sequences(and we don't want it to start doing so), such an xmax value won't getfrozen, meaning it will eventually refer to nonexistent pg_clog storage,and even wrap around completely. Since the row lock is ignored by nextvaland setval, the usefulness of the operation is highly debatable anyway.Per reports of trouble with pgpool 3.0, which had ill-advisedly startedusing such commands as a form of locking.In HEAD, also disallow SELECT FOR UPDATE/SHARE on toast tables. Althoughthis does work safely given the current implementation, there seems nogood reason to allow it. I refrained from changing that behavior inback branches, however.1 parentdd2ddfb commit2153837
1 file changed
+58
-6
lines changedLines changed: 58 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
74 | 74 |
| |
75 | 75 |
| |
76 | 76 |
| |
| 77 | + | |
77 | 78 |
| |
78 | 79 |
| |
79 | 80 |
| |
| |||
837 | 838 |
| |
838 | 839 |
| |
839 | 840 |
| |
840 |
| - | |
841 |
| - | |
842 |
| - | |
843 |
| - | |
844 |
| - | |
845 |
| - | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
846 | 844 |
| |
847 | 845 |
| |
848 | 846 |
| |
| |||
977 | 975 |
| |
978 | 976 |
| |
979 | 977 |
| |
| 978 | + | |
| 979 | + | |
| 980 | + | |
980 | 981 |
| |
981 | 982 |
| |
982 | 983 |
| |
| |||
1047 | 1048 |
| |
1048 | 1049 |
| |
1049 | 1050 |
| |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
1050 | 1102 |
| |
1051 | 1103 |
| |
1052 | 1104 |
| |
|
0 commit comments
Comments
(0)