Logical replication + before trigger = ERROR: attempted to lock invisible tuple

From: "Thomas Rosenstein" <thomas(dot)rosenstein(at)creamfinance(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Logical replication + before trigger = ERROR: attempted to lock invisible tuple
Date: 2017-11-13 20:11:55
Message-ID: 264A599D-9D31-415F-B8AB-6CBD320F9B98@creamfinance.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm trying to execute a BEFORE UPDATE trigger for my logical replication
subscription with Postgresql 10.1 but the apply worker crashes with:

ERROR: attempted to lock invisible tuple

The trigger creation:

CREATE TRIGGER customers_anonymize_before_update BEFORE UPDATE ON
customers FOR EACH ROW EXECUTE PROCEDURE customers_anonymize();

The "BEFORE INSERT" trigger seems to work fine.

I found this Issue on 2ndQuadrant:
https://github.com/2ndQuadrant/pglogical/issues/97

Is this on the radar? Is it already fixed?

Thanks
BR
Thomas

Browse pgsql-general by date

  From Date Subject
Next Message Peter Geoghegan 2017-11-13 20:40:47 Re: PG-10 + ICU and abbreviated keys
Previous Message Andreas Joseph Krogh 2017-11-13 19:48:50 Re: PG-10 + ICU and abbreviated keys