Re: Bugs in TOAST handling, OID assignment and redo recovery
| От | Tom Lane |
|---|---|
| Тема | Re: Bugs in TOAST handling, OID assignment and redo recovery |
| Дата | |
| Msg-id | 15348.1523478513@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Bugs in TOAST handling, OID assignment and redo recovery (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Bugs in TOAST handling, OID assignment and redo recovery
Re: Bugs in TOAST handling, OID assignment and redo recovery |
| Список | pgsql-hackers |
So while looking at this, it suddenly occurred to me that probing with
SnapshotDirty isn't that safe for regular (non-TOAST) Oid assignment
either. SnapshotDirty will consider a row dead the instant the
deleting transaction has committed, but it may remain visible to other
transactions for awhile after that --- and now that we use MVCC for
catalog scans, that applies to them too. Hence, the existing logic
is capable of creating objects with transiently-conflicting OIDs.
I don't think this could create a conflict that's visible outside
our own transaction, since anyone who can see our commit would also
see the commit of the deleting transaction. But there's definitely
a hazard inside the transaction that creates a new object.
I propose therefore that the right fix does not require an API change
for GetNewOidWithIndex: we can just make it use SnapshotAny all the
time.
regards, tom lane
В списке pgsql-hackers по дате отправления: