Re: getting "shell command argument contains a newline or carriage return:" error with pg_dumpall when db name have new line in double quote
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Mahendra Singh Thalor <mahi6run@gmail.com>,
Nathan Bossart <nathandbossart@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Álvaro Herrera <alvherre@alvh.no-ip.org>, Srinath Reddy <srinath2133@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2026-01-29T14:37:36Z
Lists: pgsql-hackers
On 2026-01-20 Tu 1:29 AM, Mahendra Singh Thalor wrote: > On Tue, 24 Jun 2025 at 11:37, Mahendra Singh Thalor <mahi6run@gmail.com> wrote: >> On Fri, 11 Apr 2025 at 20:17, Nathan Bossart <nathandbossart@gmail.com> wrote: >>> On Thu, Apr 10, 2025 at 11:58:41PM +0530, Mahendra Singh Thalor wrote: >>>> As per above discussions, for v18, we will not do any change to server >>>> side to fix the issue of \n\r in database names. But as a cleanup >>>> patch, we can give an alert to the user by "pg_upgrade --check". As >>>> per current code, pg_dump and pg_upgrade will fail with "shell >>>> command" error but in the attached patch, we will give some extra info >>>> to the user by "pg_upgrade --check" so that they can fix database >>>> names before trying to upgrade. >>>> >>>> Here, I am attaching a patch which will give a list of invalid >>>> database names in "pg_upgrade --check". We can consider this as a >>>> cleanup patch. >>> Are you proposing this for v18? I think this is all v19 material at this >>> point. Perhaps we could argue this is a bug fix that should be >>> back-patched, but IMHO that's a bit of a stretch. I don't sense a >>> tremendous amount of urgency, either. >>> >>> -- >>> nathan >> Thanks Nathan for the review. >> >> I want to re-start this thread for v19. I posted v06* patches in my previous updates[1]. Please someone review it and let me know feedback. >> >> v06 patches: v06_patches >> >> [1] : https://www.postgresql.org/message-id/CAKYtNAqC5pkjmh8UgvbNLtMyEVeKUtDF3_%2B9dvG9zb8YrhTJQQ%40mail.gmail.com >> >> -- >> Thanks and Regards >> Mahendra Singh Thalor >> EnterpriseDB: http://www.enterprisedb.com > Hi, > Here I am attaching updated patches for the review. Please someone review it. > > These patches need a little copy editing (e.g. "check_database_role_names_in_old_cluser" seems to be missing a "t") and the error messages and comments need some tidying, but I think they are basically sound. Is there any objection to them in principle? cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Disallow CR and LF in database, role, and tablespace names
- b380a56a3f95 19 (unreleased) landed
-
Switch the regression tests of pg_upgrade to use TAP tests
- 322becb6085c 15.0 cited