Commit Graph

6777 Commits (55d500de8d43b1e2bb9086f3ea1f424cacf3fd1c)

Author SHA1 Message Date
Jason Petersen cb7a397b0c Merge pull request #441 from citusdata/add_hash_op_comment
Add clarifying comment in HashableClauseMutator

cr: @marcocitus
2016-04-19 12:29:45 -06:00
Jason Petersen 30fdb59a80
Add clarifying comment in HashableClauseMutator
While reading this code last week, it appeared as though there was no
place we ensured that the partition clause actually used equality ops.
As such, I was worried that we might transform a clause such as id < 5
into a constraint like hash(id) = hash(5) when doing shard pruning. The
relevant code seemed to just ensure:

  1. The node is an OpExpr
  2. With a related hash function
  3. It compares the partition column
  4. Against a constant

A superficial reading implied we didn't actually make sure the original
op was equality-related, but it turns out the hash lookup function DOES
ensure that for us. So I added a comment.
2016-04-19 12:21:11 -06:00
Murat Tuncer 0b35c47932 Merge pull request #410 from citusdata/350-error-during-duplicate-index-creation
Error out earlier when creating an index with a name collision.
2016-04-19 07:26:31 +03:00
Brian Cloutier 1df4b8ba32 Better error on "CREATE INDEX already_exists ..."
Previously (if you're creating the index with the same name on different
tables) we successfully ran the command on the workers before failing it
on the master and leaving no record of the index.

Now we check whether the index exists on the master before sending
commands to the workers.

--

Also make the error better when user attampts to create an index without
a name. Previously those statements returned:

brian=# create index on c (b);
WARNING:  could not receive query results from localhost:9700
DETAIL:  Client error: cannot extend name for null index name
ERROR:  could not execute DDL command on worker node shards

They now return

brian=# create index on c (b);
ERROR:  creating index without a name on a distributed table is
currently unsupported
2016-04-18 13:33:53 -07:00
Jason Petersen 86bc73ef8a Merge pull request #423 from citusdata/422-incorrect-node-port-type
Treat nodePort as the 64bit integer it is.

cr: @anarazel
2016-04-15 12:42:11 -06:00
Jason Petersen c0b6505720 Merge branch 'master' into 422-incorrect-node-port-type 2016-04-15 12:30:50 -06:00
Jason Petersen 1a370cd1ba Merge pull request #451 from citusdata/fix_int64const_use
Fix use of INT64CONST macro

cr: @anarazel
2016-04-15 12:30:24 -06:00
Brian Cloutier 35bbc1dbfd Treat nodePort as the 64bit integer it is 2016-04-15 11:29:36 -07:00
Jason Petersen fb4f84207c
Fix use of INT64CONST macro
This macro is intended to receive a bare integer literal (no suffix).
It adds a suffix as necessary, depending upon available features. On
e.g. 32-bit platforms, the existing code failed to compile because a
suffix was added to the existing suffix. This fixes that problem.
2016-04-15 12:13:56 -06:00
Andres Freund 6860327cf9 Merge pull request #449 from citusdata/freebsd-fixes
Freebsd fixes #2 

Fixes #407 #411
2016-04-15 09:56:11 -07:00
Matthew Seaman b1a3801e58 Regularize include paths for some postgresql headers.
Addresses #411
2016-04-15 09:37:22 -07:00
Matthew Seaman 897a1126e7 Include appropriate headers for htons() and htonl(). 2016-04-15 09:37:08 -07:00
Matthew Seaman 55e81ce23d Add sys/stat.h include to files using S_IRUSR and S_IWUSR macros. 2016-04-15 09:34:22 -07:00
Ahmet Eren Basak 1f445e1e0b Merge pull request #436 from citusdata/clarify_shared_preload_libraries_message
Clarify Error Message Related to shared_preload_libraries
2016-04-13 14:14:53 +03:00
eren 3c8f275aa9 Clarify Error Message Related to shared_preload_libraries
Fixes #363

This change modifies the error message given when Citus is attempted
to be loaded other than shared_preload_libraries. Explanations have been
extended with that shared_preload_parameters parameter is in
postgresql.conf and citus should be at the beginning.
2016-04-13 12:12:21 +03:00
Ahmet Eren Basak a3b1b8944d Merge pull request #432 from citusdata/bugfix/#374-select-without-target-crash
Fix SELECT problem with no target list
2016-04-13 11:43:20 +03:00
eren 64aefed46f Fix SELECT problem with no target list
Prior to this change, performing a SELECT query without a target
list caused backend to crash.

Sample Query: SELECT FROM github_events; (without any * before FROM)

PostgreSQL:
```
--
(39599 rows)
```
Citus:
```
server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.
!>
```

