From: | "Simon Riggs" <simon(at)2ndquadrant(dot)com> |
---|---|
To: | "Alvaro Herrera" <alvherre(at)commandprompt(dot)com> |
Cc: | "Zeugswetter Andreas ADI SD" <ZeugswetterA(at)spardat(dot)at>, "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>, <nagy(at)ecircle-ag(dot)com> |
Subject: | Re: CLUSTER and MVCC |
Date: | 2007-03-09 16:01:19 |
Message-ID: | 1173456079.3641.280.camel@silverbirch.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 2007-03-09 at 12:48 -0300, Alvaro Herrera wrote:
> Zeugswetter Andreas ADI SD wrote:
> >
> > > > Is there a particular reason why CLUSTER isn't MVCC-safe? It seems
> > to
> > > > me that it would be trivial to fix, by using SnapshotAny instead of
> > > > SnapshotNow, and not overwriting the xmin/xmax with the xid of the
> > > > cluster command.
> > >
> > > It's trivial to fix now in this way, but it would break HOT,
> > > since an indexscan only returns one row per index entry.
> >
> > Well, with SnapshotAny HOT should probably return all possibly visible
> > tuples
> > with an indexscan. (Btw, does CLUSTER really do an index scan ? Seems
> > for reading a whole table a seq scan and sort is usually cheaper, at
> > least when the clustering is so bad that a CLUSTER is needed.)
>
> Yes, it does an indexscan (last time I checked, at least). I think if a
> performance improvement is demonstrated, we would accept a patch ...
Again, right now, most things people do here will break HOT. At this
late stage before freeze, please everybody be careful to look and plan
for patch conflicts. (That isn't stay away, just be careful). Thanks.
--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-03-09 16:15:53 | Re: Interaction of PITR backups and Bulk operations avoiding WAL |
Previous Message | Tom Lane | 2007-03-09 16:00:47 | Re: Re: [COMMITTERS] pgsql: Remove unsafe calling of WSAStartup and WSA Cleanup from DllMain. |