Using pg_dump from postgresql 7.3.4 I've obtained
a dump file containing a SEQUENCE SET with no
corresponding SEQUENCE. I've seen that this is usually
due to the presence of a table with a 'serial' field,
but since in this case there is no such table I wonder
if this is a bug in pg_dump.

The only reason I can imagine for this is pg_dump taking
any sequence whose name  ends in _seq as being associated
to a table, no matter if that table exists and has a 'serial'
field. Is this possible ? Shouldn't this kind of dependency
be coded somehow ?

TIA

--strk;

Sat, 7 Aug 2004 14:11:07 +0200
strk <strk@keybit.net>
pg_dump and sequences (bug ?)
> Using pg_dump from postgresql 7.3.4 I've obtained
> a dump file containing a SEQUENCE SET with no
> corresponding SEQUENCE. I've seen that this is usually
> due to the presence of a table with a 'serial' field,
> but since in this case there is no such table I wonder
> if this is a bug in pg_dump.

Perhaps.  Is there any way you can send me the compressed pg_dump -s 
output of your database?  Is it sensitive info?  How certain are you 
that there is no serial column in your database?

> The only reason I can imagine for this is pg_dump taking
> any sequence whose name  ends in _seq as being associated
> to a table, no matter if that table exists and has a 'serial'
> field. Is this possible ? Shouldn't this kind of dependency
> be coded somehow ?

It is coded somehow and pg_dump in no way treats things that end in _seq 
as being on tables.

My first suspicion is that you must be mistaken, but i would really like 
to see the full pg_dump -s output of your database....

Chris

Sun, 08 Aug 2004 12:49:20 +0800
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: pg_dump and sequences (bug ?)
Also, given this and your previous operator commutator problem, I 
strongly suspect that someone has taken an axe to the system catalogs on 
your installation and they are very screwy.

Chris


strk wrote:

> Using pg_dump from postgresql 7.3.4 I've obtained
> a dump file containing a SEQUENCE SET with no
> corresponding SEQUENCE. I've seen that this is usually
> due to the presence of a table with a 'serial' field,
> but since in this case there is no such table I wonder
> if this is a bug in pg_dump.
> 
> The only reason I can imagine for this is pg_dump taking
> any sequence whose name  ends in _seq as being associated
> to a table, no matter if that table exists and has a 'serial'
> field. Is this possible ? Shouldn't this kind of dependency
> be coded somehow ?
> 
> TIA
> 
> --strk;
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend

Sun, 08 Aug 2004 12:50:43 +0800
Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: pg_dump and sequences (bug ?)
On Sun, Aug 08, 2004 at 12:50:43PM +0800, Christopher Kings-Lynne wrote:
> Also, given this and your previous operator commutator problem, I 
> strongly suspect that someone has taken an axe to the system catalogs on 
> your installation and they are very screwy.

System catalogs screws  are possible.
That someone is probably me, but I don't remember pg_dump
giving me any warning about this. Also I think I've run vacuum
on the db before dumping.

As before I'm not on the source computer so I can't send the
pg_dump -s, but if you want, I can send you the pg_restore -l.

--strk;


> 
> Chris
> 
> 
> strk wrote:
> 
> >Using pg_dump from postgresql 7.3.4 I've obtained
> >a dump file containing a SEQUENCE SET with no
> >corresponding SEQUENCE. I've seen that this is usually
> >due to the presence of a table with a 'serial' field,
> >but since in this case there is no such table I wonder
> >if this is a bug in pg_dump.
> >
> >The only reason I can imagine for this is pg_dump taking
> >any sequence whose name  ends in _seq as being associated
> >to a table, no matter if that table exists and has a 'serial'
> >field. Is this possible ? Shouldn't this kind of dependency
> >be coded somehow ?
> >
> >TIA
> >
> >--strk;
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 8: explain analyze is your friend

Sun, 8 Aug 2004 13:40:40 +0200
strk <strk@keybit.net>
Re: pg_dump and sequences (bug ?)
With help from Christopher I've made some other tests.
Neither 7.4 nor 7.5/8.0 pg_dump are able to detect the
error. Here is a summary:

The produced dump creates a SEQUENCE SET call with no
corresponding SEQUENCE or TABLE SCHEMA creating the
sequence.  No Error or warning is issued at dump time,
nor it is at vacuum time.

A currupted catalog set is probably be the reason.
Shouldn't pg_dump warn about that ?
Is there a catalog corruption detection app ?

TIA

--strk;


On Sun, Aug 08, 2004 at 01:40:40PM +0200, strk wrote:
> On Sun, Aug 08, 2004 at 12:50:43PM +0800, Christopher Kings-Lynne wrote:
> > Also, given this and your previous operator commutator problem, I 
> > strongly suspect that someone has taken an axe to the system catalogs on 
> > your installation and they are very screwy.
> 
> System catalogs screws  are possible.
> That someone is probably me, but I don't remember pg_dump
> giving me any warning about this. Also I think I've run vacuum
> on the db before dumping.
> 
> As before I'm not on the source computer so I can't send the
> pg_dump -s, but if you want, I can send you the pg_restore -l.
> 
> --strk;
> 
> 
> > 
> > Chris
> > 
> > 
> > strk wrote:
> > 
> > >Using pg_dump from postgresql 7.3.4 I've obtained
> > >a dump file containing a SEQUENCE SET with no
> > >corresponding SEQUENCE. I've seen that this is usually
> > >due to the presence of a table with a 'serial' field,
> > >but since in this case there is no such table I wonder
> > >if this is a bug in pg_dump.
> > >
> > >The only reason I can imagine for this is pg_dump taking
> > >any sequence whose name  ends in _seq as being associated
> > >to a table, no matter if that table exists and has a 'serial'
> > >field. Is this possible ? Shouldn't this kind of dependency
> > >be coded somehow ?
> > >
> > >TIA
> > >
> > >--strk;
> > >
> > >---------------------------(end of broadcast)---------------------------
> > >TIP 8: explain analyze is your friend
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Thu, 12 Aug 2004 12:46:39 +0200
strk <strk@keybit.net>
Re: pg_dump and sequences (bug ?)