pgsql: Account for TOAST data while scheduling parallel dumps. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Account for TOAST data while scheduling parallel dumps.
Date
Msg-id E1muIe0-0007N8-RS@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Account for TOAST data while scheduling parallel dumps.

In parallel mode, pg_dump tries to order the table-data-dumping
jobs with the largest tables first.  However, it was only
consulting the pg_class.relpages value to determine table size.
This ignores TOAST data, and so we could make poor scheduling
decisions in cases where some large tables are mostly TOASTed
data while others have very little.  To fix, add in the relpages
value for the TOAST table as well.

This patch also fixes a potential integer-overflow issue that
could result in poor scheduling on machines where off_t is
only 32 bits wide.  Such platforms are probably extinct in the
wild, but we do still nominally support them, so repair.

Per complaint from Hans Buschmann.

Discussion: https://postgr.es/m/7d7eb6128f40401d81b3b7a898b6b4de@W2012-02.nidsa.loc

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/65aaed22a849c0763f38f81338a1cad04ffc0e2c

Modified Files
--------------
src/bin/pg_dump/pg_dump.c | 35 ++++++++++++++++++++++++++---------
src/bin/pg_dump/pg_dump.h |  1 +
2 files changed, 27 insertions(+), 9 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Fix inappropriate uses of PG_GETARG_UINT32()
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Update snowball