aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-02-15 18:15:47 -0500
committerTom Lane <tgl@sss.pgh.pa.us>2017-02-15 18:15:47 -0500
commitc3b5cfe33cda6e28bbdc75534706c1a00a9e6c4b (patch)
tree04c25b70ffdec00f388c26f98ebb783dc1f48be9 /src
parent19c324d9fb4d59db1d0c3e8865356fb6867dc35e (diff)
downloadpostgresql-c3b5cfe33cda6e28bbdc75534706c1a00a9e6c4b.tar.gz
postgresql-c3b5cfe33cda6e28bbdc75534706c1a00a9e6c4b.zip
Formatting and docs corrections for logical decoding output plugins.
Make the typedefs for output plugins consistent with project style; they were previously not even consistent with each other as to layout or inclusion of parameter names. Make the documentation look the same, and fix errors therein (missing and misdescribed parameters). Back-patch because of the documentation bugs.
Diffstat (limited to 'src')
-rw-r--r--src/include/replication/output_plugin.h27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/include/replication/output_plugin.h b/src/include/replication/output_plugin.h
index a58e68d30a5..efa9824d3eb 100644
--- a/src/include/replication/output_plugin.h
+++ b/src/include/replication/output_plugin.h
@@ -41,44 +41,36 @@ typedef void (*LogicalOutputPluginInit) (struct OutputPluginCallbacks *cb);
* "is_init" will be set to "true" if the decoding slot just got defined. When
* the same slot is used from there one, it will be "false".
*/
-typedef void (*LogicalDecodeStartupCB) (
- struct LogicalDecodingContext *ctx,
+typedef void (*LogicalDecodeStartupCB) (struct LogicalDecodingContext *ctx,
OutputPluginOptions *options,
- bool is_init
-);
+ bool is_init);
/*
* Callback called for every (explicit or implicit) BEGIN of a successful
* transaction.
*/
-typedef void (*LogicalDecodeBeginCB) (
- struct LogicalDecodingContext *,
+typedef void (*LogicalDecodeBeginCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn);
/*
* Callback for every individual change in a successful transaction.
*/
-typedef void (*LogicalDecodeChangeCB) (
- struct LogicalDecodingContext *,
+typedef void (*LogicalDecodeChangeCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
Relation relation,
- ReorderBufferChange *change
-);
+ ReorderBufferChange *change);
/*
* Called for every (explicit or implicit) COMMIT of a successful transaction.
*/
-typedef void (*LogicalDecodeCommitCB) (
- struct LogicalDecodingContext *,
+typedef void (*LogicalDecodeCommitCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
XLogRecPtr commit_lsn);
/*
* Called to shutdown an output plugin.
*/
-typedef void (*LogicalDecodeShutdownCB) (
- struct LogicalDecodingContext *
-);
+typedef void (*LogicalDecodeShutdownCB) (struct LogicalDecodingContext *ctx);
/*
* Output plugin callbacks
@@ -92,7 +84,8 @@ typedef struct OutputPluginCallbacks
LogicalDecodeShutdownCB shutdown_cb;
} OutputPluginCallbacks;
-void OutputPluginPrepareWrite(struct LogicalDecodingContext *ctx, bool last_write);
-void OutputPluginWrite(struct LogicalDecodingContext *ctx, bool last_write);
+/* Functions in replication/logical/logical.c */
+extern void OutputPluginPrepareWrite(struct LogicalDecodingContext *ctx, bool last_write);
+extern void OutputPluginWrite(struct LogicalDecodingContext *ctx, bool last_write);
#endif /* OUTPUT_PLUGIN_H */