mirror of
https://github.com/postgres/postgres.git
synced 2025-10-25 13:17:41 +03:00
localbuf: Introduce TerminateLocalBufferIO()
Previously TerminateLocalBufferIO() was open-coded in multiple places, which doesn't seem like a great idea. While TerminateLocalBufferIO() currently is rather simple, an upcoming patch requires additional code to be added to TerminateLocalBufferIO(), making this modification particularly worthwhile. For some reason FlushRelationBuffers() previously cleared BM_JUST_DIRTIED, even though that's never set for temporary buffers. This is not carried over as part of this change. Reviewed-by: Melanie Plageman <melanieplageman@gmail.com> Discussion: https://postgr.es/m/CAAKRu_b9anbWzEs5AAF9WCvcEVmgz-1AkHSQ-CLLy-p7WHzvFw@mail.gmail.com
This commit is contained in:
@@ -471,6 +471,8 @@ extern BlockNumber ExtendBufferedRelLocal(BufferManagerRelation bmr,
|
||||
Buffer *buffers,
|
||||
uint32 *extended_by);
|
||||
extern void MarkLocalBufferDirty(Buffer buffer);
|
||||
extern void TerminateLocalBufferIO(BufferDesc *bufHdr, bool clear_dirty,
|
||||
uint32 set_flag_bits);
|
||||
extern void DropRelationLocalBuffers(RelFileLocator rlocator,
|
||||
ForkNumber forkNum,
|
||||
BlockNumber firstDelBlock);
|
||||
|
||||
Reference in New Issue
Block a user