Commit Graph

6945 Commits (e18c4400dcccc48200d823df461a6733fb7e9d10)

Author SHA1 Message Date
gindibay e18c4400dc Removes unnecessary logs 2023-11-15 20:48:17 +03:00
gindibay 144ede3bf0 Adds GUC check for db grant sync 2023-11-15 20:45:13 +03:00
gindibay 11e7c94e2f Removes extra line in test 2023-11-15 19:32:00 +03:00
gindibay 0f1273f6ad Updates test output 2023-11-15 19:03:16 +03:00
gindibay dc48833679 Adds tests for non-distributed database 2023-11-15 18:48:46 +03:00
gindibay deee8e53dd Adds grant to public 2023-11-15 17:33:14 +03:00
gindibay 7939267326 Fixes flakiness of test 2023-11-15 17:28:50 +03:00
gindibay 37681eaed0 Fixes comment on code 2023-11-15 17:01:42 +03:00
Gürkan İndibay bb76a9b4b9
Merge branch 'main' into create_alter_database 2023-11-15 17:18:11 +03:00
gindibay 931514b0f7 Fixes indentation 2023-11-15 16:41:38 +03:00
gindibay 6f838e6e88 Fixes indentation 2023-11-15 16:34:02 +03:00
gindibay eb46d9399b Fixes warning on compile 2023-11-15 16:26:14 +03:00
gindibay 9a558bdece Adds datacl propagation 2023-11-15 16:04:26 +03:00
Naisila Puka c6fbb72c02
Fix flaky multi_prepare_plsql (#7346)
Simple need of an `ORDER BY` clause

Ran into this twice this week already!

https://github.com/citusdata/citus/actions/runs/6849701315/attempts/1#summary-18622563506

https://github.com/citusdata/citus/actions/runs/6875051160/attempts/1#summary-18698009952

```diff
 SELECT nspname, typname FROM pg_type JOIN pg_namespace ON pg_namespace.oid = pg_type.typnamespace WHERE typname = 'prepare_ddl_type_backup';
    nspname   |         typname         
 -------------+-------------------------
- public      | prepare_ddl_type_backup
  otherschema | prepare_ddl_type_backup
+ public      | prepare_ddl_type_backup
 (2 rows)
```
2023-11-15 13:28:43 +03:00
Naisila Puka a960799dfb
Clean up leftover replication slots in tests (#7338)
This commit fixes the flakiness in `logical_replication` and
`citus_non_blocking_split_shard_cleanup` tests. The flakiness
was related to leftover replication slots.
Below is a flaky example for each test:

logical_replication https://github.com/citusdata/citus/actions/runs/6721324131/attempts/1#summary-18267030604
citus_non_blocking_split_shard_cleanup https://github.com/citusdata/citus/actions/runs/6721324131/attempts/1#summary-18267006967

```diff
 -- Replication slots should be cleaned up
 SELECT slot_name FROM pg_replication_slots;
             slot_name            
 ---------------------------------
-(0 rows)
+ citus_shard_split_slot_19_10_17
+(1 row)
```

The tests by themselves are not flaky: 32 flaky test
schedules each with 20 runs run successfully.
https://github.com/citusdata/citus/actions/runs/6822020127?pr=7338

The conclusion is that:
1. `multi_tenant_isolation_nonblocking` is the problematic test running
before `logical_replication` in the `enterprise_schedule`, so I added a
cleanup at the end of `multi_tenant_isolation_nonblocking`.
https://github.com/citusdata/citus/actions/runs/6824334614/attempts/1#summary-18560127461
2. `citus_split_shard_by_split_points_negative` is the problematic test
running before `citus_non_blocking_split_shards_cleanup` in the split
schedule. Also added cleanup line.

For details on the investigation of leftover replication slots,
please check the PR https://github.com/citusdata/citus/pull/7338
2023-11-14 18:50:54 +03:00
Naisila Puka cdef2d5224
Random tests refactoring (#7342)
While investigating replication slots leftovers
in PR https://github.com/citusdata/citus/pull/7338,
I ran into the following refactoring/cleanup
that can be done in our test suite:

- Add separate test to remove non default nodes
- Remove coordinator removal from `add_coordinator` test
  Use `remove_coordinator_from_metadata` test where needed
- Don't print nodeids in `multi_multiuser_auth` and
`multi_poolinfo_usage`
  tests
- Use `startswith` when checking for isolation or failure tests
- Add some dependencies accordingly in `run_test.py` for running flaky
test schedules
2023-11-14 12:49:15 +03:00
gindibay cf019b858c Adds static declarations 2023-11-14 10:21:23 +03:00
gindibay c1e9335fb7 Adds distributed check in metadata syncing 2023-11-14 09:01:00 +03:00
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
Naisila Puka e4ac3e6d9a
Bump PG versions to latest minors 14.10, 15.5, 16.1 (#7336)
Postgres got minor updates on Nov9, this starts using the images with
the latest version for our tests, namely 14.10, 15.5 and 16.1.
These minor updates were compatible with Citus.
Sister PR: https://github.com/citusdata/the-process/pull/152
2023-11-13 15:05:38 +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
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
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