Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9895961

Browse files
committed
Avoid per-object queries in performance-critical paths in pg_dump.
Instead of issuing a secondary data-collection query against eachtable to be dumped, issue just one query, with a WHERE clauserestricting it to be applied to only the tables we intend to dump.Likewise for indexes, constraints, and triggers. This greatlyreduces the number of queries needed to dump a database containingmany tables. It might seem that WHERE clauses listing many targetOIDs could be inefficient, but at least on recent server versionsthis provides a very substantial speedup.(In principle the same thing could be done with other object typessuch as functions; but that would require significant refactoringof pg_dump, so those will be tackled in a different way in afollowing patch.)The new WHERE clauses depend on the unnest() function, which isonly present in 8.4 and above. We could implement them differentlyfor older servers, but there is an ongoing discussion that willprobably result in dropping pg_dump support for servers before 9.2,so that seems like it'd be wasted work. For now, just bump theserver version check to require >= 8.4, without stopping to removeany of the code that's thereby rendered dead. We'll mop thatsituation up soon.Patch by me, based on an idea from Andres Freund.Discussion:https://postgr.es/m/7d7eb6128f40401d81b3b7a898b6b4de@W2012-02.nidsa.loc
1 parente3fcbbd commit9895961

File tree

2 files changed

+1012
-764
lines changed

2 files changed

+1012
-764
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp