From: Jarred Ward <jarred@simple.com>
To: pgsql-bugs@postgresql.org
Subject: 9.6.3 - Backend Crash - Parallel Worker Prepared Statements
Date: Tue, 8 Aug 2017 14:56:53 -0700
Message-ID: <6F61E6D2-2F5E-4794-9479-A429BE1CEA4B@simple.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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 unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: jarred@simple.com
Subject: Re: 9.6.3 - Backend Crash - Parallel Worker Prepared Statements
In-Reply-To: <6F61E6D2-2F5E-4794-9479-A429BE1CEA4B@simple.com>
References: <6F61E6D2-2F5E-4794-9479-A429BE1CEA4B@simple.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox