gpdb
gpdb copied to clipboard
Re-enable test with database name containing quotes.
Since the PostgreSQL 9.4.20 merge, commit 928bca1a30, pg_upgrade can handle database names that contain quotes correctly. Re-enable test for it.
Fixes https://github.com/greenplum-db/gpdb/issues/3857
A db with similar name is also created in gpcopy.source: "funny copy""db'with\\quotes", but it doesn't mean we couldn't have another one ;)
LGTM, thank you.
Looks like Concourse caught something:
subprocess.CalledProcessError: Command 'psql 'funny"db'"'"'with\\quotes' -t -c " CREATE EXTENSION IF NOT EXISTS gp_replica_check "' returned non-zero exit status 1
On 15/01/2019 18:07, Jacob Champion wrote:
Looks like Concourse caught something:
subprocess.CalledProcessError: Command 'psql 'funny"db'"'"'with\\quotes' -t -c " CREATE EXTENSION IF NOT EXISTS gp_replica_check "' returned non-zero exit status 1
Yeah. I went down this rabbit hole to some depth.
The immediate issue is that there are shell-quoting issues in gp_replica_check.py. After fixing that, this was the next obstacle:
funny"db'with\quotes=# create extension "gp_replica_check" ; ERROR: no schema has been selected to create in
There's a per-database SET option in that database, setting search_path to a non-existent schema.
Ok, that seems easy enough to fix, there's a CREATE EXTENSION WITH SCHEMA option for that. But alas:
funny"db'with\quotes=# create extension "gp_replica_check" with schema public; ERROR: current transaction is aborted, commands ignored until end of transaction block (seg0 127.0.0.1:40000 pid=12190)
Turns out, the WITH SCHEMA option doesn't work correctly in GPDB :-(. That's a separate issue from quoting the database name.
- Heikki
Should we keep this PR as we wait for #6716 to be completed, or should we put in an issue and revisit this later?
I have rebased this and open a new one https://github.com/greenplum-db/gpdb/pull/13923
Close this.
Thanks a lot for the PR.