Re: Segfault logical replication PG 10.4
Quan TRAN <qtran@itscaro.me>
From: Quan TRAN <qtran@itscaro.me>
To: pgsql-hackers@lists.postgresql.org
Date: 2018-07-19T12:12:40Z
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.
Commits
-
Set ActiveSnapshot when logically replaying inserts
- 5dbd0beb8a95 11.0 landed
- 4f10e7ea7b22 12.0 landed
- 2c4d0f32e0c7 10.5 landed