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

feat(ANXS/postgresql): remove obsolete v9.6 and prior code #528

Closed
wants to merge 2 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- distro: centos8
- distro: debian9
- distro: debian10
- distro: fedora33
# - distro: fedora33 # Removing to test pipeline
otakup0pe marked this conversation as resolved.
Show resolved Hide resolved
- distro: ubuntu1604
- distro: ubuntu1804
- distro: ubuntu2004
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@ An example how to include this role as a task:

#### Compatibility matrix

| Distribution / PostgreSQL | 9.6 | 10 | 11 | 12 | 13 |
| ------------------------- |:---:|:--:|:--:|:--:|:--:|
| CentOS 7.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| CentOS 8.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Debian 9.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Debian 10.x | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: |
| Ubuntu 16.04.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Ubuntu 18.04.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Ubuntu 20.04.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Fedora 33 | :grey_question: | :grey_question: | :grey_question: | :grey_question: | :grey_question: |
| Distribution / PostgreSQL | 10 | 11 | 12 | 13 |
| ------------------------- |:---:|:--:|:--:|:--:|
| CentOS 7.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| CentOS 8.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Debian 9.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Debian 10.x | :grey_question: | :grey_question: | :grey_question: | :grey_question: |
| Ubuntu 16.04.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Ubuntu 18.04.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Ubuntu 20.04.x | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Fedora 33 | :grey_question: | :grey_question: | :grey_question: | :grey_question: |

- :white_check_mark: - tested, works fine
- :warning: - Not for production use
Expand Down
89 changes: 43 additions & 46 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ postgresql_ext_install_postgis: no

# PostGIS
postgresql_postgis_release_compatibility:
9.5: "3.0"
9.6: "3.1"
10: "3.1"
11: "3.1"
12: "3.1"
13: "3.1"

Expand Down Expand Up @@ -125,8 +124,8 @@ postgresql_port: 5432
postgresql_max_connections: 100
postgresql_superuser_reserved_connections: 3

postgresql_unix_socket_directory: "" # (<= 9.2)
postgresql_unix_socket_directories: # (>= 9.3)
postgresql_unix_socket_directory: ""
postgresql_unix_socket_directories:
- "{{ postgresql_pid_directory }}"
postgresql_unix_socket_group: ""
postgresql_unix_socket_permissions: "0777" # begin with 0 to use octal notation
Expand All @@ -153,17 +152,17 @@ postgresql_ssl_dh_params_file: "" # (>= 10)
postgresql_ssl_passphrase_command: "" # (>= 11)
postgresql_ssl_passphrase_command_supports_reload: off # (>= 11)
postgresql_ssl_renegotiation_limit: 512MB # amount of data between renegotiations
postgresql_ssl_cert_file: "/etc/ssl/certs/ssl-cert-snakeoil.pem" # (>= 9.2)
postgresql_ssl_key_file: "/etc/ssl/private/ssl-cert-snakeoil.key" # (>= 9.2)
postgresql_ssl_ca_file: "" # (>= 9.2)
postgresql_ssl_crl_file: "" # (>= 9.2)
postgresql_ssl_cert_file: "/etc/ssl/certs/ssl-cert-snakeoil.pem"
postgresql_ssl_key_file: "/etc/ssl/private/ssl-cert-snakeoil.key"
postgresql_ssl_ca_file: ""
postgresql_ssl_crl_file: ""
postgresql_password_encryption: "{{ 'md5' if postgresql_version is version_compare('10', '>=') else 'on' }}" # (>=10.0 set to scram-sha-256 for best security)
postgresql_db_user_namespace: off
postgresql_row_security: off # (>= 9.5)
postgresql_row_security: off

# Kerberos and GSSAPI
postgresql_krb_server_keyfile: ""
postgresql_krb_srvname: "postgres" # (<= 9.3)
postgresql_krb_srvname: "postgres"
postgresql_krb_caseins_users: off

# TCP Keepalives, 0 selects the system default (in seconds)
Expand All @@ -190,7 +189,7 @@ postgresql_max_prepared_transactions: 0 # zero disables the feature
postgresql_work_mem: 1MB # min 64kB
postgresql_hash_mem_multiplier: 1.0 # (>= 13)
postgresql_maintenance_work_mem: 16MB # min 1MB
postgresql_replacement_sort_tuples: 150000 # (>= 9.6) limits use of replacement selection sort
postgresql_replacement_sort_tuples: 150000 # limits use of replacement selection sort
postgresql_autovacuum_work_mem: -1 # min 1MB, or -1 to use maintenance_work_mem
postgresql_logical_decoding_work_mem: 64MB # (>= 13)
postgresql_max_stack_depth: 2MB # min 100kB
Expand All @@ -207,7 +206,7 @@ postgresql_dynamic_shared_memory_type: "posix" # the default is the first optio

