Christopher B. Browne's Home Page

8.48. disable_indexes_on_table(i_oid oid)

Function Properties

disable indexes on the specified table. Used during subscription process to suppress indexes, which allows COPY to go much faster. This may be set as a SECURITY DEFINER in order to eliminate the need for superuser access by Slony-I.
    	-- Setting pg_class.relhasindex to false will cause copy not to
    	-- maintain any indexes. At the end of the copy we will reenable
    	-- them and reindex the table. This bulk creating of indexes is
    	-- faster.
    	update pg_catalog.pg_class set relhasindex ='f' where oid = i_oid;
    	return 1;

Contact me at