Commit Graph

6926 Commits (77801016192efbb57b78077082109680dc4b6e11)

Author SHA1 Message Date
Gürkan İndibay 7780101619
Update src/backend/distributed/commands/database.c
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-13 19:00:40 +03:00
Gürkan İndibay 1e044a217d
Update src/backend/distributed/deparser/deparse_database_stmts.c
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-13 19:00:01 +03:00
Gürkan İndibay a956786bd8
Update src/backend/distributed/deparser/deparse_database_stmts.c
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-13 18:59:48 +03:00
Gürkan İndibay 32df3313d4
Update src/backend/distributed/metadata/metadata_sync.c
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-13 18:59:36 +03:00
gindibay 05d8d4454f Merge branch 'create_alter_database' of https://github.com/citusdata/citus into create_alter_database 2023-11-13 17:17:39 +03:00
Onur Tirtir c1dce6fc2b commit 2023-11-13 18:02:31 +03:00
Gürkan İndibay 7e15939e50
Update src/backend/distributed/commands/database.c
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-13 17:15:11 +03:00
gindibay b5388ddf92 Adds icu_rules in meta_data sync 2023-11-13 17:13:56 +03:00
gindibay fcdea98edd Removes drop in citus_internal_db_command udf 2023-11-13 15:58:09 +03:00
gindibay a9977e8840 Moves validation to preprocess for createdb 2023-11-13 15:49:19 +03:00
gindibay 712fd8ebf3 Fixes comments 2023-11-13 14:23:37 +03:00
gindibay 3731c45c29 Fixes drop force option 2023-11-13 14:19:19 +03:00
gindibay 52c9e92544 Adds IsAnyObjectDistributed check for db 2023-11-13 13:44:08 +03:00
Gürkan İndibay 8728871cc3
Apply suggestions from code review
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-13 14:56:24 +03:00
Onur Tirtir 1a80181a9c indent 2023-11-13 13:42:11 +03:00
Onur Tirtir ffa1fa0963 Improve tests for >= pg15 & pg >= 16 2023-11-13 13:40:55 +03:00
Onur Tirtir 69217678b3 allow wal_log option only if it's set to default 2023-11-13 12:16:08 +03:00
Onur Tirtir f5a3f4d351 Merge remote-tracking branch 'origin/create_alter_database' into create_alter_database 2023-11-13 11:43:51 +03:00
Onur Tirtir 2ca6e2c358 indent 2023-11-13 11:43:31 +03:00
gindibay 974e628884 Merge branch 'create_alter_database' of https://github.com/citusdata/citus into create_alter_database 2023-11-13 11:42:00 +03:00
gindibay 30e1a858d2 Removes oid support 2023-11-13 11:41:58 +03:00
Onur Tirtir 5b446b1137 make tests passing 2023-11-13 11:27:29 +03:00
Onur Tirtir fe24227638 Improve tests for PG <= 14 2023-11-13 11:09:54 +03:00
gindibay f8b3f322aa Fixed review items 2023-11-10 08:33:51 +03:00
Gürkan İndibay 3067d1ef08
Apply suggestions from code review
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-10 17:34:09 +03:00
gindibay 7a6afb0beb Fixes review comments 2023-11-10 07:24:54 +03:00
gindibay 1b9a8ea2db Fixes indentation 2023-11-10 06:11:43 +03:00
gindibay 2ebeea3ce3 Fixes compilation warnings 2023-11-10 06:10:24 +03:00
gindibay 8df30a2a2b Fixes EnsureCitusInitiatedOperation name change 2023-11-10 05:52:14 +03:00
Gürkan İndibay 0a73cb31b0
Merge branch 'main' into create_alter_database 2023-11-10 14:12:48 +03:00
Onur Tirtir 240313e286
Support role commands from any node (#7278)
DESCRIPTION: Adds support from issuing role management commands from worker nodes

It's unlikely to get into a distributed deadlock with role commands, we
don't care much about them at the moment.
There were several attempts to reduce the chances of a deadlock but we
didn't any of them merged into main branch yet, see:
#7325
#7016
#7009
2023-11-10 09:58:51 +00:00
Naisila Puka 57ff762c82
Fix VACUUM flakiness in multi_utilities (#7334)
When I run this test in my local, the size of the table after the DELETE
command is around 58785792. Hence, I assume that the diffs suggest that
the Vacuum had no effect. The current solution is to run the VACUUM
command three times instead of once.

Example diff:
https://github.com/citusdata/citus/actions/runs/6722231142/attempts/1#summary-18269870674
```diff
insert into local_vacuum_table select i from generate_series(1,1000000) i;
 delete from local_vacuum_table;
 VACUUM local_vacuum_table;
 SELECT CASE WHEN s BETWEEN 20000000 AND 25000000 THEN 22500000 ELSE s END
 FROM pg_total_relation_size('local_vacuum_table') s ;
     s     
 ----------
- 22500000
+ 58785792
 (1 row)
```
See more diff examples in the PR description
https://github.com/citusdata/citus/pull/7334
2023-11-09 21:00:24 +03:00
dependabot[bot] c028d929b5 Bump werkzeug from 2.3.7 to 3.0.1 in /.devcontainer/src/test/regress
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 2.3.7 to 3.0.1.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/2.3.7...3.0.1)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-09 17:14:14 +01:00
dependabot[bot] d4663212f4 Bump werkzeug from 2.3.7 to 3.0.1 in /src/test/regress
Bumps [werkzeug](https://github.com/pallets/werkzeug) from 2.3.7 to 3.0.1.
- [Release notes](https://github.com/pallets/werkzeug/releases)
- [Changelog](https://github.com/pallets/werkzeug/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/werkzeug/compare/2.3.7...3.0.1)

---
updated-dependencies:
- dependency-name: werkzeug
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-09 17:14:14 +01:00
Nils Dijk 0dac63afc0
move pg_version_constants.h to toplevel include (#7335)
In preparation of sorting and grouping all includes we wanted to move
this file to the toplevel includes for good grouping/sorting.
2023-11-09 15:09:39 +00:00
Hanefi Onaldi 92228b279a
Add changelog entries for 12.1.1 (#7332)
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-09 14:19:28 +00:00
gindibay 5f4092db5b Adds validation for template 2023-11-09 12:11:22 +03:00
Gürkan İndibay 32c67963bd
Merge branch 'main' into create_alter_database 2023-11-09 11:37:58 +03:00
gindibay 4c9863c0fb Fixes review comments 2023-11-09 01:49:43 +03:00
gindibay afa60556fd Fixes review comments 2023-11-09 01:43:08 +03:00
Gürkan İndibay 75589d1c11
Apply suggestions from code review
Co-authored-by: Jelte Fennema-Nio <jelte.fennema@microsoft.com>
2023-11-08 17:38:43 +03:00
Naisila Puka 0dc41ee5a0
Fix flaky multi_mx_insert_select_repartition test (#7331)
https://github.com/citusdata/citus/actions/runs/6745019678/attempts/1#summary-18336188930
```diff
     insert into target_table SELECT a*2 FROM source_table RETURNING a;
-NOTICE:  executing the command locally: SELECT bytes FROM fetch_intermediate_results(ARRAY['repartitioned_results_xxxxx_from_4213582_to_0','repartitioned_results_xxxxx_from_4213584_to_0']::text[],'localhost',57638) bytes
+NOTICE:  executing the command locally: SELECT bytes FROM fetch_intermediate_results(ARRAY['repartitioned_results_3940758121873413_from_4213584_to_0','repartitioned_results_3940758121873413_from_4213582_to_0']::text[],'localhost',57638) bytes
```

The elements in the array passed to `fetch_intermediate_results` are the
same, but in the opposite order than expected.

To fix this flakiness, we can omit the `"SELECT bytes FROM
fetch_intermediate_results..."` line. From the following logs, it is
understandable that the intermediate results have been fetched.
2023-11-08 15:15:33 +03:00
gindibay 5f8f1d312d Fixes message errors 2023-11-08 06:56:21 +03:00
gindibay ba377ecaab Fixes tests 2023-11-08 03:23:34 +03:00
gindibay 65660db10d Fixes review items 2023-11-08 02:02:00 +03:00
Onur Tirtir 444e6cb7d6
Remove useless variables (#7327)
To fix warnings observed when using different compiler versions.
2023-11-07 16:39:08 +03:00
cvbhjkl e535f53ce5
Fix typo in local_executor.c (#7324)
Fix a typo 'remaning' -> 'remaining' in local_executor.c
2023-11-03 12:14:11 +00:00
Onur Tirtir 21646ca1e9
Fix flaky isolation_get_all_active_transactions.spec test (#7323)
Fix the flaky test that results in following diff by waiting until the
backend that we want to terminate really terminates, until 5secs.

```diff
--- /__w/citus/citus/src/test/regress/expected/isolation_get_all_active_transactions.out.modified	2023-11-01 16:30:57.648749795 +0000
+++ /__w/citus/citus/src/test/regress/results/isolation_get_all_active_transactions.out.modified	2023-11-01 16:30:57.656749877 +0000
@@ -114,13 +114,13 @@
 --------------------
 t                   
 (1 row)
 
 step s3-show-activity: 
  SET ROLE postgres;
  select count(*) from get_all_active_transactions() where process_id IN (SELECT * FROM selected_pid);
 
 count
 -----
-    0
+    1
 (1 row)
```
2023-11-03 09:00:32 +01:00
Onur Tirtir 5e2439a117
Make some more tests re-runable (#7322)
* multi_mx_create_table
* multi_mx_function_table_reference
* multi_mx_add_coordinator
* create_role_propagation
* metadata_sync_helpers
* text_search

https://github.com/citusdata/citus/pull/7278 requires this.
2023-11-02 18:32:56 +03:00
Jelte Fennema-Nio 85b997a0fb
Fix flaky multi_alter_table_statements (#7321)
Sometimes multi_alter_table_statements would fail in CI like this:

```diff
 -- Verify that DROP NOT NULL works
 ALTER TABLE lineitem_alter ALTER COLUMN int_column2 DROP NOT NULL;
 SELECT "Column", "Type", "Modifiers" FROM table_desc WHERE relid='lineitem_alter'::regclass;
-     Column      |         Type          | Modifiers
----------------------------------------------------------------------
- l_orderkey      | bigint                | not null
- l_partkey       | integer               | not null
- l_suppkey       | integer               | not null
- l_linenumber    | integer               | not null
- l_quantity      | numeric(15,2)         | not null
- l_extendedprice | numeric(15,2)         | not null
- l_discount      | numeric(15,2)         | not null
- l_tax           | numeric(15,2)         | not null
- l_returnflag    | character(1)          | not null
- l_linestatus    | character(1)          | not null
- l_shipdate      | date                  | not null
- l_commitdate    | date                  | not null
- l_receiptdate   | date                  | not null
- l_shipinstruct  | character(25)         | not null
- l_shipmode      | character(10)         | not null
- l_comment       | character varying(44) | not null
- float_column    | double precision      | default 1
- date_column     | date                  |
- int_column1     | integer               |
- int_column2     | integer               |
- null_column     | integer               |
-(21 rows)
-
+ERROR:  schema "alter_table_add_column" does not exist
 -- COPY should succeed now
 SELECT master_create_empty_shard('lineitem_alter') as shardid \gset
 ```

Reading from table_desc apparantly has an issue that if the schema gets
deleted from one of the items, while it is being read that we get such
an error.

This change fixes that by not running multi_alter_table_statements in parallel
with alter_table_add_column anymore.

This is another instance of the same issue as in #7294
2023-11-02 16:42:45 +03:00