BUG #16038: Alter table - SegFault
The Post Office <noreply@postgresql.org>
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: deathlock13@gmail.com
Date: 2019-10-04T13:29:46Z
Lists: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 16038
Logged by: death lock
Email address: deathlock13@gmail.com
PostgreSQL version: 12.0
Operating system: WinXP (VisualStudio 2013) , Debian11 gcc9
Description:
create schema if not exists test ;
drop table test.testa;
CREATE TABLE test.testa (
code character varying(2) NOT NULL,
namez character varying(255) NOT NULL,
descr character varying(1024),
wersja numeric(1,0),
modt timestamp without time zone,
crtt timestamp without time zone,
crt integer,
mod integer,
-- ida numeric(10,0) DEFAULT nextval(('test.sq_testa'::text)::regclass)
NOT NULL,
-- fk_tmp character varying(20),
CONSTRAINT test_pk PRIMARY KEY (code)
);
INSERT INTO test.testa VALUES ('0', 'AA', NULL, NULL, '2018-02-19
09:40:38.776875', '2008-05-20 10:06:28.171', 1001, 1001 /*, 1, 'DUMMYA'
*/);
-- INSERT INTO test.testa VALUES ('1', 'BB', NULL, NULL, '2018-02-19
09:40:38.776875', '2008-05-20 10:06:28.171', 1001, 1001 /*, 2, 'DUMMYB'
*/);
drop sequence if exists test.sq_testb;
create SEQUENCE test.sq_testb;
alter table test.testa
add column idb numeric(10,0) NOT NULL DEFAULT nextval('test.sq_testb'),
add column fk_tmpb varchar(20);
server process (PID 21884) was terminated by signal 11: Segmentation fault
- empty table - alter goes ok , split alter into 2 add col - works too
Commits
-
Fix table rewrites that include a column without a default.
- f224c7c11ea7 12.1 landed
- 93765bd956be 13.0 landed