Unix Technical Forum

Re: pg_dump bug in 7.3.9 with sequences

This is a discussion on Re: pg_dump bug in 7.3.9 with sequences within the pgsql Hackers forums, part of the PostgreSQL category; --> Alvaro Herrera wrote: >On Wed, Feb 02, 2005 at 01:54:48PM -0800, Joshua D. Drake wrote: > > > >>It ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 03:35 AM
Joshua D. Drake
 
Posts: n/a
Default Re: pg_dump bug in 7.3.9 with sequences

Alvaro Herrera wrote:

>On Wed, Feb 02, 2005 at 01:54:48PM -0800, Joshua D. Drake wrote:
>
>
>
>>It is not pilot error if PostgreSQL allows it. There is
>>nothing "illegal" about the above commands in their execution.
>>The pg_dump application should recognize that the object has
>>changed and react accordingly.
>>
>>

>
>ISTM this is a bug, but it's not clear to me what is the solution.
>I can think of two:
>
>1. Changing the default is forbidden
>2. When the default is changed, the dependency on the sequence is
>dropped, and the sequence itself is dropped.
>
>

3. When the default is changed, the dependency is updated
to reflect the new sequence. The old sequence is left intact
as an independent object.

Sincerely,

Joshua D. Drake




>Which one do you think is best? Why? (I'd say "less bad" instead of
>"best", but I'm not sure if that's a correct choice of words.)
>
>
>



--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL



---------------------------(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-11-2008, 03:35 AM
Alvaro Herrera
 
Posts: n/a
Default Re: pg_dump bug in 7.3.9 with sequences

On Wed, Feb 02, 2005 at 03:49:59PM -0800, Joshua D. Drake wrote:
> Alvaro Herrera wrote:
>
> >On Wed, Feb 02, 2005 at 01:54:48PM -0800, Joshua D. Drake wrote:
> >
> >>It is not pilot error if PostgreSQL allows it. There is
> >>nothing "illegal" about the above commands in their execution.
> >>The pg_dump application should recognize that the object has
> >>changed and react accordingly.

> >
> >ISTM this is a bug, but it's not clear to me what is the solution.

>
> 3. When the default is changed, the dependency is updated
> to reflect the new sequence. The old sequence is left intact
> as an independent object.


It seems reasonable to update the dependency. But it isn't reasonable
to leave the old sequence intact, because it is an internal
implementation detail that should not be left around. It would be a
bug, because later when the table is dropped then you have a dangling
object; this behavior would be equivalent to leaving the original
sequence around when the table is dropped, which is exactly the scenario
dependencies were written for.

--
Alvaro Herrera (<alvherre[@]dcc.uchile.cl>)
You liked Linux a lot when he was just the gawky kid from down the block
mowing your lawn or shoveling the snow. But now that he wants to date
your daughter, you're not so sure he measures up. (Larry Greenemeier)

---------------------------(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
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:57 AM.


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