[BUGS] 9.6.3 - Backend Crash - Parallel Worker Prepared Statements - Mailing list pgsql-bugs

From Jarred Ward
Subject [BUGS] 9.6.3 - Backend Crash - Parallel Worker Prepared Statements
Date
Msg-id 6F61E6D2-2F5E-4794-9479-A429BE1CEA4B@simple.com
Whole thread Raw
Responses Re: [BUGS] 9.6.3 - Backend Crash - Parallel Worker Prepared Statements  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
We are experiencing a crash with parallel worker processes enabled in
one of our production 9.6.3 databases on Linux. When parallel workers
are disable, the issue does not occur.

Here is a full repro of the issue on 9.6.3 (tested on macOS 10.12.5
below):

jward@slip:~ $ grep '^max_.*worker' /usr/local/var/postgres/postgresql.conf
max_worker_processes = 8
max_parallel_workers_per_gather = 8
jward@slip:~ $ createdb repro
jward@slip:~ $ psql repro
psql (9.6.3)
Type "help" for help.

repro=# create extension if not exists "uuid-ossp";
CREATE EXTENSION
repro=# create table foo (bar uuid primary key, baz uuid not null, qux uuid not null);
CREATE TABLE
repro=# insert into foo select uuid_generate_v4(), uuid_generate_v4(), uuid_generate_v4() from generate_series(1,
250000);
INSERT 0 250000
repro=# explain select * from foo where baz = uuid_generate_v4() or qux = uuid_generate_v4();
    QUERY PLAN                                  
----------------------------------------------------------------------------Gather  (cost=1000.00..6528.27 rows=2494
width=48) Workers Planned: 1  ->  Parallel Seq Scan on foo  (cost=0.00..5278.87 rows=1467 width=48)        Filter:
((baz= uuid_generate_v4()) OR (qux = uuid_generate_v4())) 
(4 rows)

repro=# prepare test_select_jward (uuid, uuid) as select * from foo where baz = $1 or qux = $2;
PREPARE
repro=# execute test_select_jward ('1c5356b1-ba77-475e-9e16-60be44ab8f70', '0103d5e1-1ae1-3100-9fcd-8adc6f3e43d6');
server closed the connection unexpectedlyThis probably means the server terminated abnormallybefore or while processing
therequest. 
The connection to the server was lost. Attempting reset: Failed.
!>

Please let me know if there is any further information I can provide.

Thank you,
Jarred Ward

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: [BUGS] your mail
Next
From: Tom Lane
Date:
Subject: Re: [BUGS] your mail