Bug 254214 - databases/postgresql13-server: correct pkg-message about checksums
Summary: databases/postgresql13-server: correct pkg-message about checksums
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: pgsql
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-11 05:51 UTC by Michael Zhilin
Modified: 2021-05-15 09:14 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (pgsql)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Zhilin freebsd_committer 2021-03-11 05:51:45 UTC
Hi,

In pkg-message for postgresql13-server there is note about checksums:

"NB. If you're not using a checksumming filesystem like ZFS, you might
    wish to enable data checksumming. It can only be enabled during
    the initdb phase, by adding the "--data-checksums" flag to
    the postgres_initdb_flags rcvar.  Check the initdb(1) manpage
    for more info and make sure you understand the performance
    implications.
"

It's actually true for PGSQL till version 11. Since PGSQL 12 you can enable checksums via pg_checksum procedure:

 # /usr/local/etc/rc.d/postgresql initdb
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory /var/db/postgres/data13 ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    /usr/local/bin/pg_ctl -D /var/db/postgres/data13 -l logfile start

# pg_checksums -e -D /var/db/postgres/data13
Checksum operation completed
Files scanned:  916
Blocks scanned: 3021
pg_checksums: syncing data directory
pg_checksums: updating control file
Checksums enabled in cluster

I propose to correct wording to:

NB. If you're not using a checksumming filesystem like ZFS, you might
    wish to enable data checksumming. It can be enabled during
    the initdb phase, by adding the "--data-checksums" flag to
    the postgres_initdb_flags rcvar. Otherwise you can enable it later by 
    pg_checksums.  Check the initdb(1) manpage for more info 
    and make sure you understand the performance implications.

Please let me know if it's OK and if patch is required. 

Thanks!
Comment 1 Palle Girgensohn freebsd_committer 2021-05-15 09:14:20 UTC
Comitted. Thanks!