Sorry to raise the issue on startup_cb. I added a whole bunch of logging statements and I was only running the section of code I wanted when the startup callback had options.
This now gets me to the next issue I encounter. In my output plugin, I'm trying to use the SPI interface to query about PostGIS OIDs in the startup callback. Just calling SPI_connect() seems to be causing a segfault. This is the last thing I see in the logs before the segfault occurs: https://github.com/xstevens/decoderbufs/blob/master/src/decoderbufs.c#L151 On Tue, Feb 10, 2015 at 4:18 AM, Michael Paquier <michael.paqu...@gmail.com> wrote: > On Tue, Feb 10, 2015 at 5:59 PM, Andres Freund <and...@2ndquadrant.com> > wrote: > > On 2015-02-10 11:01:08 +0900, Michael Paquier wrote: > >> Just in case, I have just done a quick test with pg_recvlogical on > >> latest HEAD of REL9_4_STABLE and the startup_cb gets called: > >> DEBUG: received replication command: IDENTIFY_SYSTEM > >> DEBUG: received replication command: START_REPLICATION SLOT "slot" > LOGICAL 0/0 > >> LOG: called startup_cb_wrapper > >> Note that on 9.5 (master HEAD at c619c23) I am seeing an assertion > >> failure. What is the server version you are using? I would imagine 9.4 > >> but let's be sure. > > > > Uh, which plugin and what assertion? What's the backtrace? > > I am raising that on a new thread on -hackers, that's not related to the > report here. Thanks for reminding. > -- > Michael >