Thanks for replying. I'm actually fairly new to postgres, so I'm struggling a with some concepts. I actually solved the problem by setting a timeout for the Linux command, not for the query, this way I'll not interfere with the locked table.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That is kinda never going to work.
Have you tried to lock the table first and then doing the partition?
postgresql.org/docs/9.4/sql-lock.html
LOCK with the NOWAIT option.
Of course this won't block but the table won't be partitioned, so you may need to put some control mechanism in place. (Aka put it into a loop).
Said so, locks are fundamental in postgres, I would suggest you to refresh how and why they work.
Thanks for replying. I'm actually fairly new to postgres, so I'm struggling a with some concepts. I actually solved the problem by setting a timeout for the Linux command, not for the query, this way I'll not interfere with the locked table.