Skip to content

Commit

Permalink
pg_upgrade: Use 50% CPU cores for vacuumdb (analyze) (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitabaks authored Dec 5, 2023
1 parent cb9db73 commit df3b155
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vars/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ schema_compatibility_check: true # If 'true', a compatibility check of the data
schema_compatibility_check_port: "{{ (postgresql_port | int) + 1 }}" # Port used to run a temporary PostgreSQL instance for schema compatibility checking.
schema_compatibility_check_timeout: 3600 # Maximum duration (in seconds) for the compatibility check (using pg_dumpall --schema-only).

vacuumdb_parallel_jobs: "{{ ansible_processor_vcpus }}" # use all CPU cores
vacuumdb_analyze_timeout: 3600 # seconds. The maximum duration of analyze command (soft limit, exceeding won't halt playbook)
update_extensions: true # if 'true', try to update extensions automatically

vacuumdb_parallel_jobs: "{{ [ansible_processor_vcpus | int // 2, 1] | max }}" # use 50% CPU cores
vacuumdb_analyze_timeout: 3600 # seconds. The maximum duration of analyze command (soft limit, exceeding won't halt playbook)

# Do not perform an upgrade if
max_replication_lag_bytes: 10485760 # 10 MiB - Maximum allowed replication lag in bytes
max_transaction_sec: 15 # Maximum allowed duration for a transactions in seconds
Expand Down

0 comments on commit df3b155

Please sign in to comment.