Use recordid sequence always

niupre/TestDeferredDropAndCleanup
Nitish Upreti 2022-08-26 16:03:14 -07:00
parent cc54697580
commit a7ec398f7a
2 changed files with 4 additions and 3 deletions

View File

@ -512,10 +512,11 @@ InsertCleanupRecordInSubtransaction(CleanupObject objectType,
StringInfo command = makeStringInfo();
appendStringInfo(command,
"INSERT INTO %s.%s "
" (operation_id, object_type, object_name, node_group_id, policy_type) "
" VALUES (" UINT64_FORMAT ", %d, %s, %d, %d)",
" (record_id, operation_id, object_type, object_name, node_group_id, policy_type) "
" VALUES ( nextval('%s'), " UINT64_FORMAT ", %d, %s, %d, %d)",
PG_CATALOG,
PG_DIST_CLEANUP,
CLEANUPRECORDID_SEQUENCE_NAME,
CurrentOperationId,
objectType,
quote_literal_cstr(objectName),

View File

@ -81,7 +81,7 @@ DROP FUNCTION pg_catalog.isolate_tenant_to_new_shard(table_name regclass, tenant
-- 1) Cleanup leftover resources after a failure
-- 2) Deferred drop of old shard placements after a split.
CREATE TABLE citus.pg_dist_cleanup (
record_id bigserial primary key,
record_id bigint primary key,
operation_id bigint not null,
object_type int not null,
object_name text not null,