mirror of
https://github.com/postgres/postgres.git
synced 2025-06-27 23:21:58 +03:00
Avoid ERROR at ON COMMIT DELETE ROWS after relhassubclass=f.
Commit7102070329
fixed a similar bug, but it missed the case of database-wide ANALYZE ("use_own_xacts" mode). Commita07e03fd8f
changed consequences from silent discard of a pg_class stats (relpages et al.) update to ERROR "tuple to be updated was already modified". Losing a relpages update of an ON COMMIT DELETE ROWS table was negligible, but a COMMIT-time error isn't negligible. Back-patch to v13 (all supported versions). Reported-by: Richard Guo <guofenglinux@gmail.com Reported-by: Robins Tharakan <tharakan@gmail.com> Discussion: https://postgr.es/m/CAMbWs4-XwMKMKJ_GT=p3_-_=j9rQSEs1FbDFUnW9zHuKPsPNEQ@mail.gmail.com Backpatch-through: 13
This commit is contained in:
@ -470,6 +470,8 @@ vacuum(List *relations, VacuumParams *params,
|
||||
if (use_own_xacts)
|
||||
{
|
||||
PopActiveSnapshot();
|
||||
/* standard_ProcessUtility() does CCI if !use_own_xacts */
|
||||
CommandCounterIncrement();
|
||||
CommitTransactionCommand();
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user