Re: BUG #2477: Aggregate Integer divisors incorrectly yield integer-type quotient

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #2477: Aggregate Integer divisors incorrectly yield integer-type quotient
Дата
Msg-id 22752.1150210532@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #2477: Aggregate Integer divisors incorrectly yield integer-type quotient  ("John E. Rylander" <rylander@prolexia.com>)
Список pgsql-bugs
"John E. Rylander" <rylander@prolexia.com> writes:
> ... I have a PL/PGSQL analytical
> function that iteratively drops a table, queries to create a new table of
> the same name based on iterated parameters, and then runs numerous queries
> on the resulting table, storing a few summary records to a log table.  The
> nested loops in the function intelligently iterate tens or hundreds of
> thousands of times on tables containing tens or low-hundreds of thousands of
> records.
>     The problem is, I think, since this function is involuntarily
> wrapped in a transaction, PostgreSQL wastes a TON of time and space keeping
> track of every single interim table, and eventually (pretty soon, in fact)
> it runs out of disk space.

It might be possible to teach the system that it could immediately
unlink the table file when dropping a table that was created in the
current transaction.  See the NOTE in smgrscheduleunlink() for a hint
about one way to do it.  I think you'd have to worry about matching
subtransaction nest levels, but if they're the same then allowing
inverse unlink requests to "blow each other up" would work.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #2478: PQescapeStringConn
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Compile Errors, 8.1.4 On Solaris 8 x86