diff options
| author | Pavan Deolasee | 2014-11-06 07:52:59 +0000 |
|---|---|---|
| committer | Pavan Deolasee | 2015-04-15 05:46:38 +0000 |
| commit | 58a80dbf7182f6edff44d66efdd191238ded46af (patch) | |
| tree | a3df8dc92aef65fd2478755fdf925dd2fd41583e /src/include/commands | |
| parent | 626e8dcee52abc3189c810b00ad12cbbb44eabb4 (diff) | |
Use ResourceOwner to track internally prepared statements
XL uses prepared statements internally to execute querys on remote datanodes.
But in case of transaction aborts, these statements are left open on the
datanodes causing issues later. We now track such prepared statements using
transaction resource owner and drop them in case of aborts.
Diffstat (limited to 'src/include/commands')
| -rw-r--r-- | src/include/commands/prepare.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/commands/prepare.h b/src/include/commands/prepare.h index 12fa60fd4f..222734b7aa 100644 --- a/src/include/commands/prepare.h +++ b/src/include/commands/prepare.h @@ -29,6 +29,9 @@ typedef struct char stmt_name[NAMEDATALEN]; CachedPlanSource *plansource; /* the actual cached plan */ bool from_sql; /* prepared via SQL, not FE/BE protocol? */ +#ifdef XCP + bool use_resowner; /* does it use resowner for tracking? */ +#endif TimestampTz prepare_time; /* the time when the stmt was prepared */ } PreparedStatement; @@ -55,7 +58,8 @@ extern void ExplainExecuteQuery(ExecuteStmt *execstmt, IntoClause *into, /* Low-level access to stored prepared statements */ extern void StorePreparedStatement(const char *stmt_name, CachedPlanSource *plansource, - bool from_sql); + bool from_sql, + bool use_resowner); extern PreparedStatement *FetchPreparedStatement(const char *stmt_name, bool throwError); extern void DropPreparedStatement(const char *stmt_name, bool showError); |
