Re: In-placre persistance change of a relation
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: tgl@sss.pgh.pa.us
Cc: rjuju123@gmail.com, jakub.wartak@tomtom.com,
pgsql-hackers@lists.postgresql.org
Date: 2022-03-01T05:14:13Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
pg_dump: Refactor getIndexes()
- e2c52beecdea 15.0 cited
-
Optimize DropRelFileNodesAllBuffers() for recovery.
- bea449c635c0 14.0 cited
Attachments
- v18-0001-In-place-table-persistence-change.patch (text/x-patch)
Rebased on a recent xlog refactoring. No functional changes have been made. - Removed the default case in smgr_desc since it seems to me we don't assume out-of-definition values in xlog records elsewhere. - Simplified some added to storage.c. - Fix copy-pasto'ed comments in extractPageInfo(). - The previous version smgrDoPendingCleanups() assumes that init-fork are not loaded onto shared buffer but it is wrong (SetRelationBuffersPersistence assumes the opposite.). Thus we need to drop buffers before unlink an init fork. But it is already guaranteed by logic so I rewrote the comment for for PCOP_UNLINK_FORK. > * Unlink the fork file. Currently we use this only for > * init forks and we're sure that the init fork is not > * loaded on shared buffers. For RelationDropInitFork > * case, the function dropped that buffers. For > * RelationCreateInitFork case, PCOP_SET_PERSISTENCE(true) > * is set and the buffers have been dropped just before. This logic has the same critical window as DropRelFilenodeBuffers. That is, if file deletion fails after successful buffer dropping, theoretically the file content of the init fork may be stale. However, AFAICS init-fork is write-once fork so I don't think that actually matters. regards. -- Kyotaro Horiguchi NTT Open Source Software Center