Metin Doslu
71f8dd28b8
Pull memory allocation out of while loop
2016-03-22 16:02:08 -07:00
Metin Doslu
a2de41fe14
Make minor changes
2016-03-22 16:02:08 -07:00
Metin Doslu
e0559ceaad
Send rows to workers in binary format
2016-03-22 16:02:08 -07:00
Metin Doslu
6d4e41b8bb
Move copy related functions to multi_copy.c
2016-03-22 16:02:08 -07:00
Metin Doslu
d5e003768e
Refactor binary header and footer functions
2016-03-22 16:02:08 -07:00
Metin Doslu
9dccc4e6c1
Rename PartialCopyState to OutputCopyState
2016-03-22 16:02:08 -07:00
Metin Doslu
314ea3f96c
Refactor OutputRow()
...
- Pull heap_deform_tuple() out of OutputRow().
- Use same valueArray and isNullArray for multiple rows similar
to CopyTo() in copy.c.
2016-03-22 16:02:07 -07:00
Marco Slot
01b380d5f2
Check for interrupts after ending the COPY
2016-03-22 16:02:07 -07:00
Marco Slot
6404431f16
Use Row Exclusive Lock on distributed table
2016-03-22 16:02:07 -07:00
Marco Slot
77356592fb
Revert physical planner changes
2016-03-22 16:02:07 -07:00
Marco Slot
f7dfc7df1b
Fix undefined connectionList bug and code style improvements
2016-03-22 16:02:07 -07:00
Marco Slot
ae7a42d957
Fix finalized placement list and hash token increment bugs
2016-03-22 16:02:07 -07:00
Marco Slot
2fb3eae5e2
Address PR feedback from Metin
2016-03-22 16:02:07 -07:00
Marco Slot
9bb579b1b1
Run check_indent on COPY changes
2016-03-22 16:02:07 -07:00
Marco Slot
2a8121ca5f
Improve COPY shard-pruning test
2016-03-22 16:02:07 -07:00
Marco Slot
83c83fdf1a
Add regression tests and refactor transaction management functions
2016-03-22 16:02:07 -07:00
Marco Slot
834c87f73a
Support for COPY FROM, based on pg_shard PR by Postres Pro
2016-03-22 16:02:07 -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