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
commit6abf99b01d5a153684716d445fce204fc222975c (patch)
tree06e395a2f6e983ad82fd0122953d5b9cbc3bc587 /src
parentb1dc2af1a2210f2fa544c175ba846321de98f93c (diff)
downloadpostgresql-6abf99b01d5a153684716d445fce204fc222975c.tar.gz
postgresql-6abf99b01d5a153684716d445fce204fc222975c.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.h33
1 files changed, 12 insertions, 21 deletions
diff --git a/src/include/replication/output_plugin.h b/src/include/replication/output_plugin.h
index 7911cc0a29e..02606589c2a 100644
--- a/src/include/replication/output_plugin.h
+++ b/src/include/replication/output_plugin.h
@@ -41,43 +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 for the generic logical decoding messages.
*/
-typedef void (*LogicalDecodeMessageCB) (
- struct LogicalDecodingContext *,
+typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
XLogRecPtr message_lsn,
bool transactional,
@@ -88,16 +81,13 @@ typedef void (*LogicalDecodeMessageCB) (
/*
* Filter changes by origin.
*/
-typedef bool (*LogicalDecodeFilterByOriginCB) (
- struct LogicalDecodingContext *,
+typedef bool (*LogicalDecodeFilterByOriginCB) (struct LogicalDecodingContext *ctx,
RepOriginId origin_id);
/*
* Called to shutdown an output plugin.
*/
-typedef void (*LogicalDecodeShutdownCB) (
- struct LogicalDecodingContext *
-);
+typedef void (*LogicalDecodeShutdownCB) (struct LogicalDecodingContext *ctx);
/*
* Output plugin callbacks
@@ -113,7 +103,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 */