Re: Inconsistent use of relpages = -1

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Inconsistent use of relpages = -1
Date: 2024-10-22 17:41:09
Message-ID: be7951d424b9c16c761c39b9b2677a57fb697b1f.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2024-10-18 at 15:14 -0400, Tom Lane wrote:
> If we are going to put data into reltuples but not relpages,
> I think I agree with setting relpages to -1 to signify
> "unknown" (analogously to -1 for reltuples).  Otherwise it
> looks like the table has infinite tuple density, which is
> likely to bollix something somewhere.

That's a good point.

I attached a patch that creates partitioned tables with relpages=-1,
and updates the docs.

It's awkward to cast back and forth between BlockNumber and int32, so I
updated the signature of vac_update_relstats() as well.

Regards,
Jeff Davis

Attachment Content-Type Size
v1-0001-Be-more-consistent-about-relpages-for-partitioned.patch text/x-patch 3.6 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2024-10-22 18:35:19 Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR)
Previous Message Alexander Korotkov 2024-10-22 17:33:24 Re: type cache cleanup improvements