aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/logicalfuncs.c
diff options
context:
space:
mode:
authorSimon Riggs <simon@2ndQuadrant.com>2018-01-17 11:38:34 +0000
committerSimon Riggs <simon@2ndQuadrant.com>2018-01-17 11:38:34 +0000
commit9c7d06d60680c7f00d931233873dee81fdb311c6 (patch)
tree7e2da1523af602caae0ef9d668d28b7aea1d6f70 /src/backend/replication/logical/logicalfuncs.c
parent585e166e46a1572b59eb9fdaffc2d4b785000f9e (diff)
downloadpostgresql-9c7d06d60680c7f00d931233873dee81fdb311c6.tar.gz
postgresql-9c7d06d60680c7f00d931233873dee81fdb311c6.zip
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/backend/replication/logical/logicalfuncs.c')
-rw-r--r--src/backend/replication/logical/logicalfuncs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/backend/replication/logical/logicalfuncs.c b/src/backend/replication/logical/logicalfuncs.c
index 9aab6e71b2e..54c25f1f5b2 100644
--- a/src/backend/replication/logical/logicalfuncs.c
+++ b/src/backend/replication/logical/logicalfuncs.c
@@ -251,6 +251,7 @@ pg_logical_slot_get_changes_guts(FunctionCallInfo fcinfo, bool confirm, bool bin
/* restart at slot's confirmed_flush */
ctx = CreateDecodingContext(InvalidXLogRecPtr,
options,
+ false,
logical_read_local_xlog_page,
LogicalOutputPrepareWrite,
LogicalOutputWrite, NULL);