pgsql: Improve style of pg_upgrade task callback functions.

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Improve style of pg_upgrade task callback functions.
Date: 2024-09-26 18:56:10
Message-ID: E1stter-0013OZ-Fa@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Improve style of pg_upgrade task callback functions.

I wanted to avoid adjusting this code too much when converting
these tasks to use the new parallelization framework (see commit
40e2e5e92b), which is why this is being done as a follow-up commit.
These stylistic adjustments result in fewer lines of code and fewer
levels of indentation in some places.

While at it, add names to the UpgradeTaskSlotState enum and the
UpgradeTaskSlot struct. I'm not aware of any established project
policy in this area, but let's at least be consistent within the
same file.

Reviewed-by: Daniel Gustafsson
Discussion: https://postgr.es/m/ZunW7XHLd2uTts4f%40nathan

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9726653185de62f2f8bf42a25e961bc56895a41b

Modified Files
--------------
src/bin/pg_upgrade/check.c | 212 ++++++++++++++++++-------------------------
src/bin/pg_upgrade/task.c | 4 +-
src/bin/pg_upgrade/version.c | 29 +++---
3 files changed, 102 insertions(+), 143 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2024-09-26 20:51:41 pgsql: Ensure we have a snapshot when updating pg_index entries.
Previous Message Alexander Korotkov 2024-09-26 15:41:18 Re: pgsql: Implement pg_wal_replay_wait() stored procedure