Re: v12.4 pg_dump .sql fails to load data via psql

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Jed Walker <jed(dot)walker(at)icd-tech(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, JED WALKER <jedwa(at)comcast(dot)net>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: v12.4 pg_dump .sql fails to load data via psql
Date: 2021-10-12 15:50:32
Message-ID: CAKFQuwYuxcHfNLN+4J+96EowYJV5igtB5BpmFUHKpjJFHH1OuA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Oct 12, 2021 at 8:00 AM Jed Walker <jed(dot)walker(at)icd-tech(dot)com> wrote:

> Pity pg_dumpall doesn't work like other dbs where the constraints are
> added or enabled after data load (nice enhancement if done.) That would
> solve the problem, but if enough people don't have the issue ....

For the case where it actually matters we do exactly this. Triggers. For
check constraints, assuming you actually apply them to the existing data
when they are enabled or created, there is little benefit to be gained
compared to just evaluating the rows as they are recorded. That benefit
would be strictly performance related in any case - there are no timing
issues because check constraints can only reference the table upon which
they are created.

> I can work around this by changing the function to recognize "table empty"
> and produce just a warning.
>

I would suggest you not "work-around this" at all but instead properly
define triggers to implement the desired logic. That was the take-away you
were intended from reading the documentation section you quoted (note, you
should generally check current version documentation, 9.4 is seriously
out-of-date).

David J.

P.S. As others have been doing, it is customary to post replies inline (or
strictly at the bottom at worst) with the material you are replying to, and
to liberally trim away unneeded context. The mailing list thread for the
conversation is much easier to consume when people do this.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Matt Bush 2021-10-12 16:04:43 Re: BUG #17224: Postgres Yum repo mirror has expired SSL certificate
Previous Message Tom Lane 2021-10-12 15:43:19 Re: BUG #17224: Postgres Yum repo mirror has expired SSL certificate