Skip to content

Commit

Permalink
Merge pull request #915 from mmoll/pr_855
Browse files Browse the repository at this point in the history
 enhance --data-checksums on initdb
  • Loading branch information
eputnam authored Sep 7, 2017
2 parents f7bd101 + ae38fa6 commit db9b347
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
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

0 comments on commit db9b347

Please sign in to comment.