PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID16033
PG Version12rc1
OSUbuntu 18.04.3
Opened2019-10-02 12:04:42+00
Reported byMiha Vrhovnik
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      16033
Logged by:          Miha Vrhovnik
Email address:      (redacted)
PostgreSQL version: 12rc1
Operating system:   Ubuntu 18.04.3
Description:        

We are launching a ne service and decided to test the new 12rc1
It happens that from time to time the postgresql crashes with segmentation
fault.


When it crashes the query running is always of the following form:
UPDATE calculation SET updated_xy = NOW(), xy = $1, types =
array_distinct(array_cat(types, $2)), failed =
array_distinct(array_cat(failed, $3))

Now the array_distinct is defined as following:

CREATE OR REPLACE FUNCTION array_distinct(anyarray)
RETURNS anyarray AS $$
    SELECT ARRAY(SELECT DISTINCT unnest($1) ORDER BY 1)
$$ LANGUAGE sql;

everything of "importance" around the UPDATE sentence is
2019-10-02 12:03:03.137 UTC [1215] LOCATION:  LogChildExit,
postmaster.c:3680
2019-10-02 12:03:03.137 UTC [1215] LOG:  00000: terminating any other active
server processes
2019-10-02 12:03:03.137 UTC [1215] LOCATION:  HandleChildCrash,
postmaster.c:3400

Messages

DateAuthorSubject
2019-10-02 12:04:42+00PG Bug reporting formBUG #16033: segmentation fault when runing update
2019-10-02 13:51:54+00Tom LaneRe: BUG #16033: segmentation fault when runing update
2019-10-02 15:40:35+00Miha VrhovnikRe: BUG #16033: segmentation fault when runing update
2019-10-02 16:15:04+00Tom LaneRe: BUG #16033: segmentation fault when runing update