Hi
I have written the README for the GTT, which contains the GTT requirements and design.
I found that compared to my first email a year ago, many GTT Limitations are now gone.
Now, I'm adding comments to some of the necessary functions.
There are problems with patching. Please, can you rebase your patch?
Sure.
I'm still working on sort code and comments.
If you have any suggestions, please let me know.
It is broken again
There is bad white space
+ /*
+ * For global temp table only
+ * use ShareUpdateExclusiveLock for ensure safety
+ */
+ {
+ {
+ "on_commit_delete_rows",
+ "global temp table on commit options",
+ RELOPT_KIND_HEAP | RELOPT_KIND_PARTITIONED,
+ ShareUpdateExclusiveLock
+ },
+ true
+ }, <=================
/* list terminator */
{{NULL}}
+7 OTHERS
+Parallel query
+Planner does not produce parallel query plans for SQL related to GTT. Because <=================
+GTT private data cannot be accessed across processes.
diff --git a/src/backend/catalog/Makefile b/src/backend/catalog/Makefile
+/*
+ * Update global temp table relstats(relpage/reltuple/relallvisible) <========================
+ * to local hashtable
+ */
+void
+/*
+ * Search global temp table relstats(relpage/reltuple/relallvisible) <==============
+ * from lo
and there are lot of more places ...
I found other issue
postgres=# create global temp table foo(a int);
CREATE TABLE
postgres=# create index on foo(a);
CREATE INDEX
close session and in new session
postgres=# reindex index foo_a_idx ;
WARNING: relcache reference leak: relation "foo" not closed
REINDEX