Magnus Hagander wrote:
> Magnus Hagander wrote:
> > Attached is a patch that attempts to fix the issues with stat() not
> > properly updating st_size on win32, as reported in this thread:
> > http://archives.postgresql.org/pgsql-hackers/2008-03/msg01181.php
> >
> > It has to have a chance to affec
Tom Lane wrote:
> Magnus Hagander <[EMAIL PROTECTED]> writes:
> > A whole lot simpler patch :-)
>
> Seems like you no longer need the !defined(_DIRMOD_C) bit here?
Correct. That wasn't the actual error, that was me misdiagnosing the
situation.
> Also please include a comment about why has to be
Alvaro Herrera <[EMAIL PROTECTED]> writes:
> Andrew Dunstan wrote:
>> How about #defining safe_stat to be pg_win32_safe_stat on Windows and
>> simply stat elsewhere? Then use safe_stat at the places you consider
>> critical.
> I would couple this with a pgwin32_unsafe_stat on Windows, which ch
Magnus Hagander <[EMAIL PROTECTED]> writes:
> A whole lot simpler patch :-)
Seems like you no longer need the !defined(_DIRMOD_C) bit here?
Also please include a comment about why has to be
forcibly included.
A more general question: can't we get rid of most of the #ifdef WIN32
cruft in include/
Magnus Hagander wrote:
> Attached is a patch that attempts to fix the issues with stat() not
> properly updating st_size on win32, as reported in this thread:
> http://archives.postgresql.org/pgsql-hackers/2008-03/msg01181.php
>
> It has to have a chance to affect things beyond just the
> pg_relat
Andrew Dunstan wrote:
> How about #defining safe_stat to be pg_win32_safe_stat on Windows and
> simply stat elsewhere? Then use safe_stat at the places you consider
> critical.
I would couple this with a pgwin32_unsafe_stat on Windows, which changes
the size value to 0, so that if anyone gets
Magnus Hagander wrote:
Tom Lane wrote:
Magnus Hagander <[EMAIL PROTECTED]> writes:
Trying to prepare a patch that does it the normal way, but so far
I'm failing rather miserably. The *struct* stat is already
redefined on win32, so whenever I try #undef or so it conflicts
with that :-(
Tom Lane wrote:
> Magnus Hagander <[EMAIL PROTECTED]> writes:
> > Trying to prepare a patch that does it the normal way, but so far
> > I'm failing rather miserably. The *struct* stat is already
> > redefined on win32, so whenever I try #undef or so it conflicts
> > with that :-( Since there is no
Magnus Hagander <[EMAIL PROTECTED]> writes:
> Trying to prepare a patch that does it the normal way, but so far I'm
> failing rather miserably. The *struct* stat is already redefined on
> win32, so whenever I try #undef or so it conflicts with that :-( Since
> there is no way to #undef only the par
Tom Lane wrote:
> Magnus Hagander <[EMAIL PROTECTED]> writes:
> > Tom Lane wrote:
> >> Ick.
>
> > The reason not to do so was to avoid having to do the two filesystem
> > calls for *every* stat, instead just calling them both when we
> > actually need to use the st_size member.
>
> I don't think
Magnus Hagander <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>> Ick.
> The reason not to do so was to avoid having to do the two filesystem
> calls for *every* stat, instead just calling them both when we actually
> need to use the st_size member.
I don't think that's worth (a) the code uglifica
Tom Lane wrote:
> Magnus Hagander <[EMAIL PROTECTED]> writes:
> > + #ifndef WIN32
> > if (stat(xlogpath, &stat_buf) == 0)
> > + #else
> > + if (pgwin32_safestat(xlogpath, &stat_buf) == 0)
> > + #endif
>
> Ick. Please do this the way we normally do things when we have to
> ov
Magnus Hagander <[EMAIL PROTECTED]> writes:
> + #ifndef WIN32
> if (stat(xlogpath, &stat_buf) == 0)
> + #else
> + if (pgwin32_safestat(xlogpath, &stat_buf) == 0)
> + #endif
Ick. Please do this the way we normally do things when we have to
override broken Windows syscalls
Attached is a patch that attempts to fix the issues with stat() not
properly updating st_size on win32, as reported in this thread:
http://archives.postgresql.org/pgsql-hackers/2008-03/msg01181.php
It has to have a chance to affect things beyond just the
pg_relation_size() function, so this patch
14 matches
Mail list logo