Switch to multi-inserts for pg_depend - Mailing list pgsql-hackers

From Michael Paquier
Subject Switch to multi-inserts for pg_depend
Date
Msg-id 20200807061619.GA23955@paquier.xyz
Whole thread Raw
Responses Re: Switch to multi-inserts for pg_depend
Re: Switch to multi-inserts for pg_depend
List pgsql-hackers
Hi all,

This is a continuation of the work that has been previously discussed
here, resulting mainly in e3931d0 for pg_attribute and pg_shdepend:
https://www.postgresql.org/message-id/20190213182737.mxn6hkdxwrzgxk35@alap3.anarazel.de

I have been looking at the amount of work that could be done
independently for pg_depend, and attached are two patches:
- 0001 switches recordMultipleDependencies() to use multi-inserts.
Contrary to pg_attribute and pg_shdepend, the number of items to
insert is known in advance, but some of them can be skipped if known
as a pinned dependency.  The data insertion is capped at 64kB, and the
number of slots is basically calculation from the maximum cap and the
number of items to insert.
- 0002 switches a bunch of code paths to make use of multi-inserts
instead of individual calls to recordDependencyOn(), grouping the
insertions of dependencies of the same time.  This relies on the
existing set of APIs to manipulate a set of object addresses, without
any new addition there (no reset-like routine either as I noticed that
it would have been useful in only one place).  The set of changes is
honestly a bit bulky here.

I am adding this thread to the next commit fest.  Thoughts are
welcome.

Thanks,
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Asim Praveen
Date:
Subject: Re: [PATCH] - Provide robust alternatives for replace_string
Next
From: Michael Paquier
Date:
Subject: Re: Switch to multi-inserts for pg_depend