Closed jgoux closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
postgres-new | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Oct 1, 2024 8:05am |
@gregnr All comments addressed, merging! 🫡
I implemented a "middleware" which :
pg_dump
initiated a connection through theapplication_name=pg_dump
in the Startup message.The two queries we're interested in are:
I looked at pg_dump code from v15 to v17 and the queries definitions are the same across all these versions so we can safely detect them.
The logic is:
vector
extension and then patch it (using the oid 99999)vector
extension oid for a search/replace purpose.Once pg_dump receives an
oid > 16384
for the extensions, it will print theCREATE EXTENSION
statements in the dump.If we use
pg_dump
to migrate people to the new domain, we will be able to delete this middleware as everyone will be on a patched version of PGlite. 👍