Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler error when using PG_TRY..PG_FINALLY #7530

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tsl/src/continuous_aggs/materialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* Please see the included NOTICE for copyright information and
* LICENSE-TIMESCALE for a copy of the license.
*/
#include <compat/compat.h>
#include <postgres.h>
#include <executor/spi.h>
#include <fmgr.h>
Expand All @@ -20,6 +19,7 @@
#include <utils/snapmgr.h>
#include <utils/timestamp.h>

#include "compat/compat.h"
#include "debug_assert.h"
#include "guc.h"
#include "materialize.h"
Expand Down Expand Up @@ -770,11 +770,15 @@ execute_materializations(MaterializationContext *context)
rows_processed += execute_materialization_plan(context, PLAN_TYPE_DELETE);
rows_processed += execute_materialization_plan(context, PLAN_TYPE_INSERT);
}

/* Free all cached plans */
free_materialization_plans(context);
}
PG_FINALLY();
PG_CATCH();
{
/* Make sure all cached plans in the session be released before rethrowing the error */
free_materialization_plans(context);
PG_RE_THROW();
}
PG_END_TRY();

Expand Down
Loading