Transaction safe Truncate

Поиск
Список
Период
Сортировка
Искать

Transaction safe Truncate

От:
Rod Taylor <rbt@rbt.ca>
Дата:
Вложения:
Didn't move anything anywhere.  Simply split cluster_rel into two parts.
rebuild_rel() does the rebuilding steps.  Truncate uses this skipping
the datacopy stage by calling with dataCopy = false.


If wanted (separate patch), the below could (should?) probably move to
heap.c:
rebuild_rel
make_new_heap
copy_heap_data
swap_relfilenodes

The below could (should?) move to index.c:
get_indexattr_list
recreate_indexattr

That leaves the below in cluster.c:
cluster_rel
cluster
check_cluster_ownership
get_table_to_cluster



-- 
Rod Taylor 

Re: Transaction safe Truncate

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

Your patch has been added to the PostgreSQL unapplied patches list at:

	http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------


Rod Taylor wrote:
> Didn't move anything anywhere.  Simply split cluster_rel into two parts.
> rebuild_rel() does the rebuilding steps.  Truncate uses this skipping
> the datacopy stage by calling with dataCopy = false.
> 
> 
> If wanted (separate patch), the below could (should?) probably move to
> heap.c:
> rebuild_rel
> make_new_heap
> copy_heap_data
> swap_relfilenodes
> 
> The below could (should?) move to index.c:
> get_indexattr_list
> recreate_indexattr
> 
> That leaves the below in cluster.c:
> cluster_rel
> cluster
> check_cluster_ownership
> get_table_to_cluster
> 
> 
> 
> -- 
> Rod Taylor 

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: Transaction safe Truncate

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

Patch applied.  Thanks.

---------------------------------------------------------------------------


Rod Taylor wrote:
> Didn't move anything anywhere.  Simply split cluster_rel into two parts.
> rebuild_rel() does the rebuilding steps.  Truncate uses this skipping
> the datacopy stage by calling with dataCopy = false.
> 
> 
> If wanted (separate patch), the below could (should?) probably move to
> heap.c:
> rebuild_rel
> make_new_heap
> copy_heap_data
> swap_relfilenodes
> 
> The below could (should?) move to index.c:
> get_indexattr_list
> recreate_indexattr
> 
> That leaves the below in cluster.c:
> cluster_rel
> cluster
> check_cluster_ownership
> get_table_to_cluster
> 
> 
> 
> -- 
> Rod Taylor 

[ Attachment, skipping... ]

> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
FAQ