Re: BUG #16129: Segfault in tts_virtual_materialize in logical replication worker
Ondřej Jirman <ienieghapheoghaiwida@xff.cz>
From: Ondřej Jirman <ienieghapheoghaiwida@xff.cz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>, pgsql-bugs@lists.postgresql.org
Date: 2019-11-22T00:54:01Z
Lists: pgsql-bugs
On Thu, Nov 21, 2019 at 07:45:34PM -0500, Tom Lane wrote:
> =?utf-8?Q?Ond=C5=99ej?= Jirman <ienieghapheoghaiwida@xff.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,
o.
> regards, tom lane
Commits
-
Add test coverage for "unchanged toast column" replication code path.
- f67b173771a0 13.0 landed
- 8b46acf7c423 10.12 landed
- 8047a7b9dd45 12.2 landed
- 785206afdf1f 11.7 landed
-
Fix bogus tuple-slot management in logical replication UPDATE handling.
- b72a44c51ad6 11.7 landed
- a2aa224e05dc 12.2 landed
- 5d3fcb53a6a8 10.12 landed
- 4d9ceb0018cc 13.0 landed