Skip to content

Segfault on join's #72

@kataev

Description

@kataev

Stable debian & postgres 9.6 from http://apt.postgresql.org/pub/repos/apt/

postgres@filter:~$ /usr/lib/postgresql/9.6/bin/postgres -D /etc/postgresql/9.6/main/ 
2016-12-14 09:25:43 UTC [681-1] LOG:  database system was interrupted; last known up at 2016-12-14 09:23:09 UTC
2016-12-14 09:25:43 UTC [686-1] postgres@postgres FATAL:  the database system is starting up
2016-12-14 09:25:43 UTC [687-1] postgres@postgres FATAL:  the database system is starting up
2016-12-14 09:25:44 UTC [681-2] LOG:  database system was not properly shut down; automatic recovery in progress
2016-12-14 09:25:44 UTC [681-3] LOG:  invalid record length at 80/697694D8: wanted 24, got 0
2016-12-14 09:25:44 UTC [681-4] LOG:  redo is not required
2016-12-14 09:25:44 UTC [681-5] LOG:  MultiXact member wraparound protections are now enabled
2016-12-14 09:25:44 UTC [680-1] LOG:  database system is ready to accept connections
2016-12-14 09:25:44 UTC [691-1] LOG:  autovacuum launcher started
2016-12-14 09:26:58 UTC [680-2] LOG:  server process (PID 739) was terminated by signal 11: Segmentation fault
2016-12-14 09:26:58 UTC [680-3] DETAIL:  Failed process was running: select * from content join build_source using(source_id) where build_id = 123 limit 10;
2016-12-14 09:26:58 UTC [680-4] LOG:  terminating any other active server processes
2016-12-14 09:26:58 UTC [698-1] postgres@postgres WARNING:  terminating connection because of crash of another server process
2016-12-14 09:26:58 UTC [698-2] postgres@postgres 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.
2016-12-14 09:26:58 UTC [698-3] postgres@postgres HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2016-12-14 09:26:58 UTC [691-2] WARNING:  terminating connection because of crash of another server process
2016-12-14 09:26:58 UTC [691-3] 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.
2016-12-14 09:26:58 UTC [691-4] HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2016-12-14 09:26:58 UTC [853-1] postgres@skydns-mkfilter WARNING:  terminating connection because of crash of another server process
2016-12-14 09:26:58 UTC [853-2] postgres@skydns-mkfilter 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.
2016-12-14 09:26:58 UTC [853-3] postgres@skydns-mkfilter HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2016-12-14 09:26:58 UTC [697-1] postgres@postgres WARNING:  terminating connection because of crash of another server process
2016-12-14 09:26:58 UTC [697-2] postgres@postgres 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.
2016-12-14 09:26:58 UTC [697-3] postgres@postgres HINT:  In a moment you should be able to reconnect to the database and repeat your command.
2016-12-14 09:26:58 UTC [680-5] LOG:  all server processes terminated; reinitializing
2016-12-14 09:26:59 UTC [1024-1] LOG:  database system was interrupted; last known up at 2016-12-14 09:25:44 UTC
2016-12-14 09:26:59 UTC [1024-2] LOG:  database system was not properly shut down; automatic recovery in progress
2016-12-14 09:26:59 UTC [1024-3] LOG:  invalid record length at 80/69769548: wanted 24, got 0
2016-12-14 09:26:59 UTC [1024-4] LOG:  redo is not required
2016-12-14 09:27:00 UTC [1024-5] LOG:  MultiXact member wraparound protections are now enabled
2016-12-14 09:27:00 UTC [680-6] LOG:  database system is ready to accept connections
2016-12-14 09:27:00 UTC [1032-1] LOG:  autovacuum launcher started

Where content - table with range partition key on source_id, and build_source simple table.

[local] postgres@skydns-mkfilter=# select * from content join build_source using(source_id) where build_id = 123 limit 10;
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: Succeeded.
Time: 25689.742 ms

But if disable pg_pathman, query work well.

[local] postgres@filter=# set pg_pathman.enable = f;
NOTICE:  00000: RuntimeAppend, RuntimeMergeAppend and PartitionFilter nodes and some other options have been disabled
LOCATION:  pg_pathman_enable_assign_hook, hooks.c:450
SET
Time: 1.633 ms
[local] postgres@filter=# select source_id from content join build_source using(source_id) where build_id = 123 limit 1;
source_id
142
(1 row)
Time: 12032.605 ms

Enable pathman crash backend again.

[local] postgres@filter=# set pg_pathman.enable = t;                                                                                                                                                                                                              
NOTICE:  00000: RuntimeAppend, RuntimeMergeAppend and PartitionFilter nodes and some other options have been enabled
LOCATION:  pg_pathman_enable_assign_hook, hooks.c:450
SET
Time: 0.211 ms
[local] postgres@filter=# select source_id from content join build_source using(source_id) where build_id = 123 limit 1;
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: Succeeded.
Time: 26965.025 ms

Also sometimes query produce empty result with enabled pg_pathman, but after disable yield rows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions