dump, restore, dump yields differences

Started by Kevin Grittneralmost 13 years ago3 messages
#1Kevin Grittner
kgrittn@ymail.com
1 attachment(s)

As part of testing the matview issues around dumping, I ran `make
installcheck-world`, ran pg_dump to dump the regression database,
loaded it into a new database, dumped the newly restored database,
and compared the output files from the two pg_dump runs.  There
were a few somewhat surprising differences, attached.  Do we want
to worry about these, or leave them alone?

--
Kevin Grittner
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachments:

dump.difftext/x-patch; name=dump.diffDownload
*** regression.dump	2013-03-22 10:58:28.341475752 -0500
--- rest.dump	2013-03-22 11:00:35.881475455 -0500
***************
*** 7878,7887 ****
  -- Data for Name: b_star; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY b_star (class, aa, bb, a) FROM stdin;
! b	3	mumble	\N
  b	4	\N	\N
! b	\N	bumble	\N
  b	\N	\N	\N
  \.
  
--- 7878,7887 ----
  -- Data for Name: b_star; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY b_star (class, aa, a, bb) FROM stdin;
! b	3	\N	mumble
  b	4	\N	\N
! b	\N	\N	bumble
  b	\N	\N	\N
  \.
  
***************
*** 48950,48959 ****
  -- Data for Name: c_star; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY c_star (class, aa, cc, a) FROM stdin;
! c	5	hi mom	\N
  c	6	\N	\N
! c	\N	hi paul	\N
  c	\N	\N	\N
  \.
  
--- 48950,48959 ----
  -- Data for Name: c_star; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY c_star (class, aa, a, cc) FROM stdin;
! c	5	\N	hi mom
  c	6	\N	\N
! c	\N	\N	hi paul
  c	\N	\N	\N
  \.
  
***************
*** 49185,49206 ****
  -- Data for Name: d_star; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY d_star (class, aa, bb, cc, dd, a) FROM stdin;
! d	7	grumble	hi sunita	0	\N
! d	8	stumble	hi koko	\N	\N
! d	9	rumble	\N	1.10000000000000009	\N
! d	10	\N	hi kristin	10.0099999999999998	\N
! d	\N	crumble	hi boris	100.001000000000005	\N
! d	11	fumble	\N	\N	\N
! d	12	\N	hi avi	\N	\N
! d	13	\N	\N	1000.00009999999997	\N
! d	\N	tumble	hi andrew	\N	\N
! d	\N	humble	\N	10000.0000099999997	\N
! d	\N	\N	hi ginger	100000.000000999993	\N
  d	14	\N	\N	\N	\N
! d	\N	jumble	\N	\N	\N
! d	\N	\N	hi jolly	\N	\N
! d	\N	\N	\N	1000000.0000001	\N
  d	\N	\N	\N	\N	\N
  \.
  
--- 49185,49206 ----
  -- Data for Name: d_star; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY d_star (class, aa, a, bb, cc, dd) FROM stdin;
! d	7	\N	grumble	hi sunita	0
! d	8	\N	stumble	hi koko	\N
! d	9	\N	rumble	\N	1.10000000000000009
! d	10	\N	\N	hi kristin	10.0099999999999998
! d	\N	\N	crumble	hi boris	100.001000000000005
! d	11	\N	fumble	\N	\N
! d	12	\N	\N	hi avi	\N
! d	13	\N	\N	\N	1000.00009999999997
! d	\N	\N	tumble	hi andrew	\N
! d	\N	\N	humble	\N	10000.0000099999997
! d	\N	\N	\N	hi ginger	100000.000000999993
  d	14	\N	\N	\N	\N
! d	\N	\N	jumble	\N	\N
! d	\N	\N	\N	hi jolly	\N
! d	\N	\N	\N	\N	1000000.0000001
  d	\N	\N	\N	\N	\N
  \.
  
***************
*** 59377,59390 ****
  -- Data for Name: e_star; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY e_star (class, aa, cc, ee, e, a) FROM stdin;
! e	15	hi carol	-1	\N	\N
! e	16	hi bob	\N	\N	\N
! e	17	\N	-2	\N	\N
! e	\N	hi michelle	-3	\N	\N
  e	18	\N	\N	\N	\N
! e	\N	hi elisa	\N	\N	\N
! e	\N	\N	-4	\N	\N
  \.
  
  
--- 59377,59390 ----
  -- Data for Name: e_star; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY e_star (class, aa, a, cc, ee, e) FROM stdin;
! e	15	\N	hi carol	-1	\N
! e	16	\N	hi bob	\N	\N
! e	17	\N	\N	-2	\N
! e	\N	\N	hi michelle	-3	\N
  e	18	\N	\N	\N	\N
