Commit Graph

4961 Commits (pg_dist_object-metadatasync)

Author SHA1 Message Date
Jelte Fennema caa1bda172 Improve comment 2021-07-22 16:50:35 +02:00
Jelte Fennema a9669ab08a Fix test 2021-07-22 16:38:38 +02:00
Jelte Fennema 5cec5423b4 Fix typo in comment 2021-07-22 16:38:38 +02:00
Jelte Fennema 4133d38479 Fix warnings 2021-07-22 16:38:38 +02:00
Jelte Fennema 379f2a9b3b Move pg_dist_object commandlist generation to a function 2021-07-22 16:38:38 +02:00
Jelte Fennema 19d61c6bcd Simplify metadata snapshot syncing 2021-07-22 16:38:38 +02:00
Jelte Fennema 11f8f1f046 Update comments 2021-07-22 14:59:15 +02:00
Jelte Fennema 428b819516 Rename argument to localOnly 2021-07-22 12:22:01 +02:00
Jelte Fennema f3b7e53734 Simplify marking a sequence list as distributed 2021-07-22 12:22:01 +02:00
Jelte Fennema f9a6d11e08 Increment command counter after altering sequence type 2021-07-22 12:22:01 +02:00
Jelte Fennema 5ae0974f38 Sync pg_dist_object to all nodes with metadata 2021-07-22 12:22:01 +02:00
Jelte Fennema 00b6efa607 Support enabling metadata syncing on secondaries 2021-07-22 12:22:01 +02:00
Jelte Fennema 4c1066e463
Merge pull request #5133 from citusdata/add-cache-to-sequence-def-mx
Include data_type and cache in sequence definition on workers
2021-07-22 11:57:03 +02:00
Jelte Fennema 7d0b6dc9be Include data_type and cache in sequence definition on workers
These two options were not included when creating the sequences on the
workers as part of metadata syncing.

