From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Magnus Hagander <magnus(at)hagander(dot)net>, Michael Banck <michael(dot)banck(at)credativ(dot)de>, Sergei Kornilov <sk(at)zsrv(dot)org> |
Subject: | Re: Make pg_checksums complain if compiled BLCKSZ and data folder's block size differ |
Date: | 2019-03-17 08:17:02 |
Message-ID: | alpine.DEB.2.21.1903170857440.2506@lancre |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Something like "%s: database folder is incompatible" for the first
> line sounds kind of better per the feedback gathered. And then on the
> second line:
> "The database cluster was initialized with block size %u, but
> pg_checksums was compiled with block size %u."
Ok. "%s" progname instead of "pg_checksums", or just "the command"?
I'm not sure that prefixing the two lines with the comment line is very
elegant, I'd suggest to put spaces, and would still try to shorten the
second sentence, maybe:
%s: incompatible database cluster of block size %u, while the command
is compiled for block size %u.
>> I think it would be better to adapt the checksum computation, but this is
>> indeed non trivial because of the way the BLCKSZ constant is hardwired into
>> type declarations.
>
> That's actually the possibility I was pointing out upthread.
Yes, I was expressing my agreement.
> I am not sure that the use cases are worth the effort though.
Indeed, not for "pg_checksums" only.
A few years I considered to have an dynamic initdb-set block size, but
BLCKSZ is used a lot as a constant for struct declaration and to compute
other constants, so that was a lot of changes. I think it would be worth
the effort because the current page size is suboptimal especially on SSD
where 4 KiB would provide over 10% better performance for OLTP load.
However, having to recompile to change it is a pain and not very package
friendly.
--
Fabien.
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2019-03-17 08:25:10 | Re: Make pg_checksums complain if compiled BLCKSZ and data folder's block size differ |
Previous Message | Alexander Korotkov | 2019-03-17 08:03:44 | Re: jsonpath |