Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Check for data checksums in old postgres cluster #80

Open
zukka77 opened this issue Dec 30, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@zukka77
Copy link

zukka77 commented Dec 30, 2024

I had to redo (cleaning up everithing leftover) the upgrade because my old postgres (version 16) used data checksums

------------------------------------
New database initialisation complete
------------------------------------
---------------------------------------
Running pg_upgrade command, from /var/lib/postgresql/data
---------------------------------------
Performing Consistency Checks
-----------------------------
Checking cluster versions                                     ok

old cluster uses data checksums but the new one does not
Failure, exiting

Starting pgautoupgrade with -e POSTGRES_INITDB_ARGS=-k solved the problem.

It would be great if the script could check if data checksums is enabled on the old cluster and use the correct parameter (-k) in the initdb command.

You can check if data checksum is on using show data_checksums

postgres=# show data_checksums ;
 data_checksums 
----------------
 on
(1 row)

@zukka77 zukka77 changed the title Feature request: Check for data checksum in old postgres cluster Feature request: Check for data checksums in old postgres cluster Dec 30, 2024
@justinclift justinclift added the enhancement New feature or request label Dec 30, 2024
@justinclift
Copy link
Member

Oh, that's a very good idea. We should definitely do that.

Thanks for the suggestion @zukka77. 😄 Sorry for you having to redo your upgrade. 😦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants