Group: pgsql.bugs


Subject: BUG #3762: Inherited serials change on dump/restore
From: cstdenis@ctgameinfo.com ("Cstdenis")
Date: 11/20/2007 7:57:27 AM
The following bug has been logged online: Bug reference: 3762 Logged by: Cstdenis Email address: cstdenis@ctgameinfo.com PostgreSQL version: 8.2.5/8.3beta2 Operating system: FreeBSD 6.1 Description: Inherited serials change on dump/restore Details: Setup ------ Source: Server 8.2.3. Client 8.3beta2. Dest: Server 8.2.3. Client 8.2.3. Description ------------ When I do a dump and restore of my database my serials change. In the original version, the table looks like this (dump from pgAdmin III) and references the sequence picture_comments_comment_id_seq CREATE TABLE picture_comments ( -- Inherited: comment_id serial NOT NULL, -- Inherited: user_id integer NOT NULL, <snip some unrelated columns for brevity> -- Inherited: id_tree ltree NOT NULL DEFAULT ''::ltree, CONSTRAINT picture_comments_pkey PRIMARY KEY (comment_id) ) INHERITS (base_comments) WITHOUT OIDS; when I restore the dump I get this which now references the base table's serial base_comments_comment_id_seq CREATE TABLE picture_comments ( -- Inherited: comment_id integer NOT NULL DEFAULT nextval('base_comments_comment_id_seq'::regclass), -- Inherited: user_id integer NOT NULL, <snip> -- Inherited: id_tree ltree NOT NULL DEFAULT ''::ltree, pid integer NOT NULL, CONSTRAINT picture_comments_pkey PRIMARY KEY (comment_id) ) INHERITS (base_comments) WITHOUT OIDS; When I do the dump with the 8.2 client libraries it seems to work fine so this seems to be a bug in 8.3. ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings

Subject: BUG #3762: Inherited serials change on dump/restore
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 11/20/2007 12:12:04 PM
"Cstdenis" <cstdenis@ctgameinfo.com> writes: > When I do a dump and restore of my database my serials change. This appears to be the same bug reported and fixed about two weeks ago. http://archives.postgresql.org/pgsql-committers/2007-10/msg00447.php http://archives.postgresql.org/pgsql-committers/2007-10/msg00472.php > When I do the dump with the 8.2 client libraries it seems to work fine so > this seems to be a bug in 8.3. No, 8.2.5 is just as broken. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match