From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Quan TRAN <qtran(at)itscaro(dot)me> |
Cc: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Segfault logical replication PG 10.4 |
Date: | 2018-07-20 19:08:30 |
Message-ID: | 20180720190830.rcf3gp6g5hkdbbmn@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2018-Jul-19, Quan TRAN wrote:
> Hello,
>
> In worker.c:
>
> - in apply_handle_insert, slot_store_cstrings is called before
> PushActiveSnapshot
> - in apply_handle_update & apply_handle_delete, slot_store_cstrings is
> called after PushActiveSnapshot
>
> /* Process and store remote tuple in the slot */
> oldctx = MemoryContextSwitchTo(GetPerTupleMemoryContext(estate));
> slot_store_cstrings(remoteslot, rel, newtup.values);
> slot_fill_defaults(rel, estate, remoteslot);
> MemoryContextSwitchTo(oldctx);
>
> PushActiveSnapshot(GetTransactionSnapshot());
>
> Should this be the cause?
Yeah, moving the PushActiveSnapshot call to just before
slot_store_cstrings sounds right.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Mithun Cy | 2018-07-20 19:23:28 | Re: Possible performance regression in version 10.1 with pgbench read-write tests. |
Previous Message | Nico Williams | 2018-07-20 19:06:47 | Re: Add constraint in a Materialized View |