Commit Graph

1992 Commits (aeef44e60fc149cbb39ba03edbde331d5ec2657a)

Author SHA1 Message Date
Marco Slot aeef44e60f Test current user in task-tracker queries 2018-11-23 06:21:17 +01:00
Marco Slot 7f84242f5b COPY to a task file no longer switches to superuser 2018-11-23 06:21:12 +01:00
velioglu 7000b4e98c Bump version to 7.5.2 2018-11-15 00:17:13 +03:00
velioglu 8583a8f2b1 Add changelog entry for 7.5.2 2018-11-15 00:13:39 +03:00
Nils Dijk 968947af18 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-15 00:10:06 +03:00
Burak Yucesoy 90d4629806 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 21:01:59 +03:00
Jason Petersen 8274680f5b 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-11-14 20:59:07 +03:00
Hadi Moshayedi 547c9d3301 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-11-14 20:51:31 +03:00
Murat Tuncer 25673600d3 Fix memory leak in FinishRemoteTransactionPrepare 2018-11-14 20:49:30 +03:00
Onder Kalaci c95b13863b Prevent overflow of memory accesses during deadlock detection
In the distributed deadlock detection design, we concluded that prepared transactions
cannot be part of a distributed deadlock. The idea is that (a) when the transaction
is prepared it already acquires all the locks, so cannot be part of a deadlock
(b) even if some other processes blocked on the prepared transaction,  prepared transactions
 would eventually be committed (or rollbacked) and the system will continue operating.

With the above in mind, we probably had a mistake in terms of memory allocations. For each
backend initialized, we keep a `BackendData` struct. The bug we've introduced is that, we
assumed there would only be `MaxBackend` number of backends. However, `MaxBackends` doesn't
include the prepared transactions and axuliary processes. When you check Postgres' InitProcGlobal`
you'd see that `TotalProcs = MaxBackends + NUM_AUXILIARY_PROCS + max_prepared_xacts;`

This commit aligns with total procs processed with that.
2018-11-14 20:43:52 +03:00
Onder Kalaci 433479d913 Do not recover wrong distributed transactions in MX 2018-11-14 20:43:41 +03:00
velioglu 8027fdbfb8 Bump version to 7.5.1 2018-08-28 15:33:19 +03:00
velioglu 33611c168a Add changelog entry for 7.5.1 2018-08-28 14:17:24 +03:00
Onder Kalaci 4c94bf3eae Make sure that modifying CTEs always use the correct execution mode 2018-08-28 13:21:37 +03:00
Onder Kalaci a207c84548 Prevent multiple placements of a single shard to lead huge memory allocations 2018-08-28 13:04:33 +03:00
Onder Kalaci 509b993758 Prevent excessive number of unnecessary range table traversal 2018-08-28 13:04:25 +03:00
mehmet furkan şahin 8a86c87750
ApplyLogRedaction noop func is added 2018-08-20 10:37:08 -06:00
Jason Petersen 95141fef42 Add test showing poolinfo validation works
In other words, that it errors out.
2018-08-08 10:52:27 -06:00
mehmet furkan şahin 2bbdfad1fd windows version fix 2018-07-27 09:59:42 +03:00
mehmet furkan şahin 00bd8bfa8a Bump Citus version to 7.5.0 2018-07-26 11:25:15 +03:00
mehmet furkan şahin fa5b3f4ffc Add changelog entry for 7.5.0 2018-07-25 11:26:34 +03:00
velioglu af31f74cd1 Use contype to check for FK constraint instead of reading catalog table 2018-07-24 16:23:33 +03:00
mehmet furkan şahin 5ab0bc8c0a ALTER TABLE %s ADD COLUMN constraint check is added 2018-07-24 16:23:25 +03:00
Marco Slot 7c3c29e505
Don't try to check unopened connection in EXEC_TASK_FAILED state 2018-07-23 12:36:33 -06:00
Nils Dijk 416738374a
error on unsupported changing of distirbution column in ON CONFLICT for INSERT ... SELECT 2018-07-23 12:36:33 -06:00
Nils Dijk 9d8236961b
extract ErrorIfOnConflictNotSupported function for reuse 2018-07-23 12:36:33 -06:00
Nils Dijk 3eff9e8b9d
fix missing space for tablein in error 2018-07-23 12:36:33 -06:00
Marco Slot db07901889
Ensure StartPlacementListConnection connects with username supplied by the caller 2018-07-23 12:36:32 -06: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