Commit Graph

1356 Commits (release-7.0)

Author SHA1 Message Date
Burak Yucesoy e5a156ba63 Bump Citus version to 7.0.3 2017-10-16 11:51:02 +03:00
Burak Yucesoy 398438e488 Add CHANGELOG entry for 7.0.3 2017-10-16 11:49:33 +03:00
Marco Slot 55dfbc389d Use local group ID when querying for prepared transactions 2017-10-16 11:48:58 +03:00
Marco Slot 08e0182477 Invalidate worker and group ID cache in maintenance daemon 2017-10-16 11:48:43 +03:00
Marco Slot 75073a5bc3 Use unique constraint index for transaction record deletion 2017-10-16 11:48:17 +03:00
Onder Kalaci 0770754cb6 Skip relation extension locks
We should skip if the process blocked on the relation
extension since those locks are hold for a short duration
while the relation is actually extended on the disk and
released as soon as the extension is done. Thus, recording
such waits on our lock graphs could yield detecting wrong
distributed deadlocks.
2017-10-16 11:48:01 +03:00
Murat Tuncer ee36516a5a Prevent crash when remote transaction start fails (#1662)
We sent multiple commands to worker when starting a transaction.
Previously we only checked the result of the first command that
is transaction 'BEGIN' which always succeeds. Any failure on
following commands were not checked.

With this commit, we make sure all command results are checked.
If there is any error we report the first error found.
2017-10-16 11:47:43 +03:00
Andres Freund 458762087a Fix possible shard cache incoherency.
When a table and it's shards are dropped, and afterwards the same
shard identifiers are reused, e.g. due to a DROP & CREATE EXTENSION,
the old entry in the shard cache and the required entry in the shard
cache might be for different tables.

Force invalidation for both old and new table to fix.
2017-10-16 11:45:56 +03:00
Onder Kalaci 09e7dbd06f Make the tests produce more consistent outputs 2017-10-16 11:45:20 +03:00
Onder Kalaci 39b943cbad Properly copy and trim the error messages that come from pg_conn
When a NULL connection is provided to PQerrorMessage(), the
returned error message is a static text. Modifying that static
text, which doesn't necessarly be in a writeable memory, is
dangreous and might cause a segfault.
2017-10-16 11:45:20 +03:00
Onder Kalaci 4369777101 Ensure schema exists on reference table creation
If the schema doesn't exists on the workers, create it.
2017-10-16 11:43:37 +03:00
Jason Petersen 8e7b954a2f
Modify version-output tests for PostgreSQL 11
Basically we just care whether the running version is before or after
PostgreSQL 10, so testing the major version against 9 and printing a
boolean is sufficient.
2017-10-05 11:36:19 -06:00
Burak Yucesoy 1f83929e80 Bump Citus version to 7.0.2 2017-09-28 10:39:25 -07:00
Burak Yucesoy abf9bb6b86 Add CHANGELOG entry for 7.0.2 2017-09-28 10:38:50 -07:00
Marco Slot cdea47e5c3 Add multi-user re-partitioning regression tests 2017-09-28 15:29:17 +02:00
Marco Slot c565ab55aa Execute transmit commands as superuser during task-tracker queries 2017-09-28 15:29:17 +02:00
Marco Slot d072e06746 Check for absolute paths in COPY with format transmit 2017-09-28 15:29:17 +02:00
Marco Slot ea52bee891 Allow read-only users to run task-tracker queries 2017-09-28 15:29:17 +02:00
Burak Yucesoy 4873d771e8 Bump Citus version to 7.0.1 2017-09-12 17:25:38 -07:00
Burak Yucesoy e1a641fe9b Add CHANGELOG entry for 7.0.1 release 2017-09-12 17:13:52 -07:00
Marco Slot 6b5baf21fb Wait for I/O to finish after PQputCopyData 2017-09-12 17:13:52 -07:00
Marco Slot 8c0274cba6 Free per-tuple COPY memory in INSERT...SELECT 2017-09-12 17:13:52 -07:00
Marco Slot 907048ace8 Add volatile function in prepared statement regression test 2017-09-12 17:13:52 -07:00
Marco Slot d8bb32bd5a Always copy MultiPlan in GetMultiPlan 2017-09-12 17:13:52 -07:00
Jason Petersen 0012d70b1b Add clarifying comment to RngVarCallbackForDropIdx
We don't need the PARTITION-related logic recently added in PostgreSQL.
2017-09-12 17:13:52 -07:00
Jason Petersen 44ddef6fe8 Update ruleutils_10 with latest PostgreSQL changes
See:
	postgres/postgres@21d304dfed
	postgres/postgres@bb5d6e80b1
	postgres/postgres@d363d42bb9
	postgres/postgres@eb145fdfea
	postgres/postgres@decb08ebdf
	postgres/postgres@a3ca72ae9a
	postgres/postgres@bc2d716ad0
	postgres/postgres@382ceffdf7
	postgres/postgres@c7b8998ebb
	postgres/postgres@e3860ffa4d
	postgres/postgres@76a3df6e5e
2017-09-12 17:13:52 -07:00
Jason Petersen 0ec41de26c Update ruleutils_96 with latest PostgreSQL changes
See:
	postgres/postgres@41ada83774
	postgres/postgres@3b0c2dbed0
	postgres/postgres@ff2d537223
2017-09-12 17:13:52 -07:00
Burak Yucesoy 34c6bd4b44 Bump configure PACKAGE_VERSION 2017-08-28 16:45:20 +03:00
Burak Yucesoy d607368a9e Add CHANGELOG entry for 7.0 release 2017-08-28 16:41:14 +03:00
Marco Slot c68bd7efa7 Merge pull request #1621 from citusdata/multi_row_insert_defaults
Allow default columns in multi-row INSERTs
2017-08-25 11:32:43 +02:00
Marco Slot 0aadbb1760 Convert multi-row INSERT target list to Vars 2017-08-25 10:55:56 +02:00
Marco Slot 1920390688 Multi-row INSERTs no longer throw errors in isolation tests 2017-08-25 10:55:56 +02:00
Marco Slot ae00795dab Allow default columns in multi-row INSERTs 2017-08-25 10:55:56 +02:00
Joe Nelson a658f5ecda Two more libs I needed to build citus 2017-08-24 13:04:35 -06:00
Marco Slot b4cc8939fc Merge pull request #1613 from citusdata/fix_ref_table_multi_row_returning
Fix multi-row INSERT with RETURNING on reference tables
2017-08-24 10:56:44 +02:00
Marco Slot c97692f382 Fix multi-row INSERT with RETURNING on reference tables 2017-08-24 10:42:12 +02:00
Marco Slot 7ce2308dc1 Merge pull request #1616 from citusdata/deadlock_detection_warning
Don't error out if deadlock detection fails to connect to worker
2017-08-24 10:31:15 +02:00
Marco Slot dbf18df995 Don't error out if BuildGlobalWaitGraph fails to connect 2017-08-23 19:08:03 +02:00
Burak Yücesoy 7e59c0b019 Merge pull request #1602 from citusdata/add_isolation_tests
Increase coverage of isolation tests - Part 2
2017-08-23 19:44:23 +03:00
Burak Yucesoy 5be6eb9ef6 Increase coverage of isolation tests - Part 2
With this PR we add isolation tests for

COPY to reference table vs. other operations
COPY to partitioned table vs. other operations
Multi row INSERTs vs other operations
INSERT/SELECT vs. other operations
UPSERT vs. other operations
DELETE vs. other operations
TRUNCATE vs. other operations
DROP vs. other operations
DDL vs. other operations

other operations consist of basic SQL operations (like SELECT,
INSERT, DELETE, UPSERT, COPY TRUNCATE, CREATE INDEX) as well
as some Citus functionalities (like master_modify_multiple_shards,
master_apply_delete_command, citus_total_relation_size etc.)
2017-08-23 18:23:36 +03:00
Önder Kalacı 75491b9262 Merge pull request #1612 from citusdata/fix_dead_process
Prevent maintanince deamon crashes due to dead processes
2017-08-23 15:56:24 +03:00
Onder Kalaci c7bb29b69e Prevent maintanince deamon crashes due to dead processes
If after the distributed deadlock detection decides to cancel
a backend, the backend has been terminated/killed/cancelled
externally, we might be accessing to a NULL pointer. This commit
prevents that case by ignoring the current distributed deadlock.
2017-08-23 15:44:09 +03:00
Marco Slot 46f81d5531 Merge pull request #1607 from citusdata/remove_source_dump_local
Remove source node argument from dump_local_wait_edges
2017-08-23 13:26:06 +02:00
Marco Slot 641420d79f Remove source node argument from dump_local_wait_edges 2017-08-23 13:14:00 +02:00
Marco Slot a67d10957f Merge pull request #1600 from citusdata/fix_multi_row_returning
Add alias for target in multi-row INSERTs
2017-08-23 11:00:27 +02:00
Jason Petersen 8cb69e3a14 Add alias for target in multi-row INSERTs
This is necessary for multi-row INSERTs for the same reasons we use it
in e.g. UPSERTs: if the range table list has more than one entry, then
PostgreSQL's deparse logic requires that vars be prefixed by the name
of their corresponding range table entry. This of course doesn't affect
single-row INSERTs, but since multi-row INSERTs have a VALUE RTE, they
were affected.

The piece of ruleutils which builds range table names wasn't modified
to handle shard extension; instead UPSERT/INSERT INTO ... SELECT added
an alias to the RTE. When present, this alias is favored. Doing the
same in the multi-row INSERT case fixes RETURNING for such commands.
2017-08-23 10:24:00 +02:00
Marco Slot ad1fbbe186 Merge pull request #1608 from citusdata/sequential_multi_row_insert
Execute multi-row INSERTs sequentially
2017-08-23 10:17:30 +02:00
Marco Slot 4d7927b672 Execute multi-row INSERTs sequentially 2017-08-23 10:04:57 +02:00
Marco Slot df6d56c1ed Merge pull request #1606 from citusdata/fix_copy_dropped_columns
Consider dropped columns that precede the partition column in COPY
2017-08-22 13:13:09 +02:00
Marco Slot cf375d6a66 Consider dropped columns that precede the partition column in COPY 2017-08-22 13:02:35 +02:00