From: | Michael Paquier <michael(dot)paquier(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Andreas Karlsson <andreas(at)proxel(dot)se>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Improving test coverage of extensions with pg_dump |
Date: | 2015-09-17 05:18:55 |
Message-ID: | CAB7nPqTrT1ucOFeF3O24ebx-pQsj-MXrD8hRdCpScb8VCVoCug@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Sep 16, 2015 at 8:00 PM, Michael Paquier wrote:
> Hm. OK. I didn't get your message correctly, sorry for that. Would you
> be fine then to have a pg_regress command using parallel_schedule + an
> extra schedule launching tests related to the extensions in
> src/test/modules/pg_dumprestore then? The choice of parallel_schedule
> is based on what Windows does, aka this schedule is used in the
> equivalent of make check in vcregress.pl. The TAP script then simply
> initializes the cluster, runs pg_regress, and does the dump/restore
> job. There is no real need to worry about setval as dump is not taken
> from a standby..
So, here we go.
I have found something quite interesting when playing with the patch
attached: dump does not guarantee the column ordering across databases
for some inherited tables, see that example from the main regression
test suite the following diff between a dump taken from a source
database and a target database where the source dump has been restored
in first:
-INSERT INTO b_star (class, aa, bb, a) VALUES ('b', 3, 'mumble', NULL);
-INSERT INTO b_star (class, aa, bb, a) VALUES ('b', 4, NULL, NULL);
-INSERT INTO b_star (class, aa, bb, a) VALUES ('b', NULL, 'bumble', NULL);
-INSERT INTO b_star (class, aa, bb, a) VALUES ('b', NULL, NULL, NULL);
+INSERT INTO b_star (class, aa, a, bb) VALUES ('b', 3, NULL, 'mumble');
+INSERT INTO b_star (class, aa, a, bb) VALUES ('b', 4, NULL, NULL);
+INSERT INTO b_star (class, aa, a, bb) VALUES ('b', NULL, NULL, 'bumble');
+INSERT INTO b_star (class, aa, a, bb) VALUES ('b', NULL, NULL, NULL);
Problem is similar with --column-inserts, --inserts and COPY. We could
use --exclude-table like in the patch attached when taking the dump
from source database but that's grotty, or we could improve pg_dump
itself, though it may not be worth it for just this purpose.
Thoughts?
--
Michael
Attachment | Content-Type | Size |
---|---|---|
0001-Add-test-facility-to-check-dump-restore-with-extensi.patch | text/x-patch | 10.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2015-09-17 05:23:41 | Re: Support for N synchronous standby servers - take 2 |
Previous Message | Tom Lane | 2015-09-17 04:36:23 | Re: tsvector work with citext |