pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: lr@pcorp.us
To: pgsql-bugs@postgresql.org
Subject: BUG #14344: string_agg(DISTINCT ..) crash
Date: Thu, 29 Sep 2016 03:55:38 +0000
Message-ID: <20160929035538.20224.39628@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

The following bug has been logged on the website:

Bug reference:      14344
Logged by:          Regina Obe
Email address:      lr@pcorp.us
PostgreSQL version: 9.6rc1
Operating system:   Windows 2012 and Windows 7 64-bit
Description:        

Let me know if you need more info or if this has already been fixed.

I was testing under 

PostgreSQL 9.6rc1, compiled by Visual C++ build 1800, 64-bit

And was able to trigger a crash with this:

-- create test table
CREATE TABLE string_agg_crash_test AS 
SELECT i AS id, states[mod(i,6) + 1] AS state, 'junk' || chr(mod(i, 26) + 1)
AS junk
FROM generate_series(1,100000) AS i, (SELECT
'{NULL,MA,HI,IL,KS,NY,NJ}'::varchar[] AS states) AS s ;

-- try to summarize crashes with parallel or not 
-- so doesn't seem to be parallel worker related.

set max_parallel_workers_per_gather = 0;
SELECT string_agg(DISTINCT state, ',' ORDER BY state)
FROM string_agg_crash_test;

-- it must have something to do with the DISTINCT, because
-- this doesn't crash
set max_parallel_workers_per_gather = 0;
SELECT string_agg(state, ',' ORDER BY state)
FROM string_agg_crash_test;


The logs don't give me any useful info just

WARNING:  terminating connection because of crash of another server
process



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


view thread (30+ messages)  latest in thread

Message-ID: <20160929035538.20224.39628@wrigleys.postgresql.org>
Permalink:  ../20160929035538.20224.39628@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20160929035538.20224.39628@wrigleys.postgresql.org

 · 

reply

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: lr@pcorp.us
  Subject: Re: BUG #14344: string_agg(DISTINCT ..) crash
  In-Reply-To: <20160929035538.20224.39628@wrigleys.postgresql.org>
  References: <20160929035538.20224.39628@wrigleys.postgresql.org>

* 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