Commit Graph

18639 Commits

Author SHA1 Message Date
5ba04cd9f1 Invent pg_next_dst_boundary() and rewrite DetermineLocalTimeZone() to
use it, as per my proposal of yesterday.  This gives us a means of
determining the zone offset to impute to an unlabeled timestamp that
is both efficient and reliable, unlike all our previous tries involving
mktime() and localtime().  The behavior for invalid or ambiguous times
at a DST transition is fixed to be really and truly "assume standard
time", fixing a bug that has come and gone repeatedly but was back
again in 7.4.  (There is some ongoing discussion about whether we should
raise an error instead, but for the moment I'll make it do what it was
previously intended to do.)
2004-11-01 21:34:44 +00:00
7fad5fff0d That's just the lovely way windows handles a "segfault". Gotta be really
interesting for MS to catch all those dumps...

Anyway. Oops. Seems I ran my regression tests with the old psql, and
just managed to update the backend, when I tested that patch. Turns out
there are codepaths where we'd access the Critical Section before it was
initialized. Attached patch breaks the initializeation off to a separate
part and adds that one to a much earlier position in the program.

Magnus Hagander
2004-11-01 19:21:50 +00:00
9c3d654a16 Update comment to point to proper file. 2004-11-01 14:33:10 +00:00
7914deecb8 fixed bug in segfault REVOKE statement 2004-11-01 13:17:12 +00:00
584bfe3d70 Adjust use of sizeof(EXE). 2004-11-01 04:46:56 +00:00
b2b585fb2d Clarify coding of .exe patch 2004-11-01 04:25:18 +00:00
e837e4be8f Use psql -q option instead of 2>/dev/null during first invocation
of psql; this should make it easier to diagnose client-side problems,
such as library version mismatch.  Also, consistently use -X option
to avoid problems from weird .psqlrc settings.
2004-10-31 19:14:16 +00:00
44e8a968e3 Invent a new, more thread-safe version of PQrequestCancel, called PQcancel.
Use this new function in psql.  Implement query cancellation in psql for
Windows.  Code by Magnus Hagander, documentation and minor editorialization
by Tom Lane.
2004-10-30 23:11:27 +00:00
80559fa9e9 I found a corner case in which it is possible for RI_FKey_check's call
of HeapTupleSatisfiesItself() to trigger a hint-bit update on the tuple:
if the row was updated or deleted by a subtransaction of my own transaction
that was later rolled back.  This cannot occur in pre-8.0 of course, so
the hint-bit patch applied a couple weeks ago is OK for existing releases.
But for 8.0 it seems we had better fix things so that RI_FKey_check can
pass the correct buffer number to HeapTupleSatisfiesItself.  Accordingly,
add fields to the TriggerData struct to carry the buffer ID(s) for the
old and new tuple(s).  There are other possible solutions but this one
seems cleanest; it will allow other AFTER-trigger functions to safely
do tqual.c calls if they want to.  Put new fields at end of struct so
that there is no API breakage.
2004-10-30 20:53:06 +00:00
88868d4fbc Change COMMIT back to the old behavior of emitting command tag COMMIT,
not ROLLBACK, for the case of COMMIT outside a transaction block.
Alvaro Herrera
2004-10-30 20:44:43 +00:00
e5ac8db035 Translation update 2004-10-30 08:23:32 +00:00
23f264d125 Rearrange order of pre-commit operations: must close cursors before doing
ON COMMIT actions.  Per bug report from Michael Guerin.
2004-10-29 22:19:53 +00:00
4eb1165ff3 No need to set errorMessage length --- already set in goto target. 2004-10-29 19:30:02 +00:00
f05cfd2c73 Fix failure to think clearly about encoding conversion errors in COPY.
We can't regurgitate the unconverted string as I first thought, because
the elog.c mechanisms will assume the error message data is in the server
encoding and attempt a reverse conversion.  Eventually it might be worth
providing a short-circuit path to support this, but for now the simplest
solution is to abandon trying to report back the line contents after a
conversion failure.  Per bug report from Sil Lee, 27-Oct-2004.
2004-10-29 19:18:22 +00:00
08510856a4 Set errorMessage length in PQrequestCancel() in all places. 2004-10-29 17:53:13 +00:00
ee69be44d5 Add DEBUG1-level logging of checkpoint start and end. Also, reduce the
'recycled log files' and 'removed log files' messages from DEBUG1 to
DEBUG2, replacing them with a count of files added/removed/recycled in
the checkpoint end message, as per suggestion from Simon Riggs.
2004-10-29 00:16:08 +00:00
5a5f34e022 Code cleanup in dirmod.c. Andrew Dunstan, some further mods by moi. 2004-10-28 22:09:31 +00:00
319902dc8c Fix to_number for the case of a trailing S.
Karel Zak
2004-10-28 18:55:08 +00:00
5fef3c6ef0 Translation update 2004-10-28 09:38:27 +00:00
94c502f1db Translation updates 2004-10-28 09:01:06 +00:00
fc4cfc366d Translation updates 2004-10-28 08:54:09 +00:00
6f1b3cf19c Use AllocateFile(), FreeFile() and palloc() rather than fopen(), fclose()
and malloc() in pgstat.c, respectively. This simplifies error recovery,
as well as being more consistent with the rest of the backend.
2004-10-28 01:38:41 +00:00
e6f9bf9b7f On Windows, force a checkpoint just before dropping a database's physical
files and directories.  This ensures that the bgwriter will close any open
file references it is holding for files therein, which is needed for the
rmdir() to succeed.  Andrew Dunstan and Tom Lane.
2004-10-28 00:39:59 +00:00
a7049b52e3 Have pg_ctl status always output to stdout, even stopped status, not stderr. 2004-10-27 19:44:14 +00:00
43dc050525 Fix Cygwin compile for timezone. 2004-10-27 19:14:07 +00:00
b2b0673e4b When displaying a Var that is a reference to a column of an unnamed join,
try to display it as a reference to the underlying column instead.  This
is a legitimate substitution (it wouldn't be for a named join) and it
fixes some cases where the display would otherwise be ambiguous.  Per
example from Sim Zacks.
2004-10-27 18:09:41 +00:00
3fe704209a Canonicalize Win32 path coming in from pg_ctl -D, idea from Magnus. 2004-10-27 17:17:09 +00:00
118bd91809 Translation update 2004-10-27 11:52:28 +00:00
3bc89ac9eb Add a missing dependency: the "install" target requires "all" to have
been built before it. Per report from Kris Jurka.
2004-10-27 11:51:40 +00:00
2514e904da New translation 2004-10-27 11:44:09 +00:00
ad6b3975c9 Translation updates 2004-10-27 11:22:18 +00:00
2db0bde40e Translation update 2004-10-27 11:13:29 +00:00
cd92d85d11 Translation updates 2004-10-27 11:09:33 +00:00
979b0be4c3 Translation updates 2004-10-27 10:22:47 +00:00
eb7fc3eb1f Translation updates 2004-10-27 10:13:49 +00:00
28d8ff7948 Trivial fix: clarify a comment. 2004-10-27 07:26:56 +00:00
b69170481e Add reminder to update copyright in sgml file. 2004-10-26 23:42:49 +00:00
83cd2d8b0f Make heap_fetch API more consistent by having the buffer remain pinned
in all cases when keep_buf = true.  This allows ANALYZE's inner loop to
use heap_release_fetch, which saves multiple buffer lookups for the same
page and avoids overestimation of cost by the vacuum cost mechanism.
2004-10-26 16:05:03 +00:00
2c66dcf684 In the new dispensation where REINDEX doesn't take exclusive lock on
the parent table, it's essential that all index accesses take some kind
of lock on the index.  I had missed vacuumlazy.c :-( ...
2004-10-25 15:42:02 +00:00
1d6b096941 Update copyright information in documentation. Also, add a note
to RELEASE_CHANGES so that this is not forgotten in the future.
2004-10-25 06:40:39 +00:00
ea7f2f6a58 Remove three unnecessary casts from a pointer type to char * when calling
pfree().
2004-10-25 06:27:21 +00:00
86bcfc788b Fix tyop in comment. 2004-10-25 03:23:02 +00:00
02ca529dd8 Make error message more verbose, in hopes of avoiding misunderstandings
such as bug #1293.
2004-10-25 03:08:29 +00:00
8ec05b28b7 Modify hash_create() to elog(ERROR) if an error occurs, rather than
returning a NULL pointer (some callers remembered to check the return
value, but some did not -- it is safer to just bail out).

Also, cleanup pgstat.c to use elog(ERROR) rather than elog(LOG) followed
by exit().
2004-10-25 00:46:43 +00:00
549a4bd6fe Adjust message to not be misleading on Windows.
Andrew Dunstan
2004-10-24 22:09:33 +00:00
39fccf0277 On Windows, cause get_progname to strip any .EXE suffix.
Andrew Dunstan
2004-10-24 22:08:19 +00:00
85b2facdd8 Write config files as text not binary, per Magnus Hagander. 2004-10-24 15:55:29 +00:00
15db03181a Sync timezone data with latest zic database (dated Oct 11 2004). 2004-10-24 15:09:57 +00:00
261f184f0c Update RELEASE_CHANGES to mention updating the timezone database as
a routine part of release prep.
2004-10-24 15:01:54 +00:00
1b9c10275a Translation update 2004-10-24 14:55:04 +00:00