From: | "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pg-dev <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: generate_series from now to infinity... |
Date: | 2009-05-17 16:38:35 |
Message-ID: | 1242578315.18964.31.camel@guedes-laptop |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Em Sáb, 2009-05-16 às 23:40 -0400, Tom Lane escreveu:
> "Dickson S. Guedes" <listas(at)guedesoft(dot)net> writes:
> > Is a simple "SELECT generate_series(now(), CAST('infinity'::date AS
> > timestamp), interval '1 hour');" working forever, an expected
> > behavior?
>
> Uh, what were you expecting it to do?
Perhaps, a HINT?
> Actually, I believe it will fail eventually when the repeated additions
> overflow ... in 294277 AD. So you've got about 2 billion timestamp
> additions to wait through.
A customer are porting his application to 8.4, and are using a query
like that. Someone unintentionally included a "infinity" date and that
query have been running until they see the test server memory at 99% and
cpu at 100%.
I suggested him to use LIMIT.
[]s
--
Dickson S. Guedes
mail/xmpp: guedes(at)guedesoft(dot)net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br
From | Date | Subject | |
---|---|---|---|
Next Message | hubert depesz lubaczewski | 2009-05-17 17:22:02 | Re: generate_series from now to infinity... |
Previous Message | Robert Haas | 2009-05-17 11:37:38 | Re: generate_series from now to infinity... |