diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2012-05-25 14:35:41 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2012-05-25 14:35:41 -0400 |
commit | 1a93588ffcad3e4876c9610c0a35d79c7fcdeffe (patch) | |
tree | 839e744d925a458f14331eea9d145369267e2fce /src/bin/pg_dump/pg_dump.h | |
parent | 4615d2ca28fe9dff6e5ebaebd6caf190a0c78ba5 (diff) |
Use binary search instead of brute-force scan in findNamespace().
The previous coding presented a significant bottleneck when dumping
databases containing many thousands of schemas, since the total time
spent searching would increase roughly as O(N^2) in the number of objects.
Noted by Jeff Janes, though I rewrote his proposed patch to use the
existing findObjectByOid infrastructure.
Since this is a longstanding performance bug, backpatch to all supported
versions.
Diffstat (limited to 'src/bin/pg_dump/pg_dump.h')
-rw-r--r-- | src/bin/pg_dump/pg_dump.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h index 37b19d2f12e..21d42f8ea53 100644 --- a/src/bin/pg_dump/pg_dump.h +++ b/src/bin/pg_dump/pg_dump.h @@ -506,6 +506,7 @@ extern TypeInfo *findTypeByOid(Oid oid); extern FuncInfo *findFuncByOid(Oid oid); extern OprInfo *findOprByOid(Oid oid); extern CollInfo *findCollationByOid(Oid oid); +extern NamespaceInfo *findNamespaceByOid(Oid oid); extern void simple_oid_list_append(SimpleOidList *list, Oid val); extern void simple_string_list_append(SimpleStringList *list, const char *val); |