Skip to content

Map Postgres IDENTITY columns safely to Spanner - #1396

Open
SaurabhSingh2115 wants to merge 3 commits into
GoogleCloudPlatform:masterfrom
SaurabhSingh2115:pg-identity-column-support
Open

Map Postgres IDENTITY columns safely to Spanner#1396
SaurabhSingh2115 wants to merge 3 commits into
GoogleCloudPlatform:masterfrom
SaurabhSingh2115:pg-identity-column-support

Conversation

@SaurabhSingh2115

Copy link
Copy Markdown

Fixes #545474127

Currently, SMT successfully detects legacy PostgreSQL sequences (e.g., SERIAL types) everywhere. However, the dump file parser entirely misses modern SQL-standard IDENTITY configurations (introduced in PostgreSQL 10+). If a user uploads a dump file from a modern database, their auto-increment columns are silently lost.

@SaurabhSingh2115
SaurabhSingh2115 requested a review from a team as a code owner September 3, 2026 13:00
@SaurabhSingh2115
SaurabhSingh2115 requested review from bharadwaj-aditya and sm745052 and removed request for a team September 3, 2026 13:00
@SaurabhSingh2115
SaurabhSingh2115 requested a review from a team September 3, 2026 13:01
@SaurabhSingh2115
SaurabhSingh2115 marked this pull request as draft September 3, 2026 13:01
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.32%. Comparing base (a046b9a) to head (96f7ae1).

Files with missing lines Patch % Lines
sources/postgres/infoschema.go 90.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1396      +/-   ##
==========================================
+ Coverage   51.28%   51.32%   +0.04%     
==========================================
  Files         203      203              
  Lines       22980    23003      +23     
  Branches      552      552              
==========================================
+ Hits        11785    11807      +22     
- Misses      10500    10501       +1     
  Partials      695      695              
Components Coverage Δ
backend-apis 46.10% <ø> (ø)
backend-library 56.97% <92.00%> (+0.05%) ⬆️
cli 26.62% <ø> (ø)
frontend 39.34% <ø> (+0.02%) ⬆️
Files with missing lines Coverage Δ
sources/postgres/pgdump.go 73.94% <100.00%> (+0.19%) ⬆️
sources/postgres/infoschema.go 84.86% <90.00%> (+0.16%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SaurabhSingh2115
SaurabhSingh2115 marked this pull request as ready for review September 4, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant