Now requires a RawStmt rather than any old Node. Methods to parse DDL
into a list of Nodes now return a list of RawStmts; the old Nodes we
expect are available as one of their fields. ParseTreeRawStmt is used
in PostgreSQL 10 to obtain the RawStmt itself; the behavior of the old
ParseTreeNode is preserved and it always returns a simple Node.
getOwnedSequences can now filter owned sequences by a specified column.
Passing InvalidAttrNumber preserves the original behavior of returning
all sequences owned by a specified relation.
PostgreSQL 10 removes the ability to directly call CatalogUpdateIndexes
in favor of new CatalogTupleUpdate and CatalogTupleInsert calls, which
do this for us.
Certain PostgreSQL 10 changes require modifications to our includes:
* pg_sequence's interace has been refactored into its own file
* textToQualifiedNameList is now in utils/varlena.h
* pg_getnameinfo_all is now in common/ip.h
* stringToQualifiedNameList is now in utils/regproc.h
WaitLatchOrSocket now accepts a "wait_event_info" argument for use by
pg_stat. Extensions appear to mostly just pass "PG_WAIT_EXTENSION", so
that's what I've done.
PostgreSQL 10's ProcessUtility now requires a PlannedStmt with its
utilityStmt field set to what we used to pass directly.
In addition, it receives a QueryEnvironment reference, altogether new
but apparently OK to NULL out for now.
This adds a wrapper to adapt to the new style and fixes all callers.
- Use native postgres function for composite key btree functions
- Move explain tests to multi_explain.sql (get rid of .out _0.out files)
- Get rid of input/output files for multi_subquery.sql by moving table creations
- Update some comments
With this commit we start to register InvalidateDistRelationCacheCallback
function as cache invalidation callback function before version checks
because during version checks we use cache to look up relation ids of some
relations like pg_dist_relation or pg_dist_partition_logical_relid_index
and we want to know about cache invalidation before accessing them.
During version update, we indirectly calld CheckInstalledVersion via
ChackCitusVersions. This obviously fails because during version update it is
expected to have version mismatch between installed version and binary version.
Thus, we remove that ChackCitusVersions. We now only call ChackAvailableVersion.
Before this commit, we were erroring out at almost all queries if there is a
version mismatch. With this commit, we started to error out only requested
operation touches distributed tables.
Normally we would need to use distributed cache to understand whether a table
is distributed or not. However, it is not safe to read our metadata tables when
there is a version mismatch, thus it is not safe to create distributed cache.
Therefore for this specific occasion, we directly read from pg_dist_partition
table. However; reading from catalog is costly and we should not use this
method in other places as much as possible.
This commit fixes the problem where we incorrectly try to reach distributed table
cache when the extension is not loaded completely. We tried to reach the cache
because we wanted to get reference table information to activate the node. However
it is actually not necessary to explicitly activate the nodes which come from
master_initialize_node_metadata. Because it only runs during extension creation and
at that time there are no reference tables and all nodes are considered as active.