# - Disk -

# limits per-process temp file space in kB, or -1 for no limit (>= 9.2)
# limits per-process temp file space in kB, or -1 for no limit
postgresql_temp_file_limit: -1


Expand All @@ -231,8 +230,7 @@ postgresql_vacuum_cost_limit: 200 # 1-10000 credits
postgresql_bgwriter_delay: 200ms # 10-10000ms between rounds
postgresql_bgwriter_lru_maxpages: 100 # 0-1000 max buffers written/round
postgresql_bgwriter_lru_multiplier: 2.0 # 0-10.0 multiplier on buffers scanned/round
postgresql_bgwriter_flush_after: 0 # (>= 9.6) 0 disables,
# default is 512kB on linux, 0 otherwise
postgresql_bgwriter_flush_after: 0 # 0 disables, default is 512kB on linux, 0 otherwise


# - Asynchronous Behavior -
Expand All @@ -241,12 +239,12 @@ postgresql_effective_io_concurrency: 1 # 1-1000; 0 disables prefetchin
postgresql_maintenance_io_concurrency: 10 # (>= 13)
postgresql_max_worker_processes: 8 # (change requires restart)
postgresql_max_parallel_maintenance_workers: 2 # (>= 11) taken from max_parallel_workers
postgresql_max_parallel_workers_per_gather: 0 # (>= 9.6) taken from max_worker_processes
postgresql_max_parallel_workers_per_gather: 0 # taken from max_worker_processes
postgresql_parallel_leader_participation: on # (>= 11)
postgresql_max_parallel_workers: 8 # (>= 10)
postgresql_old_snapshot_threshold: -1 # (>= 9.6) 1min-60d; -1 disables; 0 is immediate
postgresql_old_snapshot_threshold: -1 # 1min-60d; -1 disables; 0 is immediate
# (change requires restart)
postgresql_backend_flush_after: 0 # (>= 9.6) 0 disables, default is 0
postgresql_backend_flush_after: 0 # 0 disables, default is 0


#------------------------------------------------------------------------------
Expand All @@ -255,7 +253,7 @@ postgresql_backend_flush_after: 0 # (>= 9.6) 0 disables, default

# - Settings -

postgresql_wal_level: "replica" # minimal, archive (<= 9.5), hot_standby (<= 9.5), replica (>= 9.6), or logical
postgresql_wal_level: "replica" # replica or logical
postgresql_fsync: on # flush data to disk for crash safety
# (turning this off can cause
# unrecoverable data corruption)
Expand All @@ -264,7 +262,7 @@ postgresql_fsync: on # flush data to disk for crash safety
# - off
# - local
# - remote_write
# - remote_apply (>= 9.6)
# - remote_apply
# - on
postgresql_synchronous_commit: "on"

Expand All @@ -278,24 +276,24 @@ postgresql_wal_sync_method: "fsync"

# recover from partial page writes
postgresql_full_page_writes: on
postgresql_wal_compression: off # (>= 9.5)
postgresql_wal_compression: off
postgresql_wal_log_hints: off # also do full page writes of non-critical updates
postgresql_wal_init_zero: on # zero-fill new WAL files
postgresql_wal_recycle: on # recycle WAL files

postgresql_wal_buffers: -1 # min 32kB, -1 sets based on shared_buffers
postgresql_wal_writer_delay: 200ms # 1-10000 milliseconds
postgresql_wal_writer_flush_after: 1MB # (>= 9.6) 0 disables
postgresql_wal_writer_flush_after: 1MB # 0 disables
postgresql_wal_skip_threshold: 2MB # (>= 13)
postgresql_commit_delay: 0 # range 0-100000, in microseconds
postgresql_commit_siblings: 5 # range 1-1000


# - Checkpoints -

postgresql_max_wal_size: 1GB # (>= 9.5)
postgresql_min_wal_size: 80MB # (>= 9.5)
postgresql_checkpoint_flush_after: 0 # (>= 9.6) 0 disables,
postgresql_max_wal_size: 1GB
postgresql_min_wal_size: 80MB
postgresql_checkpoint_flush_after: 0 # 0 disables,
# default is 256kB on linux, 0 otherwise
postgresql_checkpoint_timeout: 5min # range 30s-1d
postgresql_checkpoint_completion_target: 0.5 # checkpoint target duration, 0.0 - 1.0
Expand Down Expand Up @@ -345,25 +343,25 @@ postgresql_recovery_min_apply_delay: 0 # (>= 12)

