mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Extend the BufFile interface.
Allow BufFile to support temporary files that can be used by the single backend when the corresponding files need to be survived across the transaction and need to be opened and closed multiple times. Such files need to be created as a member of a SharedFileSet. Additionally, this commit implements the interface for BufFileTruncate to allow files to be truncated up to a particular offset and extends the BufFileSeek API to support the SEEK_END case. This also adds an option to provide a mode while opening the shared BufFiles instead of always opening in read-only mode. These enhancements in BufFile interface are required for the upcoming patch to allow the replication apply worker, to handle streamed in-progress transactions. Author: Dilip Kumar, Amit Kapila Reviewed-by: Amit Kapila Tested-by: Neha Sharma Discussion: https://postgr.es/m/688b0b7f-2f6c-d827-c27b-216a8e3ea700@2ndquadrant.com
This commit is contained in:
@@ -94,7 +94,7 @@ extern mode_t FileGetRawMode(File file);
|
||||
|
||||
/* Operations used for sharing named temporary files */
|
||||
extern File PathNameCreateTemporaryFile(const char *name, bool error_on_failure);
|
||||
extern File PathNameOpenTemporaryFile(const char *name);
|
||||
extern File PathNameOpenTemporaryFile(const char *path, int mode);
|
||||
extern bool PathNameDeleteTemporaryFile(const char *name, bool error_on_failure);
|
||||
extern void PathNameCreateTemporaryDir(const char *base, const char *name);
|
||||
extern void PathNameDeleteTemporaryDir(const char *name);
|
||||
|
||||
Reference in New Issue
Block a user