# Find\_in\_batch and postgres hanging

**URL:** <https://www.ruby-forum.com/t/find-in-batch-and-postgres-hanging/180781>\
**Category:** Rails\
**Created:** [December 29, 2009, 12:49am UTC](https://www.ruby-forum.com/t/find-in-batch-and-postgres-hanging/180781 "2009-12-29T00:49:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hangingclowns](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b5e925/32.png) [@hangingclowns](https://www.ruby-forum.com/u/hangingclowns)\
**Post date:** [December 29, 2009, 12:49am UTC](https://www.ruby-forum.com/t/find-in-batch-and-postgres-hanging/180781/1 "2009-12-29T00:49:46Z")

</div>

Running the command:

Event.find\_in\_batches(:conditions =\> ["gw\_out\_time + interval ‘60 days’

> now()"])

is causing a virtual hang. Not even control C will break it. If I remove  
the “interval ‘60 days’” part, it works fine. Note this query works fine  
is psql.

Ideas?

Thanks in advance
