patternsqlMinor
PostgreSQL Streaming Replication - Slave remains in recovery mode
Viewed 0 times
postgresqlslavemoderemainsreplicationrecoverystreaming
Problem
PostgesSQL 9.3.x
I cannot run some commands on slave because:
"ERROR: recovery is in progress"
I set up streaming without archive. Initialized with pg_basebackup. Dataset has about 180GB .
This is what I get on slave when looking at relevant processes:
Byte lag (as queried on master) is between 0 and 2000 bytes.
recovery.conf content:
What am I missing?
I cannot run some commands on slave because:
"ERROR: recovery is in progress"
I set up streaming without archive. Initialized with pg_basebackup. Dataset has about 180GB .
This is what I get on slave when looking at relevant processes:
23378 ? Ss 0:12 postgres: startup process recovering 000000010000026000000083
23379 ? Ss 0:02 postgres: checkpointer process
23380 ? Ss 0:00 postgres: writer process
23382 ? Ss 0:00 postgres: stats collector process
23383 ? Ss 0:14 postgres: wal receiver process streaming 260/837D8000Byte lag (as queried on master) is between 0 and 2000 bytes.
recovery.conf content:
standby_mode = 'on'
primary_conninfo = 'host=SOME_IP port=5432 user=postgres sslmode=require'What am I missing?
Solution
This is what "streaming replication" means. You stay in recovery, so that you can stream changes from the master.
That means you cannot run things that change the database on the replica.
That means you cannot run things that change the database on the replica.
Context
StackExchange Database Administrators Q#59684, answer score: 7
Revisions (0)
No revisions yet.