From: Gregory Stark <stark@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Erik Jones <erik@myemma.com>
Cc: Douglas J Hunley <doug@hunley.homeip.net>
Cc: Jeff <threshar@threshar.is-a-geek.com>
Cc: Richard Huxton <dev@archonet.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: 7 hrs for a pg_restore?
Date: Wed, 20 Feb 2008 23:31:49 +0000
Message-ID: <87zltvurve.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <9755.1203526446@sss.pgh.pa.us>
References: <200802191303.58840.doug@hunley.homeip.net>
<200802191555.43340.doug@hunley.homeip.net>
<080DA59E-2C02-4370-8584-FA7C8CC008B0@myemma.com>
<200802200826.38611.doug@hunley.homeip.net>
<874pc3ww96.fsf@oxford.xeocode.com>
<0C5E3C24-530F-40AD-8CB4-B0477A368F6E@myemma.com>
<9755.1203526446@sss.pgh.pa.us>
"Tom Lane" <tgl@sss.pgh.pa.us> writes:
> Erik Jones <erik@myemma.com> writes:
>> On Feb 20, 2008, at 8:14 AM, Gregory Stark wrote:
>>> I would suggest leaving out the && which only obfuscate what's
>>> going on here.
>>>
>>> PGOPTIONS=... pg_restore ...
>>>
>>> would work just as well and be clearer about what's going on.
>
>> Right, that's just an unnecessary habit of mine.
>
> Isn't that habit outright wrong? ISTM that with the && in there,
> what you're doing is equivalent to
>
> PGOPTIONS=whatever
> pg_restore ...
>
> This syntax will set PGOPTIONS for the remainder of the shell session,
> causing it to also affect (say) a subsequent psql invocation. Which is
> exactly not what is wanted.
When I said "obfuscating" I meant it. I'm pretty familiar with sh scripting
and I'm not even sure what the && behaviour would do. On at least some shells
I think the && will introduce a subshell. In that case the variable would not
continue. In bash I think it would because bash avoids a lot of subshells that
would otherwise be necessary.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's RemoteDBA services!
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: stark@enterprisedb.com, tgl@sss.pgh.pa.us, erik@myemma.com, doug@hunley.homeip.net, threshar@threshar.is-a-geek.com, dev@archonet.com
Subject: Re: 7 hrs for a pg_restore?
In-Reply-To: <87zltvurve.fsf@oxford.xeocode.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