mirror of
https://github.com/postgres/postgres.git
synced 2025-08-24 09:27:52 +03:00
Ability to advance replication slots
Ability to advance both physical and logical replication slots using a new user function pg_replication_slot_advance(). For logical advance that means records are consumed as fast as possible and changes are not given to output plugin for sending. Makes 2nd phase (after we reached SNAPBUILD_FULL_SNAPSHOT) of replication slot creation faster, especially when there are big transactions as the reorder buffer does not have to deal with data changes and does not have to spill to disk. Author: Petr Jelinek Reviewed-by: Simon Riggs
This commit is contained in:
@@ -45,6 +45,13 @@ typedef struct LogicalDecodingContext
|
||||
struct ReorderBuffer *reorder;
|
||||
struct SnapBuild *snapshot_builder;
|
||||
|
||||
/*
|
||||
* Marks the logical decoding context as fast forward decoding one.
|
||||
* Such a context does not have plugin loaded so most of the the following
|
||||
* properties are unused.
|
||||
*/
|
||||
bool fast_forward;
|
||||
|
||||
OutputPluginCallbacks callbacks;
|
||||
OutputPluginOptions options;
|
||||
|
||||
@@ -97,6 +104,7 @@ extern LogicalDecodingContext *CreateInitDecodingContext(char *plugin,
|
||||
extern LogicalDecodingContext *CreateDecodingContext(
|
||||
XLogRecPtr start_lsn,
|
||||
List *output_plugin_options,
|
||||
bool fast_forward,
|
||||
XLogPageReadCB read_page,
|
||||
LogicalOutputPluginWriterPrepareWrite prepare_write,
|
||||
LogicalOutputPluginWriterWrite do_write,
|
||||
|
Reference in New Issue
Block a user