The problem was an unnecessary Assert on column list in
SetRangeTblExtraData(citus_nodefuncs.c)
2016-04-13 11:08:14 +03:00
Marco Slot 174aa64f14 Merge pull request #416 from citusdata/feature/copy-for-hash-partitioning
Add COPY support for hash- and range-partitioned tables
2016-04-12 20:44:06 +02:00
Metin Doslu 1150ce6414 Send COPY rows in binary format 2016-04-12 20:22:31 +02:00
Marco Slot d25ee8fbd8 Support for COPY FROM, based on pg_shard PR by Postres Pro 2016-04-12 20:22:31 +02:00
Joe Nelson 59216d32d4 Merge pull request #433 from citusdata/readable-contact
List contact options more clearly
2016-04-07 15:32:00 -07:00
Joe Nelson 951cedcd04 Adjusted badges 2016-04-07 14:04:19 -07:00
Joe Nelson e1e819e71c Add another link to the mailing list earlier in the page 2016-04-06 15:32:07 -07:00
Joe Nelson 9d245c3ad8 List contact options more clearly 2016-04-05 12:01:58 -07:00
Joe Nelson 73c41210c5 Merge pull request #421 from citusdata/ocd-identation
Proper indentation for code blocks in lists
2016-03-30 15:52:34 -07:00
Joe Nelson cd60c89421 Proper indentation for code blocks in lists 2016-03-30 15:40:53 -07:00
Joe Nelson f4316263a9 Merge pull request #420 from citusdata/readme-mailinglist
Add link to our mailing list
2016-03-30 14:20:21 -07:00
Joe Nelson 02b675b93c Add link to our mailing list 2016-03-30 14:13:59 -07:00
Joe Nelson 82ef6266dd Merge pull request #404 from citusdata/linux-build-howto
Linux build howto
2016-03-30 13:41:34 -07:00
Joe Nelson 80178b42bd Linux build instructions 2016-03-30 13:10:41 -07:00
Önder Kalacı 52eacd29bb Merge pull request #388 from citusdata/bugfix/unsupport_clause
Allow all types of nodes in the WHERE clauses
2016-03-30 16:48:01 +03:00
Onder Kalaci d917d9a615 Allow all types of nodes in the WHERE clauses
This change removes the whitelisting check on the WHERE clauses. Note that, before
this change, citus was already allowing all types of nodes with the following
format (i.e., wrap with a boolean test):

  * SELECT col FROM table WHERE (ANY EXPRESSION) is TRUE;

Thus, this change is mostly useful for allowing the expressions in the WHERE clause
directly and avoiding "unsupport clause type" errors.
2016-03-30 16:39:58 +03:00
Murat Tuncer 14c835b37d Merge pull request #402 from citusdata/bugfix/#313-UDF-on-repartitioned-subqueries
Make UDFs Work with Repartitioned Subqueries
2016-03-30 15:45:20 +03:00
eren 8a284aab92 Fixes issue #313
Prior to this change, it was not possible to use UDFs in repartitioned
subqueries. The reason is that we were setting the search path explicitly
and omiting public schema from that path.

This change adds the public schema to the explicitly set search path.
2016-03-30 15:39:12 +03:00
Ahmet Eren Basak ac05e561ed Merge pull request #392 from citusdata/bugfix/#258-spurious-notice-message-with-any
Fix spurious NOTICE messages with ANY/ALL
2016-03-25 14:42:13 +02:00
eren ef6d5c7571 Fix spurious NOTICE messages with ANY/ALL
Fixes issue #258

Prior to this change, Citus gives a deceptive NOTICE message when a query
including ANY or ALL on a non-partition column is issued on a hash
partitioned table.

Let the github_events table be hash-distributed on repo_id column. Then,
issuing this query:
    SELECT count(*) FROM github_events WHERE event_id = ANY ('{1,2,3}')

Gives this message:
    NOTICE: cannot use shard pruning with ANY (array expression)
    HINT: Consider rewriting the expression with OR clauses.

Note that since event_id is not the partition column, shard pruning would
not be applied in any case. However, the NOTICE message would be valid
and be given if the ANY clause would have been applied on repo_id column.

Reviewer: Murat Tuncer
2016-03-25 14:30:02 +02:00
Metin Döşlü 3bfb5c430b Update Travis links 2016-03-24 23:24:09 -07:00
Murat Tuncer a9652daef7 Merge pull request #385 from citusdata/feature/unique_index
Allow users to create unique indexes
2016-03-24 09:43:04 +02:00
Murat Tuncer e74decf8b4 Allow users to create unique indexes
Users can now create unique indexes on partition columns
for hash and range distributed tables.
2016-03-24 09:31:06 +02:00
Joe Nelson 833048451c Remove redundant information 2016-03-23 17:33:12 -07:00
Jason Petersen 697d3ea09b
Merge latest 5.0 release fixes 2016-03-23 17:43:34 -06:00
Joe Nelson 11a5aef001 Merge pull request #400 from citusdata/contributing-cla
Add CLA link to contributing.md
2016-03-23 16:36:42 -07:00
Jason Petersen 1eebb9a6c3
Fix strlcpy off-by-one error
WORKER_LENGTH + 1 is too large. Fixing this has no impact on the string
that is ultimately copied, as it's impossible for the source string to
be any larger to begin with.
2016-03-23 17:34:34 -06:00
Joe Nelson 956395b3a9 Add CLA link to contributing.md 2016-03-23 16:29:33 -07:00
Jason Petersen f9e2e50e4f
Add CHANGELOG 2016-03-23 17:28:16 -06:00
Jason Petersen 374d3237c2 Merge pull request #386 from citusdata/add_license
Add or update license/copyright information

cr: @sumedhpathak @begriffs
2016-03-23 17:23:04 -06:00
Jason Petersen f87df6ccf8
Remove libpng caveat
I'm not sure this description was 100% accurate; users can open issues
if they continue to have linkage problems.
2016-03-23 17:20:35 -06:00
Jason Petersen 59a28e24c9
Add LICENSE information to README
Integrating this into the new file.
2016-03-23 17:17:43 -06:00
Jason Petersen 423e6c8ea0
Update copyright dates
Fixed configure variable and updated all end dates to 2016.
2016-03-23 17:14:37 -06:00
Jason Petersen 9521fcfb22
Add AGPL-3.0 in LICENSE file
Adding our license.
2016-03-23 17:04:58 -06:00