Re: Logical Decoding Callbacks

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Xavier Stevens <xavier(at)simple(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Logical Decoding Callbacks
Date: 2015-02-10 08:57:34
Message-ID: 20150210085734.GC21017@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

On 2015-02-09 16:52:59 -0800, Xavier Stevens wrote:
> I'm trying to write a logical decoding plugin and I'm seeing some
> interesting behavior around the startup callback. When I use psql and the
> built-in SQL functions (like pg_logical_slot_peek_changes) to use my module
> I see the startup_cb get called. I have written my own streaming
> replication client and for some reason when I use my client the startup_cb
> does not get called, but I can still see the changes just fine. The reason
> why the startup_cb is particularly important in my case, is I'm trying to
> set two dynamic OIDs for PostGIS geometry and geography types. I've tried
> setting them both as globals and as part of the output_plugin_private data.
>
> Any idea what's wrong here? Did I miss something in the streaming
> replication documentation?

Hm, that's odd. The startup callback should (and is, I used it just a
couple hours ago) definitely be called when using the streaming
replication protocol. You're saying that the callback is not called when
you do START_LOGICAL_REPLICATION ... ?

Can you reproduce the problem with test_decoding? Because that'd
actually crash if no startup callback were registered...

Can you show your code/a testcase?

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andres Freund 2015-02-10 08:59:04 Re: Logical Decoding Callbacks
Previous Message Thomas Kellerer 2015-02-10 07:14:25 Re: EXCLUDE constraint with not equals