Re: CLUSTER and MVCC
| От | Tom Lane | 
|---|---|
| Тема | Re: CLUSTER and MVCC | 
| Дата | |
| Msg-id | 29752.1173455897@sss.pgh.pa.us обсуждение исходный текст  | 
		
| Ответ на | CLUSTER and MVCC (Heikki Linnakangas <heikki@enterprisedb.com>) | 
| Ответы | 
                	
            		Re: CLUSTER and MVCC
            		
            		 | 
		
| Список | pgsql-hackers | 
Heikki Linnakangas <heikki@enterprisedb.com> writes:
> 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.
The reason it's not trivial is that you also have to preserve the t_ctid
links of update chains.  If you look into VACUUM FULL, a very large part
of its complexity is that it moves update chains as a unit to make that
possible.  (BTW, I believe the problem Pavan Deolasee reported yesterday
is a bug somewhere in there --- it looks to me like sometimes the same
update chain is getting copied multiple times.)
        regards, tom lane
		
	В списке pgsql-hackers по дате отправления: