Re: does pg_restore respect CLUSTER ON in the schema? - Mailing list pgsql-general

From John R Pierce
Subject Re: does pg_restore respect CLUSTER ON in the schema?
Date
Msg-id 545C00E1.5090505@hogranch.com
Whole thread Raw
In response to does pg_restore respect CLUSTER ON in the schema?  (Seth Pollack <seth@pollackphoto.com>)
List pgsql-general
On 11/6/2014 3:03 PM, Seth Pollack wrote:
> I have a database where several tables have been physically clustered on disk. Those clustering configuration
parametersare stored in the schema (via ALTER TABLE mytable CLUSTER ON myindex). 
>
> My question is, when i restore a backup of this database using pg_restore, is it restored with that physical
clustering,or without? i.e. do i need to run a cluster command immediately after the restore, or is it already done? 

when you restore, the data is inserted in new empty tables via COPY,
which will write the records in whatever order they were dumped in,
which is going to be the order they are in the original table at that
point in time..   any waste space will be packed out, but the data will
only be as clustered as it was when it was at the time of the dump.


--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



pgsql-general by date:

Previous
From: Seth Pollack
Date:
Subject: does pg_restore respect CLUSTER ON in the schema?
Next
From: David G Johnston
Date:
Subject: Re: does pg_restore respect CLUSTER ON in the schema?