Unix Technical Forum

Bug in pg_dump in 7.4.6?

This is a discussion on Bug in pg_dump in 7.4.6? within the Pgsql General forums, part of the PostgreSQL category; --> I regularly do a pg_dump -s and store the file in CVS. Normally I briefly look over the diff ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 06:48 PM
Greg Stark
 
Posts: n/a
Default Bug in pg_dump in 7.4.6?


I regularly do a pg_dump -s and store the file in CVS. Normally I briefly look
over the diff before committing so I can describe the changes. This latest
time I observed a strange behaviour.

7.4.6 pg_dump seems to be inserting a lot more SET SESSION AUTHORIZATION lines
than previously. Before almost every object even when the owner is the same as
before, whereas previously pg_dump only emitted them when the owner changed.

I'm not exactly sure which version I had generated the previous dump with, but
it was definitely a 7.4.x version. I don't see any changes related to this in
the release notes since the 7.4 release notes.

It's not causing me any problems aside from an overly chatty CVS diff. But I
thought I would mention it in case it was an unintended change.

--
greg


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 06:48 PM
Greg Stark
 
Posts: n/a
Default Re: Bug in pg_dump in 7.4.6?


Tom Lane <tgl@sss.pgh.pa.us> writes:

> Greg Stark <gsstark@mit.edu> writes:
> > It seems the spurious SET SESSION AUTHORIZATION commands appear after any
> > REVOKE/GRANT pair.

>
> Oh, right. In order to handle grants with GRANT OPTION, the dump data
> may need to include SET SESSION AUTHORIZATION commands; so the code
> assumes that it doesn't know the authorization any more after emitting
> an ACL entry. Not a bug. It could possibly be smarter (eg grep the
> text for "SET SESSION AUTHORIZATION" before deciding this)


Wouldn't it make more sense to have a global state variable that held the
current user and anyone invoking SET SESSION AUTHORIZATION has to set that
state variable?

Or have a function responsible for emitting SET SESSION AUTHORIZATION and bar
other functions from doing it manually. Then have a local static variable in
that function responsible for keeping state.

> but since that's not the default mode anymore anyway, I'm not very
> concerned.


What's not the default mode? I'm just running "pg_dump -U postgresql -s db"

--
greg


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 06:49 PM
Tom Lane
 
Posts: n/a
Default Re: Bug in pg_dump in 7.4.6?

Greg Stark <gsstark@mit.edu> writes:
>> but since that's not the default mode anymore anyway, I'm not very
>> concerned.


> What's not the default mode? I'm just running "pg_dump -U postgresql -s db"


As of 8.0, I meant.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 06:49 PM
Marco Colombo
 
Posts: n/a
Default Re: Bug in pg_dump in 7.4.6?

On Tue, 11 Jan 2005, Tom Lane wrote:

> Greg Stark <gsstark@mit.edu> writes:
>> 7.4.6 pg_dump seems to be inserting a lot more SET SESSION
>> AUTHORIZATION lines than previously.

>
> By "previously" do you mean 7.4.5 or thereabouts? I can't recall any
> late-7.4.* changes that might affect this. pg_dump is supposed to

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Maybe this one, from 7.4.4 relnotes?

- pg_dump handled ACLs with grant options incorrectly

> optimize away redundant SET SESSION AUTH commands. Can you give a
> specific example of what you are seeing?
>
> regards, tom lane


..TM.
--
____/ ____/ /
/ / / Marco Colombo
___/ ___ / / Technical Manager
/ / / ESI s.r.l.
_____/ _____/ _/ Colombo@ESI.it

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 04-08-2008, 06:50 PM
Tom Lane
 
Posts: n/a
Default Re: Bug in pg_dump in 7.4.6?

Greg Stark <gsstark@mit.edu> writes:
> 7.4.6 pg_dump seems to be inserting a lot more SET SESSION
> AUTHORIZATION lines than previously.


By "previously" do you mean 7.4.5 or thereabouts? I can't recall any
late-7.4.* changes that might affect this. pg_dump is supposed to
optimize away redundant SET SESSION AUTH commands. Can you give a
specific example of what you are seeing?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:30 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com