Commit Graph

361 Commits

Author SHA1 Message Date
Bruce Momjian ede3b762a3 Back out win32 patch so we can apply it separately. 2004-01-26 22:54:58 +00:00
Bruce Momjian f4921e5ca3 Attached is a patch that fixes some trivial typos and alignment. Please
apply.

Alvaro Herrera
2004-01-26 22:51:56 +00:00
Tom Lane c77f363384 Ensure that close() and fclose() are checked for errors, at least in
cases involving writes.  Per recent discussion about the possibility
of close-time failures on some filesystems.  There is a TODO item for
this, too.
2004-01-26 22:35:32 +00:00
Bruce Momjian 4cdf51e646 Drops in the CreateProcess calls for Win32 (essentially wrapping up the
fork/exec portion of the port), and fixes a handful of whitespace issues

Claudio Natoli
2004-01-11 03:49:31 +00:00
Bruce Momjian 2afa36be9d Remove ereport() from failed connection; already done, per Tom. 2004-01-09 23:27:20 +00:00
Bruce Momjian 9640cc7dfa Fix for cancel key restarting postmaster, from Claudio 2004-01-09 23:11:39 +00:00
Neil Conway 192ad63bd7 More janitorial work: remove the explicit casting of NULL literals to a
pointer type when it is not necessary to do so.

For future reference, casting NULL to a pointer type is only necessary
when (a) invoking a function AND either (b) the function has no prototype
OR (c) the function is a varargs function.
2004-01-07 18:56:30 +00:00
Bruce Momjian 488f2785d0 Final rearrangement of main postgresql child process (ie.
BackendFork/SSDataBase/pgstat) startup, to allow fork/exec calls to
closely mimic (the soon to be provided) Win32 CreateProcess equivalent
calls.

Claudio Natoli
2004-01-06 23:15:22 +00:00
Bruce Momjian aeddc2a60d Continued rearrangement to permit pgstat + BootstrapMain processes to be
fork/exec'd, in the same mode as the previous patch for backends.

Claudio Natoli
2003-12-25 03:52:51 +00:00
Bruce Momjian d75b2ec4eb This patch is the next step towards (re)allowing fork/exec.
Claudio Natoli
2003-12-20 17:31:21 +00:00
Tom Lane 5e2b99db95 Avoid assuming that type key_t is 32 bits, since it reportedly isn't
on 64-bit Solaris.  Use a non-system-dependent datatype for UsedShmemSegID,
namely unsigned long (which we were already assuming could hold a shmem
key anyway, cf RecordSharedMemoryInLockFile).
2003-12-01 22:15:38 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Jan Wieck cfeca62148 Background writer process
This first part of the background writer does no syncing at all.
It's only purpose is to keep the LRU heads clean so that regular
backends seldom to never have to call write().

Jan
2003-11-19 15:55:08 +00:00
Bruce Momjian f612b16dc2 * ioctlsocket_ret
- is not initialized to 1 (at least in the WIN_32 code I started with!)

Claudio Natoli
2003-11-11 01:09:42 +00:00
Peter Eisentraut d84b6ef56b Various message fixes, among those fixes for the previous round of fixes 2003-09-26 15:27:37 +00:00
Peter Eisentraut feb4f44d29 Message editing: remove gratuitous variations in message wording, standardize
terms, add some clarifications, fix some untranslatable attempts at dynamic
message building.
2003-09-25 06:58:07 +00:00
Tom Lane b1d3de6b96 Someone (possibly me) foolishly reduced the response for failing
to create a TCP/IP socket from FATAL to LOG.  This was unwise;
historically we have expected socket conflicts to abort postmaster
startup.  Conflicts on port numbers with another postmaster can only
be detected reliably at the TCP socket level.
2003-09-12 19:33:59 +00:00
Bruce Momjian 188eda0df2 Consistenly lowercase GUC variable names, in docs and error messages. 2003-09-11 18:30:39 +00:00
Bruce Momjian b8245766ab Re-upper case CHECKPOINT_SEGMENTS. 2003-09-04 03:38:55 +00:00
Bruce Momjian cac43aefd8 Lowercase CHECKPOINT_SEGMENTS. 2003-09-04 00:36:46 +00:00
Tom Lane fcb90fdc95 Change some frequently-reached elog(DEBUG...) calls to ereport(DEBUG...)
for speed reasons.  (ereport falls out much more quickly when no output
is needed than elog does.)
2003-08-12 18:23:21 +00:00
Bruce Momjian f3c3deb7d0 Update copyrights to 2003. 2003-08-04 02:40:20 +00:00
Bruce Momjian 089003fb46 pgindent run. 2003-08-04 00:43:34 +00:00
Tom Lane 5b545644cf Postmaster erroneously rejected SSL connections on IPv6. 2003-08-01 23:25:00 +00:00
Tom Lane b556e8200e elog mop-up: bring some straggling fprintf(stderr)'s into the elog world. 2003-07-27 21:49:55 +00:00
Tom Lane df63503dc2 Have a go at fixing various outstanding portability issues in code that
was modified for IPv6.  Use a robust definition of struct sockaddr_storage,
do a proper configure test to see if ss_len exists, don't assume that
getnameinfo() will handle AF_UNIX sockets, don't trust getaddrinfo to
return the protocol we ask for, etc.  This incorporates several outstanding
patches from Kurt Roeckx, but I'm to blame for anything that doesn't
work ...
2003-07-23 23:30:41 +00:00
Bruce Momjian a0cc9f3cb9 Add GUC parameter to control rendezvous name. 2003-07-22 20:29:13 +00:00
Tom Lane b05d3ae1ed Error message editing in backend/libpq, backend/postmaster, backend/tcop.
Along the way, fix some logic problems in pgstat_initstats, notably the
bogus assumption that malloc returns zeroed memory.
2003-07-22 19:00:12 +00:00
Bruce Momjian b4cea00a1f IPv6 cleanups.
Kurt Roeckx
Andrew Dunstan
2003-06-12 07:36:51 +00:00
Bruce Momjian 65fb311a97 Add Rendezvous support to postmaster, from Chris Campbell 2003-06-11 06:56:07 +00:00
Tom Lane 0f3c68aa43 Fix breakage of LINUX_PROFILE code due to recent Windows changes. 2003-05-28 19:36:28 +00:00
Tom Lane aae078198d In bootstrap and standalone-backend modes, do not sort LOG elevel out
of order; the 'server log' output is actually client output in these
scenarios and we ought to treat elevels the same way as in the client
case.  This allows initdb to not send backend stderr to /dev/null anymore,
which makes it much more likely that people will notice problems during
initdb.
2003-05-28 17:25:02 +00:00
Bruce Momjian 98b6f37e47 Make debug_ GUC varables output DEBUG1 rather than LOG, and mention in
docs that CLIENT/LOG_MIN_MESSAGES now controls debug_* output location.
Doc changes included.
2003-05-27 17:49:47 +00:00
Bruce Momjian 12c9423832 Allow Win32 to compile under MinGW. Major changes are:
Win32 port is now called 'win32' rather than 'win'
        add -lwsock32 on Win32
        make gethostname() be only used when kerberos4 is enabled
        use /port/getopt.c
        new /port/opendir.c routines
        disable GUC unix_socket_group on Win32
        convert some keywords.c symbols to KEYWORD_P to prevent conflict
        create new FCNTL_NONBLOCK macro to turn off socket blocking
        create new /include/port.h file that has /port prototypes, move
          out of c.h
        new /include/port/win32_include dir to hold missing include files
        work around ERROR being defined in Win32 includes
2003-05-15 16:35:30 +00:00
Tom Lane ecc8c3652e In child-crashed log messages, identify a checkpoint process as such
instead of calling it a 'server process'.
2003-05-10 18:15:42 +00:00
Bruce Momjian 995773be1c Pass canAcceptConnections to exec'ed backend, for Jan. 2003-05-09 15:57:24 +00:00
Bruce Momjian f2c7a27635 Write non-defaults file before signalling the children to reread it. 2003-05-08 20:43:07 +00:00
Tom Lane 075a0078df I think we're done with protocol instability, so mark server and libpq
as speaking the one true 3.0 protocol.
2003-05-08 18:33:39 +00:00
Bruce Momjian 5e7a5c9511 Pass shared memory address on command line to exec'ed backend.
Allow backends to attached to specified shared memory address.
2003-05-08 14:49:04 +00:00
Bruce Momjian d9fd7d12f6 Pass shared memory id and socket descriptor number on command line for
fork/exec.
2003-05-06 23:34:56 +00:00
Bruce Momjian 721996d889 Cleanup patch for exec() handling. 2003-05-03 05:13:20 +00:00
Bruce Momjian a7fd03e1de Handle clog structure in shared memory in exec() case, for Win32. 2003-05-03 03:52:07 +00:00
Bruce Momjian 36fa297497 SECOND ATTEMPT
Dump/read non-default GUC values for use by exec'ed backend, for Win32.
2003-05-02 22:02:47 +00:00
Bruce Momjian 9f0d69f527 Back out second part of patch. 2003-05-02 22:01:51 +00:00
Bruce Momjian a2e038fbee Back out last commit --- wrong patch. 2003-05-02 21:59:31 +00:00
Bruce Momjian fb1f7ccec5 Dump/read non-default GUC values for use by exec'ed backends, for Win32. 2003-05-02 21:52:42 +00:00
Tom Lane 2b1e36c7c0 Tweak stats collector start logic so that we will not try to spawn a
new stats collector oftener than once a minute.  Per gripe from Erik Walthinsen
4/25/03.
2003-04-26 02:57:14 +00:00
Tom Lane 5ed27e35f3 Another round of protocol changes. Backend-to-frontend messages now all
have length words.  COPY OUT reimplemented per new protocol: it doesn't
need \. anymore, thank goodness.  COPY BINARY to/from frontend works,
at least as far as the backend is concerned --- libpq's PQgetline API
is not up to snuff, and will have to be replaced with something that is
null-safe.  libpq uses message length words for performance improvement
(no cycles wasted rescanning long messages), but not yet for error
recovery.
2003-04-22 00:08:07 +00:00
Tom Lane bd8d441775 Second round of FE/BE protocol changes. Frontend->backend messages now
have length counts, and COPY IN data is packetized into messages.
2003-04-19 00:02:30 +00:00
Bruce Momjian 4d4953fc41 Make Win32 tests to match existing Cygwin tests, where appropriate. 2003-04-18 01:03:42 +00:00