-
-
Notifications
You must be signed in to change notification settings - Fork 62
feat(postgres): add partitioned table support #297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
abhi-airspace-intelligence
wants to merge
18
commits into
supabase:main
Choose a base branch
from
uni-intelligence:abhi/add-partitioned-table-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f385522
Create replication for partitioned table issue
abhi-airspace-intelligence 9913523
Fix partitioned tables
abhi-airspace-intelligence 5509568
Clippy
abhi-airspace-intelligence b423049
merge conflict
abhi-airspace-intelligence c4087b2
make sql lowercase
abhi-airspace-intelligence ae4f86f
fit new test style
abhi-airspace-intelligence ef58a4b
Switch to `publish_via_partition_root = true`
abhi-airspace-intelligence 8272754
clippy
abhi-airspace-intelligence 80ece8f
Merge conflict
abhi-airspace-intelligence f8be974
Use cargo nextest to speed up runs
abhi-airspace-intelligence 8d2fd3c
add retries to test for nondeterministic tests
abhi-airspace-intelligence 9bd46b5
Add slow timeout
abhi-airspace-intelligence 3524085
Simplify COPY command
abhi-airspace-intelligence 2089cc0
Use recursive query to get oids and write test
abhi-airspace-intelligence 5ef0c6d
Remove unnecessary namespace check
abhi-airspace-intelligence 82436de
Add test about dropping partitions
abhi-airspace-intelligence c00be91
fmt
abhi-airspace-intelligence c41ed85
Clippy
abhi-airspace-intelligence File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[profile.default] | ||
retries = 2 | ||
slow-timeout = { period = "15s", terminate-after = 4 } | ||
|
||
[profile.no-bigquery] | ||
default-filter = "not (package(etl-destinations) and binary(/bigquery_pipeline/))" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,19 +90,14 @@ jobs: | |
sudo apt-get install libpq-dev -y | ||
./etl-api/scripts/run_migrations.sh | ||
|
||
- name: Install cargo-nextest | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-nextest | ||
|
||
- name: Run Tests | ||
run: | | ||
cargo test \ | ||
--workspace \ | ||
--all-features \ | ||
--no-fail-fast \ | ||
--exclude etl-destinations \ | ||
&& \ | ||
cargo test \ | ||
-p etl-destinations \ | ||
--no-default-features \ | ||
--no-fail-fast \ | ||
--features iceberg | ||
cargo nextest run --all-features --no-fail-fast --profile no-bigquery | ||
|
||
test-full: | ||
name: Tests (Full) | ||
|
@@ -121,6 +116,8 @@ jobs: | |
|
||
- name: Set up Rust | ||
uses: dtolnay/[email protected] | ||
with: | ||
components: llvm-tools-preview | ||
|
||
- name: Cache Cargo | ||
uses: Swatinem/rust-cache@v2 | ||
|
@@ -149,8 +146,10 @@ jobs: | |
sudo apt-get install libpq-dev -y | ||
./etl-api/scripts/run_migrations.sh | ||
|
||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- name: Install cargo-llvm-cov and cargo-nextest | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
tool: cargo-llvm-cov,cargo-nextest | ||
|
||
- name: Set up BigQuery Credentials | ||
run: | | ||
|
@@ -161,10 +160,8 @@ jobs: | |
- name: Generate Code Coverage | ||
id: coverage | ||
run: | | ||
cargo llvm-cov test \ | ||
--workspace --no-fail-fast \ | ||
--all-features \ | ||
--lcov --output-path lcov.info | ||
cargo llvm-cov nextest --no-fail-fast \ | ||
--all-features --lcov --output-path lcov.info | ||
|
||
- name: Upload Coverage to Coveralls | ||
uses: coverallsapp/github-action@v2 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Join publication tables without schema
The new recursive query in
PgReplicationClient::get_publication_table_ids
now joinspg_publication_tables
topg_class
only onrelname
. If a publication includes two tables with the same name in different schemas (e.g.sales.users
andarchive.users
), this join can resolve to the wrong OID and the client will subscribe to or copy data from the wrong table. The previous implementation joined on both schema and table name and avoided this ambiguity.Useful? React with 👍 / 👎.