logical decoding documentation?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: logical decoding documentation?
Date: 2014-03-11 19:57:39
Message-ID: 531F6AB3.7050906@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-03-11 20:16:59 Re: logical decoding documentation?
Previous Message Murtuza Mukadam 2014-03-11 19:37:02 git-review: linking commits to review discussion in git