Re: pg13: xlogreader API adjust - Mailing list pgsql-hackers

From Bossart, Nathan
Subject Re: pg13: xlogreader API adjust
Date
Msg-id C04FC24E-903D-4423-B312-6910E4D846E5@amazon.com
Whole thread Raw
In response to Re: pg13: xlogreader API adjust  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: pg13: xlogreader API adjust
List pgsql-hackers
I think I've discovered a problem with 850196b6.  The following steps
can be used to trigger a segfault:

        # wal_level = logical
        psql postgres -c "create database testdb;"
        psql testdb -c "select pg_create_logical_replication_slot('slot', 'test_decoding');"
        psql "dbname=postgres replication=database" -c "START_REPLICATION SLOT slot LOGICAL 0/0;"

From a quick glance, I think the problem starts in
StartLogicalReplication() in walsender.c.  The call to
CreateDecodingContext() may ERROR before xlogreader is initialized in
the next line, so the subsequent call to WalSndErrorCleanup()
segfaults when it attempts to access xlogreader.

Nathan


pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: PG 13 release notes, first draft
Next
From: Gurjeet Singh
Date:
Subject: Re: JSON output from psql