Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted

Поиск
Список
Период
Сортировка
От Pavel Borisov
Тема Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted
Дата
Msg-id CALT9ZEF+fJrPjxvi2fhBPZiTxdKMz7WO1j4LNdUH=6D8ZLyH4g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted  (Neil Chen <carpenter.nail.cz@gmail.com>)
Ответы Re: BUG #16663: DROP INDEX did not free up disk space: idle connection hold file marked as deleted  (Nail Carpenter <carpenter.nail.cz@gmail.com>)
Список pgsql-hackers
One thing that doesn't matter is that the modify here seems unnecessary, right?

> mdunlinkfork(RelFileNodeBackend rnode, ForkNumber forkNum, bool isRedo)
> {
> char     *path;
> -     int                     ret;
> +     int                     ret = 0;
> path = relpath(rnode, forkNum

I suppose it is indeed necessary as otherwise the result of the comparison is not defined in case of 'else' block in the mdunlinkfork() :  
346     else
347     {
348         /* Prevent other backends' fds from holding on to the disk space */
349         do_truncate(path);
.....
356      * Delete any additional segments.
357      */
358     if (ret >= 0) 
----------^^^^^^^

--
Best regards,
Pavel Borisov

Postgres Professional: http://postgrespro.com

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Different results between PostgreSQL and Oracle for "for update" statement
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: Disable WAL logging to speed up data loading