From: | Shangzi Xie <shangzi(dot)x(at)columbia(dot)edu> |
---|---|
To: | Bruce Momjian <bruce(at)momjian(dot)us> |
Cc: | Peter Geoghegan <pg(at)bowt(dot)ie>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Pg Docs <pgsql-docs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: relpages in pg_class |
Date: | 2022-08-21 14:30:49 |
Message-ID: | CALW_98n+MZ_mL46aN3BukvkFE+V+qMTBHoQp5=Tv5xw7qeWR_A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
Page and block can be used interchangeably, but the description of relpages
in the documentation can be confusing to someone who doesn't care much
about the difference between page and block.
When I want to count pages from a table, maybe the keywords I should look
for should be "the number of", but the relpages is described by document
with "Size of".
-----------------------------------------------
Shangzi Xie
On Sat, Aug 20, 2022 at 3:16 AM Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> On Fri, Aug 19, 2022 at 11:25:52AM -0700, Peter Geoghegan wrote:
> > On Fri, Aug 19, 2022 at 9:40 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > > Yeah, we use "blocks" and "pages" interchangeably, which is something
> > > I don't feel a need to change; but evidently the OP didn't realize
> that.
> > > This is a job for the glossary, perhaps?
> >
> > I think that they're synonyms that can often (but not always) be used
> > interchangeably. I *think* that this understanding is shared by other
> > people, though I should check. Here goes:
> >
> > To me, "block" emphasizes on-disk/relfilenode storage. Something that
> > exists at a particular physical offset in a particular file (a
> > BlockNumber + relfilenode). On the other hand, the term "page"
> > emphasizes the in-memory format, and the indirection provided by the
> > bufpage.c slotted page format (i.e. line pointer array indirection).
>
> Yes, I have heard the block-disk, page-memory explanation before.
>
> --
> Bruce Momjian <bruce(at)momjian(dot)us>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__momjian.us&d=DwIBAg&c=009klHSCxuh5AI1vNQzSO0KGjl4nbi2Q0M1QLJX9BeE&r=Hul745xaxWgD5ax2VcStGxXAXxES8dE1okk4lpHMoao&m=iq1O1WJgFr-Q1WqUjSdWPoPWj7Ui7sDz3fQ5njhfrwdLVNKdZ-fCeSS0TFdJUe-y&s=o-_cOvuvBdiTSvBWdgCX5noK2cE5VZBF-jETQXEA-WE&e=
>
> EDB
> https://urldefense.proofpoint.com/v2/url?u=https-3A__enterprisedb.com&d=DwIBAg&c=009klHSCxuh5AI1vNQzSO0KGjl4nbi2Q0M1QLJX9BeE&r=Hul745xaxWgD5ax2VcStGxXAXxES8dE1okk4lpHMoao&m=iq1O1WJgFr-Q1WqUjSdWPoPWj7Ui7sDz3fQ5njhfrwdLVNKdZ-fCeSS0TFdJUe-y&s=e2Z4mi_VN2ktgB7rh3Y7N4KhPdeTi-4knCQ7yirZK1E&e=
>
>
> Indecision is a decision. Inaction is an action. Mark Batterson
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2022-08-21 18:29:31 | Re: Typo in description of PROGRAM parameter for the COPY command |
Previous Message | PG Doc comments form | 2022-08-21 01:31:25 | Typo in description of PROGRAM parameter for the COPY command |