pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Optimize tuple deformation
Date: Mon, 19 Oct 2026 12:47:14 +0200
Message-ID: <b2280406-f71f-4a5d-b815-96a4575d61ad@eisentraut.org> (raw)
In-Reply-To: <CAApHDvpF8ooF80rQRSwOdU_DfJ4YtkpFc2RMXvHSpOmv7nr7Vw@mail.gmail.com>
References: <E1w1uI5-000LSw-1l@gemulon.postgresql.org>
	<10cee1a3-3e27-4a27-83aa-acecb757640e@eisentraut.org>
	<CAApHDvoLatLLOtyCjPT4uAOyuEnHTVmqDvWmMWToNeVNrgWLbg@mail.gmail.com>
	<ddfdcaaf-3fe6-4a25-bf3f-1af56e2429aa@eisentraut.org>
	<CAApHDvpF8ooF80rQRSwOdU_DfJ4YtkpFc2RMXvHSpOmv7nr7Vw@mail.gmail.com>

On 08.10.26 22:35, David Rowley wrote:
> I'd like to get time to put in more effort into figuring out what's
> going on with the gcc as I wondered how many other places we're
> getting inefficient code because of this. More research may discover
> that we really shouldn't use ints to index arrays, for example.
> 
> It is meant to be 32-bits on 32-bit platforms. Why is uintptr_t better
> than size_t for indexing an array? Or rather, what's wrong with
> size_t? I had assumed you highlighted this because of some fields
> being int and some being size_t, but if you're happier with uintptr_t,
> then I may have misunderstood.

I'm fine with leaving it as is for now.  I'm going around fixing signed 
vs. unsigned integer mismatches, and this is being flagged because 
size_t is unsigned and attribute numbers are in general signed, and 
could at least in some cases actually be negative.  But this is only one 
of many problems, so I can silence this in my local work for now.  (So 
the suggestion to use uintptr_t was also wrong; it should have been 
intptr_t, or possibly ssize_t, but given your explanation, I'm not 
worried about this right now; I would rather see you find a proper 
solution.)







view thread (6+ messages)

Message-ID: <b2280406-f71f-4a5d-b815-96a4575d61ad@eisentraut.org>
Permalink:  ../b2280406-f71f-4a5d-b815-96a4575d61ad@eisentraut.org/
Also on:    postgresql.org/message-id/b2280406-f71f-4a5d-b815-96a4575d61ad@eisentraut.org

 · 

reply

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-committers@postgresql.org
  Cc: peter@eisentraut.org, dgrowleyml@gmail.com
  Subject: Re: pgsql: Optimize tuple deformation
  In-Reply-To: <b2280406-f71f-4a5d-b815-96a4575d61ad@eisentraut.org>
  References: <E1w1uI5-000LSw-1l@gemulon.postgresql.org> <10cee1a3-3e27-4a27-83aa-acecb757640e@eisentraut.org> <CAApHDvoLatLLOtyCjPT4uAOyuEnHTVmqDvWmMWToNeVNrgWLbg@mail.gmail.com> <ddfdcaaf-3fe6-4a25-bf3f-1af56e2429aa@eisentraut.org> <CAApHDvpF8ooF80rQRSwOdU_DfJ4YtkpFc2RMXvHSpOmv7nr7Vw@mail.gmail.com> <b2280406-f71f-4a5d-b815-96a4575d61ad@eisentraut.org>

* 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