diff options
author | Bruce Momjian <bruce@momjian.us> | 1996-10-13 04:26:39 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1996-10-13 04:26:39 +0000 |
commit | abb1b3e770fd09acc44bc2152d10020d9479f600 (patch) | |
tree | d6a93daaa76be70b27f0bf3f691e24ff7c710933 /src/include | |
parent | bef3c89a1cea3f9d6ab749fd7636952a980de35a (diff) |
I checked the alter table code, and started suspecting the relation
cache. I found if I manually added a line to flush the whole relation
cache, the assert error disappeared. Looking through the code, I found
that the relation cache is flushed at the end of each query if the
reference count is zero for the relation. However, printf's showed that
the rd_relcnt(reference count) for the accessed query was not returning
to zero after each query.
It turns out the parser was doing a heap_ropen in parser/analyze.c to
get information about the table's columns, but was not doing a
heap_close.
This was causing the query after the ALTER TABLE ADD to see the old
table structure, and the executor's assert was reporting the problem.
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/parser/parse_state.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/include/parser/parse_state.h b/src/include/parser/parse_state.h index 9636462536d..e3bba8ee98e 100644 --- a/src/include/parser/parse_state.h +++ b/src/include/parser/parse_state.h @@ -4,7 +4,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: parse_state.h,v 1.1 1996/08/28 07:23:56 scrappy Exp $ + * $Id: parse_state.h,v 1.2 1996/10/13 04:26:39 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -16,7 +16,7 @@ typedef struct ParseState { int p_last_resno; List *p_target_resnos; - Relation parser_current_rel; + Relation p_parser_current_rel; List *p_rtable; int p_query_is_rule; int p_numAgg; |