Skip to content

Commit

Permalink
Move context reset into prev_processUtility
Browse files Browse the repository at this point in the history
  • Loading branch information
staticlibs authored and fabriziomello committed Jan 10, 2025
1 parent 7c92498 commit cabf588
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/process_utility.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ prev_ProcessUtility(ProcessUtilityArgs *args)
args->queryEnv,
args->dest,
args->completion_tag);

/*
* Reset the last_process_utility_context value that is saved at the
* entrance of the TS ProcessUtility hook and can be used for transaction
* checks inside refresh_cagg and other procedures.
*/
ts_process_utility_context_reset();
}

static void
Expand Down Expand Up @@ -5065,7 +5072,6 @@ timescaledb_ddl_command_start(PlannedStmt *pstmt, const char *query_string, bool
if (altering_timescaledb || !ts_extension_is_loaded_and_not_upgrading())
{
prev_ProcessUtility(&args);
ts_process_utility_context_reset();
return;
}

Expand All @@ -5090,8 +5096,6 @@ timescaledb_ddl_command_start(PlannedStmt *pstmt, const char *query_string, bool
*/
if (result == DDL_CONTINUE)
prev_ProcessUtility(&args);

ts_process_utility_context_reset();
}

static void
Expand Down

0 comments on commit cabf588

Please sign in to comment.