Re: Avoid useless retrieval of defaults and check constraints in pg_dump -a

Julien Rouhaud <rjuju123@gmail.com>

From: Julien Rouhaud <rjuju123@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Daniel Gustafsson <daniel@yesql.se>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-15T08:46:56Z
Lists: pgsql-hackers
On Tue, Sep 15, 2020 at 4:48 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Thu, Sep 10, 2020 at 02:31:32PM +0200, Daniel Gustafsson wrote:
> > Given how unintrusive this optimization is, +1 from me to go ahead with this
> > patch.  pg_dump tests pass.  Personally I would've updated the nearby comments
> > to reflect why the check for dataOnly is there, but MMV there.  I'm moving this
> > patch to Ready for Committer.
>
> We need two comments here.  I would suggest something like:
> "Skip default/check for a data-only dump, as this is only needed for
> dumps of the table schema."
>
> Better wording is of course welcome.

FWIW I'm fine with those news comments!



Commits

  1. Avoid retrieval of CHECK constraints and DEFAULT exprs in data-only dump