Commit Graph

4402 Commits (cover-local-tables-fkey-graph)

Author SHA1 Message Date
Onur Tirtir 34be8d5f58 fixup! Update existing tests & Add more tests 2021-01-06 15:43:21 +03:00
Onur Tirtir fffa011303 Don't invalidate foreign key graph for CREATE TABLE commands 2021-01-06 14:38:34 +03:00
Onur Tirtir 0e85d8806c Revert "Cover attach partition commands"
This reverts commit fc8cc90845.
2021-01-06 12:58:33 +03:00
Onur Tirtir be2e18e4bf fixup! Update existing tests & Add more tests
use debug4 and don't rely on debug message in tests
2021-01-06 12:34:43 +03:00
Onur Tirtir 7d2d926b94 fixup! Update existing tests & Add more tests 2021-01-06 11:02:05 +03:00
Onur Tirtir ee502453d6 Use InvalidateForeignKeyGraph in postprocess 2021-01-06 10:44:59 +03:00
Onur Tirtir 904bc71a07 fixup! Cover DROP COLUMN commands dropping columns in the either side of fkeys 2021-01-06 10:43:53 +03:00
Onur Tirtir 0964280e57 fixup! Update existing tests & Add more tests
pg11 doesn't support foreign keys "to" parent tables, so make tests
compatible
2021-01-06 03:10:30 +03:00
Onur Tirtir ea5a85bc91 fixup! Update existing tests & Add more tests 2021-01-06 02:44:13 +03:00
Onur Tirtir fc8cc90845 Cover attach partition commands 2021-01-06 02:43:30 +03:00
Onur Tirtir 67f677c921 fixup! Consider fkey graph invalidations due to CREATE TABLE cmds too 2021-01-05 19:50:20 +03:00
Onur Tirtir f3f650c0b7 fixup! Handle ADD FKEY commands in preprocess 2021-01-05 19:41:19 +03:00
Onur Tirtir 487ce8fce0 Remove "validating foreign key constraint" logs 2021-01-05 15:50:59 +03:00
Onur Tirtir cc1ff00e8a fixup! Update existing tests & Add more tests 2021-01-05 15:16:53 +03:00
Onur Tirtir 0a50e0ede0 fixup! Update existing tests & Add more tests 2021-01-05 15:06:50 +03:00
Onur Tirtir 8c24018679 fixup! Cover postgres tables for CREATE TABLE commands when pg<13 2021-01-05 14:07:38 +03:00
Onur Tirtir 154c5baaa0 fixup! Consider fkey graph invalidations due to CREATE TABLE cmds too 2021-01-05 14:04:31 +03:00
Onur Tirtir eb3235d5dc Update existing tests & Add more tests 2020-12-30 15:21:31 +03:00
Onur Tirtir db5bae8ffa Cover DROP COLUMN commands dropping columns in the either side of fkeys 2020-12-29 13:10:05 +03:00
Onur Tirtir f29d7f1983 Cover DROP unique/primary CONSTRAINT commands dropping fkeys 2020-12-29 13:10:05 +03:00
Onur Tirtir 0502ca5f39 Handle DROP FKEY commands in preprocess 2020-12-29 13:10:05 +03:00
Onur Tirtir 6af1ece547 Cover ADD COLUMN commands defining fkeys 2020-12-29 13:10:05 +03:00
Onur Tirtir 1b53193eb9 Handle ADD FKEY commands in preprocess 2020-12-29 13:10:04 +03:00
Onur Tirtir 80dde5e94e Reset shouldInvalidateForeignKeyGraph on failure 2020-12-29 13:10:04 +03:00
Onur Tirtir 51ab536eed Consider fkey graph invalidations due to CREATE TABLE cmds too 2020-12-29 13:02:54 +03:00
Onur Tirtir 3f2a52b7ce Cover postgres tables for CREATE TABLE commands when pg<13 2020-12-29 13:02:54 +03:00
Onur Tirtir 66d2884ee8 Cover postgres tables for DROP TABLE commands 2020-12-29 13:02:54 +03:00
Onur Tirtir e91e745dbc
Implement ConstraintWithNameIsOfType (#4451) 2020-12-29 11:53:06 +03:00
Onur Tirtir c0e7f31eb0
Merge pull request #4452 from citusdata/implement-GetPgDependTuplesForDependingObjects
Implement GetPgDependTuplesForDependingObjects
2020-12-29 01:13:38 +03:00
Onur Tirtir e74acf11fe
Merge branch 'master' into implement-GetPgDependTuplesForDependingObjects 2020-12-29 00:34:31 +03:00
Onur Tirtir 87e5276bdd
Fix fkey graph test for self reference (#4450) 2020-12-28 12:47:39 +03:00
Onur Tirtir feda8bdd37 Now that we use tuples after closing pg_depend, don't release lock 2020-12-25 18:03:28 +03:00
Onur Tirtir 04a4167a8a Implement GetPgDependTuplesForDependingObjects 2020-12-25 18:03:28 +03:00
Halil Ozan Akgül a8626d1944
Fixes the table used in the error message (#4449) 2020-12-25 16:48:50 +03:00
Naisila Puka b9cd91ef08
Merge pull request #4409 from citusdata/issue4237
Prevent empty placement creation in the coordinator
2020-12-25 12:43:42 +03:00
Naisila Puka 04aeb6938b
Merge branch 'master' into issue4237 2020-12-25 12:36:40 +03:00
Hadi Moshayedi 52164450eb
Merge pull request #4419 from citusdata/metadata_sync
Do metadata sync in a separate background worker.
2020-12-24 09:15:16 -08:00
Hadi Moshayedi a2c73bef27 Trigger metadata sync at transaction commit 2020-12-24 08:28:38 -08:00
Hadi Moshayedi 4df723cf9b Do metadata sync in a separate background worker. 2020-12-24 08:25:55 -08:00
Ahmet Gedemenli 299d3fcbc5
Merge pull request #4444 from citusdata/alter-statistics-propagation
Propagate alter statistics
2020-12-24 18:35:52 +03:00
Naisila Puka 0bb2c991f9
Merge branch 'master' into issue4237 2020-12-24 18:05:27 +03:00
Ahmet Gedemenli 5af585269a Add separate pg13 test for stats targets 2020-12-24 18:01:25 +03:00
naisila 59a81491e8 Add test for master_create_empty_shard on coordinator 2020-12-24 17:59:40 +03:00
Ahmet Gedemenli d4bc17f6f0 Propagate statistics with altered targets 2020-12-24 17:10:12 +03:00
Ahmet Gedemenli 48ca1637a4 Propagate alter stats owner 2020-12-24 17:10:12 +03:00
Ahmet Gedemenli f7c70f9a63 Propagate alter stats target 2020-12-24 17:10:12 +03:00
Ahmet Gedemenli 5a1607b6c0 Propagate alter stats schema 2020-12-24 17:10:12 +03:00
Ahmet Gedemenli bdce4a7e67 Propagate rename statistics 2020-12-24 17:10:12 +03:00
Onur Tirtir 5ed9197041
Implement infra to get foreign key connected relations (#4439)
On top of our foreign key graph, implement the infrastructure to get
list of relations that are connected to input relation via a foreign key
graph.
We need this to support cascading create_citus_local_table &
undistribute_table operations.

Also add regression tests to see what our foreign key graph is able to
capture currently.
2020-12-24 16:42:40 +03:00
Onur Tirtir 0db21bbe14
Remove fkey graph visited flags & rework GetConnectedListHelper (#4446)
With this commit, we remove visited flags from ForeignConstraintRelationshipNode
struct since keeping local state in global object is both dangerous and
meaningless.

Also to improve readability, this commit also converts needless recursion to
iterative DFS to avoid passing local hash-map as another parameter to
GetConnectedListHelper function.
2020-12-24 12:38:48 +03:00