Re: pg13: xlogreader API adjust

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "ah(at)cybertec(dot)at" <ah(at)cybertec(dot)at>, "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>
Subject: Re: pg13: xlogreader API adjust
Date: 2020-05-14 01:03:48
Message-ID: C04FC24E-903D-4423-B312-6910E4D846E5@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gurjeet Singh 2020-05-14 01:24:39 Re: JSON output from psql
Previous Message Kyotaro Horiguchi 2020-05-14 00:51:41 Re: PG 13 release notes, first draft