File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 3
3
* Please see the included NOTICE for copyright information and
4
4
* LICENSE-TIMESCALE for a copy of the license.
5
5
*/
6
- #include <compat/compat.h>
7
6
#include <postgres.h>
8
7
#include <executor/spi.h>
9
8
#include <fmgr.h>
20
19
#include <utils/snapmgr.h>
21
20
#include <utils/timestamp.h>
22
21
22
+ #include "compat/compat.h"
23
23
#include "debug_assert.h"
24
24
#include "guc.h"
25
25
#include "materialize.h"
@@ -770,11 +770,15 @@ execute_materializations(MaterializationContext *context)
770
770
rows_processed += execute_materialization_plan (context , PLAN_TYPE_DELETE );
771
771
rows_processed += execute_materialization_plan (context , PLAN_TYPE_INSERT );
772
772
}
773
+
774
+ /* Free all cached plans */
775
+ free_materialization_plans (context );
773
776
}
774
- PG_FINALLY ();
777
+ PG_CATCH ();
775
778
{
776
779
/* Make sure all cached plans in the session be released before rethrowing the error */
777
780
free_materialization_plans (context );
781
+ PG_RE_THROW ();
778
782
}
779
783
PG_END_TRY ();
780
784
You can’t perform that action at this time.
0 commit comments