Re: pg_dump dump catalog ACLs

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Jose Luis Tallon <jltallon(at)adv-solutions(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump dump catalog ACLs
Date: 2016-04-27 12:26:55
Message-ID: CAOuzzgof24Rg+hBtNZJsNAkP7TQjv=5pS8HJebD7gcp+wxWv0Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Noah,

On Wednesday, April 27, 2016, Noah Misch <noah(at)leadboat(dot)com> wrote:

> A later thought:
>
> On Mon, Apr 25, 2016 at 12:39:09AM -0400, Stephen Frost wrote:
> > src/bin/pg_dump: make check
> >
> > implemented using the TAP testing system. There are a total of 360
> > tests, generally covering:
> >
> > Various invalid sets of command-line options.
> >
> > Valid command-line options (generally independently used):
> >
> > (no options- defaults)
> > --clean
> > --clean --if-exists
> > --data-only
> > --format=c (tested with pg_restore)
> > --format=d (tested with pg_restore)
> > --format=t (tested with pg_restore)
> > --format=d --jobs=2 (tested with pg_restore)
> > --exclude-schema
> > --exclude-table
> > --no-privileges
> > --no-owner
> > --schema
> > --schema-only
> >
> > Note that this is only including tests for basic schemas, tables, data,
> > and privileges, so far. I believe it's pretty obvious that we want to
> > include all object types and include testing of extensions, I just
> > haven't gotten there yet and figured now would be a good time to solicit
> > feedback on the approach I've used.
> >
> > I'm not sure how valuable it is to test all the different combinations
> > of command-line options, though clearly some should be tested (eg:
> > include-schema, exclude table in that schema, and similar cases).
>
> You mention that you test valid options independently. Keep an eye out for
> good opportunities to save runtime by testing multiple options per
> invocation.
> To give one example, --exclude-table seems fairly independent of --format;
> maybe those could test as a group. That complicates the suite, but saving
> ten
> or more seconds might justify the complexity.
>

That thought had occurred to me also and I began combining some options,
though I could probably do more to reduce the runtime:

The current challenge I've been trying to find a solution to is testing the
extension handling. Only core extensions (plpgsql, plperl, etc) are
available when the TAP tests are running for pg_dump, it seems. I certainly
don't want to add a testing extension in such a way that it would get
installed for users, but it doesn't seem obvious how to create an extension
from another directory or to even find the directory where I could write
the control and SQL files into to use.

Any thoughts on that would certainly be welcome.

Thanks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2016-04-27 12:36:30 Re: Add jsonb_compact(...) for whitespace-free jsonb to text
Previous Message Robert Haas 2016-04-27 12:10:32 Re: [COMMITTERS] Re: pgsql: Convert contrib/seg's bool-returning SQL functions to V1 call co