# max number of walsender processes
postgresql_max_wal_senders: 10
postgresql_wal_sender_delay: 1s # walsender cycle time, 1-10000 milliseconds (<= 9.1)
postgresql_wal_sender_delay: 1s # walsender cycle time, 1-10000 milliseconds

postgresql_wal_keep_segments: 0 # in logfile segments, 16MB each; 0 disables
postgresql_wal_keep_size: 0 # (>= 13)
postgresql_max_slot_wal_keep_size: -1 # (>= 13)

postgresql_replication_timeout: 60s # in milliseconds; 0 disables (<= 9.2)
postgresql_wal_sender_timeout: 60s # in milliseconds; 0 disables (>= 9.3)
postgresql_replication_timeout: 60s # in milliseconds; 0 disables
postgresql_wal_sender_timeout: 60s # in milliseconds; 0 disables
postgresql_max_replication_slots: 0 # max number of replication slots

postgresql_track_commit_timestamp: off # (>= 9.5)
postgresql_track_commit_timestamp: off

# - Master Server -

# These settings are ignored on a standby server.

# standby servers that provide sync rep.
# number of sync standbys (>= 9.6) and comma-separated list of application_name from standby(s)
postgresql_synchronous_standby_num_sync: "" # >= 9.6 (NOTE: If you use the ANY/ALL syntax in v10, then note the new variable below)
# number of sync standbys and comma-separated list of application_name from standby(s)
postgresql_synchronous_standby_num_sync: "" # NOTE: If you use the ANY/ALL syntax in v10, then note the new variable below
postgresql_synchronous_standby_choose_sync: "FIRST" # >= 10
postgresql_synchronous_standby_names: [] # '*' means 'all'

Expand All @@ -387,7 +385,7 @@ postgresql_hot_standby_feedback: off
#time that receiver waits for communication from master in milliseconds
postgresql_wal_receiver_timeout: 60s
# time to wait before retrying to retrieve WAL after a failed attempt
postgresql_wal_retrieve_retry_interval: 5s # (>= 9.5)
postgresql_wal_retrieve_retry_interval: 5s

# - Subscribers - (>= 10)

Expand Down Expand Up @@ -430,13 +428,12 @@ postgresql_random_page_cost: 4.0 # same scale as above
postgresql_cpu_tuple_cost: 0.01 # same scale as above
postgresql_cpu_index_tuple_cost: 0.005 # same scale as above
postgresql_cpu_operator_cost: 0.0025 # same scale as above
postgresql_parallel_tuple_cost: 0.1 # same scale as above (>= 9.6)
postgresql_parallel_setup_cost: 1000.0 # same scale as above (>= 9.6)
postgresql_parallel_tuple_cost: 0.1 # same scale as above
postgresql_parallel_setup_cost: 1000.0 # same scale as above
postgresql_jit_above_cost: 100000 # perform JIT compilation if available
postgresql_jit_inline_above_cost: 500000 # inline small functions if query is
postgresql_jit_optimize_above_cost: 500000 # use expensive JIT optimizations if

postgresql_min_parallel_relation_size: 8MB # (= 9.6) replaced by below two parameters in 10
postgresql_min_parallel_table_scan_size: 8MB # (>= 10)
postgresql_min_parallel_index_scan_size: 512kB # (>= 10)
postgresql_effective_cache_size: 128MB
Expand All @@ -460,7 +457,7 @@ postgresql_constraint_exclusion: "partition" # on, off, or partition
postgresql_cursor_tuple_fraction: 0.1 # range 0.0-1.0
postgresql_from_collapse_limit: 8
postgresql_join_collapse_limit: 8 # 1 disables collapsing of explicit
postgresql_force_parallel_mode: off # on, off, regress (>= 9.6)
postgresql_force_parallel_mode: off # on, off, regress
postgresql_jit: on # (>= 11: off, 12: on)
postgresql_plan_cache_mode: "auto" # (>= 12)

Expand Down Expand Up @@ -499,9 +496,9 @@ postgresql_log_rotation_size: 10MB
# These are relevant when logging to syslog:
postgresql_syslog_facility: "LOCAL0"
postgresql_syslog_ident: "postgres"
postgresql_syslog_sequence_numbers: on # (>= 9.6)
postgresql_syslog_split_messages: on # (>= 9.6)
# This is only relevant when logging to eventlog (win32) (>= 9.2):
postgresql_syslog_sequence_numbers: on
postgresql_syslog_split_messages: on
# This is only relevant when logging to eventlog (win32):
postgresql_event_source: "PostgreSQL"


