aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/indexcmds.c
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2024-06-27 19:21:05 -0700
committerNoah Misch <noah@leadboat.com>2024-06-27 19:21:09 -0700
commit112d055706bfe653685ec24552429a19830a7ef3 (patch)
tree1d4b09c56f8e94b97b3b048e7aa14e1e68bd4014 /src/backend/commands/indexcmds.c
parentf8135d8b54ff68f0788779d86edd796efc330ff4 (diff)
downloadpostgresql-112d055706bfe653685ec24552429a19830a7ef3.tar.gz
postgresql-112d055706bfe653685ec24552429a19830a7ef3.zip
Lock owned sequences during ALTER TABLE SET { LOGGED | UNLOGGED }.
These commands already make the persistence of owned sequences follow owned table persistence changes. They didn't lock those sequences. They lost the effect of nextval() calls that other sessions make after the ALTER TABLE command, before the ALTER TABLE transaction commits. Fix by acquiring the same lock that ALTER SEQUENCE SET { LOGGED | UNLOGGED } acquires. This might cause more deadlocks. Back-patch to v15, where commit 344d62fb9a978a72cf8347f0369b9ee643fd0b31 introduced unlogged sequences. Reviewed (in an earlier version) by Robert Haas. Discussion: https://postgr.es/m/20240611024525.9f.nmisch@google.com
Diffstat (limited to 'src/backend/commands/indexcmds.c')
0 files changed, 0 insertions, 0 deletions