[COMMITTERS] pgsql: Fix integer overflow bug in GiST buffering build calculations.

2012-05-29 Thread Heikki Linnakangas
Fix integer overflow bug in GiST buffering build calculations. The result of (maintenance_work_mem * 1024) / BLCKSZ doesn't fit in a signed 32-bit integer, if maintenance_work_mem >= 2GB. Use double instead. And while we're at it, write the calculations in an easier to understand form, with the in

Re: [COMMITTERS] pgsql: Eliminate some more O(N^2) behaviors in pg_dump/pg_restore.

2012-05-29 Thread Bruce Momjian
On Tue, May 29, 2012 at 12:38:51AM +, Tom Lane wrote: > Eliminate some more O(N^2) behaviors in pg_dump/pg_restore. > > This patch fixes three places (which AFAICT is all of them) where runtime > was O(N^2) in the number of TOC entries, by using an index array to replace > linear searches of t

[COMMITTERS] pgsql: Rewrite --section option to decouple it from --schema-only/--dat

2012-05-29 Thread Tom Lane
Rewrite --section option to decouple it from --schema-only/--data-only. The initial implementation of pg_dump's --section option supposed that the existing --schema-only and --data-only options could be made equivalent to --section settings. This is wrong, though, due to dubious but long since se