The following bug has been logged on the website:
Bug reference: 14915
Logged by: pu qun
Email address: 691525127@qq.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?