You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[8.x] Fix issues with dumping PostgreSQL databases that contain multiple schemata (#36046)
* Eliminate the need for search_path logic
The PostgreSQL search_path logic that this commit removes was added with the intention of enabling support for a schema named anything other than "public". While the theory was sound, the implementation didn't take into account the behavior in databases in which *multiple* schemas exist. In multi-schema databases, the list of tables for which data should not be dumped was incorrect, leading to unexpected behavior.
This revised approach takes advantage of PostgreSQL's support for pattern-based object references when specifying the list of tables for which data should not be dumped, and eliminates the need to perform complex search_path parsing altogether.
The attendant Pull Request documentation explains how this technique works in detail.
* Re-implement pg_restore fix that was reverted
#36054 was fixed in a previous commit, but appears to have been lost during subsequent edits in 7be50a5 .
This commit restores the changes made in 502e75b .
Fixes#36054
* Fix PostgreSQL object reference pattern quoting
While not required in a psql interactive terminal, this pattern requires outer double-quotes to function as intended when passed as a CLI argument.
While simple in this specific instance, pattern quoting can grow complicated (depending on the pattern), but is well explained in the PostgreSQL manual:
https://www.postgresql.org/docs/current/app-psql.html#APP-PSQL-PATTERNS
0 commit comments