4

I have an instance running Postgres v PostgreSQL 10.3 (Debian 10.3-1.pgdg90+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit. We have several indexes, GIN indexes included.

Occasionally queries made on one of the table get locked, this is what i can see from pg_stat_activity:

select wait_event, wait_event_type from pg_stat_activity where 
state='active'; 
  wait_event  | wait_event_type 
--------------+-----------------
 DataFileRead | IO
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 DataFileRead | IO
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
 buffer_io    | LWLock
              | 
(25 rows)

All the locked queries are not always on the same table, but on a random one, when this happens the other tables are still accessible.

I'm using Postgres over Kubernetes, with a network mounted storage.

I tried to run VACUUM ANALYZE <table>; as well, but it got stuck too.

Anybody ever run into a similar issue? how did you get through it?

2
  • Did you find the solution? – ba0708 Jan 8 '20 at 21:14
  • I suspect it was the network mounted storage but couldn’t prove it. In order to resolve the situation I had to move the database outside of the cluster. – Riccardo Jan 8 '20 at 22:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.