pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dean Gibson (DB Administrator) <postgresql@mailpen.com>
To: pgsql-performance@postgresql.org
Subject: Re: AWS forcing PG upgrade from v9.6 a disaster
Date: Thu, 10 Jun 2021 12:29:05 -0700
Message-ID: <1921658f-4827-e89b-9ecf-68bf6e0d212a@mailpen.com> (raw)
In-Reply-To: <a1916786-21e4-e336-47d6-71057a45ded0@dunslane.net>
References: <88dec70b-eb63-0b72-0b5d-253851ef127b@mailpen.com>
	<92cc8563-195f-8727-d887-5f2bb63f231f@mailpen.com>
	<20210601041635.GQ2082@telsasoft.com>
	<a38c45cf-3bbd-b43a-0f8a-11539c1c6dc1@mailpen.com>
	<a7e9da9d-7433-ee02-9e35-db6b19acdcd4@mailpen.com>
	<18f77a0c-dade-b86a-cbeb-6f85d3d137e1@dunslane.net>
	<ec18a226-6bef-7ba6-e176-c751e189270d@mailpen.com>
	<CAEudQAodj-ywxc-3fgh8wK7oP8WXCoNSs0j8EF4HK+uUixTqMA@mail.gmail.com>
	<4abbbebd-1496-7376-136f-38eb91773cd2@mailpen.com>
	<1682562.1623348017@sss.pgh.pa.us>
	<a1916786-21e4-e336-47d6-71057a45ded0@dunslane.net>

On 2021-06-10 11:23, Andrew Dunstan wrote:
> On 6/10/21 2:00 PM, Tom Lane wrote:
>> "Dean Gibson (DB Administrator)" <postgresql@mailpen.com> writes:
>>> ... Do I need quotes on the command line?
>>> On 2021-06-10 09:54, Ranier Vilela wrote:
>>>> Your cmd lacks =
>>>> =>pg_dumpall -U Admin --exclude-database=MailPen >zzz.sql
>>> I read [the manual] before posting, but missed that.  Old command line patterns die hard!
>>> However, the result was the same:  3.5GB before running out of space.
>> [ experiments... ]  Looks like you gotta do it like this:
>>
>> 	pg_dumpall '--exclude-database="MailPen"' ...
>>
>> This surprises me, as I thought it was project policy not to case-fold command-line arguments (precisely because you end up needing weird quoting to prevent that).	
> Ouch. That looks like a plain old bug. Let's fix it. IIRC I just used the same logic that we use for pg_dump's --exclude-* options, so we need to check if they have similar issues.
>
> cheers, andrew

That works!  I thought it was a quoting/case issue!  I was next going to 
try single quotes just outside double quotes, & that works as well (& is 
a bit more natural):

pg_dumpall -U Admin --exclude-database='"MailPen"' >zzz.sql

Using mixed case has bitten me before, but I am not deterred!  I run 
phpBB 3.0.14 (very old version) because upgrades to more current 
versions fail on the mixed case of the DB name, as well as the use of 
SCHEMAs to isolate the message board from the rest of the data. Yes, I 
reported it years ago.

I use lower-case for column, VIEW, & function names;  mixed (camel) case 
for table, schema, & database names;  & upper-case for SQL keywords.  It 
helps readability (as does murdering a couple semicolons in the prior 
sentence).

view thread (54+ messages)  latest in thread

Message-ID: <1921658f-4827-e89b-9ecf-68bf6e0d212a@mailpen.com>
Permalink:  ../1921658f-4827-e89b-9ecf-68bf6e0d212a@mailpen.com/
Also on:    postgresql.org/message-id/1921658f-4827-e89b-9ecf-68bf6e0d212a@mailpen.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: postgresql@mailpen.com
  Subject: Re: AWS forcing PG upgrade from v9.6 a disaster
  In-Reply-To: <1921658f-4827-e89b-9ecf-68bf6e0d212a@mailpen.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox