From: Tom Lane <tgl@sss.pgh.pa.us>
To: Frank Way <fgw_three@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: How to determine which file contains which block
Date: Wed, 28 Jan 2004 17:45:16 -0500
Message-ID: <7274.1075329916@sss.pgh.pa.us> (raw)
In-Reply-To: <20040128213722.6828.qmail@web11610.mail.yahoo.com>
References: <20040128213722.6828.qmail@web11610.mail.yahoo.com>
Frank Way <fgw_three@yahoo.com> writes:
> After finding the ctid in (block,tuple) format, how do you know which
> file in all the subdirectories under /usr/local/pgsql/data/base
> contains that block?
The subdirectories are named after the OIDs of their databases
(pg_database.oid column). Individual files are named after the
relfilenodes of their tables/indexes (pg_class.relfilenode).
Note also that tables exceeding 1GB will be broken into gigabyte-size
segments named nnn, nnn.1, nnn.2, etc; if you are dealing with one
of these then you need to determine which segment to use from the
block number.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, fgw_three@yahoo.com
Subject: Re: How to determine which file contains which block
In-Reply-To: <7274.1075329916@sss.pgh.pa.us>
References: <20040128213722.6828.qmail@web11610.mail.yahoo.com> <7274.1075329916@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox