After acquiring the lock following a 1.5-hour wait, if the PostgreSQL log shows that the query was executed, table was not updated
0
votes
1
answer
71
views
I have a table on which I am executing ALTER TABLE event ALTER pkey SET DEFAULT (1740891600).
The logs show the following -
2025-03-02T06:37:03.876771+00:00 sys-1 postgres-1_1: [25-1] :[67b83ba4.1baab] sqlstate=00000 application_name=[unknown],user=tempuser,db=db_name,client=172.16.6.1 LOG: duration: 5823321.049 ms execute : ALTER TABLE event ALTER pkey SET DEFAULT (1740891600)
I checked the table for the updated key, but found that it was not updated.
Does this mean that query was executed successfully? If yes, why did it not reflect? Does this have something to do with the fact that the client closed the connection with the postgres server after waiting for 10 mins for the query to return success (server did not respond because process was waiting for lock) ?
Edit: An important detail that I might have missed is the below log that were seen immediately after-
2025-03-02T06:37:03.880403+00:00 sys-1 postgres-1_1: [26-1] :[67b83ba4.1baab] sqlstate=08006 application_name=[unknown],user=tempuser,db=db_name,client=172.16.6.1 LOG: could not send data to client: Broken pipe
2025-03-02T06:37:03.882249+00:00 sys-1 postgres-1_1: [27-1] :[67b83ba4.1baab] sqlstate=08006 application_name=[unknown],user=tempuser,db=db_name,client=172.16.6.1 FATAL: connection to client lost
Asked by Yashodhan Agnihotri
(11 rep)
Mar 5, 2025, 11:21 AM
Last activity: Mar 6, 2025, 08:56 AM
Last activity: Mar 6, 2025, 08:56 AM