Re: BUG #16129: Segfault in tts_virtual_materialize in logical replication worker

From: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>
To: Ondřej Jirman <ienieghapheoghaiwida(at)xff(dot)cz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16129: Segfault in tts_virtual_materialize in logical replication worker
Date: 2019-11-22 16:12:48
Message-ID: 20191122161248.qnzeoh6t7fvg5wl3@development
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Nov 22, 2019 at 01:54:01AM +0100, Ondřej Jirman wrote:
>On Thu, Nov 21, 2019 at 07:45:34PM -0500, Tom Lane wrote:
>> =?utf-8?Q?Ond=C5=99ej?= Jirman <ienieghapheoghaiwida(at)xff(dot)cz> writes:
>> > On Thu, Nov 21, 2019 at 11:08:54PM +0100, Tomas Vondra wrote:
>> >> 1) Print newtup.values and newtup.changed matches, so that we can check
>> >> it contains the tuple I shared before? There should be 8 elements in
>> >> each, with 'values' being values formatted as text, and 'changed' being
>> >> flags which values were updated.
>>
>> > newtup.changed
>>
>> > {true, true, false, true, true, true, true, true, false <repeats 1656 times>}
>>
>> So column 3 is not getting replaced. That seems to jibe with my
>> theory that slot_modify_cstrings is failing to handle that case
>> correctly. Can you try applying the patch I posted and see if
>> it fixes the issue for you?
>
>With the patch the replication resumes, without a crash.
>
>confirmed_flush_lsn is now same for all my replication slots.
>
>thank you and regards,

Can you show us the attribute list as defined in the system, including
e.g. dropped columns? That is, something like

SELECT attnum, attname, atttypid FROM pg_attribute
WHERE attrelid = 'public.videos'::regclass;

both from the published and subscriber.

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2019-11-22 16:50:03 Re: BUG #16129: Segfault in tts_virtual_materialize in logical replication worker
Previous Message Tom Lane 2019-11-22 01:21:15 Re: BUG #16129: Segfault in tts_virtual_materialize in logical replication worker