Skip site navigation (1) Skip section navigation (2)

Re: [DOCS] pg_total_relation_size() and CHECKPOINT

From: "Zubkovsky, Sergey" <Sergey(dot)Zubkovsky(at)transas(dot)com>
To: "Magnus Hagander" <magnus(at)hagander(dot)net>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>,"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>,"Alvaro Herrera" <alvherre(at)commandprompt(dot)com>,"Gregory Stark" <stark(at)enterprisedb(dot)com>,<pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [DOCS] pg_total_relation_size() and CHECKPOINT
Date: 2008-04-29 16:05:01
Message-ID: 528853D3C5ED2C4AA8990B504BA7FB850658BA5D@sol.transas.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
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(at)hagander(dot)net] 
Sent: Tuesday, April 29, 2008 4:54 PM
To: Zubkovsky, Sergey
Cc: Andrew Dunstan; Tom Lane; Alvaro Herrera; Gregory Stark;
pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] [DOCS] pg_total_relation_size() and CHECKPOINT

I already applied a different patch for this quite some time ago. So 
what's in HEAD (and current in 8.3 and 8.2) should be fixed already.

//Magnus

Zubkovsky, Sergey wrote:
> Hi,
> 
> Here is the patch.
> Check it, please.
> 
> Locations of the added files:
>   src\include\port\win32_msvc\sys\stat.inl
>   src\port\stat_pg_fixed.c
> 
> 
> Thank you.
> 
> 
> -----Original Message-----
> From: Andrew Dunstan [mailto:andrew(at)dunslane(dot)net] 
> Sent: Saturday, March 29, 2008 4:18 PM
> To: Zubkovsky, Sergey
> Cc: Tom Lane; Alvaro Herrera; Gregory Stark;
> pgsql-hackers(at)postgresql(dot)org; Magnus Hagander
> Subject: Re: [HACKERS] [DOCS] pg_total_relation_size() and CHECKPOINT
> 
> 
> 
> 
> Zubkovsky, Sergey wrote:
>> In the prepared custom build of PG 8.3.1 the native MSVC's stat() was
> rewrote by adding GetFileAttributesEx() to correct stat's st_size
value.
>> I had seen that a result of MSVC's stat() and a result of
> GetFileAttributesEx() may be differ by the file size values at least.
>> The most important 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.
>>
>>   
> 
> 
> If you have a patch, please send it to the -patches list.
> 
> cheers
> 
> andrew


In response to

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2008-04-29 17:11:10
Subject: Re: Proposed patch - psql wraps at window width
Previous:From: Aidan Van DykDate: 2008-04-29 15:23:04
Subject: Re: Protection from SQL injection

pgsql-patches by date

Next:From: Alex HunsakerDate: 2008-04-29 17:48:14
Subject: Re: [badalex@gmail.com: Re: [BUGS] Problem identifying constraints which should not be inherited]
Previous:From: Alvaro HerreraDate: 2008-04-29 14:06:28
Subject: Re: [HACKERS] Proposed patch - psql wraps at window width

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group