Expand Down Expand Up @@ -612,7 +609,7 @@ postgresql_log_timezone: "UTC"

postgresql_track_activities: on
postgresql_track_counts: on
postgresql_track_io_timing: off # (>= 9.2)
postgresql_track_io_timing: off
postgresql_track_functions: "none" # none, pl, all
postgresql_track_activity_query_size: 1024
postgresql_update_process_title: on
Expand Down Expand Up @@ -652,7 +649,7 @@ postgresql_autovacuum_vacuum_insert_scale_factor: 0.2 # (>= 13)
postgresql_autovacuum_analyze_scale_factor: 0.1
# maximum XID age before forced vacuum
postgresql_autovacuum_freeze_max_age: 200000000
# maximum Multixact age before forced vacuum (>= 9.3)
# maximum Multixact age before forced vacuum
postgresql_autovacuum_multixact_freeze_max_age: 400000000
# default vacuum cost delay for autovacuum, in milliseconds
postgresql_autovacuum_vacuum_cost_delay: 2ms # (<= 11: 20ms, >=12 2ms)
Expand Down Expand Up @@ -681,19 +678,19 @@ postgresql_default_transaction_deferrable: off
postgresql_session_replication_role: "origin"

postgresql_statement_timeout: 0 # in milliseconds, 0 is disabled
postgresql_lock_timeout: 0 # in milliseconds, 0 is disabled (>= 9.3)
postgresql_idle_in_transaction_session_timeout: 0 # in milliseconds, 0 is disabled (>= 9.6)
postgresql_lock_timeout: 0 # in milliseconds, 0 is disabled
postgresql_idle_in_transaction_session_timeout: 0 # in milliseconds, 0 is disabled
postgresql_vacuum_freeze_min_age: 50000000
postgresql_vacuum_freeze_table_age: 150000000
postgresql_vacuum_cleanup_index_scale_factor: 0.1 # (>= 11)
postgresql_vacuum_multixact_freeze_min_age: 5000000 # (>= 9.3)
postgresql_vacuum_multixact_freeze_table_age: 150000000 # (>= 9.3)
postgresql_vacuum_multixact_freeze_min_age: 5000000
postgresql_vacuum_multixact_freeze_table_age: 150000000

postgresql_bytea_output: "hex" # hex, escape
postgresql_xmlbinary: "base64"
postgresql_xmloption: "content"
postgresql_gin_fuzzy_search_limit: 0 # (<= 9.2)
postgresql_gin_pending_list_limit: 4MB # (>= 9.5)
postgresql_gin_fuzzy_search_limit: 0
postgresql_gin_pending_list_limit: 4MB


# - Locale and Formatting -
Expand Down
6 changes: 3 additions & 3 deletions molecule/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This directory is the home of the test playbooks:

# Molecule

The default tested version is postgresql 9.6, 10, 11, 12, and 13 on Ubuntu 20.04. Linting is disabled for the tests.
The default tested version is postgresql 10, 11, 12, and 13 on Ubuntu 20.04. Linting is disabled for the tests.

The default distribution is ubuntu2004. You can override th with setting the environment variable MOLECULE_DISTRO to one of:

Expand Down Expand Up @@ -35,7 +35,7 @@ Prior to the testing, molecule runs the prepare.yml playbook to:
* Create a user called `ansible`, with the default group membership of either `wheel` (CentOS, Fedora), or `sudo` (Debian, ubuntu)
* Install a couple of packages that Jeff Geerling did not install in his container images, that are needed in order to test the role properly

The main file ./molecule/default/molecule.yml sets up versions to test from 9.6 to 13.
The main file ./molecule/default/molecule.yml sets up versions to test from 10 to 13.

# Tests

Expand Down Expand Up @@ -92,4 +92,4 @@ MOLECULE_DISTRO=ubuntu2004 molecule destroy

# References

* https://github.com/search?q=user%3Ageerlingguy+docker-.*-ansible
* https://github.com/search?q=user%3Ageerlingguy+docker-.*-ansible
9 changes: 0 additions & 9 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,6 @@ lint: |
# yamllint .
# ansible-lint
platforms:
- name: postgresql-9_6
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
command: ""
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
privileged: true
pre_build_image: true
- name: postgresql-10
image: "geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2004}-ansible:latest"
command: ""
Expand Down Expand Up @@ -50,8 +43,6 @@ provisioner:
converge: ${MOLECULE_PLAYBOOK:-../../tests/playbook.yml}
inventory:
host_vars:
postgresql-9_6:
postgresql_version: 9.6
postgresql-10:
postgresql_version: 10
postgresql-11:
Expand Down
Loading