Commit Graph

13332 Commits

Author SHA1 Message Date
Tom Lane 6ad853b975 Yet another place where someone was being careless about the arguments
of <ctype.h> macros.
2004-09-02 20:07:50 +00:00
Tom Lane a28961d5e0 Spelling correction, per Greg Mullane. 2004-09-02 17:58:41 +00:00
Tom Lane 1e4c33b1e8 Fix getrusage() emulation on Windows. Magnus Hagander 2004-09-02 17:55:16 +00:00
Tom Lane 3cd16475db Cope with recent HPUX versions providing isfinite() instead of finite(). 2004-09-02 17:12:50 +00:00
Tom Lane 5042985fb4 Add s_lock support for HPUX on IA64, per Shinji Teragaito. 2004-09-02 17:10:58 +00:00
Tom Lane e00896f3c6 Remove useless variable. 2004-09-02 16:42:00 +00:00
Bruce Momjian 8cef6ae522 Remove pg_config_paths.h from libpq *.mak builds so later MinGW builds
will succeed.
2004-09-02 02:02:02 +00:00
Bruce Momjian bf831f6e9f Back out timezone detection patch. Tom already applied it. 2004-09-02 01:15:06 +00:00
Bruce Momjian 525449be27 This patch attempts to fix the issue with localized timezones on
Windows.

Recap: When running on a localized windows version, the timezone name
returned is also localized, and therefor does not match our lookup
table.

Solution: The registry contains both the name of the timezone in english
and the localized name. The patch adds code to scan the registry for the
localized name and gets the english name from that, and then rescans the
table.

I have tested this on a Swedish WinXP, and it works without problems.
The registry layout is the same in Win2k, but I haven't specifically
tested it. It's also the same on different languages but again only
Swedish is tested.

Magnus Hagander
2004-09-02 01:03:59 +00:00
Tom Lane e814e4bfe5 Remove obsolete comment. 2004-09-02 00:22:16 +00:00
Tom Lane e41acf4029 Tweak prettyprinting rules for saner indenting of UNION, INTERSECT,
EXCEPT constructs.
2004-09-01 23:58:38 +00:00
Bruce Momjian 453c670b61 Fix bcc to compile libpq by creating include file for path.c. 2004-09-01 23:45:16 +00:00
Bruce Momjian 4fa8b44749 Realign libpq and psql for need for path.c under Win32 VC and BCC. 2004-09-01 23:35:16 +00:00
Bruce Momjian bd9b951191 Back out Cygwin timezone change until we have a more global solution. 2004-09-01 18:59:35 +00:00
Tom Lane 93dc1d4685 Fix mistaken comment. 2004-09-01 18:04:32 +00:00
Tom Lane 272cc8e265 Whack Wisconsin benchmark around until it actually works again.
It's still useless because it tests a standalone backend, but at least
the bit rot is repaired.
2004-09-01 17:25:40 +00:00
Tom Lane d1b2260cdc Add code to be able to match the timezone name on localized Windows
systems.  Magnus Hagander.
2004-09-01 16:21:50 +00:00
Dennis Bjorklund b3d3e27bb8 Translation updates 2004-09-01 10:11:08 +00:00
Bruce Momjian 33f395eada Cast _timezone to int from time_t for Cygwin. 2004-09-01 04:02:06 +00:00
Bruce Momjian 2a5f83c17c src/bin/psql/tab-complete.c =~ s/CONVERSATION/CONVERSION/;
Greg Sabino Mullane
2004-09-01 00:10:01 +00:00
Tom Lane e19f6bcf64 needs_toast_table() should ignore dropped columns. 2004-08-31 23:27:05 +00:00
Tom Lane 1239a01a72 Code review for recent changes in guc-file.l. Avoid multiple frees,
use of already-freed strings, other silliness.  Also fix reporting of
config file syntax errors so that it actually works reasonably well
(eg, points at the correct line).  Use palloc instead of malloc for
temporary storage to reduce code clutter.
2004-08-31 22:43:58 +00:00
Tom Lane c32416ebb7 Code review for various recent GUC hacking. Don't elog(ERROR) when
not supposed to (fixes problem with postmaster aborting due to mistaken
postgresql.conf change); don't call superuser() when not inside a
transaction (fixes coredump when, eg, try to set log_statement from
PGOPTIONS); some message style guidelines enforcement.
2004-08-31 19:28:51 +00:00
Tom Lane 617d6ea7df Fix unintended assignment of sequences to the containing schema's
default tablespace --- they should always go in the database's default
tablespace.  Adjust heap_create() API so that it is passed the relkind
to make this easier; should simplify any further tweaking of the same
sort.
2004-08-31 17:10:36 +00:00
Tom Lane a421b4e850 FlushRelationBuffers was also being a bit cavalier about whether the
relation is already opened by smgr.
2004-08-31 16:13:06 +00:00
Tom Lane 556110f4e0 copy_relation_data was mistakenly assuming that the source relation
would always be already open at the smgr level.  Per bug report from
Fabien Coelho.
2004-08-31 15:56:39 +00:00
Bruce Momjian b4456e6d6a Define lstat with parameters, rather than just redefining the symbol. 2004-08-31 11:29:56 +00:00
Bruce Momjian 2e88d29f88 Fix typo in lstat() macro exposed by new tablespace code. 2004-08-31 11:25:33 +00:00
Tom Lane 8c603f2c95 Replace log_filename_prefix with more general log_filename parameter,
to allow DBA to choose the form in which log filenames reflect the
current time.  Also allow for truncating instead of appending to
pre-existing files --- this is convenient when the log filename pattern
rewrites the same names cyclically.  Per Ed L.
2004-08-31 04:53:44 +00:00
Tom Lane 332ee2dc41 Improve spinlock selftest to make it able to detect misdeclaration of
the slock_t datatype (ie, declared type smaller than what the hardware
TAS instruction needs).
2004-08-30 23:47:20 +00:00
Tom Lane 17364edce6 slock_t must be int not char for MIPS. 7.4 got this right, but the
info was apparently mistranscribed in s_lock code rearrangement.
2004-08-30 22:49:07 +00:00
Tom Lane c7040429e7 Fix obviously-utterly-untested noTocComments code. 2004-08-30 19:44:14 +00:00
Tom Lane 64cb889106 Ensure that the remainder of the current pg_clog page is zeroed during
startup, just to be sure that there's no leftover junk there.
2004-08-30 19:00:42 +00:00
Tom Lane 9cf4eaa00b Fix failure to advance nextXID beyond subtransactions whose XIDs appear
only within COMMIT or ABORT records.
2004-08-30 19:00:03 +00:00
Tom Lane 303e46ea93 Tweak md.c logic to cope with the situation where WAL replay tries to
write into a high-numbered segment of a relation that was later deleted.
We need to temporarily recreate missing segment files, instead of
failing.
2004-08-30 03:52:43 +00:00
Tom Lane 09c6ac9513 Dept. of second thoughts: it'd be a good idea to flush buffers
during replay of CREATE DATABASE as well as the first time around.
Else it's possible that the copy operation will copy obsolete blocks.
We are still a long way from guaranteeing anything about using a
recently-written database as a CREATE template, but this seems needed
to ensure the existing behavior holds up during replay.
2004-08-30 03:50:24 +00:00
Bruce Momjian 15d3f9f6b7 Another pgindent run with lib typedefs added. 2004-08-30 02:54:42 +00:00
Tom Lane 50742aed68 Add WAL logging for CREATE/DROP DATABASE and CREATE/DROP TABLESPACE.
Fix TablespaceCreateDbspace() to be able to create a dummy directory
in place of a dropped tablespace's symlink.  This eliminates the open
problem of a PANIC during WAL replay when a replayed action attempts
to touch a file in a since-deleted tablespace.  It also makes for a
significant improvement in the usability of PITR replay.
2004-08-29 21:08:48 +00:00
Bruce Momjian ee66401f31 Update typedefs with /lib info. 2004-08-29 17:31:42 +00:00
Tom Lane 0ffe11abd3 Widen xl_len field of XLogRecord header to 32 bits, so that we'll have
a more tolerable limit on the number of subtransactions or deleted files
in COMMIT and ABORT records.  Buy back the extra space by eliminating the
xl_xact_prev field, which isn't being used for anything and is rather
unlikely ever to be used for anything.
This does not force initdb, but you do need to do pg_resetxlog if you
want to upgrade an existing 8.0 installation without initdb.
2004-08-29 16:34:48 +00:00
Bruce Momjian b6b71b85bc Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
Bruce Momjian 90cb9c3051 Update with new typedefs. Remove java and c++ parts of readme. 2004-08-29 04:49:45 +00:00
Bruce Momjian da9a8649d8 Update copyright to 2004. 2004-08-29 04:13:13 +00:00
Bruce Momjian 466c1290df Fix for postmaster.c function win32_waitpid(int *exitstatus) call to
Win32 WaitForMultipleObjects:

	ret = WaitForMultipleObjects(win32_numChildren, win32_childHNDArray,
	FALSE, 0);

