Slony-I 2.2.7 Documentation
Prev | Fast Backward | Chapter 8. Schema schemadoc | Fast Forward | Next

# 8.47. disable_indexes_on_table(i_oid oid)

Function Properties

Language: PLPGSQL

Return Type: integer

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.

    begin
    	-- 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;
    end

Prev | Home | Next
determineidxnameunique(p_idx_name text, p_tab_fqname name) | Up | disablenode(p_no_id integer)