File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ title : PostgreSQL 55000 error
3
+ date : 2023-11-21
4
+ tags : [til, postgresql]
5
+ description : What was the root cause of PostgreSQL 55000 error in our case
6
+ ---
7
+
8
+ We had a Kafka consumer which was crashing with the error below
9
+
10
+ ``` elixir
11
+ (Postgrex .Error ERROR 55000 (object_not_in_prerequisite_state) recovery is in progress
12
+
13
+ hint: WAL control functions cannot be executed during recovery.)
14
+ ```
15
+
16
+ In that consumer module, there was a function which was eventually trying to get the LSN from the DB by querying something like
17
+
18
+ ```
19
+ SELECT pg_last_wal_replay_lsn()::varchar
20
+ ```
21
+
22
+ It turns out we were actually querying a replica where WAL was enabled, figured that out quite quickly by asking in #postgresql IRC.
23
+
24
+ > 10:49 < Berge> Note that a replica (using WAL replication) is considered to be in recovery
25
+
26
+ Thank you Berge! TIL!
You can’t perform that action at this time.
0 commit comments