On 1 February 2014 03:50, Robert Haas <rh...@postgresql.org> wrote:

> Introduce replication slots.
>
> Replication slots are a crash-safe data structure which can be created
> on either a master or a standby to prevent premature removal of
> write-ahead log segments needed by a standby, as well as (with
> hot_standby_feedback=on) pruning of tuples whose removal would cause
> replication conflicts.  Slots have some advantages over existing
> techniques, as explained in the documentation.
>
> In a few places, we refer to the type of replication slots introduced
> by this patch as "physical" slots, because forthcoming patches for
> logical decoding will also have slots, but with somewhat different
> properties.
>

So now that I've actually gone to use physical replication slots, I can't
get them working.

Primary postgresql.conf changes:

shared_buffers = 8MB
logging_collector = on
log_line_prefix = '%m - %u - %d'
max_connections = 8
wal_level = 'hot_standby'
port = 5532
max_wal_senders = 4
max_replication_slots = 4


Standby postgresql.conf changes:

shared_buffers = 8MB
logging_collector = on
log_line_prefix = '%m - %u - %d'
max_connections = 8
wal_level = 'hot_standby'
port = 5533
hot_standby = on


Standby recovery.conf:

standby_mode = 'on'
recovery_target_timeline = 'latest'
primary_conninfo = 'host=127.0.0.1 user=rep_user port=5532
application_name=standby1'
primary_slotname = 'primary_physical_slot'


Primary:

  psql://thom@[local]:5532/postgres

# SELECT * FROM pg_replication_slots;
       slot_name       | slot_type | datoid | database | active | xmin |
restart_lsn
-----------------------+-----------+--------+----------+--------+------+-------------
 primary_physical_slot | physical  |      0 |          | f      |      |
(1 row)


Errors in primary log:

2014-02-28 19:00:40.459 GMT - rep_user - [unknown]ERROR:  syntax error
(repeated every 5 seconds)


Errors in standby log:

2014-02-28 19:00:40.459 GMT -  - FATAL:  could not start WAL streaming:
ERROR:  syntax error
(repeated every 5 seconds)


Am I missing something obvious?  The error message isn't particularly
helpful.
-- 
Thom

Reply via email to