Re: Segfault logical replication PG 10.4

2018-07-30 Thread Mai Peng
Thank you Alvaro :) > Le 30 juil. 2018 à 22:33, Alvaro Herrera a écrit : > > On 2018-Jul-28, Alvaro Herrera wrote: > >> Aha, I see, thanks. Here's a complete fix with included testcase. In >> an unpatched assert-enabled build, this crashes this >> >> TRAP: FailedAssertion("!(ActiveSnapshotSe

Re: Segfault logical replication PG 10.4

2018-07-30 Thread Alvaro Herrera
On 2018-Jul-28, Alvaro Herrera wrote: > Aha, I see, thanks. Here's a complete fix with included testcase. In > an unpatched assert-enabled build, this crashes this > > TRAP: FailedAssertion("!(ActiveSnapshotSet())", File: > "/pgsql/source/REL_10_STABLE/src/backend/tcop/postgres.c", Line: 788)

Re: Segfault logical replication PG 10.4

2018-07-28 Thread Alvaro Herrera
Aha, I see, thanks. Here's a complete fix with included testcase. In an unpatched assert-enabled build, this crashes this TRAP: FailedAssertion("!(ActiveSnapshotSet())", File: "/pgsql/source/REL_10_STABLE/src/backend/tcop/postgres.c", Line: 788) Will push on Monday. -- Álvaro Herrera

Re: Segfault logical replication PG 10.4

2018-07-28 Thread Quan Tran
Sorry, there is an error in the previous message: insert into itscaro.test values (2, '{{test1.test2.test3}'); should be corrected with: insert into itscaro.test values (2, '{test1.test2.test3}'); >

Re: Segfault logical replication PG 10.4

2018-07-28 Thread Minh-Quan Tran
Hello, Here is the steps to reproduce this problem. Thank you. Pastebin : https://pastebin.com/Wc80YegY -- CREATE EXTENSION IF NOT EXISTS postgis; CREATE EXTENSION IF NOT EXISTS ltree; CREATE EXTENSION IF NOT EXISTS intarray; CREATE EXTENSION IF NOT EXISTS hstore; CREATE EXTENSION IF NOT EXIST

Re: Segfault logical replication PG 10.4

2018-07-27 Thread Alvaro Herrera
On 2018-Jul-20, Minh-Quan Tran wrote: > Something like this? Can you provide a reproducer for this problem? -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Segfault logical replication PG 10.4

2018-07-20 Thread Minh-Quan Tran
Something like this? Thank you. logical-replication-worker-insert.patch Description: Binary data

Re: Segfault logical replication PG 10.4

2018-07-20 Thread Alvaro Herrera
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

Re: Segfault logical replication PG 10.4

2018-07-19 Thread Quan TRAN
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 = Memor

Re: Segfault logical replication PG 10.4

2018-07-19 Thread Mai Peng
Hello , Some new input: On slave, all domains ( with checks) have been replaced by a simple type. No crash on slave since this bypass. Is there something to fix in the ActiveSnapshot code ? BR > Le 18 juil. 2018 à 17:03, Tom Lane a écrit : > > Mai Peng writes: >> Here the backtrace > > Hmm

Re: Segfault logical replication PG 10.4

2018-07-18 Thread Tom Lane
Mai Peng writes: > Here the backtrace Hmm .. so this can be summarized as "logical replication workers should provide an ActiveSnapshot in case the user functions they call want one". Makes me wonder how much other transactional infrastructure is needed but not present. r

Re: Segfault logical replication PG 10.4

2018-07-18 Thread Mai Peng
Hello, Here the backtrace ```Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `postgres: bgworker: logical replication worker for subscription'. Program terminated with signal SIGSEGV, Segmentation fault. #0 GetActiveSnapshot () at ./build/../src/b

Re: Segfault logical replication PG 10.4

2018-07-14 Thread Peter Eisentraut
On 12.07.18 00:56, Mai Peng wrote: > We discovered our pg_wal partition was full few days after setting our > first logical publication on a PG 10.4 instance. > Then, we can not synchronise our slave to the master, it triggers a > segfault on the slave. We had to drop manually the subscription on s

Segfault logical replication PG 10.4

2018-07-11 Thread Mai Peng
We discovered our pg_wal partition was full few days after setting our first logical publication on a PG 10.4 instance. Then, we can not synchronise our slave to the master, it triggers a segfault on the slave. We had to drop manually the subscription on slave and the slot on master. Then, we wa