Commit Graph

609 Commits (21449ed0a043d75aa22ea02ea3364f932f67c294)

Author SHA1 Message Date
Andres Freund 21449ed0a0 Convert multi_shard_transaction.[ch] to new framework. 2016-12-12 15:18:12 -08:00
Andres Freund 7ac4a2bc94 Coordinated remote transaction management. 2016-12-12 15:18:12 -08:00
Andres Freund ccb2a35b6b Add PQgetResult() wrapper handling interrupts.
This makes it possible to implement cancelling queries blocked on
communication with remote nodes.
2016-12-12 15:18:12 -08:00
Andres Freund c9e8b10b29 Merge pull request #1017 from citusdata/vanillatests
Add support for running postgres tests against a database with citus loaded
2016-12-12 14:34:20 -08:00
Andres Freund a26b9d3b8f Add support for running postgres tests against a database with citus loaded.
Not that this is not with the citus *extension* loaded, just the shared
library. The former runs (by adding --use-existing to the flags) but
has a bunch of trivial test differences.
2016-12-12 14:25:06 -08:00
Jason Petersen abccd8d5f1 Merge pull request #1035 from citusdata/tweak_coverage
Tweak coverage options

cr: @jasonmp85
2016-12-09 14:19:52 -07:00
Jason Petersen 3439548c86 Bump target to 87.5%
With the ignore rules in place, we can increase the target.
2016-12-09 14:06:35 -07:00
Jason Petersen bbbb7f1ef6 Format for readability 2016-12-09 13:33:58 -07:00
Jason Petersen f8cbf4f024 Add ignore rules 2016-12-09 13:03:23 -07:00
Jason Petersen db13abba11 Make patch target 75%
If a patch has very bad coverage, reject it.
2016-12-09 13:03:23 -07:00
Jason Petersen 086187bcde Be explicit about coverage project requirements
If a change drops coverage (absolutely) beneath 80% or (relatively)
reduces coverage by more than 0.5%, give it a bad status.
2016-12-09 13:03:23 -07:00
Jason Petersen 37b8c5f7b6 Add default Codecov configuration
Will change shortly.
2016-12-09 13:03:23 -07:00
Andres Freund 7269a7da98 Merge pull request #1022 from citusdata/feature/2PCBUMPISM
Make prepared transactions available if not configured.
2016-12-08 20:04:00 -08:00
Andres Freund 820f300de2 Make prepared transactions available if not configured. 2016-12-08 19:57:22 -08:00
Burak Yücesoy 5559b8201d Merge pull request #876 from citusdata/foreign_key_push_down_for_alter_table
Add Foreign Key Support to ALTER TABLE commands
2016-12-08 14:11:01 +02:00
Burak Yucesoy cdb725a561 Add Foreign Key Support to ALTER TABLE commands
With this PR, we add foreign key support to ALTER TABLE commands. For now,
we only support foreign constraint creation via ALTER TABLE query, if it
is only subcommand in ALTER TABLE subcommand list.

We also only allow foreign key creation if replication factor is 1.
2016-12-08 15:03:25 +02:00
Andres Freund b16540725a Merge pull request #863 from citusdata/feature/connection-lifecycle
Connection Lifecycle Management Infrastructure
2016-12-07 11:51:02 -08:00
Andres Freund 3754e74acb Move multi_client_executor.[ch] ontop of connection_management.[ch].
That way connections can be automatically closed after errors and such,
and the connection management infrastructure gets wider testing.  It
also fixes a few issues around connection string building.
2016-12-07 11:44:24 -08:00
Andres Freund c7f19f6c83 Use connection_management.c from within connection_cache.c.
This is a temporary step towards removing connection_cache.c.
2016-12-07 11:44:24 -08:00
Andres Freund 7bc7284b61 Add initial helpers to make interactions with MultiConnection et al. easier.
This includes basic infrastructure for logging of commands sent to
remote/worker nodes. Note that this has no effect as of yet, since no
callers are converted to the new infrastructure.
2016-12-07 11:44:24 -08:00
Andres Freund 8e32951eb9 Centralized Connection Lifetime Management.
Connections are tracked and released by integrating into postgres'
transaction handling. That allows to to use connections without having
to resort to having to disable interrupts or using PG_TRY/CATCH blocks
to avoid leaking connections.

This is intended to eventually replace multi_client_executor.c and
connection_cache.c, and to provide the basis of a centralized
transaction management.

The newly introduced transaction hook should, in the future, be the only
one in citus, to allow for proper ordering between operations.  For now
this central handler is responsible for releasing connections and
resetting XactModificationLevel after a transaction.
2016-12-07 11:43:18 -08:00
Andres Freund 9564e1e7fc Add some basic helpers to make use of dynahash hashtables easier. 2016-12-06 14:15:36 -08:00
Jason Petersen 3afb4c0583 Merge pull request #994 from citusdata/enable-coverage-testing
Add coverall support for continuous code coverage testing

cr: @jasonmp85
2016-12-06 11:42:48 -07:00
Jason Petersen d88949d952 Add comment for otherwise opaque secure value 2016-12-06 11:30:22 -07:00
Brian Cloutier d8df38983d Enable instrumentation of coverage
Adds an --enable-coverage configure option which provides the necessary
flags for coverage instrumentation. A new tools branch uses this flag
during all builds. Coverage reports are uploaded to codecov.io, where
they are publicly visible.
2016-12-06 11:30:22 -07:00
Marco Slot c6f432b79a Merge pull request #1006 from citusdata/bugfix/placement_id_readfunc
Use READ_UINT64_FIELD for placement ID in ReadShardPlacement
2016-12-05 23:08:27 +01:00
Marco Slot 6cff558896 Use READ_UINT64_FIELD for placement ID in ReadShardPlacement 2016-12-05 17:22:23 +01:00
Murat Tuncer 0fa7276a53 Merge pull request #995 from citusdata/fix-870-non-relational-filter
Add new tests for non-relational filters in queries
2016-12-05 13:35:46 +02:00
Murat Tuncer 6abc1eecbd Add new tests for non-relational filters in queries 2016-12-05 14:27:36 +03:00
Marco Slot 35c583784a Merge pull request #911 from citusdata/bugfix/take_metadata_lock
Take shard metadata lock in several UDFs
2016-12-02 16:34:44 +01:00
Marco Slot 5b5bceb5ed Take shard metadata lock in master_append_table_to_shard 2016-12-02 15:56:30 +01:00
Eren Başak 2f04f094f8 Merge pull request #996 from citusdata/sync_pg_dist_node
Propagate node add/remove to the nodes with hasmetadata=true
2016-12-02 13:50:52 +02:00
Eren Basak 517db3648a Propagate node add/remove to the nodes with hasmetadata=true
This change propagates the changes done by `master_add_node` and `master_remove_node`
to the workers that contain metadata.
2016-12-02 14:43:32 +03:00
Brian Cloutier 14b47b769c Remove dead code: ResponsiveWorkerNodeList 2016-12-02 13:14:11 +03:00
Andres Freund 36df62157e Use system psql if available, to fix travis build errors.
On some systems a new libpq is available than what we're compiling
against, but until now we used psql in the version we're compiling
against.  That' a problem, because (quoting Jason):

  With 9.6, libpq's default handling of CONTEXT changed: it is hidden
  unless the level is ERROR or higher. We addressed this ourselves using
  the SHOW_CONTEXT variable (by setting "always" in pg_regress_multi): in
  9.5, this is ignored (and unneeded), in 9.6, it ensures old behavior is
  preserved.

For 9.6 we'd already worked around the problem by specifying that
context should always be shown, but < 9.6 psql doesn't know how to do
that.

As there's no csql anymore, which strictly tied us to a specific version
of psql/csql, we can now just use the system's psql if available. We
still fall back to the psql of the installation we're compiling against,
if there's no other psql in PATH.
2016-12-01 15:58:23 -08:00
Önder Kalacı 6e5efd8b9f Merge pull request #988 from citusdata/fix_constant_select
Bugfix for deparsing INSERT..SELECT queries which involve constant va…
2016-12-01 10:48:01 +02:00
Onder Kalaci bbced1d704 Bugfix for deparsing INSERT..SELECT queries which involve constant values
This commit fixes a bug when the SELECT target list includes a constant
value.

Previous behaviour of target list re-ordering:
  * Iterate over the INSERT target list
    * If it includes a Var, find the corresponding SELECT entry
      and update its resno accordingly
    * If it does not include a Var (which we only considered to be
      DEFAULTs), generate a new SELECT target entry
  * If the processed target entry count in SELECT target list is less
    than the original SELECT target list (GROUP BY elements not included in
    the SELECT target entry), add them in the SELECT target list and
    update the resnos accordingly.
     * However, this step was leading to add the CONST SELECT target entries
       twice. The reason is that when CONST target list entries appear in the
       SELECT target list, the INSERT target list doesn't include a Var. Instead,
       it includes CONST as it does for DEFAULTs.

New behaviour of target list re-ordering:
  * Iterate over the INSERT target list
    * If it includes a Var, find the corresponding SELECT entry
      and update its resno accordingly
    * If it does not include a Var (which we consider to be
      DEFAULTs and CONSTs on the SELECT), generate a new SELECT
      target entry
  * If any target entry remains on the SELECT target list which are resjunk,
    (GROUP BY elements not included in the SELECT target entry), keep them
    in the SELECT target list by updating the resnos.
2016-12-01 10:41:56 +02:00
Murat Tuncer 6458de43f1 Merge pull request #1002 from citusdata/fix/395_filters_do_not_work
Add support for filter
2016-12-01 09:06:23 +02:00
Murat Tuncer 33375944d6 Add support for filters
Ensures filter clauses are stripped from master query, and pushed
down to worker queries.
2016-12-01 08:53:46 +03:00
Jason Petersen 6384a74a99 Merge pull request #1001 from citusdata/add_changelog_entry_for_6.0.1
Add 6.0.1 CHANGELOG entry

cr: @jasonmp85
2016-11-29 09:14:23 -07:00
Burak Yucesoy a7f0823318 Add 6.0.1 CHANGELOG entry
Couple fixes and improvements to existing behavior.
2016-11-29 08:05:36 -08:00
Marco Slot f2ee93b62f Merge pull request #976 from citusdata/fix-error-messa
Fixup unsupported error message
2016-11-26 11:19:27 +01:00
Sumedh Pathak b9cbb52c06 Change DDL error message to say "unsupported" instead of "supported" 2016-11-26 10:30:09 +01:00
Marco Slot 271b559e0a Merge pull request #975 from citusdata/sumedhpathak-readme-change
Update documentation link to 6.0
2016-11-26 10:28:45 +01:00
sumedhpathak 2df3dcb8bd Update documentation link to 6.0 2016-11-26 10:01:34 +01:00
Murat Tuncer 8f2e61dbfc Merge pull request #973 from citusdata/fix/964_pg_upgrade_catalog_tables
Fix failures during pg_upgrade
2016-11-11 17:33:43 -08:00
Murat Tuncer 9bc833f335 Fix failures during pg_upgrade
- fix error in CitusHasBeenLoaded()
- allow creation of pg_catalog tables during upgrade
2016-11-11 17:22:45 -08:00
Marco Slot 419ce3c2cd Merge pull request #979 from citusdata/bugfix/null_parameter
Pass down the correct type for null parameters
2016-11-11 16:57:06 -08:00
Marco Slot 40b1e8c039 Pass down the correct type for null parameters 2016-11-11 07:14:08 +01:00
Metin Döşlü ae0f1033d0 Merge pull request #974 from citusdata/fix/use_access_share_lock
Use AccessShareLock on the source table while creating a colocated table
2016-11-10 11:30:55 -08:00