Skip to content

Commit 82587bd

Browse files
committed
store: Treat 'no connection to the server' as db not available
So far we treated the Postgres error "no connection to the server" as not indicating that the database was not available. It's a little murky what exactly that error indicates, but it seems to indicate that an existing connection got killed, e.g., because the database crashed. We now treat this as an indication that the database is not available, which will trigger the right action further up in the stack. For example, on indexing, db operations will be retried instead of causing the subgraph to fail. Queries will be aborted with an error message.
1 parent 8b1a524 commit 82587bd

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

store/postgres/src/connection_pool.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,6 @@ impl r2d2::HandleError<r2d2::Error> for ErrorHandler {
566566
// in a locale other than English. In that case, their database will
567567
// be marked as unavailable even though it is perfectly fine.
568568
if msg.contains("canceling statement")
569-
|| msg.contains("no connection to the server")
570569
|| msg.contains("terminating connection due to conflict with recovery")
571570
{
572571
return;

0 commit comments

Comments
 (0)