Commit Graph

206 Commits (release-5.1)

Author SHA1 Message Date
Jason Petersen fa6690645f
Lock tools version 2016-08-02 21:27:55 -07:00
Andres Freund bb83331ac5 Merge pull request #689 from citusdata/fix-674-51
Don't access pg_dist_partition->partkey directly, use heap_getattr() - 5.1.
2016-07-29 10:14:51 -07:00
Andres Freund aab8e6b324 Don't access pg_dist_partition->partkey directly, use heap_getattr().
Text datums can't be directly accessed via the struct equivalence trick
used to access catalogs. That's because, as an optimization, they're
sometimes aligned to 1 byte ("text"'s alignment), and sometimes to 4
bytes. That depends on it being a short
varlena (cf. VARATT_NOT_PAD_BYTE) or not.

In the case at hand here, partkey became longer than 127 characters -
the boundary for short varlenas (cf. VARATT_CAN_MAKE_SHORT()). Thus it
became 4 byte/int aligned. Which lead to the direct struct access
accessing the wrong data.

The fix is simply to never access partkey that way - to enforce that,
hide partkey ehind the usual ifdef.

Fixes: #674
2016-07-29 10:03:56 -07:00
Jason Petersen ef86c0784e
Add CHANGELOG entries for 5.1.1 release
cr: @sumedhpathak
2016-06-17 16:05:19 -06:00
Murat Tuncer c613c991bf
Refactor task tracker cleanup to enable workers receive cleanup jobs
Long sleep is replaced by multiple small sleeps. Maximum timeout
is also increased since we do not have to wait for that long most
of the cases.
2016-06-17 15:49:38 -06:00
Murat Tuncer 0f9232dee4
Add complex distinct count support for repartitioned subqueries
Single table repartition subqueries now support count(distinct column)
and count(distinct (case when ...)) expressions. Repartition query
extracts column used in aggregate expression and adds them to target
list and group by list, master query stays the same (count (distinct ...))
but attribute numbers inside the aggregate expression is modified to
reflect changes in repartition query.
2016-06-17 15:37:28 -06:00
Andres Freund b5bba293aa Merge pull request #609 from citusdata/fix/outer-join-filter_5.1
Do not copy outer join clauses into WHERE (5.1 backport)
2016-06-16 17:33:01 -07:00
Andres Freund 71c592e219 Add tests for LEFT JOIN ON clauses preventing matches left/right. 2016-06-16 17:10:34 -07:00
Marco Slot 2be987d71a Do not copy outer join clauses into WHERE 2016-06-16 17:10:33 -07:00
Jason Petersen 322f912102
Omit open- tracking branches from build 2016-06-03 18:17:54 -06:00
Matthew Seaman af1f8d4f24
Add inet includes for htonl and htons funtions
Needed to fix FreeBSD builds.
2016-06-03 18:17:54 -06:00
Christoph Berg 9e7d31c800
Sort list of objects in src/backend/distributed/Makefile
Make's $(wildcard) does not sort the glob result, but returns filenames
in filesystem ordering. This makes the build result vary and hence
unreproducible on the binary level. Fix by adding $(sort).

Spotted by Debian's reproducible builds project.
2016-06-03 18:17:53 -06:00
Jason Petersen de78371355
Add Travis step to sync master to open-master 2016-06-03 17:29:29 -06:00
Jason Petersen 242ac821f1
Add CHANGELOG entries for 5.1 release
Probably a superset of what we actually want, but should be complete.
2016-05-17 10:04:36 -06:00
Jason Petersen 7bdfbf1f67
Add multi_copy test outputs to gitignore 2016-05-10 13:38:05 -06:00
Jason Petersen 587fa5e497
Add gitignore rules for latest install files
Got tired of dirty git tree.
2016-05-10 12:04:43 -06:00
Jason Petersen 05b723b859
Add latest CHANGELOG entries 2016-05-10 12:04:43 -06:00
Marco Slot 7b70b5a9a9
Add JSON/XML validation to EXPLAIN regression tests and fix issues 2016-05-10 11:44:52 -06:00
Lukas Fittl a911774388
Distributed EXPLAIN: Generate valid JSON output.
This modifies the EXPLAIN output functions to actually generate
valid JSON output when (FORMAT JSON) is being used.

Fixes #494.
2016-05-10 11:44:52 -06:00
Onder Kalaci a316712532
Fix check-full failures
This commit fixes failures happen during check-full. The change does make
clean seperation of executor types in certain places to keep the outputs
stable.
2016-05-05 15:11:26 -06:00
Jason Petersen eab60e20de
Add CHANGELOG entry for 5.0.1 2016-05-04 22:07:43 -06:00
Andres Freund 2eb386dcf7 Merge pull request #493 from citusdata/stamp-5.1
Stamp 5.1

CR: Jason
2016-05-04 18:47:01 -07:00
Andres Freund 5f282dd241 Stamp 5.1 release. 2016-05-04 18:05:41 -07:00
Andres Freund 4d7bcfdd35 Generate extension versions from the previous one. 2016-05-04 18:05:41 -07:00
Önder Kalacı 5604669db5 Merge pull request #487 from citusdata/fix_compile_warning
Fix compile time warning
2016-05-04 09:52:05 +03:00
Onder Kalaci 38da3c826b Fix compile time warning
This change fixes a compile time warning related to definition/declaration order
of the code.
2016-05-04 09:42:10 +03:00
Marco Slot 5f35c48132 Merge pull request #485 from citusdata/fix-explain-cost-output
Remove costs from explain regression tests
2016-05-03 22:23:54 +02:00
Marco Slot 845aebfe19 Remove costs from explain regression tests 2016-05-03 22:11:23 +02:00
Metin Döşlü 2db30af07f Merge pull request #468 from citusdata/feature/worker-copy-for-append-partitioning
Add COPY support on worker nodes for append partitioned relations

CR: @marcocitus
2016-05-03 16:08:27 +03:00
Metin Doslu 866271b765 Add COPY support on worker nodes for append partitioned relations
Now, we can copy to an append-partitioned distributed relation from
any worker node by providing master options such as;

COPY relation_name FROM file_path WITH (delimiter '|', master_host 'localhost', master_port 5432);

where master_port is optional and default is 5432.
2016-05-03 16:00:00 +03:00
Marco Slot ecd5b65897 Merge pull request #478 from citusdata/remove_copy_to_distributed_table
Add deprecation warning to copy_to_distributed_table
2016-05-03 14:16:28 +02:00
Marco Slot 0c140cf333 Add deprecation warning to copy_to_distributed_table 2016-05-03 14:08:42 +02:00
Brian Cloutier 58535eb337 Query Planning Performance Improvments (#474)
- Only look at pruned shards when determining AnchorTable
- Use cached shardIntervalCompareFunction during copartition check
2016-05-03 10:48:46 +03:00
Marco Slot becac83ac9 Merge pull request #481 from citusdata/fix-spurious-test-files
Remove spurious intermediate regression test files
2016-05-02 12:57:02 +02:00
Marco Slot 24a74fb0ae Remove spurious intermediate regression test files 2016-05-02 12:30:15 +02:00
Jason Petersen 599dbb99ae Merge pull request #476 from citusdata/fix_connection_status
Force bad connections in tests by closing sockets

cr: @anarazel
2016-04-29 16:05:14 -07:00
Jason Petersen 510783f84f
Force bad connections in tests by closing sockets
Based on Andres' suggestion, I removed SetConnectionStatus, moving its
functionality directly into set_connection_status_bad, which now simply
shuts down the socket underlying a particular connection.

This keeps the functionality as-is while removing our questionable use
of internal libpq headers.
2016-04-29 15:56:04 -07:00
Marco Slot 1859a285a0 Merge pull request #414 from citusdata/feature/explain
Add EXPLAIN for simple distributed queries
2016-04-30 00:35:47 +02:00
Marco Slot fc4f23065a Add EXPLAIN for simple distributed queries 2016-04-30 00:11:02 +02:00
Ahmet Eren Basak 25382c289b Merge pull request #479 from citusdata/fix_mixed_code_and_declaration_warning
FIX "mixed declarations and code" Warning in multi_physical_planner.c
2016-04-29 13:54:35 +03:00
eren 7e19ebe679 FIX "mixed declarations and code" Warning in multi_physical_planner.c
Fixes #477

This change fixes the compile time warning message in BuildMapMergeJob in
multi_physical_planner.c about mixed declarations and code. Basically, the
problematic declaration is moved up so that no expression is before it.
2016-04-29 11:18:04 +03:00
Brian Cloutier 0036eb3253 Allow references to columns in UPDATE statements (#472)
Allow references to columns in UPDATE statements

Queries like "UPDATE tbl SET column = column + 1" are now allowed, so long as you don't use any IMMUTABLE functions.
2016-04-28 05:45:16 -07:00
Ahmet Eren Basak 66eab4e629 Merge pull request #471 from citusdata/rename_copy_transaction_manager
Rename citus.copy_transaction_manager to citus.multi_shard_commit_protocol
2016-04-28 15:28:20 +03:00
eren ab240a7d4c Rename copy_transaction_manager
This change renames the distributed transaction manager parameter from
citus.copy_transaction_manager to citus.multi_shard_commit_protocol.

Distributed transaction manager has been used only by the COPY on hash
partitioned tables but it can be used by upcoming features so, we needed
to rename so that its name do not contain a reference to COPY.

The change also includes renames like transaction_manager_options to
commit_protocol_options and TRANSACTION_MANAGER_1PC to COMMIT_PROTOCOL_1PC.

With this change, declaration of MultiShardCommitProtocol (was
CopyTransactionManager) is moved from multi_copy.c to multi_transaction.c.
2016-04-28 15:12:50 +03:00
Andres Freund 0ce1e3ddaf Perform permission checks on operations re-implemented by citus.
Currently that's just COPY FROM.  There's other places where we could
check for permissions earlier (to fail less verbosely), but since
there's other pending changes in the whole DDL area, which is affected
by this, I'm just adding a note to those places.
2016-04-27 10:28:36 -07:00
Andres Freund 758a70a8ff Create new shards as owned the distributed table's owner.
That's important because ownership of relations implies special
privileges. Without this change, a distributed table can be accessible
by a table's owner, but a shard created by another user might not.
2016-04-27 10:28:33 -07:00
Andres Freund 3a264db2fe Add ReplicateGrantStmt().
This is the basis for coordinating GRANT/REVOKE across nodes.
2016-04-27 10:28:25 -07:00
Andres Freund 7c281fbe07 Add pg_get_table_grants() function and support extending GRANTs. 2016-04-27 10:28:25 -07:00
Andres Freund eae65404d0 Grant SELECT for pg_catalog.pg_dist* to PUBLIC.
Given pg_class et al. are readable by everyone there's little point in
restricting read only access to citus catalogs.
2016-04-27 10:28:25 -07:00
Andres Freund a5b3dcddb3 Run some commands as superuser to allow normal users to execute queries.
Some small parts of citus currently require superuser privileges; which
is obviously not desirable for production scenarios. Run these small
parts under superuser privileges (we use the extension owner) to avoid
that.

This does not yet coordinate grants between master and workers. Thus it
allows to create shards, load data, and run queries as a non-superuser,
but it is not easily possible to allow differentiated accesses to
several users.
2016-04-27 10:28:22 -07:00