Re: pg_xlog on a hot_stanby slave

Поиск
Список
Период
Сортировка
От Xavier 12
Тема Re: pg_xlog on a hot_stanby slave
Дата
Msg-id CAMOV8iC5X1LH+t8Wqm1_Q=Fj0GL0WCWwPEn2jZJEz-3rcLGF3A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_xlog on a hot_stanby slave  (Guillaume Lelarge <guillaume@lelarge.info>)
Ответы Re: pg_xlog on a hot_stanby slave  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgsql-general
I don't think so. There is no archive_command and the master doesn't
ship its wal here.
But how can I check that ?

2015-06-16 12:41 GMT+02:00 Guillaume Lelarge <guillaume@lelarge.info>:
> Le 16 juin 2015 10:57 AM, "Xavier 12" <maniatux@gmail.com> a écrit :
>>
>> Hi everyone,
>>
>> Questions about pg_xlogs again...
>> I have two Postgresql 9.1 servers in a master/slave stream replication
>> (hot_standby).
>>
>> Psql01 (master) is backuped with Barman and pg_xlogs is correctly
>> purged (archive_command is used).
>>
>> Hower, Psql02 (slave) has a huge pg_xlog (951 files, 15G for 7 days
>> only, it keeps growing up until disk space is full). I have found
>> documentation and tutorials, mailing list, but I don't know what is
>> suitable for a Slave. Leads I've found :
>>
>> - checkpoints
>> - archive_command
>> - archive_cleanup
>>
>> Master postgresq.conf :
>>
>> [...]
>> wal_level = 'hot_standby'
>> archive_mode = on
>> archive_command = 'rsync -az /var/lib/postgresql/9.1/main/pg_xlog/%f
>> barman@nas.lan:/data/pgbarman/psql01/incoming/%f'
>> max_wal_senders = 5
>> wal_keep_segments = 64
>> autovacuum = on
>>
>> Slave postgresql.conf :
>>
>> [...]
>> wal_level = minimal
>> wal_keep_segments = 32
>> hot_standby = on
>>
>> Slave recovery.conf :
>>
>> standby_mode = 'on'
>> primary_conninfo = 'host=10.0.0.1 port=5400 user=postgres'
>> trigger_file = '/var/lib/postgresql/9.1/triggersql'
>> restore_command='cp /var/lib/postgresql/9.1/wal_archive/%f "%p"'
>> archive_cleanup_command =
>> '/usr/lib/postgresql/9.1/bin/pg_archivecleanup
>> /var/lib/postgresql/9.1/wal_archive/ %r'
>>
>>
>>
>>
>>
>> How can I reduce the number of WAL files on the hot_stanby slave ?
>>
>
> Depends on what you're talking about. If they are archived wal,
> pg_archive_cleanup is what you're looking for.


В списке pgsql-general по дате отправления:

Предыдущее
От: Filipe Pina
Дата:
Сообщение: serialization failure why?
Следующее
От: Melvin Davidson
Дата:
Сообщение: pg_upgrade problem