Module: PgHero::Methods::Settings

Included in:
Database
Defined in:
lib/pghero/methods/settings.rb

Instance Method Summary collapse

Instance Method Details

#autovacuum_settingsObject



24
25
26
# File 'lib/pghero/methods/settings.rb', line 24

def autovacuum_settings
  fetch_settings %i(autovacuum autovacuum_max_workers autovacuum_vacuum_cost_limit autovacuum_vacuum_scale_factor autovacuum_analyze_scale_factor)
end

#settingsObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/pghero/methods/settings.rb', line 4

def settings
  names =
    if server_version_num >= 180000
      %i(
        max_connections shared_buffers effective_cache_size maintenance_work_mem
        checkpoint_completion_target wal_buffers default_statistics_target
        random_page_cost effective_io_concurrency work_mem huge_pages
        jit wal_compression io_method min_wal_size max_wal_size
      )
    else
      %i(
        max_connections shared_buffers effective_cache_size maintenance_work_mem
        checkpoint_completion_target wal_buffers default_statistics_target
        random_page_cost effective_io_concurrency work_mem huge_pages
        jit wal_compression min_wal_size max_wal_size
      )
    end
  fetch_settings(names)
end

#vacuum_settingsObject



28
29
30
# File 'lib/pghero/methods/settings.rb', line 28

def vacuum_settings
  fetch_settings %i(vacuum_cost_limit)
end