[Fixes #14321] copy_with_dump is missing from copy_table_with_ogr2ogr#14323
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces an alternative table copying mechanism in copy_table_with_ogr2ogr using ogr2ogr's PGDump format piped directly into psql when the OGR2OGR_COPY_WITH_DUMP environment variable is enabled. A corresponding unit test has been added to verify this behavior. Feedback on these changes highlights two critical issues: first, the psql command is missing the port parameter (-p) and lacks safe defaults for HOST and PORT, which could cause connection failures; second, using stderr=PIPE on the first piped process without reading from it concurrently poses a deadlock risk if the buffer fills up, which can be resolved by redirecting its stderr to a temporary file.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #14323 +/- ##
=======================================
Coverage 74.91% 74.92%
=======================================
Files 982 982
Lines 60496 60527 +31
Branches 8247 8252 +5
=======================================
+ Hits 45322 45348 +26
- Misses 13344 13349 +5
Partials 1830 1830 🚀 New features to boost your workflow:
|
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
The backport to To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-5.0.x 5.0.x
# Navigate to the new working tree
cd .worktrees/backport-5.0.x
# Create a new branch
git switch --create backport-14323-to-5.0.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 a0f50e5eb4cf6d19693967879aa78a296037d7ac
# Push it to GitHub
git push --set-upstream origin backport-14323-to-5.0.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-5.0.xThen, create a pull request where the |
…#14323) (#14324) * [Fixes #14321] copy_with_dump is missing from copy_table_with_ogr2ogr --------- (cherry picked from commit a0f50e5) Co-authored-by: mattiagiupponi <51856725+mattiagiupponi@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Checklist
For all pull requests:
The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):
Submitting the PR does not require you to check all items, but by the time it gets merged, they should be either satisfied or inapplicable.