BUG #14915: Create sub-partitioning using GENERATED ALWAYS AS IDENTITY will lead to system collapse.

From: 691525127(at)qq(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Cc: 691525127(at)qq(dot)com
Subject: BUG #14915: Create sub-partitioning using GENERATED ALWAYS AS IDENTITY will lead to system collapse.
Date: 2017-11-17 01:52:00
Message-ID: 20171117015200.1464.76267@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14915
Logged by: pu qun
Email address: 691525127(at)qq(dot)com
PostgreSQL version: 10.0
Operating system: Red Hat Enterprise Linux Server release 6.0
Description:

Steps are as follows:
1. create partition table:
postgres=# create table t_list(id int not null,col int,create_time
timestamp) partition by list(mod(col,2));
CREATE TABLE

2. create sub partition table without IDENTITY column_constraint. create sub
partition table successfully:
postgres=# create table t_list_1 partition of t_list(id,col,create_time) for
values in(0);
CREATE TABLE

3. create sub partition table with IDENTITY column_constraint. create sub
partition table failed and lead to system collapse.
postgres=# create table t_list_2 partition of t_list(id generated always as
identity,col,create_time) for values in(0);
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: Failed.
!>
!>

question:
The syntax of the partition table in manual:
CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT
EXISTS ] table_name
PARTITION OF parent_table [ (
{ column_name [ WITH OPTIONS ] [ column_constraint [ ... ] ]
| table_constraint }
[, ... ]
) ] FOR VALUES partition_bound_spec
[ PARTITION BY { RANGE | LIST } ( { column_name | ( expression ) } [ COLLATE
collation ] [ opclass ] [, ... ] ) ]
[ WITH ( storage_parameter [= value] [, ... ] ) | WITH OIDS | WITHOUT OIDS
]
[ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ]
[ TABLESPACE tablespace_name ]

where column_constraint is:

[ CONSTRAINT constraint_name ]
{ NOT NULL |
NULL |
CHECK ( expression ) [ NO INHERIT ] |
DEFAULT default_expr |
GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ] |
UNIQUE index_parameters |
PRIMARY KEY index_parameters |
REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL | MATCH
SIMPLE ]
[ ON DELETE action ] [ ON UPDATE action ] }
[ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE
]

The above column_constraint include:GENERATED { ALWAYS | BY DEFAULT } AS
IDENTITY [ ( sequence_options ) ]

However, the server connection failed in actual implementation.
What is the reason for that? Will it be a bug?

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2017-11-17 02:05:03 Re: BUG #14915: Create sub-partitioning using GENERATED ALWAYS AS IDENTITY will lead to system collapse.
Previous Message jens.with 2017-11-17 00:39:46 BUG #14914: Test for aggregates fails