Re: BUG #16095: Segfault while executing trigger

From: Thomas Butz <tbutz(at)optitool(dot)de>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16095: Segfault while executing trigger
Date: 2019-11-06 11:48:16
Message-ID: 1820932263.377949.1573040896379.JavaMail.zimbra@optitool.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> Thomas, can you try with that patch and see if it fixes the problem
> for you? We're quite close to 12.1 release, so if there's more to fix,
> it'd be better to find out ASAP.
>
> Note that this theory requires that the query we see being executed within
> a BEFORE UPDATE trigger had itself fired a BEFORE UPDATE trigger, and that
> there'd been concurrent commits causing EPQ to run. That doesn't seem
> exactly implausible, but it's data not evident in your report.

That seems to be the case because the software is running parallel UPDATE requests against a table called "placex" which has an active trigger[1]:

CREATE TRIGGER placex_before_update BEFORE UPDATE ON placex
FOR EACH ROW EXECUTE PROCEDURE placex_update();

and the placex_update() function is again issuing UPDATE statements[2]:

UPDATE placex set linked_place_id = null, indexed_status = 2
where linked_place_id = NEW.place_id;

[1] https://github.com/openstreetmap/Nominatim/blob/65daef70c1f9aa80e6d37fc12198309e49b883ca/sql/tables.sql#L198-L199
[2] https://github.com/openstreetmap/Nominatim/blob/05d7f9139247981cc7d9edc1edca9492e94b516b/sql/functions.sql#L1248-L1249

Are there any prebuilt deb packages with this patch?

Kind regards

Thomas Butz

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message vignesh C 2019-11-06 11:50:02 Reorderbuffer crash during recovery
Previous Message Fabien COELHO 2019-11-06 11:31:02 Re: BUG #16096: psql (non-interactive mode) SQL multi-request commands don't report all feedback ?!