X
X

Select Your Currency

Türk Lirası $ US Dollar
X
X

Select Your Currency

Türk Lirası $ US Dollar
Yıllık Satın Alımlarda %15 İndirim: Şimdi Tasarruf Edin! Detaylı Bilgi İçin Tıklayın!

Knowledge Base

HomepageKnowledge BaseGeneralMaking Django PostgreSQL High Perfo...

Making Django PostgreSQL High Performance Settings

Below are the settings for high performance.

echo '' > /etc/postgresql/10/main/postgresql.conf
nano /etc/postgresql/10/main/postgresql.conf
data_directory = '/var/lib/postgresql/10/main'
hba_file = '/etc/postgresql/10/main/pg_hba.conf'
ident_file = '/etc/postgresql/10/main/pg_ident.conf'
external_pid_file = '/var/run/postgresql/10-main.pid'
listen_addresses = '*'
port=5432
max_connections = 300
shared_buffers = 2GB
effective_cache_size = 4GB
maintenance_work_mem = 512MB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
effective_io_concurrency = 200
work_mem = 6990kB
min_wal_size = 2GB
max_wal_size = 4GB
max_worker_processes = 2
max_parallel_workers_per_gather = 1
max_parallel_workers = 2
random_page_cost = 10
seq_page_cost = 1
unix_socket_directories = '/var/run/postgresql'
dynamic_shared_memory_type = posix
cluster_name = '10/main'
stats_temp_directory = '/var/run/postgresql/10-main.pg_stat_tmp'
datestyle = 'iso, mdy'
timezone = 'Europe/Istanbul'
lc_messages = 'en_US.UTF-8'
lc_monetary = 'en_US.UTF-8'
lc_numeric = 'en_US.UTF-8'
lc_time = 'en_US.UTF-8'
default_text_search_config = 'pg_catalog.english'
include_dir = 'conf.d'

log_statement = all
logging_collector = on
log_destination = 'stderr'
log_rotation_age = 1d
log_directory = '/var/log/postgresql/pg_log'
log_min_duration_statement = 30
log_rotation_age = 1d
log_timezone = 'Turkey'
log_rotation_size = 100MB

After making the settings, we restart and activate Postgresql with the following command.

systemctl restart postgresql; systemctl enable postgresql

Can't find the information you're looking for?

You have examined the knowledge base in detail, but if you cannot find the information you need,

Create a Support Ticket
Did you find it useful?
(113 times viewed. / 0 people found helpful.)