Re: Segfault logical replication PG 10.4

From: Quan TRAN <qtran(at)itscaro(dot)me>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Segfault logical replication PG 10.4
Date: 2018-07-19 12:12:40
Message-ID: 324a2313-aae9-c407-0369-ea1bd4f75d27@itscaro.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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?

Thank you.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2018-07-19 12:13:46 Re: Runtime partition pruning for MergeAppend
Previous Message Thomas Munro 2018-07-19 11:51:46 Re: [HACKERS] PATCH: Keep one postmaster monitoring pipe per process