I am trying to set up streaming replication in postgresql-10.0. i faced this issue.
Standbys are not supposed to receive any Transactional queries, if it does, postgres will throw out the following error and should not crash,
cannot execute DELETE in a read-only transaction
But im facing a crash in Standby when i issue a DELETE query. Attached the server logs,
postgres=# delete from time;
2018-08-09 12:51:12.965 IST [5166] ERROR: cannot execute DELETE in a read-only transaction
2018-08-09 12:51:12.965 IST [5166] STATEMENT: delete from time;
2018-08-09 12:51:12.965 IST [5166] ERROR: cannot make new WAL entries during recovery
2018-08-09 12:51:12.965 IST [5166] WARNING: AbortTransaction while in ABORT state
2018-08-09 12:51:12.965 IST [5166] ERROR: cannot make new WAL entries during recovery
2018-08-09 12:51:12.965 IST [5166] WARNING: AbortTransaction while in ABORT state
2018-08-09 12:51:12.965 IST [5166] ERROR: cannot make new WAL entries during recovery
WARNING: AbortTransaction while in ABORT state
2018-08-09 12:51:12.965 IST [5166] WARNING: AbortTransaction while in ABORT state
WARNING: AbortTransaction while in ABORT state
WARNING: AbortTransaction while in ABORT state
2018-08-09 12:51:12.965 IST [5166] ERROR: cannot make new WAL entries during recovery
2018-08-09 12:51:12.965 IST [5166] PANIC: ERRORDATA_STACK_SIZE exceeded
ERROR: cannot execute DELETE in a read-only transaction
ERROR: cannot make new WAL entries during recovery
ERROR: cannot make new WAL entries during recovery
ERROR: cannot make new WAL entries during recovery
ERROR: cannot make new WAL entries during recovery
PANIC: ERRORDATA_STACK_SIZE exceeded
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: 2018-08-09 12:53:39.180 IST [98163] LOG: server process (PID 5166) was terminated by signal 6: Abort trap
I have no clue why standby is crashing. Does anyone have idea?