Re: Can we get rid of repeated queries from pg_dump?

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: Can we get rid of repeated queries from pg_dump?
Дата
Msg-id 20210830144551.GA27054@depesz.com
обсуждение исходный текст
Ответ на Re: Can we get rid of repeated queries from pg_dump?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Can we get rid of repeated queries from pg_dump?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Can we get rid of repeated queries from pg_dump?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Mon, Aug 30, 2021 at 10:11:22AM -0400, Tom Lane wrote:
> I don't suppose you could send me a schema-only dump of that
> database, off-list?  I'm now quite curious.

Asked the owners for their permission.

> > The thing is - even though it was called 1804 times, dump contains data only
> > about 107 functions (pg_restore -l schema.dump | grep -c FUNCTION), so it kinda
> > seems that 94% of these calls is not needed.

> Hm.  It's not doing that for *every* row in pg_proc, at least.
> I speculate that it is collecting and then not printing the info
> about functions that are in extensions --- can you check on
> how many there are of those?
> (Actually, if you've got a whole lot of objects inside extensions,
> maybe that explains the 5000 calls?)

Well, not sure if that's a lot, but:
there are 15 extensions, including plpgsql.

SELECT
    count(*)
FROM
    pg_catalog.pg_depend
WHERE
    refclassid = 'pg_catalog.pg_extension'::pg_catalog.regclass
    AND deptype = 'e';


return 2110 objects:

SELECT
    classid::regclass,
    count(*)
FROM
    pg_catalog.pg_depend
WHERE
    refclassid = 'pg_catalog.pg_extension'::pg_catalog.regclass
    AND deptype = 'e'
GROUP BY
    1
ORDER BY
    1;

         classid         │ count 
─────────────────────────┼───────
 pg_type                 │    31
 pg_proc                 │  1729
 pg_class                │    61
 pg_foreign_data_wrapper │     1
 pg_cast                 │    30
 pg_language             │     1
 pg_opclass              │    73
 pg_operator             │   111
 pg_opfamily             │    73
(9 rows)

Best regards,

depesz




В списке pgsql-general по дате отправления:

Предыдущее
От: Pól Ua Laoínecháin
Дата:
Сообщение: Re: Arrays - selecting (and not removing) duplicates...
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Can we get rid of repeated queries from pg_dump?