Lists: | pgsql-hackerspgsql-patches |
---|
From: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Duplicate object names in GRANT |
Date: | 2005-07-27 03:47:25 |
Message-ID: | Pine.LNX.4.58.0507271339530.22654@linuxworld.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Hi all,
I ran across this yesterday on HEAD:
template1=# grant select on foo, foo to swm;
ERROR: tuple already updated by self
We could do away with the error by producing a unique list of object names
-- but that would impose an extra cost on the common case. It seems to me
that producing a useful error message would entail the same cost, however.
Thoughts?
Gavin
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Duplicate object names in GRANT |
Date: | 2005-07-27 04:41:26 |
Message-ID: | 21741.1122439286@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> I ran across this yesterday on HEAD:
> template1=# grant select on foo, foo to swm;
> ERROR: tuple already updated by self
Seems to fail similarly in every version back to 7.2; probably further,
but that's all I have running at the moment.
> We could do away with the error by producing a unique list of object names
> -- but that would impose an extra cost on the common case.
CommandCounterIncrement in the GRANT loop would be easier, likely.
I'm having a hard time getting excited about it though...
regards, tom lane
From: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: [HACKERS] Duplicate object names in GRANT |
Date: | 2005-07-28 06:00:24 |
Message-ID: | Pine.LNX.4.58.0507281558130.1799@linuxworld.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
On Wed, 27 Jul 2005, Tom Lane wrote:
> Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> > I ran across this yesterday on HEAD:
>
> > template1=# grant select on foo, foo to swm;
> > ERROR: tuple already updated by self
>
> Seems to fail similarly in every version back to 7.2; probably further,
> but that's all I have running at the moment.
>
> > We could do away with the error by producing a unique list of object names
> > -- but that would impose an extra cost on the common case.
>
> CommandCounterIncrement in the GRANT loop would be easier, likely.
> I'm having a hard time getting excited about it though...
Yeah, its not that exciting but that error message would throw your
average user.
I've attached a patch which calls CommandCounterIncrement() in each of the
grant loops.
Thanks,
Gavin
Attachment | Content-Type | Size |
---|---|---|
grant.patch | text/plain | 1.4 KB |
From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: [HACKERS] Duplicate object names in GRANT |
Date: | 2005-08-12 21:20:39 |
Message-ID: | 200508122120.j7CLKdL15764@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers pgsql-patches |
Patch applied. Thanks.
I also added a comment above each one to mention why it is needed.
---------------------------------------------------------------------------
Gavin Sherry wrote:
> On Wed, 27 Jul 2005, Tom Lane wrote:
>
> > Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> > > I ran across this yesterday on HEAD:
> >
> > > template1=# grant select on foo, foo to swm;
> > > ERROR: tuple already updated by self
> >
> > Seems to fail similarly in every version back to 7.2; probably further,
> > but that's all I have running at the moment.
> >
> > > We could do away with the error by producing a unique list of object names
> > > -- but that would impose an extra cost on the common case.
> >
> > CommandCounterIncrement in the GRANT loop would be easier, likely.
> > I'm having a hard time getting excited about it though...
>
> Yeah, its not that exciting but that error message would throw your
> average user.
>
> I've attached a patch which calls CommandCounterIncrement() in each of the
> grant loops.
>
> Thanks,
>
> Gavin
Content-Description:
[ Attachment, skipping... ]
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073