Re: Logical Decoding Callbacks

From: Xavier Stevens <xavier(at)simple(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: Logical Decoding Callbacks
Date: 2015-02-10 18:33:41
Message-ID: CAFu3Q-+2ivdCdL2TBTDx-LfD2-rzHRmUoeOBNWroDh13Gg0MGg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(dot)paquier(at)gmail(dot)com>
wrote:

> On Tue, Feb 10, 2015 at 5:59 PM, Andres Freund <andres(at)2ndquadrant(dot)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
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Felipe Gasper 2015-02-10 18:49:40 Command to reset entire PgSQL cluster?
Previous Message Guillaume Drolet 2015-02-10 16:38:49 Re: Cluster seems broken after pg_basebackup