pgq_coop.next_batch: check and create subconsumers after locking main consumer
authorMarko Kreen <markokr@gmail.com>
Tue, 18 Sep 2012 11:37:25 +0000 (14:37 +0300)
committerMarko Kreen <markokr@gmail.com>
Tue, 18 Sep 2012 11:37:25 +0000 (14:37 +0300)
commit6a58e74aa18aa5a43761418b29eefd7e3dfa026f
tree9c99ce513f3705425092ec7f1c85b3556ab61879
parent807c6ee24189d2bf387354fd93a759c3f609257a
pgq_coop.next_batch: check and create subconsumers after locking main consumer

Otherwise, there is race with other consumers who might remove
just-checked subconsumer.
sql/pgq_coop/functions/pgq_coop.next_batch.sql