Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RekGRpth committed Nov 18, 2024
1 parent 61a1665 commit 0bc9c76
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/quotamodel.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,9 @@ refresh_disk_quota_model(bool is_init)
static void
refresh_disk_quota_usage(bool is_init)
{
volatile bool pushed_active_snap = false;
volatile bool ret = true;
volatile bool pushed_active_snap = false;
volatile bool ret = true;
StringInfoData active_oids = {0};

StartTransactionCommand();

Expand All @@ -821,8 +822,6 @@ refresh_disk_quota_usage(bool is_init)
*/
PG_TRY();
{
StringInfoData active_oids;

PushActiveSnapshot(GetTransactionSnapshot());
pushed_active_snap = true;
/*
Expand All @@ -849,7 +848,6 @@ refresh_disk_quota_usage(bool is_init)
*/
if (is_init || (diskquota_hardlimit && (reject_map_changed || hasActiveTable)))
dispatch_rejectmap(active_oids.data);
pfree(active_oids.data);
}
PG_CATCH();
{
Expand All @@ -862,7 +860,7 @@ refresh_disk_quota_usage(bool is_init)
RESUME_INTERRUPTS();
}
PG_END_TRY();
if (local_active_table_stat_map) hash_destroy(local_active_table_stat_map);
if (active_oids.data) pfree(active_oids.data);
if (pushed_active_snap) PopActiveSnapshot();
if (ret)
CommitTransactionCommand();
Expand Down

0 comments on commit 0bc9c76

Please sign in to comment.