Re: oid2name reports much fewer files...

Lists: pgsql-general
From: "Mario Weilguni" <mweilguni(at)sime(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: oid2name reports much fewer files...
Date: 2002-08-13 13:17:00
Message-ID: 018501c242cb$b5475360$6f01c00a@icomedias.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

For a specific db, oid2name reports 303 objects, and I've 430 files lying around. only the pg_largeobject table is greater than 1 GB, and so has 2 files. But I've no idea what the other files might be. The files in question occupy around 200MB, so I'm curious what these files might be.

Anyone who knows this? Thanks!

Mario Weilguni


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Mario Weilguni <mweilguni(at)sime(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: oid2name reports much fewer files...
Date: 2002-08-13 15:12:45
Message-ID: 200208131512.g7DFCj606986@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Mario Weilguni wrote:
> For a specific db, oid2name reports 303 objects, and I've 430
> files lying around. only the pg_largeobject table is greater
> than 1 GB, and so has 2 files. But I've no idea what the other
> files might be. The files in question occupy around 200MB, so
> I'm curious what these files might be.

Wow, that is a good question. I sure hope it isn't cruft left over from
crashes. What modification dates do the files have? What version of
PostgreSQL are you using?

--
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


From: Mario Weilguni <mweilguni(at)sime(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: oid2name reports much fewer files...
Date: 2002-08-13 15:30:34
Message-ID: 200208131730.34517.mweilguni@sime.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Am Dienstag, 13. August 2002 17:12 schrieb Bruce Momjian:
> Mario Weilguni wrote:
> > For a specific db, oid2name reports 303 objects, and I've 430
> > files lying around. only the pg_largeobject table is greater
> > than 1 GB, and so has 2 files. But I've no idea what the other
> > files might be. The files in question occupy around 200MB, so
> > I'm curious what these files might be.
>
> Wow, that is a good question. I sure hope it isn't cruft left over from
> crashes. What modification dates do the files have? What version of
> PostgreSQL are you using?

It's version 7.2.1.
I'm not aware of any crashes, everything works fine (except the problem "no one parent tuple found" as mentiond on pgsql-hackers)

I checked it again, it are exactly 301 files from oid2names (2 were header).

This info is from the database itself:
cms=# SELECT count(1) from pg_class ;
count
-------
476
(1 row)

cms=# SELECT count(1), relkind from pg_class group by relkind;
count | relkind
-------+---------
7 | S
299 | i
103 | r
1 | s
43 | t
23 | v

And there are 443 files in the directory (without pg_internal.init, pgsql_tmp, PG_VERSION, and one pg_largeobject file 16404.1)

Lets see:
476 entries - 23 views - 1 pg_xactlock - 7 sequences makes 445 entities, still off by 2. But it seems oid2name does not list some files.


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Mario Weilguni <mweilguni(at)sime(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: oid2name reports much fewer files...
Date: 2002-08-13 15:35:03
Message-ID: 200208131535.g7DFZ3908137@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


OK, this is interesting. Seems your pg_class total is pretty close, but
oid2name isn't finding some of the pg_class entries.

We need to get that fixed first. Would you eyeball the pg_class list
against the oids and find one that isn't printing? Just grab one of the
oids that oid2name doesn't know about, and look it up in pg_class.

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

Mario Weilguni wrote:
> Am Dienstag, 13. August 2002 17:12 schrieb Bruce Momjian:
> > Mario Weilguni wrote:
> > > For a specific db, oid2name reports 303 objects, and I've 430
> > > files lying around. only the pg_largeobject table is greater
> > > than 1 GB, and so has 2 files. But I've no idea what the other
> > > files might be. The files in question occupy around 200MB, so
> > > I'm curious what these files might be.
> >
> > Wow, that is a good question. I sure hope it isn't cruft left over from
> > crashes. What modification dates do the files have? What version of
> > PostgreSQL are you using?
>
> It's version 7.2.1.
> I'm not aware of any crashes, everything works fine (except the problem "no one parent tuple found" as mentiond on pgsql-hackers)
>
> I checked it again, it are exactly 301 files from oid2names (2 were header).
>
> This info is from the database itself:
> cms=# SELECT count(1) from pg_class ;
> count
> -------
> 476
> (1 row)
>
> cms=# SELECT count(1), relkind from pg_class group by relkind;
> count | relkind
> -------+---------
> 7 | S
> 299 | i
> 103 | r
> 1 | s
> 43 | t
> 23 | v
>
>
> And there are 443 files in the directory (without pg_internal.init, pgsql_tmp, PG_VERSION, and one pg_largeobject file 16404.1)
>
> Lets see:
> 476 entries - 23 views - 1 pg_xactlock - 7 sequences makes 445 entities, still off by 2. But it seems oid2name does not list some files.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>

--
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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mario Weilguni <mweilguni(at)sime(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: oid2name reports much fewer files...
Date: 2002-08-13 16:33:30
Message-ID: 26950.1029256410@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Mario Weilguni <mweilguni(at)sime(dot)com> writes:
> I checked it again, it are exactly 301 files from oid2names (2 were header).

> This info is from the database itself:
> cms=# SELECT count(1) from pg_class ;
> count
> -------
> 476
> (1 row)

> cms=# SELECT count(1), relkind from pg_class group by relkind;
> count | relkind
> -------+---------
> 7 | S
> 299 | i
> 103 | r
> 1 | s
> 43 | t
> 23 | v

> And there are 443 files in the directory (without pg_internal.init, pgsql_tmp, PG_VERSION, and one pg_largeobject file 16404.1)

> Lets see:
> 476 entries - 23 views - 1 pg_xactlock - 7 sequences makes 445 entities, still off by 2. But it seems oid2name does not list some files.

The sequences should have files, so I make it 452 pg_class rows that
should have corresponding files. However, those rows that have
relisshared = 't' correspond to files in $PGDATA/global, not files
in your per-database directory. In 7.2 I believe there should be ten
such rows, one of which is pg_xactlock, so 443 seems the correct count.

Could you make a list of the pg_class.relfilenode values for
'S','i','r','t' rows (excluding relisshared rows), and compare that
against what oid2name is reporting to see what it is missing or
getting wrong?

regards, tom lane


From: "Mario Weilguni" <mweilguni(at)sime(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: oid2name reports much fewer files...
Date: 2002-08-14 08:01:17
Message-ID: 01f801c24368$c51f0740$6f01c00a@icomedias.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Sorry for the troubles, I was completly mistaken, oid2name needs the "-x"
parameter to view system tables,
and everything looks fine now. All numbers are ok now.

Thanks a lot!

----- Original Message -----
From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Mario Weilguni" <mweilguni(at)sime(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, August 13, 2002 6:33 PM
Subject: Re: [GENERAL] oid2name reports much fewer files...

> Mario Weilguni <mweilguni(at)sime(dot)com> writes:
> > I checked it again, it are exactly 301 files from oid2names (2 were
header).
>
> > This info is from the database itself:
> > cms=# SELECT count(1) from pg_class ;
> > count
> > -------
> > 476
> > (1 row)
>
> > cms=# SELECT count(1), relkind from pg_class group by relkind;
> > count | relkind
> > -------+---------
> > 7 | S
> > 299 | i
> > 103 | r
> > 1 | s
> > 43 | t
> > 23 | v
>
>
> > And there are 443 files in the directory (without pg_internal.init,
pgsql_tmp, PG_VERSION, and one pg_largeobject file 16404.1)
>
> > Lets see:
> > 476 entries - 23 views - 1 pg_xactlock - 7 sequences makes 445 entities,
still off by 2. But it seems oid2name does not list some files.
>
> The sequences should have files, so I make it 452 pg_class rows that
> should have corresponding files. However, those rows that have
> relisshared = 't' correspond to files in $PGDATA/global, not files
> in your per-database directory. In 7.2 I believe there should be ten
> such rows, one of which is pg_xactlock, so 443 seems the correct count.
>
> Could you make a list of the pg_class.relfilenode values for
> 'S','i','r','t' rows (excluding relisshared rows), and compare that
> against what oid2name is reporting to see what it is missing or
> getting wrong?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>