pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: Can we get rid of repeated queries from pg_dump?
Date: Sat, 28 Aug 2021 08:46:50 +0200
Message-ID: <20210828064650.GB11579@depesz.com> (raw)
In-Reply-To: <896732.1630099403@sss.pgh.pa.us>
References: <20210826084430.GA26282@depesz.com>
	<648517.1629986527@sss.pgh.pa.us>
	<20210826140827.GA15868@depesz.com>
	<649446.1629987629@sss.pgh.pa.us>
	<20210826160644.GA3120@depesz.com>
	<e6a7503afd115d111fbb96c5787906d73cfe2605.camel@cybertec.at>
	<896732.1630099403@sss.pgh.pa.us>

On Fri, Aug 27, 2021 at 05:23:23PM -0400, Tom Lane wrote:
> Those queries are coming from getFormattedTypeName(), which is used
> for function arguments and the like.  I'm not quite sure why Hubert
> is seeing 5000 such calls in a database with only ~100 functions;
> surely they don't all have an average of 50 arguments?

Oh. missed that part.
So I checked. In the mean time I got -Fc dump, so:

#v+
=$ pg_restore -l schema.dump | \
    grep -P '^\d*; \d+ \d+ FUNCTION ' |
    sed 's/^[^(]*(//; s/)[^)]*$//' |
    awk -F, '{print NF}' |
    sort -n |
    uniq -c
23 0
52 1
21 2
 8 3
 1 4
 2 5
#v-

23 functions with 0 arguments, 52 with 1, and the max is 5 arguments - two
functions have these.

Not sure if it matters but there is a lot of enums. 83 of them. And they have
up to 250 elements (2 such types).

Best regards,

depesz






view thread (37+ messages)  latest in thread

Message-ID: <20210828064650.GB11579@depesz.com>
Permalink:  ../20210828064650.GB11579@depesz.com/
Also on:    postgresql.org/message-id/20210828064650.GB11579@depesz.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-general@postgresql.org
  Cc: depesz@depesz.com, tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at, pgsql-general@lists.postgresql.org
  Subject: Re: Can we get rid of repeated queries from pg_dump?
  In-Reply-To: <20210828064650.GB11579@depesz.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox