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

enhance --data-checksums on initdb #915

Merged
merged 1 commit into from
Sep 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,16 @@ Default value: OS dependent.

**Warning:** If datadir is changed from the default, Puppet does not manage purging of the original data directory, which causes it to fail if the data directory is changed back to the original.

##### `data_checksums`

Optional.

Data type: Boolean.

Use checksums on data pages to help detect corruption by the I/O system that would otherwise be silent. Valid values: 'true' or 'false'. Default: initdb's default ('false').

**Warning:** This option is used during initialization by initdb, and cannot be changed later. If set, checksums are calculated for all objects, in all databases.

##### `default_database`

Specifies the name of the default database to connect with.
Expand Down Expand Up @@ -499,16 +509,6 @@ Default value: `undef`, which is effectively 'C'.

**On Debian, you'll need to ensure that the 'locales-all' package is installed for full functionality of PostgreSQL.**

##### `data_checksums`

Optional.

Data type: Boolean.

Turns on data checksums during `initdb`.

Default value: `undef`, which is the same as `false`.

##### `timezone`

Sets the default timezone of the postgresql server. The postgresql built-in default is taking the systems timezone information.
Expand Down Expand Up @@ -751,6 +751,16 @@ The name of the PostgreSQL Python package.

Default value: '${bindir}/createdb'.

##### `data_checksums`

Optional.

Data type: Boolean.

Use checksums on data pages to help detect corruption by the I/O system that would otherwise be silent. Valid values: 'true' or 'false'. Default: initdb's default ('false').

**Warning:** This option is used during initialization by initdb, and cannot be changed later. If set, checksums are calculated for all objects, in all databases.

##### `default_database`

Specifies the name of the default database to connect with. On most systems this is 'postgres'.
Expand Down
4 changes: 4 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@
}
}

if($data_checksums and versioncmp($version, '9.3') < 0) {
fail('data_checksums require version 9.3 or greater')
}

$validcon_script_path = pick($validcon_script_path, '/usr/local/bin/validate_postgresql_connection.sh')
$initdb_path = pick($initdb_path, "${bindir}/initdb")
$pg_hba_conf_path = pick($pg_hba_conf_path, "${confdir}/pg_hba.conf")
Expand Down