Magnus,
Please, take a look at my implementation of stat().
It has at least two advantages: it's faster and doesn't have a bug with
local-to-UTC time conversion that native msvc's stat() has.
Maybe it will be useful.
Thank you.
-----Original Message-----
From: Magnus Hagander [mailto:magnus@[EMAIL PROTECTED]
Tuesday, April 29, 2008 4:54 PM
To: Zubkovsky, Sergey
Cc: Andrew Dunstan; Tom Lane; Alvaro Herrera; Gregory Stark;
pgsql-patches@[EMAIL PROTECTED]
Re: [HACKERS] [DOCS] pg_total_relation_size() and CHECKPOINT
I already applied a different patch for this quite some time ago. So=20
what's in HEAD (and current in 8.3 and 8.2) should be fixed already.
//Magnus
Zubkovsky, Sergey wrote:
> Hi,
>=20
> Here is the patch.
> Check it, please.
>=20
> Locations of the added files:
> src\include\****t\win32_msvc\sys\stat.inl
> src\****t\stat_pg_fixed.c
>=20
>=20
> Thank you.
>=20
>=20
> -----Original Message-----
> From: Andrew Dunstan [mailto:andrew@[EMAIL PROTECTED]
> Sent: Saturday, March 29, 2008 4:18 PM
> To: Zubkovsky, Sergey
> Cc: Tom Lane; Alvaro Herrera; Gregory Stark;
> pgsql-hackers@[EMAIL PROTECTED]
Magnus Hagander
> Subject: Re: [HACKERS] [DOCS] pg_total_relation_size() and CHECKPOINT
>=20
>=20
>=20
>=20
> Zubkovsky, Sergey wrote:
>> In the prepared custom build of PG 8.3.1 the native MSVC's stat() was
> rewrote by adding GetFileAttribute***() to correct stat's st_size
value.
>> I had seen that a result of MSVC's stat() and a result of
> GetFileAttribute***() may be differ by the file size values at least.
>> The most im****tant thing is the test in the original post
>> ( http://archives.postgresql.org/pgsql-docs/2008-03/msg00041.php
)
>> doesn't reproduce any inconsistence now.
>> All work fine.
>>
>> This was tested on my WinXP SP2 platform but I suppose it will work
on
> any NT-based OS.
>>
>>=20=20=20
>=20
>=20
> If you have a patch, please send it to the -patches list.
>=20
> cheers
>=20
> andrew
--=20
Sent via pgsql-hackers mailing list (pgsql-hackers@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers


|