Problem is 'win32_numChildren' could be more then 64 ( function supports
), problem basically arise ( kills postgres ) when you create more then
64 connections and terminate some of them sill leaving more then 64.

Claudio Natoli
2004-08-29 03:16:30 +00:00
Bruce Momjian 71fce6ce1b Adjust regression expected file for new grant language hint. 2004-08-29 03:14:07 +00:00
Bruce Momjian 61384de6f9 Add hint about using GRANT with non-trusted languages.
James William Pye
2004-08-29 03:04:15 +00:00
Bruce Momjian 0476bbbc9b Several Cygwin fixes pointed out by Reini Urban. 2004-08-29 02:58:50 +00:00
Bruce Momjian f94aea9c10 Add comment on palloc use and DLLIMPORT> 2004-08-29 01:44:02 +00:00
Bruce Momjian 704ff0b2f2 >>> I understand your disliking of non-posix stuff. OTOH,
>>GetLastError will
>>> give much more details than errno.
>>
>>How much more, really?  That mapping table gave me the impression that
>>the win32 error codes aren't all that much more detailed than errno...
>
>The mapping table is not complete. My winerror.h from the SDK
>lists 2209
>error codes, whereas errno.h lists 42...
>
>I still don't think we'll get that much more stuff. Right now,
>the Win32
>code paths that actually use the more advanced functions already write
>out the error number in case something happens. We can keep doing that
>for the other paths (ereport the error *number* when the mapping does
>not have a match). The map to errno will catch almost all cases, I
>think. And in the corner cases we can do with just the number, and use
>"net helpmsg" to get the actual message when checking...

Here's an attempt on this. new file goes in backend/port/win32.

Magnus Hagander
2004-08-29 00:38:03 +00:00
Bruce Momjian fe90fb4d37 The attached patch improves pg_ctl's win32 service code to eliminate
some possible causes of the stale postmaster.pid problem that some users
have reported.

- The service did not properly report that it accepts
SERVICE_CONTROL_SHUTDOWN events, thus it's possible the SCM simply
killed the postmaster on shutdown.

- 'WaitHints' are now given to the SCM to prevent it timing out if
pg_ctl doesn't respond to a control event quickly enough.

- During shutdown, the service checkpoint counter is incremented every
five seconds for up to a minute to prevent the SCM timing out and
assuming the service is not responding.

Dave Page
2004-08-28 23:26:37 +00:00