From: | Jeff Davis <pgsql(at)j-davis(dot)com> |
---|---|
To: | Gregory Stark <stark(at)enterprisedb(dot)com> |
Cc: | pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CLUSTER and synchronized scans and pg_dump et al |
Date: | 2008-01-28 22:38:50 |
Message-ID: | 1201559930.10057.641.camel@dogma.ljc.laika.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 2008-01-27 at 15:02 +0000, Gregory Stark wrote:
> It occurred to me the other day that synchronized scans could play havoc with
> clustered tables. When you dump and reload a table even if it was recently
> clustered if any other sequential scans are happening in the system at the
> time you dump it the dump could shuffle the records out of order.
>
> Now the records would still be effectively ordered for most purposes but our
> statistics can't detect that. Since the correlation would be poor the restored
> database would have markedly different statistics showing virtually no
> correlation on the clustered column.
>
> Perhaps we should have some form of escape hatch for pg_dump to request real
> physical order when dumping clustered tables.
>
Thank you for bringing this up, it's an interesting point.
Keep in mind that this only matters if you are actually running pg_dump
concurrently with another scan, because a scan will reset the starting
point after completing.
Regards,
Jeff Davis
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2008-01-28 22:39:41 | Re: [PATCHES] Proposed patch: synchronized_scanning GUC variable |
Previous Message | Jeff Davis | 2008-01-28 22:36:43 | Re: CLUSTER and synchronized scans and pg_dump et al |