pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yura Sokolov <y.sokolov@postgrespro.ru>
To: Sami Imseih <samimseih@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>
Cc: Andres Freund <andres@anarazel.de>
Cc: Chao Li <li.evan.chao@gmail.com>
Subject: Re: Fix bug in multixact Oldest*MXactId initialization and access
Date: Thu, 26 Feb 2026 20:02:38 +0300
Message-ID: <ebeb0db1-0eb2-4439-a6c8-1d96b60b25ad@postgrespro.ru> (raw)
In-Reply-To: <CAA5RZ0t8iGnqO3JcAZP1VEjCspcnZtQ0GFFVGLNLAsFqfHqRsw@mail.gmail.com>
References: <7acc94b0-ea82-4657-b1b0-77842cb7a60c@postgrespro.ru>
	<93F0BD0A-0B8B-4592-9D4B-53F405A86F6A@gmail.com>
	<c3eaaac1-d244-4e4d-b5d7-06c284108eac@postgrespro.ru>
	<C991344D-F38A-4EEC-903A-72B52FF887FA@gmail.com>
	<bf2951b4-687b-4bd3-a072-46deb463f177@postgrespro.ru>
	<CAA5RZ0t8iGnqO3JcAZP1VEjCspcnZtQ0GFFVGLNLAsFqfHqRsw@mail.gmail.com>

26.02.2026 19:34, Sami Imseih пишет:
>> But I still use inline procs for access to the arrays. Asserts cost nothing
>> in release build. And new version of functions doesn't branch.
> 
> Asserts may have minimal impact for most builds, but my concern is
> this is all unnecessary complexity. I mean if we guarantee that the
> arrays are initialized correctly, maybe we can have an assert at
> init time, why would we need asserts at run time?

They are future proof.

If there had been assertions from the beginning, there would not have been
a breaking change. The tests would have failed.

(Sorry, I've used Google Translate to write this sentence).

When you write assert, you protect yourself from shooting your leg far in
the future. Believe me.

-- 
regards
Yura Sokolov aka funny-falcon





view thread (31+ messages)  latest in thread

Message-ID: <ebeb0db1-0eb2-4439-a6c8-1d96b60b25ad@postgrespro.ru>
Permalink:  ../ebeb0db1-0eb2-4439-a6c8-1d96b60b25ad@postgrespro.ru/
Also on:    postgresql.org/message-id/ebeb0db1-0eb2-4439-a6c8-1d96b60b25ad@postgrespro.ru

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: y.sokolov@postgrespro.ru, samimseih@gmail.com, pgsql-hackers@lists.postgresql.org, hlinnaka@iki.fi, andres@anarazel.de, li.evan.chao@gmail.com
  Subject: Re: Fix bug in multixact Oldest*MXactId initialization and access
  In-Reply-To: <ebeb0db1-0eb2-4439-a6c8-1d96b60b25ad@postgrespro.ru>

* 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