@@ -380,7 +380,7 @@ typedef struct OutputPluginCallbacks
380
380
LogicalDecodeShutdownCB shutdown_cb;
381
381
} OutputPluginCallbacks;
382
382
383
- typedef void (*LogicalOutputPluginInit)(struct OutputPluginCallbacks *cb);
383
+ typedef void (*LogicalOutputPluginInit) (struct OutputPluginCallbacks *cb);
384
384
</programlisting>
385
385
The <function>begin_cb</function>, <function>change_cb</function>
386
386
and <function>commit_cb</function> callbacks are required,
@@ -465,11 +465,9 @@ CREATE TABLE another_catalog_table(data text) WITH (user_catalog_table = true);
465
465
a replication slot is created or asked to stream changes, independent
466
466
of the number of changes that are ready to be put out.
467
467
<programlisting>
468
- typedef void (*LogicalDecodeStartupCB) (
469
- struct LogicalDecodingContext *ctx,
470
- OutputPluginOptions *options,
471
- bool is_init
472
- );
468
+ typedef void (*LogicalDecodeStartupCB) (struct LogicalDecodingContext *ctx,
469
+ OutputPluginOptions *options,
470
+ bool is_init);
473
471
</programlisting>
474
472
The <literal>is_init</literal> parameter will be true when the
475
473
replication slot is being created and false
@@ -504,9 +502,7 @@ typedef struct OutputPluginOptions
504
502
be used to deallocate resources private to the output plugin. The slot
505
503
isn't necessarily being dropped, streaming is just being stopped.
506
504
<programlisting>
507
- typedef void (*LogicalDecodeShutdownCB) (
508
- struct LogicalDecodingContext *ctx
509
- );
505
+ typedef void (*LogicalDecodeShutdownCB) (struct LogicalDecodingContext *ctx);
510
506
</programlisting>
511
507
</para>
512
508
</sect3>
@@ -519,10 +515,8 @@ typedef void (*LogicalDecodeShutdownCB) (
519
515
start of a committed transaction has been decoded. Aborted transactions
520
516
and their contents never get decoded.
521
517
<programlisting>
522
- typedef void (*LogicalDecodeBeginCB) (
523
- struct LogicalDecodingContext *,
524
- ReorderBufferTXN *txn
525
- );
518
+ typedef void (*LogicalDecodeBeginCB) (struct LogicalDecodingContext *ctx,
519
+ ReorderBufferTXN *txn);
526
520
</programlisting>
527
521
The <parameter>txn</parameter> parameter contains meta information about
528
522
the transaction, like the time stamp at which it has been committed and
@@ -540,10 +534,9 @@ typedef void (*LogicalDecodeBeginCB) (
540
534
rows will have been called before this, if there have been any modified
541
535
rows.
542
536
<programlisting>
543
- typedef void (*LogicalDecodeCommitCB) (
544
- struct LogicalDecodingContext *,
545
- ReorderBufferTXN *txn
546
- );
537
+ typedef void (*LogicalDecodeCommitCB) (struct LogicalDecodingContext *ctx,
538
+ ReorderBufferTXN *txn,
539
+ XLogRecPtr commit_lsn);
547
540
</programlisting>
548
541
</para>
549
542
</sect3>
@@ -559,12 +552,10 @@ typedef void (*LogicalDecodeCommitCB) (
559
552
several rows at once the callback will be called individually for each
560
553
row.
561
554
<programlisting>
562
- typedef void (*LogicalDecodeChangeCB) (
563
- struct LogicalDecodingContext *ctx,
564
- ReorderBufferTXN *txn,
565
- Relation relation,
566
- ReorderBufferChange *change
567
- );
555
+ typedef void (*LogicalDecodeChangeCB) (struct LogicalDecodingContext *ctx,
556
+ ReorderBufferTXN *txn,
557
+ Relation relation,
558
+ ReorderBufferChange *change);
568
559
</programlisting>
569
560
The <parameter>ctx</parameter> and <parameter>txn</parameter> parameters
570
561
have the same contents as for the <function>begin_cb</function>
@@ -594,10 +585,8 @@ typedef void (*LogicalDecodeChangeCB) (
594
585
from <parameter>origin_id</parameter> is of interest to the
595
586
output plugin.
596
587
<programlisting>
597
- typedef bool (*LogicalDecodeFilterByOriginCB) (
598
- struct LogicalDecodingContext *ctx,
599
- RepNodeId origin_id
600
- );
588
+ typedef bool (*LogicalDecodeFilterByOriginCB) (struct LogicalDecodingContext *ctx,
589
+ RepOriginId origin_id);
601
590
</programlisting>
602
591
The <parameter>ctx</parameter> parameter has the same contents
603
592
as for the other callbacks. No information but the origin is
@@ -623,15 +612,13 @@ typedef bool (*LogicalDecodeFilterByOriginCB) (
623
612
The optional <function>message_cb</function> callback is called whenever
624
613
a logical decoding message has been decoded.
625
614
<programlisting>
626
- typedef void (*LogicalDecodeMessageCB) (
627
- struct LogicalDecodingContext *,
628
- ReorderBufferTXN *txn,
629
- XLogRecPtr message_lsn,
630
- bool transactional,
631
- const char *prefix,
632
- Size message_size,
633
- const char *message
634
- );
615
+ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
616
+ ReorderBufferTXN *txn,
617
+ XLogRecPtr message_lsn,
618
+ bool transactional,
619
+ const char *prefix,
620
+ Size message_size,
621
+ const char *message);
635
622
</programlisting>
636
623
The <parameter>txn</parameter> parameter contains meta information about
637
624
the transaction, like the time stamp at which it has been committed and
0 commit comments