From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Christopher Browne <cbbrowne(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: psql - -dry-run option |
Date: | 2015-12-21 03:46:09 |
Message-ID: | 56777601.3030209@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 12/18/15 2:50 AM, Shulgin, Oleksandr wrote:
> On Thu, Dec 17, 2015 at 9:13 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>> wrote:
>
>
> Whether we really need a feature like that isn't clear though; it's not
> like it's hard to test things that way now. Stick in a BEGIN with no
> COMMIT, you're there. The problem only comes in if you start expecting
> the behavior to be bulletproof. Maybe I'm being too pessimistic about
> what people would believe a --dry-run switch to be good for ... but
> I doubt it.
>
>
> I'm on the same line: BEGIN/ROLLBACK requires trivial effort and a
> --dry-run option might give a false sense of security, but it cannot
> possibly rollback side-effects of user functions which modify filesystem
> or interact with the outside world in some other way.
The issue with that is if you're \i'ing files in and one of those
happens to contain a COMMIT, you're hosed. I can see some use for a
"must rollback" mode of BEGIN.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
From | Date | Subject | |
---|---|---|---|
Next Message | Craig Ringer | 2015-12-21 04:12:55 | Re: psql - -dry-run option |
Previous Message | David Fetter | 2015-12-21 02:50:41 | Re: Weighted Stats |