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

PostgreSQL v13 installation #2330

Conversation

atsikham
Copy link
Contributor

@atsikham atsikham commented May 18, 2021

Installation (apply) part of task #1861 for PostgreSQL, PgAudit, PgPool, Repmgr (except PgBouncer).
PgBouncer will be probably handled in the scope of #2076

  • Some thoughts from this comment were taken into account.
  • Added Molecule Ansible tests.

@atsikham atsikham marked this pull request as draft May 18, 2021 23:38
@atsikham
Copy link
Contributor Author

atsikham commented May 22, 2021

Default postgresql.conf difference:

Debian

data_directory = '/var/lib/postgresql/13/main'          # use data in another directory
                                        # (change requires restart)
hba_file = '/etc/postgresql/13/main/pg_hba.conf'        # host-based authentication file
                                        # (change requires restart)
ident_file = '/etc/postgresql/13/main/pg_ident.conf'    # ident configuration file
                                        # (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
external_pid_file = '/var/run/postgresql/13-main.pid'                   # write an extra PID file
                                        # (change requires restart)
port = 5432                             # (change requires restart)
unix_socket_directories = '/var/run/postgresql' # comma-separated list of directories
#password_encryption = md5              # md5 or scram-sha-256
ssl = on
ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
#log_destination = 'stderr'             # Valid values are combinations of
                                        # stderr, csvlog, syslog, and eventlog,
                                        # depending on platform.  csvlog
                                        # requires logging_collector to be on.
# This is used when logging to stderr:
#logging_collector = off                # Enable capturing of stderr and csvlog
                                        # into log files. Required to be on for
                                        # csvlogs.
                                        # (change requires restart)
# These are only used if logging_collector is on:
#log_directory = 'log'                  # directory where log files are written,
                                        # can be absolute or relative to PGDATA
#log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log'        # log file name pattern,
                                        # can include strftime() escapes
#log_truncate_on_rotation = off         # If on, an existing log file with the
                                        # same name as the new log file will be
                                        # truncated rather than appended to.
                                        # But such truncation only occurs on
                                        # time-driven rotation, not on restarts
                                        # or size-driven rotation.  Default is
                                        # off, meaning append to existing files
                                        # in all cases.
#log_rotation_age = 1d                  # Automatic rotation of logfiles will
                                        # happen after that time.  0 disables.
#log_rotation_size = 10MB               # Automatic rotation of logfiles will
                                        # happen after that much log output.
                                        # 0 disables.
log_line_prefix = '%m [%p] %q%u@%d '            # special values:
log_timezone = 'Etc/UTC'
cluster_name = '13/main'                        # added to process titles if nonempty
stats_temp_directory = '/var/run/postgresql/13-main.pg_stat_tmp'
timezone = 'Etc/UTC'
lc_messages = 'C.UTF-8'                 # locale for system error message
lc_monetary = 'C.UTF-8'                 # locale for monetary formatting
lc_numeric = 'C.UTF-8'                  # locale for number formatting
lc_time = 'C.UTF-8'                             # locale for time formatting
#extension_destdir = ''                 # prepend path when loading extensions
                                        # and shared objects (added by Debian)
include_dir = 'conf.d'                  # include files ending in '.conf' from

RedHat

#data_directory = 'ConfigDir'           # use data in another directory
                                        # (change requires restart)
#hba_file = 'ConfigDir/pg_hba.conf'     # host-based authentication file
                                        # (change requires restart)
#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file
                                        # (change requires restart)

# If external_pid_file is not explicitly set, no extra PID file is written.
#external_pid_file = ''                 # write an extra PID file
                                        # (change requires restart)
#port = 5432                            # (change requires restart)
#unix_socket_directories = '/var/run/postgresql, /tmp'  # comma-separated list of directories
password_encryption = scram-sha-256             # md5 or scram-sha-256
#ssl = off
#ssl_cert_file = 'server.crt'
#ssl_key_file = 'server.key'
log_destination = 'stderr'              # Valid values are combinations of
                                        # stderr, csvlog, syslog, and eventlog,
                                        # depending on platform.  csvlog
                                        # requires logging_collector to be on.
