Commit Graph

2167 Commits (2de8ef29c335ec2e4ccdf934b52aa1baf24160f6)

Author SHA1 Message Date
Marco Slot 2de8ef29c3 Revoke function permissions for node metadata functions 2018-11-15 06:25:07 +01:00
Burak Velioglu ef24895add
Merge pull request #2478 from citusdata/master-8.0.0-14112018
Add changelog entry for 7.5.2
2018-11-14 23:31:19 +03:00
velioglu 9b5e4942a0 Add changelog entry for 7.5.2 2018-11-14 21:26:29 +03:00
Nils Dijk bafec7ea48
Merge pull request #2469 from citusdata/refactor/commands-extract
Refactor the UtilityProcess function into its own module
2018-11-14 15:08:06 +01:00
Marco Slot f383e4f307
Description: Refactor code that handles DDL commands from one file into a module
The file handling the utility functions (DDL) for citus organically grew over time and became unreasonably large. This refactor takes that file and refactored the functionality into separate files per command. Initially modeled after the directory and file layout that can be found in postgres.

Although the size of the change is quite big there are barely any code changes. Only one two functions have been added for readability purposes:

- PostProcessIndexStmt which is extracted from PostProcessUtility
- PostProcessAlterTableStmt which is extracted from multi_ProcessUtility

A README.md has been added to `src/backend/distributed/commands` describing the contents of the module and every file in the module.
We need more documentation around the overloading of the COPY command, for now the boilerplate has been added for people with better knowledge to fill out.
2018-11-14 13:36:27 +01:00
Burak Yücesoy ce463e9812
Merge pull request #2467 from citusdata/fix-crashes-on-ooms
Fix crashes caused by stack size increase under high memory load
2018-11-14 10:49:06 +03:00
Burak Yucesoy f8e0d37ba1 Fix crashes caused by stack size increase under high memory load
Each PostgreSQL backend starts with a predefined amount of stack and this stack
size can be increased if there is a need. However, stack size increase during
high memory load may cause unexpected crashes, because if there is not enough
memory for stack size increase, there is nothing to do for process apart from
crashing. An interesting thing is; the process would get OOM error instead of
crash, if the process had an explicit memory request (with palloc) for example.
However, in the case of stack size increase, there is no system call to get OOM
error, so the process simply crashes.

With this change, we are increasing the stack size explicitly by requesting extra
memory from the stack, so that, even if there is not memory, we can at least get
an OOM instead of a crash.
2018-11-14 01:27:53 +03:00
Nils Dijk 2cc803afe0
Merge pull request #2474 from citusdata/fix/min-client-message-fatal
Fix failures of tests on recent postgres builds
2018-11-13 17:40:21 +01:00
Nils Dijk 97da44558b
Description: Fix failures of tests on recent postgres builds
In recent postgres builds you cannot set client_min_messages to
values higher then ERROR, if will silently set it to ERROR if so.

