Commit Graph

6650 Commits (17c744be21d832bf836cb23bf9df7ef8c839cba7)

Author SHA1 Message Date
gindibay 17c744be21 Updates tools branch to add attrs dependency 2023-07-20 00:02:59 +03:00
gindibay 3ecf3efc5f Fixes docker image for centos 2023-07-19 22:31:24 +03:00
gindibay 90d1dd42bc Adds attrs module 2023-07-19 22:31:24 +03:00
gindibay 6c6a9ece85 Updates tools version 2023-07-19 22:31:24 +03:00
gindibay 23c9f4134d Removes bash flags 2023-07-19 22:31:24 +03:00
gindibay 6a633bc599 Fixes deb error 2023-07-19 22:31:24 +03:00
gindibay 21bd53b158 Rollbacks path parametrization 2023-07-19 22:31:24 +03:00
gindibay 48c98a9cce Fixes deban builds 2023-07-19 22:31:24 +03:00
gindibay 22aef15497 Fixes tools branch 2023-07-19 22:31:24 +03:00
gindibay d57d7816ac Parameterizes safe directory 2023-07-19 22:31:24 +03:00
gindibay 72846a40f2 Rollbacks tools branch 2023-07-19 22:31:24 +03:00
gindibay a910fc0387 Adds error check for make 2023-07-19 22:31:24 +03:00
gindibay 6e24043927 Tests exit 1 in step 2023-07-19 22:31:24 +03:00
gindibay 95750f7a82 Fixes git error 2023-07-19 22:31:24 +03:00
gindibay 1089f6eecc Adds x flag 2023-07-19 22:31:24 +03:00
gindibay 4bb156e58f Fixes dubious ownership error 2023-07-19 22:31:24 +03:00
gindibay ea626ffde3 Changes os detection method name 2023-07-19 22:31:24 +03:00
gindibay 7bab58ef84 Adds set -e for required steps 2023-07-19 22:31:24 +03:00
gindibay 34c7c2ce60 Rollbacks fail-fast 2023-07-19 22:31:24 +03:00
gindibay d6017ef1c3 Sets fail-fast to true to make steps fail in error 2023-07-19 22:31:24 +03:00
gindibay 41b9db020d Fixes version errors 2023-07-19 22:31:24 +03:00
gindibay faa394d709 Adds debug codes 2023-07-19 22:31:24 +03:00
gindibay f46b58ae27 Fixes urllib3 for centos based distributions 2023-07-19 22:31:24 +03:00
gindibay 6e49729bf9 Removes explicit attrs installation 2023-07-19 22:31:24 +03:00
gindibay 85d955ae68 Changes bash behavious to exit 2023-07-19 22:31:24 +03:00
gindibay 75aabcfe27 Fixes module error 2023-07-19 22:31:24 +03:00
gindibay ff00d5db07 Adds attr module 2023-07-19 22:31:24 +03:00
gindibay 509e903038 Adds code for debugging 2023-07-19 22:31:24 +03:00
gindibay cbcc77591a Changing deffault branch for tools 2023-07-19 22:31:24 +03:00
Teja Mupparti 87dc88f837 Isolate schema sharding/MERGE tests into a new file, and
use the new GUC parameter
2023-07-19 12:23:45 -07:00
mulander 6498e1eb6c
Fix typo in distributed (#7069)
DESCRIPTION: PR description that will go into the change log, up to 78
characters
2023-07-18 21:02:09 +02:00
aykut-bozkurt 832fc4a8f0
readme update for 12.0 (#7068) 2023-07-18 20:09:27 +03:00
Nils Dijk 96a3d82e13
Update slack link in README.md for self-serve signup (#7058)
The link in our readme directly goes to our channel, meaning people
finding the link here for the first time are unable to join slack this
way.

Given that the target audience using this link is most likely not part
of the slack channel yet it would be better to link to our self serve
signup flow at slack.citusdata.com, which is the same we use on
citusdata.com.

From simple testing you should still get redirected to the channel if
you are already joined and signed in.
2023-07-17 12:59:46 +02:00
Halil Ozan Akgül c99a93ffa7
Move SQL file changes for citus_shard_sizes fixes into the new 11.3-2 version (#7050)
This PR moves `citus_shard_sizes` changes from #7003, and #7018 to into
a new Citus version, 11.3-2
2023-07-14 17:19:54 +03:00
aykut-bozkurt 609a5465ea
Bump Citus version into 12.1devel (#7061) 2023-07-14 13:12:30 +03:00
Gürkan İndibay 0f0b60c29c
Fix format attribute and IsLocalReplicationOriginSessionActive errors (#7055)
This PR fixes the following:

- in oraclelinux-7 `Make` step
```
/usr/bin/ld: utils/replication_origin_session_utils.o: relocation R_X86_64_PC32 against undefined symbol 
`IsLocalReplicationOriginSessionActive' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
```
`IsLocalReplicationOriginSessionActive` function has improper inline
declaration, fixed that
- in centos-7 `Make` step
```
utils/background_jobs.c: In function 'StartCitusBackgroundTaskExecutor':
utils/background_jobs.c:1746:6: warning: function might be possible candidate for 'gnu_printf' format attribute
[-Wsuggest-attribute=format]
      database, user, jobId, taskId);
      ^
```
should use `pg_attribute_printf(3,4)` instead of
`pg_attribute_printf(3,0)` since the number of arguments varies for
`SafeSnprintf(char *str, rsize_t count, const char *fmt, ...)`

---------

Co-authored-by: naisila <nicypp@gmail.com>
2023-07-13 17:41:57 +03:00
aykut-bozkurt ee255cd46e
Changelog entries for 12.0.0 (#7049)
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
Co-authored-by: Gokhan Gulbiz <ggulbiz@gmail.com>
2023-07-13 14:46:58 +03:00
Onur Tirtir 2c11e4d7f9
Deparse ALTER TABLE commands if ADD COLUMN is the only subcommand (#7032)
Some clients send ALTER TABLE .. ADD COLUMN .. commands together
with some other DDLs and this makes it impossible to directly send
the original DDL command to the workers.

For this reason, this commit adds support for deparsing such ALTER
TABLE commands so that we can avoid from directly sending the original
one to the workers.

Partially fixes https://github.com/citusdata/citus/issues/690.
Fixes #3678
2023-07-12 18:28:45 +03:00
Onur Tirtir f3cdb6d1bf Deparse ALTER TABLE commands if ADD COLUMN is the only subcommand
And stabilize multi_alter_table_statements.sql.
2023-07-12 18:17:47 +03:00
Onur Tirtir 6365f47b57 Properly handle index storage options for ADD CONSTRAINT / COLUMN 2023-07-11 17:42:43 +03:00
Onur Tirtir ae142e1764 Properly handle IF NOT EXISTS for ADD COLUMN 2023-07-11 17:42:43 +03:00
Onur Tirtir d4789a2c3a Stabilize test helper sql files
multi_test_helpers is run in parallel with others, so need to stabilize
other test helpers too to make multi_test_helpers runnable multiple
times.
2023-07-06 10:47:41 +03:00
Onur Tirtir 001437bdfe Refactor AppendAlterTableCmdAddConstraint to reuse it for ADD COLUMN too 2023-07-06 10:47:41 +03:00
Onur Tirtir 56f1daa800 Refactor the code that extends constraint/index names on shards into a func 2023-07-06 10:47:41 +03:00
Onur Tirtir ba1ea9b5bd Refactor the code that prepares constraint objects in an alter table stmt into a func 2023-07-06 10:47:41 +03:00
Halil Ozan Akgül 613cced1ae
Use citus_shard_sizes in citus_tables (#7018)
Fixes #7019 

This PR updates citus_tables view to use citus_shard_sizes function,
instead of citus_total_relation_size to improve performance.
2023-07-05 11:40:34 +03:00
aykut-bozkurt 719d92c8b9
mat view should not be converted to tenant table (#7043)
We allow materialized view to exist in distrbuted schema but they should
not be tried to be converted to a tenant table since they cannot be
distributed.

Fixes https://github.com/citusdata/citus/issues/7041
2023-07-04 17:28:03 +03:00
Ahmet Gedemenli 5051be86ff
Skip distributed schema insertion into pg_dist_schema, if already exists (#7044)
Inserting into `pg_dist_schema` causes unexpected duplicate key errors,
for distributed schemas that already exist. With this commit we skip the
insertion if the schema already exists in `pg_dist_schema`.

The error:
```sql
SET citus.enable_schema_based_sharding TO ON;
CREATE SCHEMA sc2;
CREATE SCHEMA IF NOT EXISTS sc2;
NOTICE:  schema "sc2" already exists, skipping
ERROR:  duplicate key value violates unique constraint "pg_dist_schema_pkey"
DETAIL:  Key (schemaid)=(17294) already exists.
```

fixes: #7042
2023-07-04 15:19:07 +03:00
Gokhan Gulbiz e0d3476526
Add locking mechanism for tenant monitoring probabilistic approach (#7026)
This PR 
* Addresses a concurrency issue in the probabilistic approach of tenant
monitoring by acquiring a shared lock for tenant existence checks.
* Changes `citus.stat_tenants_sample_rate_for_new_tenants` type to
double
* Renames `citus.stat_tenants_sample_rate_for_new_tenants` to
`citus.stat_tenants_untracked_sample_rate`
2023-07-03 13:08:03 +03:00
Jelte Fennema ac24e11986
Change default rebalance strategy to by_disk_size (#7033)
DESCRIPTION: Change default rebalance strategy to by_disk_size

When introducing rebalancing by disk size we didn't make it the default
initially. The main reason was, because we expected some problems with
it. We have indeed had some problems/bugs with it over the years, and
have fixed all of them. By now we're quite confident in its stability,
and that it pretty much always gives better results than by_shard_count.

So this PR makes by_disk_size the new default. We don't change the
default when some other strategy than by_shard_count is the current
default. This is in case someone defined their own rebalance strategy
and marked this as the default themselves.

Note: It explicitly does nothing during a downgrade, because there's no
way of knowing if the rebalance strategy before the upgrade was
by_disk_size or by_shard_count. And even in previous versions
by_disk_size is considered superior for quite some time.
2023-07-03 11:08:24 +02:00