From: 691525127@qq.com
To: pgsql-bugs@postgresql.org
Cc: 691525127@qq.com
Subject: BUG #14915: Create sub-partitioning using GENERATED ALWAYS AS IDENTITY will lead to system collapse.
Date: Fri, 17 Nov 2017 01:52:00 +0000
Message-ID: <20171117015200.1464.76267@wrigleys.postgresql.org> (raw)
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?
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: 691525127@qq.com
Subject: Re: BUG #14915: Create sub-partitioning using GENERATED ALWAYS AS IDENTITY will lead to system collapse.
In-Reply-To: <20171117015200.1464.76267@wrigleys.postgresql.org>
References: <20171117015200.1464.76267@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox