Posts

Showing posts with the label WAL

PostgreSQL 11 Yenilikleri 1 - wal-segsize

Image
Merhaba, PostgreSQL wal size deafult olarak 16MB dir. PostgreSQL 11 ile initdb komutuna yeni bir seçenek daha geldi, wal-segsize. PostgreSQL 11 ile birlikte bu değer kurulum sırasında wal dosyalarının boyutu belirlenebilecek. 2 nin katları (1,2,4,8,16,32..) şeklinde MB boyutunda set edilebilir. Buradaki sınır en fazla 1024 (MB) olarak set edilebilir. initdb -D /pg_data --wal-segsize=32 Bu yenilik gelmeden önce Robert Haas’ın neden böyle bir değişikliğe gereksinim duyulduğu ile ilgili bir yazısını okudum. Wal dosyasınınn boyutunun 16MB’tan 64MB’a çıkarılmasınyüzlerceın çok fark etmeyeceğinden bahsetmişti. Açıklaması da şöyle: “max_wal_size=1GB olması demek 64 adet 16MB’lık WAL segment’i demek. 16 adet 64MB’lık WAL segmentine sahip olunması bu değişikliği yapan kişileri çok da etkilemeyecek. Bir günde 32,768 adet WAL segmenti üreten bir PostgreSQL veritabanı (her 2.6 sn civarı WAL dosyasının üretilmesi anlamına gelir bu da) için günde 8,192 WAL segmentinin oluşturulması(günde 10.5 sn

ERROR: pg_stop_backup still waiting for all required WAL segments to be archived

Hi, This error mention that WAL Segments can not be archived, so you need to check archive_command is right to archive WAL.  NOTICE: pg_stop_backup cleanup done, waiting for required WAL segments to be archived  WARNING: pg_stop_backup still waiting for all required WAL segments to be archived (60 seconds elapsed)  HINT: Check that your archive_command is executing properly. pg_stop_backup can be cancelled safely, but the database backup will not be usable without all the WAL segments. archive_command can be as bellow row in your postgres.conf file; archive_command = '/bin/cp %p /var/lib/pgsql/archive/%f' the most important thing is if there is a directory for /var/lib/pgsql/archive/%f side. Check it out and reload your config file or restart your Postgresql server. Loves,