mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Optimize fileset usage in apply worker.
Use one fileset for the entire worker lifetime instead of using separate filesets for each streaming transaction. Now, the changes/subxacts files for every streaming transaction will be created under the same fileset and the files will be deleted after the transaction is completed. This patch extends the BufFileOpenFileSet and BufFileDeleteFileSet APIs to allow users to specify whether to give an error on missing files. Author: Dilip Kumar, based on suggestion by Thomas Munro Reviewed-by: Hou Zhijie, Masahiko Sawada, Amit Kapila Discussion: https://postgr.es/m/E1mCC6U-0004Ik-Fs@gemulon.postgresql.org
This commit is contained in:
@@ -49,8 +49,9 @@ extern long BufFileAppend(BufFile *target, BufFile *source);
|
||||
extern BufFile *BufFileCreateFileSet(FileSet *fileset, const char *name);
|
||||
extern void BufFileExportFileSet(BufFile *file);
|
||||
extern BufFile *BufFileOpenFileSet(FileSet *fileset, const char *name,
|
||||
int mode);
|
||||
extern void BufFileDeleteFileSet(FileSet *fileset, const char *name);
|
||||
int mode, bool missing_ok);
|
||||
extern void BufFileDeleteFileSet(FileSet *fileset, const char *name,
|
||||
bool missing_ok);
|
||||
extern void BufFileTruncateFileSet(BufFile *file, int fileno, off_t offset);
|
||||
|
||||
#endif /* BUFFILE_H */
|
||||
|
||||
Reference in New Issue
Block a user