On 09/03/2014 11:03 PM, Andres Freund wrote:
> It actually is explained. I don't have a built source handy right now,
> so chapter numbers... But at least the following is there:
>
> <sect3 id="streaming-replication-slots-config">
> <title>Configuration Example</title>
> <para>
> You can create a replication slot like this:
> <programlisting>
> postgres=# SELECT * FROM pg_create_physical_replication_slot('node_a_slot');
> slot_name | xlog_position
> -------------+---------------
> node_a_slot |
>
> postgres=# SELECT * FROM pg_replication_slots;
> slot_name | slot_type | datoid | database | active | xmin | restart_lsn
> -------------+-----------+--------+----------+--------+------+-------------
> node_a_slot | physical | | | f | |
> (1 row)
> </programlisting>
> To configure the standby to use this slot, <varname>primary_slot_name</>
> should be configured in the standby's <filename>recovery.conf</>.
> Here is a simple example:
> <programlisting>
> standby_mode = 'on'
> primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
> primary_slot_name = 'node_a_slot'
> </programlisting>
>
> and I'm pretty sure primary_slot_name and such is configured at the
> appropriate place too.
Huh. I can't seem to find any way to navigate to that page. What is it
supposed to be under?
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com