Crash in 9.4 Beta when partially collapsing left outer joins - Mailing list pgsql-general

From lists@benjamindsmith.com
Subject Crash in 9.4 Beta when partially collapsing left outer joins
Date
Msg-id 3408505.efUGptfArt@tesla.schoolpathways.com
Whole thread Raw
Responses Re: Crash in 9.4 Beta when partially collapsing left outer joins
Re: Crash in 9.4 Beta when partially collapsing left outer joins
List pgsql-general
I think this is the first time I've ever reported a PG crash, which is notable
since I've been using PG for over 10 years. ;)

Using the 9.4 Beta RPMs on CentOS 6.X/64, we're experiencing a reproducible
crash when running a query with a left outer join, partially collapsed.

TRAP: FailedAssertion("!(!restriction_is_or_clause((RestrictInfo *) orarg))",
File: "indxpath.c", Line: 1213)
< 2014-09-08 14:21:33.179 PDT >LOG:  server process (PID 19957) was terminated
by signal 6: Aborted
< 2014-09-08 14:21:33.179 PDT >DETAIL:  Failed process was running: SELECT
                students.id
        FROM students
        LEFT OUTER JOIN enrollments ON
                (
                enrollments.students_id = students.id
                )
        WHERE
                 (
                students.id = 5008
                OR
                      (
                                (
                                students.birthcity = 'Chico'
                                OR students.birthcity IS NULL
                                )
                        AND enrollments.start < 20141219
                        )
                );
< 2014-09-08 14:21:33.179 PDT >LOG:  terminating any other active server
processes
< 2014-09-08 14:21:33.179 PDT >WARNING:  terminating connection because of
crash of another server process
< 2014-09-08 14:21:33.179 PDT >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.


Here's the smallest query I could find that it would crash on. Run on a blank
database, the following will reliably crash postgres:

CREATE TABLE students
    (id SERIAL PRIMARY KEY,
    birthcity VARCHAR DEFAULT NULL);

CREATE TABLE enrollments
    (students_id INTEGER NOT NULL REFERENCES students(id),
    start INTEGER);

SELECT
    students.id
FROM students
LEFT OUTER JOIN enrollments ON
    (
    enrollments.students_id = students.id
    )
WHERE
    (
    students.id = 5008
    OR
        (
            (
            students.birthcity = 'Chico'
            OR students.birthcity IS NULL
            )
        AND enrollments.start < 20141219
        )
    );

-----------------------
Other environment stuff:

[root@db1 pgsql]# rpm -qa | grep postg
postgresql94-libs-9.4beta2-1PGDG.rhel6.x86_64
postgresql94-server-9.4beta2-1PGDG.rhel6.x86_64
postgresql94-devel-9.4beta2-1PGDG.rhel6.x86_64
postgresql92-libs-9.2.9-1PGDG.rhel6.x86_64
postgresql94-9.4beta2-1PGDG.rhel6.x86_64
postgresql94-contrib-9.4beta2-1PGDG.rhel6.x86_64

[root@db1 pgsql]# uname -a
Linux db1.schoolpathways.com 2.6.32-431.23.3.el6.x86_64 #1 SMP Thu Jul 31
17:20:51 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


What other information should I provide? We have the machine available if
necessary.

Benjamin Smith


pgsql-general by date:

Previous
From: Jerry Sievers
Date:
Subject: Re: Issue with to_timestamp function
Next
From: Jeff Janes
Date:
Subject: Re: Querying a time range across multiple partitions