Commit Graph

107 Commits (754e16b7371ffe72e9519a1f5bb290e69c6a4f2c)

Author SHA1 Message Date
Joe Nelson 2c7475ad50 Fully qualify citus url 2016-03-18 14:35:23 -07:00
Joe Nelson 90ab05c598 Use real Travis badge 2016-03-18 13:55:21 -07:00
Joe Nelson e8bdc2c846 Readme for 5.0 2016-03-18 13:32:13 -07:00
Andres Freund 8dc4bf39e7 Merge pull request #360 from citusdata/ddl-rep-regressiontest-improvements
Improve DDL replication related regression tests.

Reviewed-By: Samay Sharma
2016-03-17 16:16:04 -07:00
Andres Freund 304c3c8b2a Improve DDL replication related regression tests.
The previous form of the test, utilizing DEBUG2, included too much
output dependent on the specifc system and version. Reformulate it to
explicitly connect to workers and show the schema there, when necessary.

The only remaining difference in some of the remaining alternate
regression test files was due to an older minor version release
change. Remove those as well.
2016-03-17 16:05:54 -07:00
Andres Freund 8adffbaf47 Make :master_port and :worker_$n_port available to all regression tests.
There already exist tests that locally embed knowledge about port
numbers, and there's more tests requiring that. Instead of copying
\set's to several tests, make these port number variables available to
all tests.
2016-03-17 16:05:54 -07:00
Andres Freund a81771c58d Merge pull request #383 from citusdata/feature/pg_stat_statements
Copy toplevel queryId to citus' master statement.
2016-03-17 15:35:23 -07:00
Andres Freund eed14b1224 Copy toplevel queryId to citus' master statement.
multi_ExecutorStart() replaces the original planned statement with the
master select statement. As that hasn't gone through the parse analysis
hooks, it'll not have a associated queryId.  This prevents extensions
pg_stat_statements to show useful data associated with the query.
2016-03-14 17:27:52 -07:00
Jason Petersen 46d721459d Merge pull request #382 from citusdata/build_fixes
Fix various build issues

cr: @anarazel
2016-03-11 14:59:57 -07:00
Jason Petersen 6ed20fb242 Merge pull request #378 from citusdata/build_fixes
Fix various build issues

cr: @anarazel
2016-03-11 14:28:54 -07:00
Jason Petersen b73c3b1604 Fix various build issues
I came across several places we weren't as flexible or resilient as we
should have been in our build logic. They include:

  * Not using `DESTDIR` in the install-header destination
  * Allowing callers to specify `VPATH` or `srcdir` (which breaks)
  * Using absolute path for SCRIPTS (9.5 prepends srcdir)
  * Including libpq-int in a confusing way (extracted this function)
  * Having server includes come first during csql build (client must)

In particular, I hit all of these attempting to build with pg_buildext
in Debian. It passes in an explicit VPATH, as well as srcdir (breaking
all recursive make invocations), and also uses DESTDIR during install.

In addition, a PGDG-enabled Debian box will have the latest libpq-dev
headers (e.g. 9.5) even when building against an older server version
(e.g. 9.4). This leads to problems when including e.g. `c.h`, which
is ambiguous. While compiling more client-side code (csql), we need to
ensure the newer libpq headers are included _first_, so I fixed that.
2016-03-11 13:38:47 -07:00
Jason Petersen 0f62a5197b Final formatting fixes 2016-02-17 17:20:14 -07:00
Jason Petersen 22cea69fa8 Merge pull request #340 from citusdata/bugfix/buildsystem
Small buildsystem fixes

