This patch contains repack_cleanup_callback() which calls to repack_drop() for cleaning temporary objects. repack_cleanup_callback() will be pushed on stack using pgut_atexit_push() at beginning so that it will pop on abort or exit of program.
This patch includes one global counter (temp_obj_num) which counts number of temporary objects created by pg_repack. Correct order of deletion of temporary object as per count avoids unintentional error messages.
This commit is contained in:
@ -247,7 +247,7 @@ CREATE FUNCTION repack.repack_swap(oid) RETURNS void AS
|
||||
'MODULE_PATHNAME', 'repack_swap'
|
||||
LANGUAGE C VOLATILE STRICT;
|
||||
|
||||
CREATE FUNCTION repack.repack_drop(oid) RETURNS void AS
|
||||
CREATE FUNCTION repack.repack_drop(oid, int) RETURNS void AS
|
||||
'MODULE_PATHNAME', 'repack_drop'
|
||||
LANGUAGE C VOLATILE STRICT;
|
||||
|
||||
|
Reference in New Issue
Block a user