Re: Segfault logical replication PG 10.4 - Mailing list pgsql-hackers

From Quan TRAN
Subject Re: Segfault logical replication PG 10.4
Date
Msg-id 324a2313-aae9-c407-0369-ea1bd4f75d27@itscaro.me
Whole thread Raw
In response to Segfault logical replication PG 10.4  (Mai Peng <maily.peng@webedia-group.com>)
Responses Re: Segfault logical replication PG 10.4  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List 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.

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: [HACKERS] PATCH: Keep one postmaster monitoring pipe per process
Next
From: David Rowley
Date:
Subject: Re: Runtime partition pruning for MergeAppend