Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dfCeK-0002yz-V2 for pgsql-bugs@arkaria.postgresql.org; Tue, 08 Aug 2017 22:06:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dfCeK-0000x6-HU for pgsql-bugs@arkaria.postgresql.org; Tue, 08 Aug 2017 22:06:52 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dfCUm-0007Pw-R5 for pgsql-bugs@postgresql.org; Tue, 08 Aug 2017 21:57:01 +0000 Received: from mail-pg0-x22f.google.com ([2607:f8b0:400e:c05::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dfCUj-00028a-EQ for pgsql-bugs@postgresql.org; Tue, 08 Aug 2017 21:56:59 +0000 Received: by mail-pg0-x22f.google.com with SMTP id v189so19930996pgd.2 for ; Tue, 08 Aug 2017 14:56:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=simple.com; s=google; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=HGh2fg0vyIMLkAfZHN66IUt6fTbeS0dbYM9SWWm2gSQ=; b=ku91mZ5zAKtwiNAA+SY1U79o4GfCrLNaKDLx65o0lUWVL/PbQ7wqaLMAyaTG/X8EdU cfz63J1zOa7CvVtRoMJyIzLGGg83pg6o8X6AdViY6XOQox5C9MlY7htIRZfZRfN+z3wf hpdhqPRFaVMhwvvwq6uyT5gnBoR3Lw62HyUgA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=HGh2fg0vyIMLkAfZHN66IUt6fTbeS0dbYM9SWWm2gSQ=; b=oe/9B/kwVZXIkyTeEONWFwqEE/ByM8SzXBWvADYvrhEv53tedFAXQ6MmDpjB3JFvp6 SS7JTZGKgNL3G12J15W7bhQHYP1fIrifxK1H3HJvKF0cNX2OUzwgy9xnb3VkoQRi6Xwi CcWcbDgTR9wHNZofaE/z9SqEHiV4kz7olc8qDJxXe3xAxYMBNQcsMEMkCrwplz3k+sMU 0HTXAai3bFef7o+WjzL5f2maQ/ABoEqSfc3L6kjr70xB3ZNThH3kQfBuhnzvhnYnekFg v9D1ZWULRpkBptHPuX27xlFNx5GYKnomgkATiKbRJZBVsp8Byzopr7irc72BRaw4ARpV V80g== X-Gm-Message-State: AHYfb5jOHiLMuPEUS6/0O4+pRunNpIri22NDq21WVzvHuJucnjAZrHeE 78iMww4HjMop+foEpGTkAw== X-Received: by 10.98.209.10 with SMTP id z10mr5914672pfg.93.1502229415276; Tue, 08 Aug 2017 14:56:55 -0700 (PDT) Received: from [192.168.252.66] (ec2-52-8-135-137.us-west-1.compute.amazonaws.com. [52.8.135.137]) by smtp.gmail.com with ESMTPSA id q24sm4348702pgc.61.2017.08.08.14.56.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 14:56:54 -0700 (PDT) From: Jarred Ward Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: 9.6.3 - Backend Crash - Parallel Worker Prepared Statements Message-Id: <6F61E6D2-2F5E-4794-9479-A429BE1CEA4B@simple.com> Date: Tue, 8 Aug 2017 14:56:53 -0700 To: pgsql-bugs@postgresql.org X-Mailer: Apple Mail (2.3273) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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 =3D 8 max_parallel_workers_per_gather =3D 8 jward@slip:~ $ createdb repro jward@slip:~ $ psql repro psql (9.6.3) Type "help" for help. repro=3D# create extension if not exists "uuid-ossp"; CREATE EXTENSION repro=3D# create table foo (bar uuid primary key, baz uuid not null, qux uu= id not null); CREATE TABLE repro=3D# insert into foo select uuid_generate_v4(), uuid_generate_v4(), uu= id_generate_v4() from generate_series(1, 250000); INSERT 0 250000 repro=3D# explain select * from foo where baz =3D uuid_generate_v4() or qux= =3D uuid_generate_v4(); QUERY PLAN=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ---------------------------------------------------------------------------- Gather (cost=3D1000.00..6528.27 rows=3D2494 width=3D48) Workers Planned: 1 -> Parallel Seq Scan on foo (cost=3D0.00..5278.87 rows=3D1467 width=3D= 48) Filter: ((baz =3D uuid_generate_v4()) OR (qux =3D uuid_generate_v4= ())) (4 rows) repro=3D# prepare test_select_jward (uuid, uuid) as select * from foo where= baz =3D $1 or qux =3D $2; PREPARE repro=3D# 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. !>=20 Please let me know if there is any further information I can provide. Thank you, Jarred Ward --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs