Commit Graph

1970 Commits (a05817e2ecec5dc220eb450943b7a10006523f25)

Author SHA1 Message Date
Mehmet Furkan ŞAHİN a05817e2ec
Merge pull request #2272 from citusdata/failure-truncate
Truncate failure tests are added
2018-07-13 14:29:38 +03:00
mehmet furkan şahin f854420079 truncate failure tests are added 2018-07-13 13:20:50 +03:00
Murat Tuncer b51d252fcc
Merge pull request #2210 from citusdata/mt_failure_test
Added failure test for create index concurrently
2018-07-13 13:18:10 +03:00
Murat Tuncer 2795494758 Added failure test for create index concurrently 2018-07-13 11:53:49 +03:00
Önder Kalacı 54332957fa
Merge pull request #2212 from citusdata/ddl_failure_testing
DDL failure testing
2018-07-13 10:55:49 +03:00
Onder Kalaci a446e71ee7 Add failure testing for DDL commands
This commit adds an extensive failure testing, which covers quite
a bit of things and their combinations:
   - 1PC vs 2PC
   - Replication factor 1 and Replication factor 2
   - Network failures and query cancellations
   - Sequential vs Parallel query execution mode
2018-07-12 13:05:29 +03:00
Jason Petersen 07ac909410
Merge pull request #2268 from citusdata/add_poolinfo
Add pg_dist_poolinfo table

cr: @marcocitus
2018-07-10 10:09:41 -07:00
Jason Petersen 318119910b
Add pg_dist_poolinfo table
For storing nodes' pool host/port overrides.
2018-07-10 09:30:22 -07:00
Mehmet Furkan ŞAHİN 1c24380877
Merge pull request #2193 from citusdata/topn_agg_support
Topn aggregate support
2018-07-10 15:36:33 +03:00
mehmet furkan şahin 93e2d26226 .travis.yml change to install TopN on travis 2018-07-10 14:33:42 +03:00
mehmet furkan şahin 3afa7f425d Topn aggregates are supported 2018-07-10 14:33:42 +03:00
Marco Slot 54f5fb3b26
Merge pull request #2264 from citusdata/marcocitus-patch-1
Create pull_request_template.md with DESCRIPTION line
2018-07-10 13:16:49 +02:00
Marco Slot a70b06f194 Add DESCRIPTION to PR template 2018-07-10 13:35:13 +02:00
Murat Tuncer 05e182128d
Merge pull request #2266 from citusdata/landlord_base
Make citus_stat_statements_reset() super user function
2018-07-10 13:23:34 +03:00
Murat Tuncer a7277526fd Make citus_stat_statements_reset() super user function 2018-07-10 11:21:20 +03:00
Marco Slot 74a5b1e14a
Merge pull request #2257 from citusdata/select_opens_transaction_block
Add a GUC to disable opening transaction blocks on workers for SELECT-only xacts
2018-07-09 22:34:49 +02:00
Marco Slot 89870e76ce Add a select_opens_transaction_block GUC 2018-07-08 03:50:39 +02:00
Brian Cloutier a54f9a6d2c network proxy-based failure testing
- Lots of detail is in src/test/regress/mitmscripts/README
- Create a new target, make check-failure, which runs tests
- Tells travis how to install everything and run the tests
2018-07-06 12:38:53 -07:00
Burak Velioglu c6cf40e9c7
Merge pull request #2261 from citusdata/changelog_6-2-6
Add changelog entry for 6.2.6
2018-07-06 15:37:22 +03:00
velioglu a7200d557d Add changelog entry for 6.2.6 2018-07-06 15:24:01 +03:00
velioglu 76477fd44e Revert "Add changelog entry for 6.2.5"
This reverts commit 50807bca98.
2018-07-06 15:23:03 +03:00
Burak Velioglu 30fa6e57a4
Merge pull request #2260 from citusdata/changelog_6-2-5
Add changelog entry for 6.2.5
2018-07-06 15:14:43 +03:00
velioglu 50807bca98 Add changelog entry for 6.2.5 2018-07-06 14:58:38 +03:00
Murat Tuncer cdbe752e2d
Merge pull request #2255 from citusdata/relax_count_distinct
Expand count distinct support
2018-07-06 11:44:38 +03:00
Murat Tuncer f20258ef10 Expand count distinct support
We can now support more complex count distinct operations by
pulling necessary columns to coordinator and evalutating the
aggreage at coordinator.

It supports broad range of expression with the restriction that
the expression must contain a column.
2018-07-06 09:44:20 +03:00
Önder Kalacı 80132b5481
Merge pull request #2253 from citusdata/improve_foreign_keys_code
Some stylistic improvements in the foreign keys to reference table changes
2018-07-06 00:51:15 +03:00
Onder Kalaci 7fb529aab9 Some stylistic improvements in the foreign keys to reference table
changes.
2018-07-05 23:23:34 +03:00
Marco Slot 6656592b8e
Merge pull request #2243 from citusdata/better-guc-description
Remove sslmode structs and add more helpful description
2018-07-05 14:33:05 +02:00
Brian Cloutier 735218ee5d Remove sslmode structs and add more helpful description 2018-07-05 14:12:36 +02:00
Nils Dijk 1bff1c2d3d
Merge pull request #2254 from citusdata/feature/policy-stub
create placeholder for policy ddl
2018-07-05 12:45:35 +02:00
Nils Dijk c1c8c38dc9 create placeholder for policy ddl 2018-07-05 11:07:01 +02:00
Mehmet Furkan ŞAHİN 19e92ee369
Merge pull request #2186 from citusdata/hll_agg_support
Hll aggregate support
2018-07-05 10:42:00 +03:00
mehmet furkan şahin df11dda750 hll aggregates are tested 2018-07-05 08:19:01 +03:00
mehmet furkan şahin 06217be326 hll aggregate functions are supported natively 2018-07-04 16:41:09 +03:00
Marco Slot 0c33d7ea9a
Merge pull request #2251 from citusdata/landlord_base
Move partition key logging related code from enterprise
2018-07-04 12:34:28 +02:00
Murat Tuncer 901066a421 Move partition key logging related code from enterprise 2018-07-04 13:11:34 +03:00
Mehmet Furkan ŞAHİN b480bf8d0e
Merge pull request #2240 from citusdata/foreign_master
Foreign Key support from distributed to reference tables
2018-07-03 17:55:59 +03:00
mehmet furkan şahin f7b901e3fd CopyShardForeignConstraintCommandList API change for grouped constraints 2018-07-03 17:05:55 +03:00
mehmet furkan şahin 35eac2318d lock referenced reference table metadata is added
For certain operations in enterprise, we need to lock the
referenced reference table shard distribution metadata
2018-07-03 17:05:55 +03:00
Onder Kalaci d83be3a33f Enforce foreign key restrictions inside transaction blocks
When a hash distributed table have a foreign key to a reference
table, there are few restrictions we have to apply in order to
prevent distributed deadlocks or reading wrong results.

The necessity to apply the restrictions arise from cascading
nature of foreign keys. When a foreign key on a reference table
cascades to a distributed table, a single operation over a single
connection can acquire locks on multiple shards of the distributed
table. Thus, any parallel operation on that distributed table, in the
same transaction should not open parallel connections to the shards.
Otherwise, we'd either end-up with a self-distributed deadlock or
read wrong results.

As briefly described above, the restrictions that we apply is done
by tracking the distributed/reference relation accesses inside
transaction blocks, and act accordingly when necessary.

The two main rules are as follows:
   - Whenever a parallel distributed relation access conflicts
     with a consecutive reference relation access, Citus errors
     out
   - Whenever a reference relation access is followed by a
     conflicting parallel relation access, the execution mode
     is switched to sequential mode.

There are also some other notes to mention:
   - If the user does SET LOCAL citus.multi_shard_modify_mode
     TO 'sequential';, all the queries should simply work with
     using one connection per worker and sequentially executing
     the commands. That's obviously a slower approach than Citus'
     usual parallel execution. However, we've at least have a way
     to run all commands successfully.

   - If an unrelated parallel query executed on any distributed
     table, we cannot switch to sequential mode. Because, the essense
     of sequential mode is using one connection per worker. However,
     in the presence of a parallel connection, the connection manager
     picks those connections to execute the commands. That contradicts
     with our purpose, thus we error out.

   - COPY to a distributed table cannot be executed in sequential mode.
     Thus, if we switch to sequential mode and COPY is executed, the
     operation fails and there is currently no way of implementing that.
     Note that, when the local table is not empty and create_distributed_table
     is used, citus uses COPY internally. Thus, in those cases,
     create_distributed_table() will also fail.

   - There is a GUC called citus.enforce_foreign_key_restrictions
     to disable all the checks. We added that GUC since the restrictions
     we apply is sometimes a bit more restrictive than its necessary.
     The user might want to relax those. Similarly, if you don't have
     CASCADEing reference tables, you might consider disabling all the
     checks.
2018-07-03 17:05:55 +03:00
velioglu 6be6911ed9 Create foreign key relation graph and functions to query on it 2018-07-03 17:05:55 +03:00
mehmet furkan şahin 89a8d6ab95 FK from dist to ref is tested for partitioning, MX 2018-07-03 17:05:55 +03:00
mehmet furkan şahin 4db72c99f6 Specific DDLs are sequentialized when there is FK
-[x] drop constraint
-[x] drop column
-[x] alter column type
-[x] truncate

are sequentialized if there is a foreign constraint from
a distributed table to a reference table on the affected relations
by the above commands.
2018-07-03 17:05:55 +03:00
mehmet furkan şahin e37f76c276 tests are added 2018-07-03 17:05:01 +03:00
mehmet furkan şahin 2c5d59f3a8 create_distributed_table in transaction is fixed 2018-07-03 17:05:01 +03:00
mehmet furkan şahin 45f8017f42 create_distributed_table with fk to ref table is implemented 2018-07-03 17:05:01 +03:00
mehmet furkan şahin 2fa4e38841 FK from dist to ref can be added with alter table 2018-07-03 17:05:01 +03:00
Murat Tuncer 58486fd1b9
Merge pull request #2247 from citusdata/enable_preloading_libraries
Add pg_stat_statements to shared_preload_libraries if installed
2018-07-03 16:59:34 +03:00
Murat Tuncer 3fc98e8225 Add pg_stat_statements to shared_preload_libraries if installed 2018-07-03 16:33:15 +03:00
Murat Tuncer 54aa865c3c
Merge pull request #2249 from citusdata/landlord_base
Update citus_stat_statements view and regression tests
2018-07-03 16:32:47 +03:00