Re: Logical Decoding Callbacks - Mailing list pgsql-general

From Xavier Stevens
Subject Re: Logical Decoding Callbacks
Date
Msg-id CAFu3Q-+2ivdCdL2TBTDx-LfD2-rzHRmUoeOBNWroDh13Gg0MGg@mail.gmail.com
Whole thread Raw
In response to Re: Logical Decoding Callbacks  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Logical Decoding Callbacks
List 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: 




On Tue, Feb 10, 2015 at 4:18 AM, Michael Paquier <michael.paquier@gmail.com> wrote:
On Tue, Feb 10, 2015 at 5:59 PM, Andres Freund <andres@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

pgsql-general by date:

Previous
From: Guillaume Drolet
Date:
Subject: Re: Cluster seems broken after pg_basebackup
Next
From: Felipe Gasper
Date:
Subject: Command to reset entire PgSQL cluster?