Switch to multi-inserts for pg_depend
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Cc: Daniel Gustafsson <daniel@yesql.se>
Date: 2020-08-07T06:16:19Z
Lists: pgsql-hackers
Attachments
- 0001-Use-multi-inserts-for-pg_depend.patch (text/x-diff) patch 0001
- 0002-Switch-to-multi-insert-dependencies-for-many-code-pa.patch (text/x-diff) patch 0002
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
Commits
-
Switch to multi-inserts when registering dependencies for many code paths
- 8febfd185545 14.0 landed
-
Use multi-inserts for pg_depend
- 63110c6264a5 14.0 landed