forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit59ab4ac
committed
Accept relations of any kind in LOCK TABLE
The restriction that only tables and views can be locked by LOCK TABLEis quite arbitrary, since the underlying mechanism can lock any relationtype. Drop the restriction so that programs such as pg_dump can lockall relations they're interested in, preventing schema changes thatcould cause a dump to fail after expending much effort.Backpatch to 9.5.Author: Álvaro Herrera <alvherre@alvh.no-ip.org>Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Reported-by: Wells Oliver <wells.oliver@gmail.com>Discussion:https://postgr.es/m/20201021200659.GA32358@alvherre.pgsql1 parent4066b64 commit59ab4ac
File tree
4 files changed
+42
-25
lines changed- doc/src/sgml/ref
- src
- backend/commands
- test/regress
- expected
- sql
4 files changed
+42
-25
lines changedLines changed: 9 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
19 |
| - | |
| 19 | + | |
20 | 20 |
| |
21 | 21 |
| |
22 | 22 |
| |
| |||
34 | 34 |
| |
35 | 35 |
| |
36 | 36 |
| |
37 |
| - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
38 | 40 |
| |
39 | 41 |
| |
40 | 42 |
| |
| |||
115 | 117 |
| |
116 | 118 |
| |
117 | 119 |
| |
118 |
| - | |
119 |
| - | |
| 120 | + | |
| 121 | + | |
120 | 122 |
| |
121 | 123 |
| |
122 | 124 |
| |
123 |
| - | |
| 125 | + | |
| 126 | + | |
124 | 127 |
| |
125 | 128 |
| |
126 | 129 |
| |
127 | 130 |
| |
128 |
| - | |
| 131 | + | |
129 | 132 |
| |
130 | 133 |
| |
131 | 134 |
| |
|
Lines changed: 9 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
83 | 83 |
| |
84 | 84 |
| |
85 | 85 |
| |
86 |
| - | |
87 |
| - | |
88 |
| - | |
89 |
| - | |
90 |
| - | |
91 |
| - | |
92 |
| - | |
93 |
| - | |
94 | 86 |
| |
95 | 87 |
| |
96 | 88 |
| |
| |||
186 | 178 |
| |
187 | 179 |
| |
188 | 180 |
| |
| 181 | + | |
189 | 182 |
| |
190 | 183 |
| |
191 |
| - | |
192 |
| - | |
193 |
| - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
194 | 188 |
| |
195 | 189 |
| |
196 | 190 |
| |
| |||
201 | 195 |
| |
202 | 196 |
| |
203 | 197 |
| |
204 |
| - | |
205 |
| - | |
206 |
| - | |
207 |
| - | |
208 |
| - | |
209 | 198 |
| |
210 | 199 |
| |
211 | 200 |
| |
| |||
216 | 205 |
| |
217 | 206 |
| |
218 | 207 |
| |
219 |
| - | |
| 208 | + | |
| 209 | + | |
220 | 210 |
| |
221 | 211 |
| |
222 | 212 |
| |
| |||
225 | 215 |
| |
226 | 216 |
| |
227 | 217 |
| |
228 |
| - | |
| 218 | + | |
229 | 219 |
| |
230 |
| - | |
| 220 | + | |
231 | 221 |
| |
232 | 222 |
| |
233 | 223 |
| |
|
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 |
| |
16 | 19 |
| |
17 | 20 |
| |
| |||
154 | 157 |
| |
155 | 158 |
| |
156 | 159 |
| |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
157 | 166 |
| |
158 | 167 |
| |
159 | 168 |
| |
| 169 | + | |
160 | 170 |
| |
161 | 171 |
| |
162 | 172 |
| |
| |||
168 | 178 |
| |
169 | 179 |
| |
170 | 180 |
| |
| 181 | + | |
171 | 182 |
| |
172 | 183 |
| |
173 | 184 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| 16 | + | |
| 17 | + | |
| 18 | + | |
16 | 19 |
| |
17 | 20 |
| |
18 | 21 |
| |
| |||
117 | 120 |
| |
118 | 121 |
| |
119 | 122 |
| |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
120 | 131 |
| |
121 | 132 |
| |
122 | 133 |
| |
| 134 | + | |
123 | 135 |
| |
124 | 136 |
| |
125 | 137 |
| |
| |||
130 | 142 |
| |
131 | 143 |
| |
132 | 144 |
| |
| 145 | + | |
133 | 146 |
| |
134 | 147 |
| |
135 | 148 |
| |
|
0 commit comments
Comments
(0)