public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: [email protected]
Subject: pgsql: Group more closely cache updates for backends in sequence.c
Date: Mon, 26 Feb 2024 08:03:40 +0000
Message-ID: <[email protected]> (raw)

Group more closely cache updates for backends in sequence.c

Information of sequences is cached for each backend for currval() and
nextval(), and the update of some cached information was mixed in the
middle of computations based on the other properties of a sequence, for
the increment value in nextval() and the cached state when altering a
sequence.

Grouping them makes the code easier to follow and to refactor in the
future, when splitting the computation and the SeqTable change parts.
Note that the cached data is untouched between the areas where these
cache updates are moved.

Issue noticed while doing some refactoring of the sequence code.

Author: Michael Paquier
Reviewed-by: Tomas Vondra
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6e951bf98e2e0230ed95db2fafc244536bd7502f

Modified Files
--------------
src/backend/commands/sequence.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)



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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: Group more closely cache updates for backends in sequence.c
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox