Re: directory archive format for pg_dump - Mailing list pgsql-hackers

From Tom Lane
Subject Re: directory archive format for pg_dump
Date
Msg-id 8305.1292527742@sss.pgh.pa.us
Whole thread Raw
In response to Re: directory archive format for pg_dump  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Responses Re: directory archive format for pg_dump  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> On 16.12.2010 20:33, Joachim Wieland wrote:
>> How exactly would you "just split the table in chunks of roughly the
>> same size" ?

> Check pg_class.relpages, and divide that evenly across the processes. 
> That should be good enough.

Not even close ... relpages could be badly out of date.  If you believe
it, you could fail to dump data that's in further-out pages.  We'd need
to move pg_relpages() or some equivalent into core to make this
workable.

>> Which queries should pg_dump send to the backend?

> Hmm, I was thinking of "SELECT * FROM table WHERE ctid BETWEEN ? AND ?", 
> but we don't support TidScans for ranges. Perhaps we could add that.

Yeah, that seems probably workable, given an up-to-date idea of the
possible block range.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Extensions, patch v18 (merge against master, bitrot-only-fixes)
Next
From: Dimitri Fontaine
Date:
Subject: Re: Extensions, patch v18 (merge against master, bitrot-only-fixes)