Re: Migrating to PG 9.2 (LONG, SORRY)

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: Migrating to PG 9.2 (LONG, SORRY)
Дата
Msg-id 20121004011803.GO1267@tamriel.snowman.net
обсуждение исходный текст
Ответ на Migrating to PG 9.2 (LONG, SORRY)  (Scott Whitney <scott@journyx.com>)
Список pgsql-admin
* Scott Whitney (scott@journyx.com) wrote:
> 1)Add to pg_hba.conf on master:
> host  replication  postgres  my IP/32  trust

Never use 'trust'.  At least use 'md5', all that requires is putting a
password into your replication config.

> 2) Configure in postgresql.conf on master:
> wal_level = hot_standby
> max_wal_senders = 5
> wal_keep_segments = SOME NUMBER I HAVE TO DETERMINE BASED ON HOW LONG THE BACKUP ETC TAKES.
>
> # Maybe do this if the above is not high enough
> #archive_mode    = on
> #archive_command = 'cp %p /path_to/archive/%f'

You should definitely have a mechanism for the WALs to be transferred to
the replica(s) on a regular basis.  Don't just rely on the replication
connection.  With this, you don't have to worry as much about the
wal_keep_segments option above...

> 3) Add to postgresql.conf on standby:
> hot_standby = on
>
> 4) Create a recovery.conf on the standby (in $PGDATA):
> standby_mode          = 'on'
> primary_conninfo      = 'host=master IP port=5432 user=postgres'

In primary_conninfo is where you'd put the password for md5 auth.

> 5)Do my backup from the STANDBY AT THE DATA CETNER

I think the typical approach is to use the same copy of the master that
you did for the intial slave when doing the cascaded slave..
Regardless, and with all of this, test, test, test.

    Thanks,

        Stephen

Вложения

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

Предыдущее
От: Greg Williamson
Дата:
Сообщение: Re: Database size stays constant but disk space keeps shrinking -- postgres 9.1
Следующее
От: Christian Ullrich
Дата:
Сообщение: Re: Creating schema best practices