dbTalk Databases Forums  

Re: [BUGS] Bug in ALTER LANGUAGE ... RENAME TO ...;

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] Bug in ALTER LANGUAGE ... RENAME TO ...; in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] Bug in ALTER LANGUAGE ... RENAME TO ...; - 02-13-2005 , 11:12 PM







Oh, good catch. We will fix that. Thanks.

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

---------------------------------------------------------------------------


Sergey N. Yatskevich wrote:
Quote:
RenameLanguage procedure in src/backend/commands/proclang.c open
and update pg_catalog.pg_shadow table instead pg_catalog.pg_language.

--
Sergey N. Yatskevich <syatskevich (AT) 2100 (DOT) gosniias.ru
[ Attachment, skipping... ]

Quote:
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Bug in ALTER LANGUAGE ... RENAME TO ...; - 02-14-2005 , 12:20 AM






"Sergey N. Yatskevich" <syatskevich (AT) 2100 (DOT) gosniias.ru> writes:
Quote:
RenameLanguage procedure in src/backend/commands/proclang.c open
and update pg_catalog.pg_shadow table instead pg_catalog.pg_language.
Wow. Apparently this has been broken since it was written, and
nobody ever tested it. Thanks!

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Bug in ALTER LANGUAGE ... RENAME TO ...; - 02-14-2005 , 12:53 AM



Quote:
"Sergey N. Yatskevich" <syatskevich (AT) 2100 (DOT) gosniias.ru> writes:
RenameLanguage procedure in src/backend/commands/proclang.c open
and update pg_catalog.pg_shadow table instead pg_catalog.pg_language.

Wow. Apparently this has been broken since it was written, and
nobody ever tested it. Thanks!
BTW, is there a security issue here? In my testing all I got was
harmless "tuple concurrently updated" failures --- but it seems like
this bug ought to result in either a core dump or storing a bogus row
into pg_shadow. Neither of which sound appealing.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend


Reply With Quote
  #4  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: [BUGS] Bug in ALTER LANGUAGE ... RENAME TO ...; - 02-14-2005 , 12:47 PM




Patch applied by Tom. Thanks.

---------------------------------------------------------------------------


Sergey N. Yatskevich wrote:
Quote:
RenameLanguage procedure in src/backend/commands/proclang.c open
and update pg_catalog.pg_shadow table instead pg_catalog.pg_language.

--
Sergey N. Yatskevich <syatskevich (AT) 2100 (DOT) gosniias.ru
[ Attachment, skipping... ]

Quote:
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #5  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Bug in ALTER LANGUAGE ... RENAME TO ...; - 02-14-2005 , 01:23 PM



"Sergey N. Yatskevich" <syatskevich (AT) 2100 (DOT) gosniias.ru> writes:
Quote:
÷ ðÎÄ, 14/02/2005 × 01:52 -0500, Tom Lane ÐÉÛÅÔ:
BTW, is there a security issue here?

I think this is not good but not so bad because:
1) ALTER LANGUAGE can be used only users with superuser privilegies
Right --- that check is made before we do anything that could go wrong.
So, no security hole, because if you are superuser you already have the
keys to the kingdom anyway ...

Quote:
We catch this error only because we try to do formal testing of all
PostgreSQL features listed in documentation.
Cool. What progress are you making?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.