Re: ms windows: 40% space taken double by ../pg_tblspc folder?

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: ms windows: 40% space taken double by ../pg_tblspc folder?
Дата
Msg-id 48C7A96E.3090600@hagander.net
обсуждение исходный текст
Ответ на ms windows: 40% space taken double by ../pg_tblspc folder?  ("Willy-Bas Loos" <willybas@gmail.com>)
Список pgsql-general
Willy-Bas Loos wrote:
> Hi,
>
> Tablespaces are implemented as some sort of a hard link on windows, so
> that the data seem to be in the program files, but they're not.

No, they are implemented using softlinks, AKA NTFS Junctions.


> When i look at my C drive with spacemonger though, it tells me that the
> data in the tablespace IS in the program files folder - it is "fooled"
> by the hard link.

In that case, it's a bug in that product. It's not uncommon - using
junctions isn't very common on windows. But one core system exapmle is
that the SYSVOL stuff uses junctions.


> That's no  big problem, but it seems that Windows itself is fooled too.
> The space left on my C drive is not correct, i'm missing some space.
> It's not quite as much as the size of the tablespace. 4 GiB of space is
> missing on the C drive, the tablespace is 10 GiB.
> -  "Missing" means: when i calculate the sum of the file sizes, except
> the ones in C:\ProgramFiles\PostgreSQL\8.3\data\pg_tblspc\ , there
> should be 24 GiB Free, but DIR and all the dialogs say that there are
> only 20 GiB free. If the whole space for ../pg_tblspc were taken double,
> there would be only 14 GiB free.
> -  The command used was C:\>dir  /a /s /-c > c.txt
> -  There are minor diferences between dir *, dir *.* and dir without an
> asterix (surprisingly *.* gets the most)
> -  The difference is not explained by the "size on disk" vs "filesize"
> (DIR gives the filesize, but the difference is less than 1 GiB)
> -  The filesize sum in the properties dialog of Program files does NOT
> include the tablespace files

It could be the fact that the size of files that are currently being
modified doesn't show up properly.

> What happens when the size of the tablespace surpasses the space that is
> left on my C drive? Windows might find that the disc is full (even
> though it isn't), and writing to it would be impossible.

If the tablespace is on a different drive, it's completely unaffected by
the size of the actual drive C. The windows APIs, that postgresql uses,
certainly know about this, and won't be fooled.

//Magnus


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

Предыдущее
От: Tommy Gildseth
Дата:
Сообщение: Re: "Stuck" query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: "Stuck" query