Tom Lane [Tue, 20 Mar 2001 20:54:41 +0000 (20:54 +0000)]
Recommend CREATE TABLE AS in preference to SELECT INTO. Remove the
(inadequate anyway) mention of SELECT INTO from the main SELECT ref page.
Point out that SELECT INTO means something else in plpgsql and ecpg.
Tom Lane [Tue, 20 Mar 2001 03:08:12 +0000 (03:08 +0000)]
Repair intarray's problems with TOASTed input, avoid scribbling on
source data, improve split algorithm for intbig_ops. Oleg Bartunov
with some kibitzing from Tom Lane.
Tom Lane [Mon, 19 Mar 2001 22:29:39 +0000 (22:29 +0000)]
Tweak out-of-memory error messages to include the request size, so that
it's easier to tell whether a bug report is talking about progressive
memory exhaustion or a wacko requested chunk size.
Philip Warner [Mon, 19 Mar 2001 02:35:29 +0000 (02:35 +0000)]
- Added CVS headers to files
- Avoid forcing table name to lower case in FixupBlobXrefs
- Removed fmtId calls for all ArchiveEntry name fields. This fixes
quoting problems in trigger enable/disable code for mixed case
table names, and avoids commands like 'pg_restore -t '"TblA"'
Tom Lane [Sun, 18 Mar 2001 23:36:55 +0000 (23:36 +0000)]
Restore include-file updates, and fix some of the more glaring macro
sloppiness (insufficient parenthesization, etc).
It still fails regress test for me, however.
Tom Lane [Sun, 18 Mar 2001 20:18:59 +0000 (20:18 +0000)]
Remove NEXTXID xlog record type to avoid three-way deadlock risk.
NEXTXID isn't really necessary, per previous discussion in pghackers,
but I mulishy insisted we should put it in anyway. Mea culpa.
Tom Lane [Sat, 17 Mar 2001 20:54:13 +0000 (20:54 +0000)]
Rearrange XLogFileInit so that control-file spinlock is not held while filling
the new log file with zeroes, only while renaming it into place. This should
prevent problems with 'stuck spinlock' errors under heavy load.
Tom Lane [Fri, 16 Mar 2001 05:44:33 +0000 (05:44 +0000)]
Support syncing WAL log to disk using either fsync(), fdatasync(),
O_SYNC, or O_DSYNC (as available on a given platform). Add GUC parameter
to control sync method.
Also, add defense to XLogWrite to prevent it from going nuts if passed
a target write position that's past the end of the buffers so far filled
by XLogInsert.
Tom Lane [Fri, 16 Mar 2001 05:08:39 +0000 (05:08 +0000)]
Resetting the XLOG can't include rewinding it to logical position zero,
because we need page LSNs stored in the main database to be less than
the current XLOG position. Hence, generate the new XLOG segment at last
old segment number plus one.
Hiroshi Inoue [Fri, 16 Mar 2001 01:17:23 +0000 (01:17 +0000)]
Add multibyte support.
Provide an extenisible scheme of encoding conversion.
As the first step, SJIS and BIG5 are supported.
From now on multibyte people would be happy to use
this psqlodbc driver.
Tom Lane [Wed, 14 Mar 2001 21:47:50 +0000 (21:47 +0000)]
COPY should handle after-insert triggers the same as execMain.c does.
I'm not sure that it's really necessary to save insert events when there
are only after update or delete triggers, but certainly it's wrong for
COPY to behave differently from an INSERT query.
Tom Lane [Wed, 14 Mar 2001 20:12:10 +0000 (20:12 +0000)]
Remove obsolete PowerPC-specific hack for comparisons to DBL_MIN
(per recent discussion with Tatsuo). Hopefully the compilers with
that old bug are all long gone.
Tom Lane [Tue, 13 Mar 2001 20:32:37 +0000 (20:32 +0000)]
Change xlog page-header format to include StartUpID. Use the SUI to
detect case that next page in log came from an older run than the prior
page. This avoids the necessity to re-zero the log after recovery from
a crash, which is good because we need not risk destroying valuable log
information.
This forces another initdb since yesterday :-(. Need to get that log
reset utility done...
Hiroshi Inoue [Tue, 13 Mar 2001 09:03:24 +0000 (09:03 +0000)]
The attached file contains the registry settings required to install the
ODBC driver on Windows 9X/ME/NT/2K when using the later versions of the
driver that don't have the Installshield installation:
1) Install psqlodbc.dll in to C:\Windows\System or C:\Winnt\System32
2) Add the registry settings in the attached file using regedit.
Tom Lane [Tue, 13 Mar 2001 01:17:06 +0000 (01:17 +0000)]
XLOG (and related) changes:
* Store two past checkpoint locations, not just one, in pg_control.
On startup, we fall back to the older checkpoint if the newer one
is unreadable. Also, a physical copy of the newest checkpoint record
is kept in pg_control for possible use in disaster recovery (ie,
complete loss of pg_xlog). Also add a version number for pg_control
itself. Remove archdir from pg_control; it ought to be a GUC
parameter, not a special case (not that it's implemented yet anyway).
* Suppress successive checkpoint records when nothing has been entered
in the WAL log since the last one. This is not so much to avoid I/O
as to make it actually useful to keep track of the last two
checkpoints. If the things are right next to each other then there's
not a lot of redundancy gained...
* Change CRC scheme to a true 64-bit CRC, not a pair of 32-bit CRCs
on alternate bytes. Polynomial borrowed from ECMA DLT1 standard.
* Fix XLOG record length handling so that it will work at BLCKSZ = 32k.
* Change XID allocation to work more like OID allocation. (This is of
dubious necessity, but I think it's a good idea anyway.)
* Fix a number of minor bugs, such as off-by-one logic for XLOG file
wraparound at the 4 gig mark.
* Add documentation and clean up some coding infelicities; move file
format declarations out to include files where planned contrib
utilities can get at them.
* Checkpoint will now occur every CHECKPOINT_SEGMENTS log segments or
every CHECKPOINT_TIMEOUT seconds, whichever comes first. It is also
possible to force a checkpoint by sending SIGUSR1 to the postmaster
(undocumented feature...)
* Defend against kill -9 postmaster by storing shmem block's key and ID
in postmaster.pid lockfile, and checking at startup to ensure that no
processes are still connected to old shmem block (if it still exists).
* Switch backends to accept SIGQUIT rather than SIGUSR1 for emergency
stop, for symmetry with postmaster and xlog utilities. Clean up signal
handling in bootstrap.c so that xlog utilities launched by postmaster
will react to signals better.
* Standalone bootstrap now grabs lockfile in target directory, as added
insurance against running it in parallel with live postmaster.
Tom Lane [Mon, 12 Mar 2001 23:02:00 +0000 (23:02 +0000)]
Avoid O(N^2) behavior in deferredTriggerAddEvent() for large numbers of
tuples inserted/deleted/updated in a single transaction. On my machine,
this reduced the time to delete 80000 tuples in a foreign-key-referencing
table from ~15min to ~8sec.
Peter Eisentraut [Sun, 11 Mar 2001 11:07:01 +0000 (11:07 +0000)]
Add uninstall target to Java build.
Respect default port setting in JDBC driver.
Pick up version number from Makefile.global.
Change installation directory to share/java/.
Document.
Tom Lane [Sat, 10 Mar 2001 23:15:20 +0000 (23:15 +0000)]
Turns out the HPUX linker likes -Bsymbolic too. Without this, ODBC
driver does not work because its internal cross-references get bound
to similarly named functions in unixODBC shared library.
Tom Lane [Sat, 10 Mar 2001 04:21:51 +0000 (04:21 +0000)]
FATAL errors should cause exit with nonzero status if we are not running
under the postmaster --- specifically, if we are a standalone backend
running under the initdb script, this is critical!