Re: [HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-31 Thread Alvaro Herrera
Andres Freund wrote:
> On 2017-05-30 18:21:10 -0400, Alvaro Herrera wrote:
> > Alexander Sosna wrote:
> > > Hi,
> > > 
> > > I can reproduce a segmentation fault when creating a BRIN concurrently
> > > with set pages_per_range and autosummarize.
> > 
> > Pushed fix just now.  Please give it a try.  Thanks for testing and
> > reporting,
> 
> Shouldn't this have been uncovered by a regression test? In other words,
> do I understand correctly that the new summarization stuff is largely
> not tested by regression tests?

You understand correctly and I had the same concern myself upon finding
about the bug.  I cannot promise to create one right now but I can do so
after June 12th.

-- 
Álvaro Herrerahttps://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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


Re: [HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-31 Thread Alexander Sosna
Alvaro Herrera writes:
>> I can reproduce a segmentation fault when creating a BRIN concurrently
>> with set pages_per_range and autosummarize.
> 
> Pushed fix just now.  Please give it a try.  Thanks for testing and
> reporting,

Thank you for fixing, works for me.


Regards,
Alexander Sosna




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


Re: [HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-30 Thread Andres Freund
On 2017-05-30 18:21:10 -0400, Alvaro Herrera wrote:
> Alexander Sosna wrote:
> > Hi,
> > 
> > I can reproduce a segmentation fault when creating a BRIN concurrently
> > with set pages_per_range and autosummarize.
> 
> Pushed fix just now.  Please give it a try.  Thanks for testing and
> reporting,

Shouldn't this have been uncovered by a regression test? In other words,
do I understand correctly that the new summarization stuff is largely
not tested by regression tests?

- Andres


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


Re: [HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-30 Thread Alvaro Herrera
Alexander Sosna wrote:
> Hi,
> 
> I can reproduce a segmentation fault when creating a BRIN concurrently
> with set pages_per_range and autosummarize.

Pushed fix just now.  Please give it a try.  Thanks for testing and
reporting,

-- 
Álvaro Herrerahttps://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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


Re: [HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-30 Thread Alvaro Herrera
Tom Lane wrote:
> Alexander Sosna  writes:
> > I can reproduce a segmentation fault when creating a BRIN concurrently
> > with set pages_per_range and autosummarize.
> 
> I wonder if this isn't the same issue reported in
> https://www.postgresql.org/message-id/flat/20170524063323.29941.46339%40wrigleys.postgresql.org
> 
> Could you try the patch suggested there?

With the patch, it crashes immediately for me.  Looking into it now.

-- 
Álvaro Herrerahttps://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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


Re: [HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-30 Thread Tom Lane
Alexander Sosna  writes:
> I can reproduce a segmentation fault when creating a BRIN concurrently
> with set pages_per_range and autosummarize.

I wonder if this isn't the same issue reported in
https://www.postgresql.org/message-id/flat/20170524063323.29941.46339%40wrigleys.postgresql.org

Could you try the patch suggested there?

regards, tom lane


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


[HACKERS] Segmentation fault when creating a BRIN, 10beta1

2017-05-30 Thread Alexander Sosna
Hi,

I can reproduce a segmentation fault when creating a BRIN concurrently
with set pages_per_range and autosummarize.

# Reproduce
CREATE TABLE brin_test AS
SELECT
series AS id,
MD5(series::TEXT) AS VALUE,
'2015-10-31 13:37:00.313370+01'::TIMESTAMP + (series::TEXT || '
Minute')::INTERVAL AS TIME
FROM
GENERATE_SERIES(0,1) AS series;

CREATE INDEX CONCURRENTLY brin_test_time_abrin_8 ON brin_test USING brin
(TIME) WITH (pages_per_range=8, autosummarize=true);

2017-05-30 16:08:59.451 CEST [20689] LOG:  server process (PID 20881)
was terminated by signal 11: Segmentation fault
2017-05-30 16:08:59.451 CEST [20689] DETAIL:  Failed process was
running: CREATE INDEX CONCURRENTLY brin_test_time_abrin_8 ON brin_test
USING brin (TIME) WITH (pages_per_range=8, autosummarize=true);
2017-05-30 16:08:59.451 CEST [20689] LOG:  terminating any other active
server processes
2017-05-30 16:08:59.451 CEST [20806] WARNING:  terminating connection
because of crash of another server process
2017-05-30 16:08:59.451 CEST [20806] DETAIL:  The postmaster has
commanded this server process to roll back the current transaction and
exit, because another server process exited abnormally and possibly
corrupted shared memory.
2017-05-30 16:08:59.451 CEST [20806] HINT:  In a moment you should be
able to reconnect to the database and repeat your command.
2017-05-30 16:08:59.452 CEST [21204] postgres@postgres FATAL:  the
database system is in recovery mode

The debian packages where used, version "PostgreSQL 10beta1 on
x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18) 6.3.0 20170516,
64-bit".
I also tested the latest git commit
d5cb3bab564e0927ffac7c8729eacf181a12dd40 with the same result.
A more detailed log (debug5) can be found attached.


Kind regards,
Alexander Sosna
2017-05-30 16:19:27.374 CEST [22160] postgres@postgres DEBUG:  StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0
2017-05-30 16:19:27.374 CEST [22160] postgres@postgres STATEMENT:  CREATE INDEX CONCURRENTLY brin_test_time_abrin_8 ON brin_test USING brin (TIME) WITH (pages_per_range=8, autosummarize=true);
2017-05-30 16:19:27.375 CEST [22160] postgres@postgres DEBUG:  CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 591/1/2
2017-05-30 16:19:27.375 CEST [22160] postgres@postgres STATEMENT:  CREATE INDEX CONCURRENTLY brin_test_time_abrin_8 ON brin_test USING brin (TIME) WITH (pages_per_range=8, autosummarize=true);
2017-05-30 16:19:27.382 CEST [22160] postgres@postgres DEBUG:  StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0
2017-05-30 16:19:27.382 CEST [22160] postgres@postgres STATEMENT:  CREATE INDEX CONCURRENTLY brin_test_time_abrin_8 ON brin_test USING brin (TIME) WITH (pages_per_range=8, autosummarize=true);
2017-05-30 16:19:27.382 CEST [22160] postgres@postgres DEBUG:  building index "brin_test_time_abrin_8" on table "brin_test"
2017-05-30 16:19:27.382 CEST [22160] postgres@postgres STATEMENT:  CREATE INDEX CONCURRENTLY brin_test_time_abrin_8 ON brin_test USING brin (TIME) WITH (pages_per_range=8, autosummarize=true);
2017-05-30 16:19:27.384 CEST [22160] postgres@postgres DEBUG:  CommitTransaction(1) name: unnamed; blockState: STARTED; state: INPROGR, xid/subid/cid: 0/1/1 (used)
2017-05-30 16:19:27.384 CEST [22160] postgres@postgres STATEMENT:  CREATE INDEX CONCURRENTLY brin_test_time_abrin_8 ON brin_test USING brin (TIME) WITH (pages_per_range=8, autosummarize=true);
2017-05-30 16:19:27.384 CEST [22160] postgres@postgres DEBUG:  StartTransaction(1) name: unnamed; blockState: DEFAULT; state: INPROGR, xid/subid/cid: 0/1/0
2017-05-30 16:19:27.384 CEST [22160] postgres@postgres STATEMENT:  CREATE INDEX CONCURRENTLY brin_test_time_abrin_8 ON brin_test USING brin (TIME) WITH (pages_per_range=8, autosummarize=true);
2017-05-30 16:19:27.386 CEST [22059] DEBUG:  reaping dead processes
2017-05-30 16:19:27.386 CEST [22059] DEBUG:  server process (PID 22160) was terminated by signal 11: Segmentation fault
2017-05-30 16:19:27.386 CEST [22059] DETAIL:  Failed process was running: CREATE INDEX CONCURRENTLY brin_test_time_abrin_8 ON brin_test USING brin (TIME) WITH (pages_per_range=8, autosummarize=true);
2017-05-30 16:19:27.386 CEST [22059] LOG:  server process (PID 22160) was terminated by signal 11: Segmentation fault
2017-05-30 16:19:27.386 CEST [22059] DETAIL:  Failed process was running: CREATE INDEX CONCURRENTLY brin_test_time_abrin_8 ON brin_test USING brin (TIME) WITH (pages_per_range=8, autosummarize=true);
2017-05-30 16:19:27.386 CEST [22059] LOG:  terminating any other active server processes
2017-05-30 16:19:27.386 CEST [22059] DEBUG:  sending SIGQUIT to process 22066
2017-05-30 16:19:27.386 CEST [22059] DEBUG:  sending SIGQUIT to process 22062
2017-05-30 16:19:27.386 CEST [22059] DEBUG:  sending SIGQUIT to process 22061
2017-05-30 16:19:27.386 CEST [22059] DEBUG:  sending SIGQUIT to process 22063