forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5be594c
committed
Heed lock protocol in DROP OWNED BY
We were acquiring object locks then deleting objects one by one, insteadof acquiring all object locks first, ignoring those that did not exist,and then deleting all objects together. The latter is the correctprotocol to use, and what this commits changes to code to do. Failingto follow that leads to "cache lookup failed for relation XYZ" errorreports when DROP OWNED runs concurrently with other DDL -- for example,a session termination that removes some temp tables.Author: Álvaro HerreraReported-by: Mithun Chicklore Yogendra (Mithun CY)Reviewed-by: Ahsan Hadi, Tom LaneDiscussion:https://postgr.es/m/CADq3xVZTbzK4ZLKq+dn_vB4QafXXbmMgDP3trY-GuLnib2Ai1w@mail.gmail.com1 parentf215993 commit5be594c
File tree
4 files changed
+36
-8
lines changed- src
- backend
- catalog
- commands
- include/catalog
4 files changed
+36
-8
lines changedLines changed: 9 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
200 | 200 |
| |
201 | 201 |
| |
202 | 202 |
| |
203 |
| - | |
204 |
| - | |
205 | 203 |
| |
206 | 204 |
| |
207 | 205 |
| |
| |||
1527 | 1525 |
| |
1528 | 1526 |
| |
1529 | 1527 |
| |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
1530 | 1531 |
| |
1531 |
| - | |
1532 |
| - | |
| 1532 | + | |
| 1533 | + | |
1533 | 1534 |
| |
1534 |
| - | |
| 1535 | + | |
1535 | 1536 |
| |
1536 | 1537 |
| |
1537 | 1538 |
| |
| |||
1557 | 1558 |
| |
1558 | 1559 |
| |
1559 | 1560 |
| |
| 1561 | + | |
| 1562 | + | |
1560 | 1563 |
| |
1561 |
| - | |
| 1564 | + | |
1562 | 1565 |
| |
1563 | 1566 |
| |
1564 | 1567 |
| |
|
Lines changed: 23 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1324 | 1324 |
| |
1325 | 1325 |
| |
1326 | 1326 |
| |
1327 |
| - | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
1328 | 1331 |
| |
1329 | 1332 |
| |
1330 | 1333 |
| |
1331 | 1334 |
| |
1332 | 1335 |
| |
1333 | 1336 |
| |
1334 | 1337 |
| |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
1335 | 1350 |
| |
1336 | 1351 |
| |
1337 | 1352 |
| |
| |||
1342 | 1357 |
| |
1343 | 1358 |
| |
1344 | 1359 |
| |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
1345 | 1367 |
| |
1346 | 1368 |
| |
1347 | 1369 |
| |
|
Lines changed: 0 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
915 | 915 |
| |
916 | 916 |
| |
917 | 917 |
| |
918 |
| - | |
919 | 918 |
| |
920 | 919 |
| |
921 | 920 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
142 | 142 |
| |
143 | 143 |
| |
144 | 144 |
| |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
145 | 149 |
| |
146 | 150 |
| |
147 | 151 |
| |
|
0 commit comments
Comments
(0)