logical decoding documentation? - Mailing list pgsql-hackers

From Peter Eisentraut
Subject logical decoding documentation?
Date
Msg-id 531F6AB3.7050906@gmx.net
Whole thread Raw
Responses Re: logical decoding documentation?  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
Where, if anywhere, is the current documentation for writing or using a
logical decoding output plugin consumer thingy?

I'm trying to find my way into it ...

src/backend/replication/logical/logical.c, which textually contains most
of the functions that appear to interact with the test_decoding module,
contains this in the header comment:

"""
The idea is that a consumer provides three callbacks, one to read WAL,
one to prepare a data write, and a final one for actually writing since
their implementation depends on the type of consumer.  Check
logicalfunc.c for an example implementations of a fairly simple consumer
and a implementation of a WAL reading callback that's suitable for
simpler consumers.
"""

There is no file logicalfunc.c.  And test_decoding actually uses five
callbacks, not three.

Is a consumer the same as a decoder?

test_decoding.c contains this:

/* These must be available to pg_dlsym() */
static void pg_decode_startup(LogicalDecodingContext *ctx,
OutputPluginOptions *opt, bool is_init);
...

which is surely wrong.



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: The case against multixact GUCs
Next
From: Andres Freund
Date:
Subject: Re: logical decoding documentation?