Csaba Nagy <[EMAIL PROTECTED]> writes: > I'm not sure how this operation can work in the presence of other long > running transactions which did not touch the queue table yet, but it > actually does work, I can confirm that. Is it violating MVCC maybe ?
Yes :-(. I think you can get away with it if all your transactions that use the queue table run in READ COMMITTED (not serializable) mode, and if they work like BEGIN; LOCK queue_table IN some-suitable-mode; process queue table; COMMIT; Grabbing the lock will ensure that CLUSTER finishes before any snapshot is taken. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly