diff options
| author | Simon Riggs | 2018-01-17 11:38:34 +0000 |
|---|---|---|
| committer | Simon Riggs | 2018-01-17 11:38:34 +0000 |
| commit | 9c7d06d60680c7f00d931233873dee81fdb311c6 (patch) | |
| tree | 7e2da1523af602caae0ef9d668d28b7aea1d6f70 /src/include/replication | |
| parent | 585e166e46a1572b59eb9fdaffc2d4b785000f9e (diff) | |
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
Diffstat (limited to 'src/include/replication')
| -rw-r--r-- | src/include/replication/logical.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/replication/logical.h b/src/include/replication/logical.h index d9059e1cca6..619c5f4d73e 100644 --- a/src/include/replication/logical.h +++ b/src/include/replication/logical.h @@ -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, |