# This is used when logging to stderr:
logging_collector = on                  # Enable capturing of stderr and csvlog
                                        # into log files. Required to be on for
                                        # csvlogs.
                                        # (change requires restart)
# These are only used if logging_collector is on:
log_directory = 'log'                   # directory where log files are written,
                                        # can be absolute or relative to PGDATA
log_filename = 'postgresql-%a.log'      # log file name pattern,
                                        # can include strftime() escapes
log_truncate_on_rotation = on           # If on, an existing log file with the
                                        # same name as the new log file will be
                                        # truncated rather than appended to.
                                        # But such truncation only occurs on
                                        # time-driven rotation, not on restarts
                                        # or size-driven rotation.  Default is
                                        # off, meaning append to existing files
                                        # in all cases.
log_rotation_age = 1d                   # Automatic rotation of logfiles will
                                        # happen after that time.  0 disables.
log_rotation_size = 0                   # Automatic rotation of logfiles will
                                        # happen after that much log output.
                                        # 0 disables.
log_line_prefix = '%m [%p] '            # special values:
log_timezone = 'UTC'
#cluster_name = ''                      # added to process titles if nonempty
#stats_temp_directory = 'pg_stat_tmp'
timezone = 'UTC'
lc_messages = 'en_US.UTF-8'                     # locale for system error message
lc_monetary = 'en_US.UTF-8'                     # locale for monetary formatting
lc_numeric = 'en_US.UTF-8'                      # locale for number formatting
lc_time = 'en_US.UTF-8'                         # locale for time formatting

#include_dir = '...'                    # include files ending in '.conf' from

@atsikham atsikham marked this pull request as ready for review May 23, 2021 22:55
@atsikham atsikham self-assigned this May 24, 2021
@atsikham atsikham force-pushed the feature/upgrade-postgresql-install branch from 2433d9d to 6aee001 Compare May 24, 2021 08:30
@atsikham atsikham force-pushed the feature/upgrade-postgresql-install branch from 0799e43 to 731bb44 Compare May 24, 2021 19:41
@atsikham atsikham force-pushed the feature/upgrade-postgresql-install branch from 731bb44 to da57e0c Compare May 24, 2021 19:49
@atsikham atsikham requested review from seriva and plirglo May 27, 2021 13:11
@atsikham atsikham mentioned this pull request May 31, 2021
12 tasks
plirglo
plirglo previously approved these changes Jun 1, 2021
docs/home/COMPONENTS.md Show resolved Hide resolved
…/molecule/debian-repmgr/prepare.yml

Co-authored-by: to-bar <[email protected]>
atsikham and others added 10 commits June 1, 2021 21:04
…/molecule/debian-repmgr/verify.yml

Co-authored-by: to-bar <[email protected]>
…/molecule/redhat-repmgr/prepare.yml

Co-authored-by: to-bar <[email protected]>
…/tasks/extensions/replication/extension.yml

Co-authored-by: to-bar <[email protected]>
…/tasks/extensions/replication/extension.yml

Co-authored-by: to-bar <[email protected]>
…/tasks/extensions/replication/extension.yml

Co-authored-by: to-bar <[email protected]>
@atsikham atsikham requested review from to-bar and plirglo June 1, 2021 22:43
@atsikham atsikham merged commit 197fe44 into hitachienergy:feature/upgrade-postgresql Jun 7, 2021
atsikham added a commit that referenced this pull request Jul 28, 2021
For more information check #2330
atsikham added a commit to atsikham/epiphany that referenced this pull request Jul 28, 2021
to-bar pushed a commit to to-bar/epiphany that referenced this pull request Jul 28, 2021
to-bar pushed a commit to to-bar/epiphany that referenced this pull request Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants