Re: Make deparsing of column defaults faster

2018-09-24 Thread Peter Eisentraut
On 30/07/2018 13:51, Jeff Janes wrote: > Any thoughts on how to proceed here?  It seems there is more work to do > to cover all the issues with dumping and restoring tables with many > columns.  Since the original report was in the context of pg_upgrade, we > should surely address a

Re: Make deparsing of column defaults faster

2018-07-30 Thread Jeff Janes
On Mon, Jul 30, 2018 at 7:03 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 07/07/2018 20:07, Jeff Janes wrote: > > One case that your patch doesn't improve (neither does my posted one) is > > check constraints. To fix that, pg_get_constraintdef_worker would also > > need to

Re: Make deparsing of column defaults faster

2018-07-30 Thread Peter Eisentraut
On 07/07/2018 20:07, Jeff Janes wrote: > One case that your patch doesn't improve (neither does my posted one) is > check constraints.  To fix that, pg_get_constraintdef_worker would also > need to grow a cache as well.  I don't know how often people put check > constraints on most of the columns o

Re: Make deparsing of column defaults faster

2018-07-07 Thread Jeff Janes
On Thu, Jul 5, 2018 at 10:45 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 29.06.18 05:15, Jeff Janes wrote: > > Since pg_dump calls pg_get_expr once over and over again on the same > > table consecutively, perhaps we could cache the column alias assignments > > in a single-

Re: Make deparsing of column defaults faster

2018-07-06 Thread Peter Eisentraut
On 05.07.18 18:58, Justin Pryzby wrote: > I checked on one customer running PG10.4, for which pg_dump takes 8 minutes to > pg_dump -s. > > I imported existing schema to PG12dev (which itself took 25min) and compared: > patched: 2m33.616s > unpatched: 7m19.578s Which patch is that, Jeff's or mine?

Re: Make deparsing of column defaults faster

2018-07-05 Thread Justin Pryzby
On Mon, Jun 04, 2018 at 10:00:53PM -0400, Peter Eisentraut wrote: > On 6/4/18 20:55, Jeff Janes wrote: > > Since defaults can't contain Vars, this patch converts the second > > parameter to zero in places where pg_get_expr is invoked on column > > defaults. > > My in-progress generated columns pat

Re: Make deparsing of column defaults faster

2018-07-05 Thread Peter Eisentraut
On 29.06.18 05:15, Jeff Janes wrote: > Since pg_dump calls pg_get_expr once over and over again on the same > table consecutively, perhaps we could cache the column alias assignments > in a single-entry cache, so if it is called on the same table as last > time it just re-uses the aliases from last

Re: Make deparsing of column defaults faster

2018-06-28 Thread Jeff Janes
On Mon, Jun 4, 2018 at 10:00 PM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 6/4/18 20:55, Jeff Janes wrote: > > The user docs say about column defaults: "The value is any variable-free > > expression (subqueries and cross-references to other columns in the > > current table a

Re: Make deparsing of column defaults faster

2018-06-04 Thread Peter Eisentraut
On 6/4/18 20:55, Jeff Janes wrote: > The user docs say about column defaults: "The value is any variable-free > expression (subqueries and cross-references to other columns in the > current table are not allowed)" > > And also say about pg_get_expr "If the expression might contain Vars, > specify