Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 2021 05:51:45 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 254214] databases/postgresql13-server: correct pkg-message about checksums
Message-ID:  <bug-254214-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254214

            Bug ID: 254214
           Summary: databases/postgresql13-server: correct pkg-message
                    about checksums
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: pgsql@FreeBSD.org
          Reporter: mizhka@gmail.com
             Flags: maintainer-feedback?(pgsql@FreeBSD.org)
          Assignee: pgsql@FreeBSD.org

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=20
    pg_checksums.  Check the initdb(1) manpage for more info=20
    and make sure you understand the performance implications.

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

Thanks!

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254214-7788>