BUG in 10.1 - dsa_area could not attach to a segment that has been freed

From: Alexander Voytsekhovskyy <young(dot)inbox(at)gmail(dot)com>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: BUG in 10.1 - dsa_area could not attach to a segment that has been freed
Date: 2017-11-28 17:17:39
Message-ID: CAPa4P2a8Umtzh6Pxjbw-u40X0PGHbJ_Wfts1T6NEHwRhrB2xTg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

in very certain case i am getting error

"ERROR: dsa_area could not attach to a segment that has been freed"

I am running
PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu
4.8.4-2ubuntu1~14.04.3) 4.8.4, 64-bit

I am getting this error when

1) i set set enable_nestloop to off

2) run query

SELECT
delivery_data.id_product AS id_product,
client_tt.id_client_tt
FROM delivery_data
JOIN client_tt AS client_tt_tmp ON (client_tt_tmp.id_client_tt =
delivery_data.id_client_tt)
JOIN client_tt ON (client_tt_tmp.id_unique = client_tt.id_client_tt)
WHERE delivery_data.delivery_date BETWEEN '2017-09-01' AND '2017-11-30'
AND client_tt.id_client_tt IN (167427, 167429, 167430, 167433,
167434, 167435, 167436, 167437, 167438, 167485, 167520, 167521, 167527,
167528, 167529, 167530)
AND delivery_data.id_ta IN (3911)
GROUP BY client_tt.id_client_tt, delivery_data.id_product
HAVING SUM(delivery_data.amount) > 0
ORDER BY client_tt.id_client_tt

Here is explain for this query:
https://explain.depesz.com/s/slpM

If i change any part of this query, like remove filter
client_tt.id_client_tt or try it on other data set - it works

For me it's looks like a bug (

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2017-11-28 18:14:59 Re: BUG #14932: SELECT DISTINCT val FROM table gets stuck in an infinite loop
Previous Message Peter Eisentraut 2017-11-28 16:37:22 Re: [BUGS] BUG #14866: The generated constraint in the typed table causes the server to crash