! e	\N	\N	hi elisa	\N	\N
! e	\N	\N	\N	-4	\N
  \.
  
  
***************
*** 59415,59437 ****
  -- Data for Name: f_star; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY f_star (class, aa, cc, ee, ff, f, e, a) FROM stdin;
! f	19	hi claire	-5	((1,3),(2,4))	10	\N	\N
! f	20	hi mike	-6	\N	10	\N	\N
! f	21	hi marcel	\N	((11,44),(22,55),(33,66))	10	\N	\N
! f	22	\N	-7	((111,555),(222,666),(333,777),(444,888))	10	\N	\N
! f	\N	hi keith	-8	((1111,3333),(2222,4444))	10	\N	\N
! f	24	hi marc	\N	\N	10	\N	\N
! f	25	\N	-9	\N	10	\N	\N
! f	26	\N	\N	((11111,33333),(22222,44444))	10	\N	\N
! f	\N	hi allison	-10	\N	10	\N	\N
! f	\N	hi jeff	\N	((111111,333333),(222222,444444))	10	\N	\N
! f	\N	\N	-11	((1111111,3333333),(2222222,4444444))	10	\N	\N
! f	27	\N	\N	\N	10	\N	\N
! f	\N	hi carl	\N	\N	10	\N	\N
! f	\N	\N	-12	\N	10	\N	\N
! f	\N	\N	\N	((11111111,33333333),(22222222,44444444))	10	\N	\N
! f	\N	\N	\N	\N	10	\N	\N
  \.
  
  
--- 59415,59437 ----
  -- Data for Name: f_star; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY f_star (class, aa, a, cc, ee, e, ff, f) FROM stdin;
! f	19	\N	hi claire	-5	\N	((1,3),(2,4))	10
! f	20	\N	hi mike	-6	\N	\N	10
! f	21	\N	hi marcel	\N	\N	((11,44),(22,55),(33,66))	10
! f	22	\N	\N	-7	\N	((111,555),(222,666),(333,777),(444,888))	10
! f	\N	\N	hi keith	-8	\N	((1111,3333),(2222,4444))	10
! f	24	\N	hi marc	\N	\N	\N	10
! f	25	\N	\N	-9	\N	\N	10
! f	26	\N	\N	\N	\N	((11111,33333),(22222,44444))	10
! f	\N	\N	hi allison	-10	\N	\N	10
! f	\N	\N	hi jeff	\N	\N	((111111,333333),(222222,444444))	10
! f	\N	\N	\N	-11	\N	((1111111,3333333),(2222222,4444444))	10
! f	27	\N	\N	\N	\N	\N	10
! f	\N	\N	hi carl	\N	\N	\N	10
! f	\N	\N	\N	-12	\N	\N	10
! f	\N	\N	\N	\N	\N	((11111111,33333333),(22222222,44444444))	10
! f	\N	\N	\N	\N	\N	\N	10
  \.
  
  
***************
*** 128994,129000 ****
  -- Data for Name: renamecolumnanother; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY renamecolumnanother (d, a, c, w) FROM stdin;
  \.
  
  
--- 128994,129000 ----
  -- Data for Name: renamecolumnanother; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY renamecolumnanother (d, w, a, c) FROM stdin;
  \.
  
  
***************
*** 129002,129008 ****
  -- Data for Name: renamecolumnchild; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY renamecolumnchild (d, a, w) FROM stdin;
  \.
  
  
--- 129002,129008 ----
  -- Data for Name: renamecolumnchild; Type: TABLE DATA; Schema: public; Owner: kgrittn
  --
  
! COPY renamecolumnchild (d, w, a) FROM stdin;
  \.
  
  
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kevin Grittner (#1)
Re: dump, restore, dump yields differences

Kevin Grittner <kgrittn@ymail.com> writes:

As part of testing the matview issues around dumping, I ran `make
installcheck-world`, ran pg_dump to dump the regression database,
loaded it into a new database, dumped the newly restored database,
and compared the output files from the two pg_dump runs.� There
were a few somewhat surprising differences, attached.� Do we want
to worry about these, or leave them alone?

Those are expected. You can trace the ALTER TABLE history of those
tables if you want to see why they're so odd, but basically there
are inheritance situations where it's hard to avoid this.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Greg Stark
stark@mit.edu
In reply to: Tom Lane (#2)
Re: dump, restore, dump yields differences

On Fri, Mar 22, 2013 at 6:49 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

Those are expected. You can trace the ALTER TABLE history of those
tables if you want to see why they're so odd, but basically there
are inheritance situations where it's hard to avoid this.

Incidentally it would still be cool to have make check do this dance
and intelligently compare the before and after. There have been more
than one patch where you've caught omissions in pg_dump before
applying.

--
greg

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers