summaryrefslogtreecommitdiff
path: root/src/backend/port/win32
AgeCommit message (Collapse)Author
2014-01-07Update copyright for 2014Bruce Momjian
Update all files in head, and files COPYRIGHT and legal.sgml in all back branches.
2013-03-17Move pqsignal() to libpgport.Tom Lane
We had two copies of this function in the backend and libpq, which was already pretty bogus, but it turns out that we need it in some other programs that don't use libpq (such as pg_test_fsync). So put it where it probably should have been all along. The signal-mask-initialization support in src/backend/libpq/pqsignal.c stays where it is, though, since we only need that in the backend.
2013-01-01Update copyrights for 2013Bruce Momjian
Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
2012-06-10Run pgindent on 9.2 source tree in preparation for first 9.3Bruce Momjian
commit-fest.
2012-05-13Attempt to fix some issues in our Windows socket code.Tom Lane
Make sure WaitLatchOrSocket regards FD_CLOSE as a read-ready condition. We might want to tweak this further, but it was surely wrong as-is. Make pgwin32_waitforsinglesocket detach its private event object from the passed socket before returning. I suspect that failure to do so leads to race conditions when other code (such as WaitLatchOrSocket) attaches a different event object to the same socket. Moreover, the existing coding meant that repeated calls to pgwin32_waitforsinglesocket would perform ResetEvent on an event actively connected to a socket, which is rumored to be an unsafe practice; the WSAEventSelect documentation appears to recommend against this, though it does not say not to do it in so many words. Also, uniformly use the coding pattern "WSAEventSelect(s, NULL, 0)" to detach events from sockets, rather than passing the event in the second parameter. The WSAEventSelect documentation says that the second parameter is ignored if the third is 0, so theoretically this should make no difference. However, elsewhere on the same reference page the use of NULL in this context is recommended, and I have found suggestions on the net that some versions of Windows have bugs with a non-NULL second parameter in this usage. Some other mostly-cosmetic cleanup, such as using the right one of WSAGetLastError and GetLastError for reporting errors from these functions.
2012-04-23Lots of doc corrections.Robert Haas
Josh Kupershmidt
2012-01-01Update copyright notices for year 2012.Bruce Momjian
2011-08-23Use consistent format for reporting GetLastError()Peter Eisentraut
Use something like "error code %lu" for reporting GetLastError() values on Windows. Previously, a mix of different wordings and formats were in use.
2011-07-26Replace printf format %i by %dPeter Eisentraut
They are identical, but the overwhelming majority of the code uses %d, so standardize on that.
2011-07-05Message style improvements of errmsg_internal() callsPeter Eisentraut
2011-07-05Message style tweaksPeter Eisentraut
2011-06-19Capitalization fixesPeter Eisentraut
2011-06-09Pgindent run before 9.1 beta2.Bruce Momjian
2011-04-27Use an explicit format string to keep the compiler happy.Andrew Dunstan
2011-04-25Assorted minor changes to silence Windows compiler warnings.Andrew Dunstan
Mostly to do with macro redefinitions or object signedness.
2011-04-23Silence a few compiler warnings from gcc on MinGW.Andrew Dunstan
Most of these cast DWORD to int or unsigned int for printf type handling. This is safe even on 64 bit architectures because a DWORD is always 32 bits. In one case a variable is initialised to keep the compiler happy.
2011-04-10pgindent run before PG 9.1 beta 1.Bruce Momjian
2011-03-30Automatically terminate replication connections that are idle for moreHeikki Linnakangas
than replication_timeout (a new GUC) milliseconds. The TCP timeout is often too long, you want the master to notice a dead connection much sooner. People complained about that in 9.0 too, but with synchronous replication it's even more important to notice dead connections promptly. Fujii Masao and Heikki Linnakangas
2011-01-01Stamp copyrights for year 2011.Bruce Momjian
2010-12-26Only build in crashdump support on Windows if there's a working dbghelp.h.Andrew Dunstan
2010-12-19Remove thread dumping constant that requires newer Platform SDKMagnus Hagander
Since we're not multithreaded it only provides marginally useful information, and it does require a newer version of the Platform SDK than we target. We may want to reconsider this in the future along with a fix for MinGW.
2010-12-19Support for collecting crash dumps on WindowsMagnus Hagander
Add support for collecting "minidump" style crash dumps on Windows, by setting up an exception handling filter. Crash dumps will be generated in PGDATA/crashdumps if the directory is created (the existance of the directory is used as on/off switch for the generation of the dumps). Craig Ringer and Magnus Hagander
2010-09-20Remove cvs keywords from all files.Magnus Hagander
2010-07-06pgindent run for 9.0, second runBruce Momjian
2010-02-26pgindent run for 9.0Bruce Momjian
2010-02-17Another typo fix.Magnus Hagander
Thom Brown
2010-02-16Add emulation of non-blocking sockets to the win32 socket/signal layer,Magnus Hagander
and use this in pq_getbyte_if_available. It's only a limited implementation which swithes the whole emulation layer no non-blocking mode, but that's enough as long as non-blocking is only used during a short period of time, and only one socket is accessed during this time.
2010-02-09Typo fix, per Thom BrownMagnus Hagander
2010-02-09Define the value for in6addr_any on MingW, since it provides the structMagnus Hagander
only in the header files and not in any libraries, yet declare it as an extern.
2010-01-31Fix race condition in win32 signal handling.Magnus Hagander
There was a race condition where the receiving pipe could be closed by the child thread if the main thread was pre-empted before it got a chance to create a new one, and the dispatch thread ran to completion during that time. One symptom of this is that rows in pg_listener could be dropped under heavy load. Analysis and original patch by Radu Ilie, with some small modifications by Magnus Hagander.
2010-01-02Update copyright for the year 2010.Bruce Momjian
2009-12-28Remove non-ascii characters from source code.Bruce Momjian
2009-06-118.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef listBruce Momjian
provided by Andrew.
2009-01-01Update copyright for 2009.Bruce Momjian
2008-04-16Fix MinGW warnings re formats and unused variables. per ITAGAKI TakahiroAndrew Dunstan
2008-02-19More refactoring, so that the SUBSYS.o rules are now all in one place.Peter Eisentraut
2008-01-01Update copyrights in source tree to 2008.Bruce Momjian
2007-11-15pgindent run for 8.3.Bruce Momjian
2007-10-29Make variable static, per Tom.Magnus Hagander
2007-10-29Add compat file for dynamically loading the functions that MinGW is missingMagnus Hagander
the imports for. Add RegisterWaitForSingleObject() to the list of such functions, which should take care of the current buildfarm breakage.
2007-10-23Use snprintf instead of wsprintf, and use getenv("APPDATA") instead ofMagnus Hagander
SHGetFolderPath. This removes the direct dependency on shell32.dll and user32.dll, which eats a lot of "desktop heap" for each backend that's started. The desktop heap is a very limited resource, causing backends to no longer start once it's been exhausted. We still have indirect depdendencies on user32.dll through third party libraries, but those can't easily be removed. Dave Page
2007-06-04On win32, retry reading when WSARecv returns WSAEWOULDBLOCK. There seemMagnus Hagander
to be cases when at least Windows 2000 can do this even though select just indicated that the socket is readable. Per report and analysis from Cyril VELTER.
2007-03-21Native shared memory implementation for win32.Magnus Hagander
Uses same underlying tech as before, but not the sysv emulation layer.
2007-01-26On Windows, use pgwin32_waitforsinglesocket() instead of select() to wait forTom Lane
input in the stats collector. Our select() emulation is apparently buggy for UDP sockets :-(. This should resolve problems with stats collection (and hence autovacuum) failing under more than minimal load. Diagnosis and patch by Magnus Hagander. Patch probably needs to be back-ported to 8.1 and 8.0, but first let's see if it makes the buildfarm happy...
2007-01-20Remove remains of old depend target.Peter Eisentraut
2007-01-05Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian
back-stamped for this.
2006-12-04Patch of Win32 Encoding problem for server messages usingBruce Momjian
FormatMessage() (This should have been in 8.2.0, patched to 8.2.X and HEAD): I think this problem to be complex.... http://archives.postgresql.org/pgsql-hackers/2006-11/msg00042.php FormatMessage of windows cannot consider the encoding of the database. However, I should try the solution now. It is necessary to clear the problem. Multi character-code exists together in message and log. It doesn't consider the data base encoding that the user intended.... The user in multi-byte country can try this. http://inet.winpg.jp/~saito/pg_bug/MessageCheck.c That is, it is likely to become it in this manner.(Japanese) http://inet.winpg.jp/~saito/pg_bug/FormatMessage998.png Hiroshi Saito
2006-10-13Fix infinite sleep and failes of send in Win32.Teodor Sigaev
1) pgwin32_waitforsinglesocket(): WaitForMultipleObjectsEx now called with finite timeout (100ms) in case of FP_WRITE and UDP socket. If timeout occurs then pgwin32_waitforsinglesocket() tries to write empty packet goes to WaitForMultipleObjectsEx again. 2) pgwin32_send(): add loop around WSASend and pgwin32_waitforsinglesocket(). The reason is: for overlapped socket, 'ok' result from pgwin32_waitforsinglesocket() isn't guarantee that socket is still free, it can become busy again and following WSASend call will fail with WSAEWOULDBLOCK error. See http://archives.postgresql.org/pgsql-hackers/2006-10/msg00561.php
2006-10-04pgindent run for 8.2.Bruce Momjian
2006-08-09Round microseconds on setitimer upwards.Bruce Momjian