Commit Graph

158 Commits (eae65404d0cea6274c09d5e7bcd0826811f9685c)

Author SHA1 Message Date
Ozgun Erdogan c1390acb4c Merge pull request #393 from citusdata/readme-5.0
Readme for 5.0
2016-03-21 09:34:26 -07:00
Joe Nelson 3a844ef673 Fully qualify citus url 2016-03-18 14:35:23 -07:00
Joe Nelson 459fa497a3 Use real Travis badge 2016-03-18 13:55:21 -07:00
Joe Nelson bc48785b23 Readme for 5.0 2016-03-18 13:32:13 -07:00
Andres Freund 3e512db025 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 53309461cb 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 5311960200 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 07b0348c8c 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 b60f5da774 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 692563930f Merge pull request #382 from citusdata/build_fixes
Fix various build issues

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

cr: @anarazel
2016-03-11 14:28:54 -07:00
Jason Petersen a53fb90ef9
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 297bd5768d
Final formatting fixes 2016-02-17 17:20:14 -07:00
Jason Petersen bdf3cdd228 Merge pull request #340 from citusdata/bugfix/buildsystem
Small buildsystem fixes

cr: @jasonmp85
2016-02-17 17:14:46 -07:00
Andres Freund 6bd1ec3ce9
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 974a121d50
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 93caee2929
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 7efbb5b472
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 0a1c8723c4
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 9e944fbcfc 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 71af0e496e Rename citusdb to citus in regression test output 2016-02-17 23:33:30 +01:00
Marco Slot 75a141a7c6 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 1d0a6506fd 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 ec1e74e7f9
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 6d4fb39f91 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 df5851366c Fixed merge leftovers 2016-02-17 15:44:24 +02:00
Murat Tuncer 5fb1fabc21 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 3528d7ce85 Merge from master branch into feature/citusdb-to-citus 2016-02-17 14:49:01 +02:00
Metin Döşlü 39b333996b 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 6123022ca7 Add check for count distinct on single table subqueries
Fixes #314
2016-02-17 14:24:07 +02:00
Murat Tuncer 2160a2951b 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 8ad5b09251 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 2fcfa011ae 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 622eb29996
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 0d196d1bf4
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 444f305165 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 20c68fe251
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 920e0c406d
Format csql's stage files
These are entirely Citus-produced, so need full formatting.
2016-02-15 23:37:37 -07:00
Jason Petersen 19c529f311
Omit most of copy_options from formatting
Only a small portion is Citus style.
2016-02-15 23:37:37 -07:00
Jason Petersen 2b5ae847d4
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 bc23113732
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 74372f70e0
Omit get_extension_schema from formatting
It exactly matches the implementation in extension.c.
2016-02-15 23:29:33 -07:00
Jason Petersen f874a56e24
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 fdb37682b2
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 55c44b48dd 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 334f800016 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