pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #8468: Create index on type tstzrange fail
2+ messages / 2 participants
[nested] [flat]
* BUG #8468: Create index on type tstzrange fail
@ 2013-09-24 11:42 marian.krucina@gmail.com
0 siblings, 1 reply; 2+ messages in thread
From: marian.krucina@gmail.com @ 2013-09-24 11:42 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 8468
Logged by: marian
Email address: marian.krucina@gmail.com
PostgreSQL version: 9.3.0
Operating system: Linux
Description:
CREATE INDEX ON tstzrange fail on 9.3.0 and 9.2.4 - default postgres
configuration.
It ate whole memory and was killed by oom.
Example:
postgres=# CREATE TABLE range_test AS SELECT tstzrange(t, t+'1min') tr FROM
generate_series('2000-1-1'::TIMESTAMPTZ, '2010-1-1'::TIMESTAMPTZ, '1min') AS
t1(t);
SELECT 5260321
postgres=# CREATE INDEX ON range_test(tr);
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the
current transaction and exit, because another server process exited
abnormally and possibly corrupted shared memory.
HINT: In a moment you should be able to reconnect to the database and
repeat your command.
The connection to the server was lost. Attempting reset: Failed.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #8468: Create index on type tstzrange fail
@ 2013-09-25 13:12 Heikki Linnakangas <hlinnakangas@vmware.com>
parent: marian.krucina@gmail.com
0 siblings, 0 replies; 2+ messages in thread
From: Heikki Linnakangas @ 2013-09-25 13:12 UTC (permalink / raw)
To: marian.krucina@gmail.com; +Cc: pgsql-bugs
On 24.09.2013 14:42, marian.krucina@gmail.com wrote:
> CREATE INDEX ON tstzrange fail on 9.3.0 and 9.2.4 - default postgres
> configuration.
> It ate whole memory and was killed by oom.
>
>
> Example:
> postgres=# CREATE TABLE range_test AS SELECT tstzrange(t, t+'1min') tr FROM
> generate_series('2000-1-1'::TIMESTAMPTZ, '2010-1-1'::TIMESTAMPTZ, '1min') AS
> t1(t);
> SELECT 5260321
> postgres=# CREATE INDEX ON range_test(tr);
> WARNING: terminating connection because of crash of another server process
> DETAIL: The postmaster has commanded this server process to roll back the
> current transaction and exit, because another server process exited
> abnormally and possibly corrupted shared memory.
> HINT: In a moment you should be able to reconnect to the database and
> repeat your command.
> The connection to the server was lost. Attempting reset: Failed.
A-ha, the comparison function of range datatypes, range_cmp(), detoasts
its arguments, but fails to free the detoasted copies. Functions are
normally not required to free such temporary copies - the memory is
usually leaked into a short-lived memory context that will be quickly
free'd anyway - but B-tree comparison operators are expected to not leak.
Committed a fix, it will appear in the next minor releases. Thanks for
the report!
- Heikki
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2013-09-25 13:12 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-09-24 11:42 BUG #8468: Create index on type tstzrange fail marian.krucina@gmail.com
2013-09-25 13:12 ` Heikki Linnakangas <hlinnakangas@vmware.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox