How to fix FATAL: reader could not find writer proc entry, lock
searchcancel
How to fix FATAL: reader could not find writer proc entry, lock
book
Article ID: 296984
calendar_today
Updated On: 04-20-2024
Products
VMware Tanzu Greenplum
Issue/Introduction
This issue occurs inGreenplum Database 4.3.x.
Queries are failing with the following error: "FATAL: reader could not find writer proc entry, lock"
Where there is a failover of a segment from primary to mirror, all current queries should be terminated but in some cases the session is allowed to continue. If a session has already created, the writer gang on the segments, then one or more segments failover to the mirror due to a hardware or software error
The session will then try to create a reader gang on the new mirror segment and it will find that there's no writer QE (Query Executor) and reports the error "FATAL: reader could not find writer proc entry, lock".
Environment
Product Version: 4.3.30
Resolution
This issue has been fixed in versions 5.x and above.
In 4.3.x the code should check the health of the writer gang before creating a reader gang. This works correctly on 5.x and above. There is no plan to backport the fix to 4.3.x.
Workaround:
The sessions that are facing this issue needs to be reconnected from client. That is, the user needs to log out and in again.
Use pg_cancel_backend or pg_terminate_backend on the sessions' process ID to stop the sessions reporting the error.
Restarting the database will reset all connections and resolve the issue.