miscellaneous pg_upgrade cleanup

Started by Nathan Bossartover 1 year ago4 messageshackers
Jump to latest
#1Nathan Bossart
nathandbossart@gmail.com

Here are a few miscellaneous cleanup patches for pg_upgrade. I don't think
there's anything controversial here.

0001 removes some extra whitespace in the status message for failed data
type checks. I noticed that when the check fails, this status message is
indented beyond all the other output. This appears to have been introduced
in commit 347758b, so I'd back-patch this one to v17.

0002 improves the coding style in many of the new upgrade task callback
functions. I refrained from adjusting this code too much when converting
these tasks to use the new pg_upgrade task framework (see commit 40e2e5e),
but now I think we should. This decreases the amount of indentation in
some places and removes a few dozen lines of code.

0003 adds names to the UpgradeTaskSlotState enum and the UpgradeTaskSlot
struct. I'm not aware of any established project policy in this area, but
I figured it'd be good to at least be consistent within the same file.

Thoughts?

--
nathan

Attachments:

v1-0001-remove-extra-whitespace-in-pg_upgrade-report.patchtext/plain; charset=us-asciiDownload+1-2
v1-0002-improve-style-of-upgrade-task-callback-functions.patchtext/plain; charset=us-asciiDownload+99-136
v1-0003-add-names-to-some-upgrade-task-structs.patchtext/plain; charset=us-asciiDownload+2-3
#2Daniel Gustafsson
daniel@yesql.se
In reply to: Nathan Bossart (#1)
Re: miscellaneous pg_upgrade cleanup

On 17 Sep 2024, at 21:22, Nathan Bossart <nathandbossart@gmail.com> wrote:

Here are a few miscellaneous cleanup patches for pg_upgrade. I don't think
there's anything controversial here.

No objections to any of these changes, LGTM.

--
Daniel Gustafsson

#3Nathan Bossart
nathandbossart@gmail.com
In reply to: Daniel Gustafsson (#2)
Re: miscellaneous pg_upgrade cleanup

On Mon, Sep 23, 2024 at 03:04:22PM +0200, Daniel Gustafsson wrote:

No objections to any of these changes, LGTM.

Thanks for reviewing. I'll commit these once the v17 release freeze is
over (since 0001 needs to be back-patched there).

--
nathan

#4Nathan Bossart
nathandbossart@gmail.com
In reply to: Nathan Bossart (#3)
Re: miscellaneous pg_upgrade cleanup

Committed.

--
nathan