During some tests we would set it to fatal to hide random values
(eg. pid's of processes) from the test output. This patch will use
different tactics for hiding these values.
2018-11-13 16:53:05 +01:00
Murat Tuncer 22e516a4c4
Merge pull request #2471 from citusdata/update_hll_topn_versions
Update topn and hll versions used in travis
2018-11-07 17:27:12 +03:00
Murat Tuncer 02bb44794a Update topn and hll versions used in travis 2018-11-07 16:56:52 +03:00
Murat Tuncer 95ba630002
Merge pull request #2470 from citusdata/add_function_utils
Create function_utils for pg function call related utilities
2018-11-07 16:00:49 +03:00
Murat Tuncer cc401a2616 Create function_utils for pg function call related utilities 2018-11-07 15:29:38 +03:00
Hadi Moshayedi d3e284dcd6
Use heap_deform_tuple() instead of calling heap_getattr(). (#2464)
After Fast ALTER TABLE ADD COLUMN with a non-NULL default in PG11, physical heaps might not contain all attributes after a ALTER TABLE ADD COLUMN happens. heap_getattr() returns NULL when the physical tuple doesn't contain an attribute. So we should use heap_deform_tuple() in these cases, which fills in the missing attributes.

Our catalog tables evolve over time, and an upgrade might involve some ALTER TABLE ADD COLUMN commands.

Note that we don't need to worry about postgres catalog tables and we can use heap_getattr() for them, because they only change between major versions.

This also fixes #2453.
2018-11-05 15:11:01 -05:00
Burak Velioglu 3616939dfa
Merge pull request #2466 from citusdata/changelog-8.0.0
Add changelog entry for 8.0.0
2018-10-31 14:24:47 +03:00
velioglu 9d0865e4dd Add changelog entry for 8.0.0 2018-10-31 13:40:55 +03:00
Önder Kalacı 6d08a6b947
Merge pull request #2463 from citusdata/multi_row_insert_failure
Add failure and cancellation tests for multi row inserts
2018-10-30 12:34:20 +03:00
Onder Kalaci 7aa2af8975 Add failure and cancellation tests for multi row inserts 2018-10-29 11:36:02 +03:00
Önder Kalacı 46120df7a9
Merge pull request #2462 from citusdata/cancellation_vacuum
Add cancellation tests for VACUUM/ANALYZE
2018-10-26 20:11:04 +03:00
Onder Kalaci 7b4d912904 Add cancellation tests for VACUUM/ANALYZE 2018-10-26 16:25:11 +03:00
Önder Kalacı c58bb37ad7
Merge pull request #2461 from citusdata/cancellation_multi_shard
Add cancellation tests for multi shard modification queries
2018-10-26 15:35:31 +03:00
Onder Kalaci 85d7d074c3 Add cancellation tests for multi shard modification queries 2018-10-26 15:07:52 +03:00
Önder Kalacı 0926c9994a
Merge pull request #2458 from citusdata/add_router_cancel
Add cancellation tests for router selects
2018-10-26 15:07:42 +03:00
Onder Kalaci 18eee6d9c8 Add cancellation tests for router selects 2018-10-26 14:29:56 +03:00
Nils Dijk 13226a9a3b
Merge pull request #2440 from citusdata/savepoint_failures
Add savepoint failure tests
2018-10-26 11:59:37 +01:00
Jason Petersen a37a809d49
Add savepoint failure tests
Tests at each significant point (i.e. SAVEPOINT, ROLLBACK, RELEASE)
that correct semantics are preserved (using both no and statement replication).
2018-10-26 11:12:40 +01:00
Önder Kalacı 0f768349e0
Merge pull request #2457 from citusdata/fix_valgrind_issue
Make sure to access PARAM_EXTERN accurately in PG 11
2018-10-26 11:25:21 +03:00
Onder Kalaci 9e2e2a7300 Make sure to access PARAM_EXTERN accurately in PG 11
PG 11 has change the way that PARAM_EXTERN is processed.
This commit ensures that Citus follows the same pattern.

For details see the related Postgres commit:
6719b238e8
2018-10-25 21:55:03 +03:00
Murat Tuncer c7891115ef
Merge pull request #2454 from citusdata/remove_cloudflare
Remove CloudFlare from who uses citus section
2018-10-24 14:50:10 +03:00
Murat Tuncer 1e79492f35 Remove CloudFlare from who uses citus section 2018-10-24 13:58:54 +03:00
Önder Kalacı 0d84287a42
Merge pull request #2452 from citusdata/add_multi_shard_commands
Processes that are blocked on advisory locks show up in wait edges
2018-10-24 13:57:52 +03:00
Onder Kalaci 6e05921736 Processes that are blocked on advisory locks show up in wait edges
Assign the distributed transaction id before trying to acquire the
executor advisory locks. This is useful to show this backend in citus
lock graphs (e.g., dump_global_wait_edges() and citus_lock_waits).
2018-10-24 13:32:13 +03:00
Nils Dijk 980edac314
Merge pull request #2437 from citusdata/single_shard_mod_failure
Add single-shard modification failure tests
2018-10-24 01:10:31 +02:00
Jason Petersen 98c8267a37
Add single-shard modification failure tests
I'm pretty sure a lot of this test functionality may be covered in some
of our existing regression tests, but I've included them to ensure we
put all failure-based tests under our new testing method for that kind
of test.

Didn't include lower replication factor, as (for a single-shard mod.),
it's indistinguishable from modifying a reference table. So these all
test modifications which hit a single, replicated shard.
2018-10-23 23:31:40 +01:00
Hadi Moshayedi 5a274aa64c
Merge pull request #2450 from citusdata/fix_dropdb_if_exists
Don't throw error for DROP DATABASE IF EXISTS
2018-10-23 10:10:47 -04:00
Hadi Moshayedi 3e00bf1c0d Don't throw error for DROP DATABASE IF EXISTS 2018-10-23 09:45:03 -04:00
Murat Tuncer 28d307850c
Merge pull request #2446 from citusdata/dont_allow_failure
make PG11 builds mandatory again
2018-10-19 15:49:30 +03:00
Murat Tuncer 081594ad03 Don't allow PG11 travis failures anymore
We made PG11 builds optional when we had an issue
with mx isolation test that we could not solve back then.

This commit solves the issue with a workaround by running
start_metadata_sync_to_node outside the transaction block.
2018-10-19 15:20:53 +03:00
Metin Döşlü 3a97988ada
Merge pull request #2444 from citusdata/memory_fix_attempt
Attempt to address planner context crashes
2018-10-19 10:15:55 +03:00
Jason Petersen ae9a98c2d1
Attempt to address planner context crashes
Both of these are a bit of a shot in the dark. In one case, we noticed
a stack trace where a caller received a null pointer and attempted to
dereference the memory context field (at 0x010). In the other, I saw
that any error thrown from within AdjustParseTree could keep the stack
from being cleaned up (presumably if we push we should always pop).

Both stack traces were collected during times of high memory pressure
and locally reproducing the problem locally or otherwise has been very
tricky (i.e. it hasn't been reproduced reliably at all).
2018-10-18 08:41:51 -06:00
Murat Tuncer 38c4059a16
Merge pull request #2431 from citusdata/mt_failure_insert_select_pushdown
Add failure test for insert/select pushdown
2018-10-18 00:16:14 -07:00
Murat Tuncer c7efd8aff0 Add failure test for insert/select pushdown 2018-10-18 09:09:26 +03:00
Sumedh Pathak b15d1eee62
Update Contributing to install PG10 instead of 9.6 (#2436)
* Update Contributing to note PG10 install

* Updated suggested link to PG10
2018-10-16 12:31:17 -07:00
Hadi Moshayedi 431ac80563
Keep track of cached entries in case of interruption. (#2433)
* Keep track of cached entries in case of interruption.

Previously we set DistTableCacheEntry->sortedShardIntervalArray
and DistTableCacheEntry->shardIntervalArrayLength after we entered
all related shard entries into DistShardCacheHash. The drawback was
that if populating DistShardCacheHash was interrupted,
ResetDistTableCacheEntry() didn't see the shard hash entries created,
so was unable to clean them up.

This patch fixes that by setting sortedShardIntervalArray earlier,
and incrementing shardIntervalArrayLength as we enter shards into
the cache.
2018-10-15 14:06:56 -04:00
Marco Slot a9f183a284
Merge pull request #2432 from citusdata/fix_typos
Fix user-facing typos
2018-10-10 14:25:59 -07:00
Jason Petersen 9fb951c312
Fix user-facing typos
Lintian found these (presumably by looking in the text section and
running them through e.g. aspell).
2018-10-09 16:54:03 -07:00
Burak Velioglu 8b9aeb374b
Merge pull request #2425 from citusdata/real-time-select-failure
Add failure tests for real time select queries
2018-10-09 14:27:45 -07:00
velioglu 5713019058 Add failure tests for real time select queries 2018-10-09 14:12:02 -07:00
Önder Kalacı d5ebf22ba1
Merge pull request #2424 from citusdata/clear_intermediate_results
Make sure not to leak intermediate result folders on the workers
2018-10-09 23:50:27 +03:00
Onder Kalaci 73696a03e4 Make sure not to leak intermediate result folders on the workers 2018-10-09 22:47:56 +03:00