Commit Graph

641 Commits (1a728f747b304d95e5ccf7c29dec8ca2763d46c6)

Author SHA1 Message Date
Andres Freund 1a728f747b Remove 9.5 regression test output files. 2017-06-26 12:17:46 -07:00
Andres Freund c9c26ad81f Remove 9.5 related node wrappers.
Now that all branches support the extensible node infrastructure, we
don't need our wrappers anymore.
2017-06-26 08:46:32 -07:00
Andres Freund 7733154be0 Fix code only enabled for 9.5.
There's still supporting wrappers used, a subsequent commit will
remove those.

This also removes the already unused tuplecount_t define.
2017-06-26 08:46:32 -07:00
Andres Freund 0f3d41702e Remove 9.5 specific C files. 2017-06-26 08:46:32 -07:00
Jason Petersen 05aef7ce29 Support PostgreSQL 10 (#1379)
Adds support for PostgreSQL 10 by copying in the requisite ruleutils
and updating all API usages to conform with changes in PostgreSQL 10.
Most changes are fairly minor but they are numerous. One particular
obstacle was the change in \d behavior in PostgreSQL 10's psql; I had
to add SQL implementations (views, mostly) to mimic the pre-10 output.
2017-06-26 02:35:46 -06:00
Andres Freund 2e7e40dc66 Add some tests checking that maintenance daemon gets started.
The 2nd database one is a bit slow, but also shows something
important, so we might want to keep it?
2017-06-23 11:53:39 -07:00
Andres Freund 62e7b67dc1 Introduce per-database maintenance process.
This will be used for deadlock detection, prepared transaction
recovery amongst others, but currently is just idling around.
2017-06-23 11:53:39 -07:00
Andres Freund 81f92d44d2 Minimal infrastructure for per-backend citus initialization. 2017-06-23 11:20:10 -07:00
Andres Freund 0df00a0955 Force cache invalidation machinery to be initialized earlier.
Previously it was not guaranteed that invalidations were registered
after creating the extension, only if the extension was used
afterwards.
2017-06-23 11:20:10 -07:00
Andres Freund 31b610a359 Centralized metadata_cache cache variables into one struct, to avoid missing resets.
E.g. extensionOwner was already missed.
2017-06-23 11:20:10 -07:00
Marco Slot d4295587aa Fix spuriously failing regression test 2017-06-23 10:06:15 +02:00
Marco Slot 5f84d8e0c4 Add weird column name to create_distributed_table test 2017-06-22 16:27:39 +02:00
Marco Slot 9d14e70716 Clarify error message when copying NULL value into table 2017-06-22 15:48:24 +02:00
Marco Slot f1c6c966f0 Execute INSERT..SELECT via coordinator if it cannot be pushed down
Add a second implementation of INSERT INTO distributed_table SELECT ... that is used if
the query cannot be pushed down. The basic idea is to execute the SELECT query separately
and pass the results into the distributed table using a CopyDestReceiver, which is also
used for COPY and create_distributed_table. When planning the SELECT, we go through
planner hooks again, which means the SELECT can also be a distributed query.

EXPLAIN is supported, but EXPLAIN ANALYZE is not because preventing double execution was
a lot more complicated in this case.
2017-06-22 15:46:30 +02:00
Marco Slot 688f5a11c7 Support quoted column-names in COPY logic 2017-06-22 15:45:57 +02:00
Marco Slot 7675d21151 Simplify router planner call path 2017-06-22 15:45:57 +02:00
Murat Tuncer 49e9f13963 Remove fall back to select if poll is not available (#1466)
poll is supported on all relevant systems, there is no
need to have a fall back mechanism to use select()
2017-06-22 12:11:18 +03:00
Jason Petersen ffaae84fa5 Don't call PostProcessUtility for local commands
It is intended only to aid in processing of distributed DDL commands,
but as written could execute during local CREATE INDEX CONCURRENTLY
commands.
2017-06-19 15:56:03 -06:00
velioglu 0cf67a3164 Delete ExecuteRemoteCommand function 2017-06-15 17:11:19 +03:00
velioglu 8706181b8a Convert DropShardsFromWorker to the new connection API 2017-06-15 15:24:06 +03:00
velioglu c8cebb91bb Convert TableDDLCommandList function to the new connection API 2017-06-14 17:29:58 +03:00
velioglu 1b07d9d396 Convert RemoteTableOwner function to the new connection API 2017-06-14 17:29:58 +03:00
velioglu 34eb8e78f7 Convert worker_fetch_foreign_file to new connection API 2017-06-14 17:29:58 +03:00
velioglu 0049f7334a Convert DistributedTableSizeOnWorker function to new connection API 2017-06-14 17:29:58 +03:00
Marco Slot a6eb469ff5 Add support for unlogged distributed tables 2017-06-14 13:50:00 +02:00
velioglu 57bb512069 Use placement connection to drop shards instead of node connection 2017-06-14 14:14:59 +03:00
Marco Slot 7396cbe9e2 Allow COPY after a multi-shard command
This change removes the XactModificationLevel check at the start of COPY
that was made redundant by consistently using GetPlacementConnection.
2017-06-09 13:54:58 +02:00
Jason Petersen 5353705dc3 Add ORDER clause to subquery test missing it 2017-06-08 18:30:14 -06:00
Jason Petersen d8083e5cb5 Remove tracked files from gitignore
Causes very hard-to-debug test failures.
2017-06-08 17:39:31 -06:00
jmunsch 2192638000 Clarify error message for local and distributed query plans. 2017-06-01 11:52:49 -07:00
Marco Slot c68aa6b8d7 Don't take a table lock in ForeignConstraintGetReferencedTableId 2017-05-31 11:15:21 +02:00
Onder Kalaci c6629fd4e8 Improve subquery pushdown regression tests
- 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
2017-05-30 14:05:15 +03:00
Burak Yucesoy 4c04d3beb4 Add tests for version check 2017-05-24 17:39:25 +03:00
Burak Yucesoy 66a9d0df02 Register cache invalidation callback before version checks
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.
2017-05-24 17:39:25 +03:00
Burak Yucesoy 1eb77495b9 Fix incorrect call to CheckInstalledVersion
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.
2017-05-24 17:39:25 +03:00
Önder Kalacı 9fbdbd183e Merge branch 'master' into better_comment_for_tests 2017-05-22 10:58:21 +03:00
Onder Kalaci 4a1730d85d Add comment to the regression test file to prevent any misunderstandings about
the usage of enable_router_execution GUC variable.
2017-05-22 10:39:32 +03:00
Burak Yucesoy 2448950665 Add tests for version checks 2017-05-22 09:53:29 +03:00
Burak Yucesoy 6b73628ae9 Add version checks to necessary UDFs 2017-05-22 09:53:29 +03:00
Burak Yucesoy 2f075c43cc Only error out on distributed queries when there is version mismatch
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.
2017-05-22 09:53:29 +03:00
Burak Yucesoy e8247021e2 Fix crash during upgrade from 5.2 to 6.2
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.
2017-05-19 00:01:36 +03:00
Jason Petersen 618102cda5 Bump extension and configure PACKAGE versions
Actually getting this done before the next dev cycle begins.
2017-05-17 15:25:30 -06:00
Jason Petersen 1b60dd71d9 Limit sequence SELECT to last_value
Unbounded column output differs by version.
2017-05-16 11:05:34 -06:00
Jason Petersen 8fe806db58 Suppress hash index warning
Irrelevant to the test.
2017-05-16 11:05:34 -06:00
Jason Petersen 3a07997f06 Add missing CCI call in metadata seq sync
Be explicit about the fact that we've made a modification: we need
subsequent commands to see this sequence.
2017-05-16 11:05:34 -06:00
Jason Petersen e3edf83b7c Change version-sensitive tests to handle '10'
Previously assumed period in version; this makes tests future-proof.
2017-05-16 11:05:34 -06:00
Jason Petersen 53e54c66fa Remove ALTER SEQUENCE from parallel groups
Removing these has no side effect, and in the (current) PostgreSQL 10,
an ERROR is printed during concurrent sequence modification.
2017-05-16 11:05:34 -06:00
Jason Petersen 8b0a4d8315 Add unambiguous ORDER BY clauses to many tests
Queries which do not specify an order may arbitrarily change output
across PostgreSQL versions.
2017-05-16 11:05:34 -06:00
Jason Petersen 5855e8f3e5 Update header comments to match new test names
Just keeping these in sync with the actual file name.
2017-05-16 11:05:33 -06:00
Jason Petersen c51c17327d Rename very long test files
In addition to not actually providing much information, these names can
cause problems in PostgreSQL 10.
2017-05-16 11:05:33 -06:00