I want to vacuum a table in PostgreSQL version 9.1 which will take between 10 to 12 minutes. This needs to be done in real-time, in production use.
I just want to know that if any INSERT
or UPDATE
query comes, will they wait for the lock to be lifted, or will they time out?
NOTE: The Java code that will fire the query has not specified any timeout.
Best Answer
The documentation says the following:
There is no conflict between the two lock types involved. This means that neither
INSERT
/UPDATE
blocksVACUUM
, nor the other way around. This means furthermore that your queries should succeed without timeouts. Most probably the I/O activity of vacuuming won't do you any harm.