From: | Jeff Davis <jdavis-pgsql(at)empires(dot)org> |
---|---|
To: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: How to crash postgres using savepoints |
Date: | 2004-08-03 11:02:24 |
Message-ID: | 1091530944.24603.109.camel@jeff |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 2004-08-03 at 03:41, Gavin Sherry wrote:
> Attached is a patch fixing this.
>
> One question I do have:
>
> if (target->savepointLevel != s->savepointLevel)
>
> Will this ever be true in the current code? I cannot see anything setting
> savepointLevel explicitly.
>From reading the lists, it seems like that's allowing for some
functionality that was talked about but wasn't part of the semantics
agreed upon by the end of the discussion.
I have a question for you also. I just posted a patch at about the same
time you did (I sent it to pgsql-patches, but I haven't seen it appear
yet). Mine was a one-liner (appended to end of this email) and all it
did was add a check into the aforementioned line for a non-null target
pointer. My patch seemed to work, so I'd like to know why you changed
the structure around more. I did notice some things were a little
cleaner, so was it just clean-up or does my patch fail in some way?
Regards,
Jeff
--- xact.c.old 2004-08-03 03:18:12.000000000 -0700
+++ xact.c 2004-08-03 03:19:05.000000000 -0700
@@ -2529,7 +2529,7 @@
target = target->parent;
/* we don't cross savepoint level boundaries */
- if (target->savepointLevel != s->savepointLevel)
+ if (PointerIsValid(target) && (target->savepointLevel !=
s->savepointLevel))
ereport(ERROR,
(errcode(ERRCODE_S_E_INVALID_SPECIFICATION),
errmsg("no such savepoint")));
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Elphick | 2004-08-03 11:36:12 | Unicode restriction |
Previous Message | Gavin Sherry | 2004-08-03 10:41:27 | Re: How to crash postgres using savepoints |