Re: [SQL] Questions about vacuum analyze

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] Questions about vacuum analyze
Дата
Msg-id 3104.939393781@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [SQL] Questions about vacuum analyze  ("Steven M. Wheeler" <swheeler@sabre.com>)
Ответы Re: [SQL] Questions about vacuum analyze  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
"Steven M. Wheeler" <swheeler@sabre.com> writes:
> I am now running into another problem.  I need to do select distinct from the
> currnt to get dates for maintenance activity (rows to summarize and move to
> history).  When ever I do I get this message in my server.log file:

> NOTICE:  BufFileRead: should have flushed after writing

> And I get 0 records selected.

After some code browsing I have come up with a theory: is it possible
that you are running out of disk space during the sort?  I see psort.c
neglects to check for write failure :-(, although I am not entirely
clear on why that particular message and nothing else would come out
after it bulled ahead with an incomplete temporary file.

Sorting a large table seems to require temp disk space equal to several
times the size of the table.  Since you said your table is 40M rows,
I can easily believe you don't have that much free space...

I don't believe anyone has taken a hard look at psort.c in a long time.
I will try to dive into it and see if its resource consumption can't
be reduced.  Mergesort inherently requires 2X the original data space,
but it seems that psort is using even more than that, and perhaps this
can be improved.
        regards, tom lane


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

Предыдущее
От: "Catherine Germain"
Дата:
Сообщение: Select of 2 tables using "left outer join"
Следующее
От: Alexander F Hartner
Дата:
Сообщение: Insert / Update Statement