cr: @jasonmp85
2016-02-17 17:14:46 -07:00
Andres Freund 37d5b1c150 Fix Makefile.global/configure regeneration
These dependencies previously didn't result in regeneration when using
a source directory build.
2016-02-17 16:54:39 -07:00
Andres Freund 0c57a1a04e Make 'all' default src/backend/distributed target
Otherwise typing 'make' will just build citusdb--5.0.sql, not
particularly helpful.
2016-02-17 16:51:55 -07:00
Andres Freund 2393a44927 Add deps from toplevel install to build targets
Otherwise a parallel 'make install' can end up trying to build the same
targets twice, once via the normal build rules ('all') and once via
install.
2016-02-17 16:51:01 -07:00
Andres Freund 62b9bca96b Don't use autoconf's default CFLAGS.
We just want PosgreSQL's defaults, not autoconf's (-g -O2). Currently,
these are wrong when PostgreSQL has been compiled with e.g. -O0.
2016-02-17 16:50:14 -07:00
Andres Freund caed118e7f Fix make install for VPATH builds.
copy_to_distributed_table is in the source, not the build directory. As
there might be scripts in either at some point, install scripts from
both.
2016-02-17 16:48:06 -07:00
Marco Slot d8f794ba71 Merge pull request #326 from citusdata/feature/drop_shards_on_drop_table
Drop shards when a distributed table is dropped
2016-02-17 23:47:49 +01:00
Marco Slot 4a3b6a8ab7 Rename citusdb to citus in regression test output 2016-02-17 23:33:30 +01:00
Marco Slot 58351fb128 Merge remote-tracking branch 'origin/master' into feature/drop_shards_on_drop_table 2016-02-17 22:52:58 +01:00
Marco Slot 9aa1f1e1e7 Rename topLevel variable to isTopLevel 2016-02-17 22:52:35 +01:00
Jason Petersen cac5e71abe Merge pull request #339 from citusdata/use_default_staging#323
Change tests to use default staging policy

cr: @metdos
2016-02-17 11:14:21 -07:00
Jason Petersen 0516555f97 Change tests to use default staging policy
The default staging policy is now round-robin, though tests were still
configured to use local-first. Testing with the shipping default seems
like the best option, correctness-wise, and since local-first has some
issues with OSes where connecting from localhost doesn't always resolve
to 'localhost', just going with the default is a win-win.
2016-02-17 11:03:17 -07:00
Murat Tuncer becbe3e579 Merge pull request #349 from citusdata/feature/citusdb-to-citus
Change product name to Citus (cont)
2016-02-17 17:53:02 +02:00
Murat Tuncer b535910f3e Fixed merge leftovers 2016-02-17 15:44:24 +02:00
Murat Tuncer 2ff52d3384 Merge pull request #337 from citusdata/feature/citusdb-to-citus
Change product name to citus
2016-02-17 15:24:22 +02:00
Murat Tuncer 00b10e5a93 Merge from master branch into feature/citusdb-to-citus 2016-02-17 14:49:01 +02:00
Metin Döşlü d8c1f34da2 Merge pull request #335 from citusdata/check_count_distinct_on_single_subquery
Check count distinct on single subquery
2016-02-17 14:37:11 +02:00
Metin Doslu 87ff558c1c Add check for count distinct on single table subqueries
Fixes #314
2016-02-17 14:24:07 +02:00
Murat Tuncer db8330ee81 Merge pull request #334 from citusdata/feature/append_table_to_shard
Add support for appending to cstore table shards
2016-02-17 09:19:33 +02:00
Jason Petersen 27edf02484 Merge pull request #344 from citusdata/fix_shard_lock_acquisition#342
Ensure router executor acquires proper shard lock

cr: @onderkalaci
2016-02-16 16:43:39 -07:00
Jason Petersen 5a1309f40b Merge pull request #327 from citusdata/apply_formatting_tool
Apply Citus Data coding conventions

cr: @sumedhpathak @anarazel
2016-02-16 12:24:42 -07:00
Jason Petersen ce37149dcc Add make targets for applying and checking style
Need to change to the project's top srcdir, as citus_indent expects to
be able to find styled files using git ls-files, and VPATH builds would
otherwise not return any results.
2016-02-16 12:04:06 -07:00
Jason Petersen 130e65f5be Ensure router executor acquires proper shard lock
Though Citus' Task struct has a shardId field, it doesn't have the same
semantics as the one previously used in pg_shard code. The analogous
field in the Citus Task is anchorShardId. I've also added an argument
check to the relevant locking function to catch future locking attempts
which pass an invalid argument.
2016-02-16 11:20:18 -07:00
Marco Slot 37f580f9c7 Trim comment about invalidating dropped relations 2016-02-16 14:04:12 +01:00
Marco Slot 2af6797c04 Perform relcache invalidation in CitusInvalidateRelcacheByRelid 2016-02-16 12:59:38 +01:00
Murat Tuncer 44d7721b4c Add support for appending to cstore table shards
- Flexed the check which prevented append operation cstore tables
  since its storage type is not SHARD_STORAGE_TABLE.
- Used process utility function to perform copy operation in
  worker_append_table_to shard() instead of directly calling
  postgresql DoCopy().
- Removed the additional check in master_create_empty_shard() function.
  This check was redundant and erroneous since it was called after
  CheckDistributedTable() call.
- Modified WorkerTableSize() function to retrieve cstore table shard
  size correctly.
2016-02-16 13:58:39 +02:00
Marco Slot 52f11223e5 Drop shards when a distributed table is dropped
After this change, shards and associated metadata are automatically
dropped when running DROP TABLE on a distributed table, which fixes #230.
It also adds schema support for master_apply_delete_command, which
fixes #73.

Dropping the shards happens in the master_drop_all_shards UDF, which is
called from the SQL_DROP trigger. Inside the trigger, the table is no
longer visible and calling master_apply_delete_command directly wouldn't
work and oid <-> name mappings are not available. The
master_drop_all_shards function therefore takes the relation id, schema
name, and table name as parameters, which can be obtained from
pg_event_trigger_dropped_objects() in the SQL_DROP trigger. If the user
calls master_drop_all_shards while the table still exists, the schema
name and table name are ignored.

Author: Marco Slot
Reviewed-By: Andres Freund
2016-02-16 10:54:29 +01:00
Jason Petersen f249d9f3a4 Switch to using git attributes to ignore files
Ties into the script introduced [here][1].

[1]: https://github.com/citusdata/tools/pull/2
2016-02-15 23:41:51 -07:00
Jason Petersen 3722d66c41 Format csql's stage files
These are entirely Citus-produced, so need full formatting.
2016-02-15 23:37:37 -07:00
Jason Petersen 63f1497ecd Omit most of copy_options from formatting
Only a small portion is Citus style.
2016-02-15 23:37:37 -07:00
Jason Petersen b48182574e Make copy_options.ch similar to PostgreSQL copy.c
We reorganized these functions in our copy; not sure why (makes diffing
harder). I'm moving it back.
2016-02-15 23:37:37 -07:00
Jason Petersen 20ba6c659e Omit backend/copy.c-inspired parts from formatting
I think we need to assess whether this function is still as in-sync
with upstream as we believe, but for now I'm omitting it from formatting.
2016-02-15 23:29:33 -07:00
Jason Petersen 628ed846a2 Omit get_extension_schema from formatting
It exactly matches the implementation in extension.c.
2016-02-15 23:29:33 -07:00
Jason Petersen 1ea3f46194 Omit RangeVarCallbackForDropIndex from formatting
I removed two braces to have this function remain more similar to the
original PostgreSQL function and added uncrustify commands to disable
formatting of its contents.
2016-02-15 23:29:33 -07:00
Jason Petersen 166f96bb83 First formatting attempt
Skipped csql, ruleutils, readfuncs, and functions obviously copied from
PostgreSQL. Seeing how this looks, then continuing.
2016-02-15 23:29:32 -07:00
Murat Tuncer c1d377b7d2 Changed product name to citus
All citusdb references in
- extension, binary names
- file headers
- all configuration name prefixes
- error/warning messages
- some functions names
- regression tests

are changed to be citus.
2016-02-15 16:04:31 +02:00
Jason Petersen 3da8105af9 Merge pull request #329 from citusdata/feature-fix_naming_conflicts#236
Rename GetConnection to address name conflict

cr: @onderkalaci
2016-02-12 16:58:33 -07:00
Jason Petersen f2bf7fc802 Rename GetConnection to address name conflict
The postgres_fdw extension has an extern function with an identical
signature, which can cause problems when both extensions are loaded.
A simple rename can fix this for now (this is the only function with)
such a conflict.
2016-02-12 13:35:02 -07:00