The missing `data_type` part of the definition made finding the cause
of #5126 harder than necessary, because of confusing errors.
2021-07-22 11:49:06 +02:00
Önder Kalacı f52db0abab
Merge pull request #5127 from citusdata/get_ready_tenant_isolation
Introduce citus_internal_delete_shard_metadata
2021-07-19 14:43:47 +02:00
Onder Kalaci 903489c763 Improve wording of an error message 2021-07-19 14:38:52 +02:00
Onder Kalaci c8368e7929 Introduce citus_internal_delete_shard_metadata
With this function, the owner of the table is allowed to remove
shard metadata. This is going to be useful for tenant-isolation.
2021-07-19 13:25:05 +02:00
Önder Kalacı 87a51ae552
CLUSTER ON deparser should consider schemas (#5122) 2021-07-16 19:13:18 +03:00
Hanefi Onaldi 38c139ba59
Merge pull request #5114 from citusdata/changelog-updates 2021-07-16 17:53:36 +03:00
Hanefi Onaldi 6b4996f47e
Add changelog entries for 10.1.0
This patch also moves the section to the top of the changelog
2021-07-16 16:51:12 +03:00
Jelte Fennema adf17a8cf1
Add upgrade and dowgrade tests for Citus 10.2 (#5120)
It seems we forgot to add this when starting 10.2 development.
2021-07-16 14:39:04 +02:00
Önder Kalacı 644052ea58
Merge pull request #5105 from citusdata/regular_user_metadata_sync
Use current user while syncing metadata
2021-07-16 14:00:32 +02:00
Onder Kalaci 2c349e6dfd Use current user to sync metadata
Before this commit, we always synced the metadata with superuser.
However, that creates various edge cases such as visibility errors
or self distributed deadlocks or complicates user access checks.

Instead, with this commit, we use the current user to sync the metadata.
Note that, `start_metadata_sync_to_node` still requires super user
because accessing certain metadata (like pg_dist_node) always require
superuser (e.g., the current user should be a superuser).

However, metadata syncing operations regarding the distributed
tables can now be done with regular users, as long as the user
is the owner of the table. A table owner can still insert non-sense
metadata, however it'd only affect its own table. So, we cannot do
anything about that.
2021-07-16 13:25:27 +02:00
Hanefi Onaldi b3cc9d63cb
Merge pull request #5111 from citusdata/changelog-updates 2021-07-14 15:42:43 +03:00
Hanefi Onaldi 45b72c204d
Add changelog entry for 10.0.4 2021-07-14 15:04:45 +03:00
Onur Tirtir f00c63c33d
Support columnar table index builds with CONCURRENTLY option (#5032)
With this commit, we add (`CREATE INDEX` / `REINDEX`) `CONCURRENTLY` support for columnar tables.

For that, we implement `columnar_index_validate_scan` callback.
The reasoning behind the implementation is as follows:

* Postgres function `validate_index` provides all the TIDs that are currently in the
  index to `columnar_index_validate_scan` callback via a `tupleSort` object..

* We start scanning the table by using `columnar_getnextslot` as usual.
  Before moving forward, note that `columnar_getnextslot` guarantees
  to return tuples in the order of their TIDs.

* For us to use during table scan, postgres provides a snapshot guaranteeing
  that any tuples that are valid according to that snapshot but are not in the
  index must be added to the index.

* Then for each tuple that we read from our table, we continue iterating
  given `tupleSort` to find the first TID that is greater than or equal to our
  tuple's TID.

  If both TID's are equal to each other, then we skip the tuple since it's already
  indexed.

  If the TID that we read from tupleSort is greater then our tuple's TID, then
  we decide to insert this tuple into index.
2021-07-09 13:44:58 +03:00
Onur Tirtir ea5fe022a4
Be more explicit when doing ordered scan on columnar cat. tables (#5026)
systable_getnext already uses ForwardScanDirection if relation has any
open indexes, but let's be more explicit doing ordered scan on columnar
catalog tables.
2021-07-09 13:24:27 +03:00
Hanefi Onaldi ab873c6b58
Merge pull request #5030 from citusdata/do-not-use-public-schema 2021-07-09 02:15:42 +03:00
Hanefi Onaldi efc5776451
Remove public schema dependency for 10.1 upgrades
This commit contains a subset of the changes that should be cherry
picked to 10.1 releases.
2021-07-09 02:08:22 +03:00
Hanefi Onaldi 8e9cc229ff
Remove public schema dependency for 10.0 upgrades
This commit contains a subset of the changes that should be cherry
picked to 10.0 releases.
2021-07-09 02:08:22 +03:00
Ahmet Gedemenli ed3b98a80b
Add failure test for stop_metadata_sync_to_node (#5102) 2021-07-08 18:23:19 +03:00
Hanefi Onaldi 38c24ae0db
Merge pull request #5100 from citusdata/changelog-updates 2021-07-08 16:02:11 +03:00
Hanefi Onaldi b68188cd3f fixup! Add changelog entry for 9.5.6 2021-07-08 15:25:00 +03:00
Hanefi Onaldi d96d730178
Add changelog entry for 9.5.6 2021-07-08 13:31:19 +03:00
Nils Dijk 2e60f5cf43
Merge pull request #5095 from citusdata/fix/prepare-upgrade-idempotent
Fix: citus_prepare_pg_upgrade idempotency
2021-07-08 12:29:18 +02:00
Nils Dijk 18652ef9ff
fix 10.1-1 upgrade script to adhere to idempotency 2021-07-08 12:24:52 +02:00
Nils Dijk e5517dc7b3
fix 9.5-2 upgrade script to adhere to idempotency 2021-07-08 12:24:52 +02:00
Nils Dijk 366796a72e
Add test for idempotency of citus_prepare_pg_upgrade 2021-07-08 12:24:51 +02:00
Hanefi Onaldi 79979f56cf
Merge pull request #5092 from citusdata/changelog-updates 2021-07-08 09:44:38 +03:00
Hanefi Onaldi d3b6651403
Add changelog entry for 9.5.5 2021-07-07 16:34:30 +03:00
Hanefi Onaldi 80a5539671
Add changelog entry for 9.4.5 2021-07-07 16:34:30 +03:00
Onur Tirtir dfcfa18edc
Merge pull request #5088 from citusdata/col/refactor-reader
Remove stripeList (list of StripeMetadata) & currentStripe (stripeList index of the
current stripe being read) from ColumnarReadState, introduce currentStripeMetadata.
2021-07-07 11:21:16 +03:00
Onur Tirtir 7bfd84bc70 Introduce StripeGetHighestRowNumber 2021-07-07 11:01:39 +03:00
Onur Tirtir 8942086506 Remove stripeList & currentStripe from ColumnarReadState 2021-07-07 11:01:39 +03:00
Onur Tirtir 16dee73b10 Refactor FindStripeByRowNumber into StripeMetadataLookupRowNumber
Push the most logic in FindStripeByRowNumber down to an helper function
to re-use it in next commit.
2021-07-07 11:01:38 +03:00
Nils Dijk 2954fb0ee8
Merge pull request #5076 from citusdata/marcocitus/fix-pg-upgrade
DESCRIPTION: Fixes an issue that could cause citus_finish_pg_upgrade to fail

Rewiring Citus upgrade scripts to fix the prepare/finish PG upgrade scripts. 

Users who upgrade to the patch release of 9.4 will get the fix via 9.4-1--9.4-2.
Users who upgrade to the patch release of 9.5 will get the fix via 9.5-1--9.5-2.
Users who upgrade to the patch release of 10.0 will get the fix via 10.0-3--10.0-4.
Users who upgrade to Citus 10.1 will also get it as part of the 10.0-3--10.0-4 upgrade path.

Given that we use CREATE OR REPLACE, it's ok to get the fix multiple times.

Fixes #5068, but not #5069.
2021-07-05 16:14:14 +02:00
Marco Slot 214c674989
Fix PG upgrade scripts for 10.1 2021-07-05 14:38:26 +02:00
Marco Slot b14955c2bd
Fix PG upgrade scripts for 10.0 2021-07-05 14:38:20 +02:00
Marco Slot 3c0dfc12c0
Fix PG upgrade scripts for 9.5 2021-07-05 13:39:35 +02:00
Marco Slot bee202aa39
Fix PG upgrade scripts for 9.4 2021-07-05 13:39:28 +02:00