Commit Graph

7665 Commits

Author SHA1 Message Date
Tom Lane ddc5bc958a When we add 'waiting' to the ps_status display, there should be a
space in front of it.  Improve comments a little.
2001-03-18 20:13:13 +00:00
Tom Lane 934126b518 Considering the BeOS port didn't compile without IPC_STAT and shm_nattch,
I'm betting the QNX4 port does not either ...
2001-03-18 18:32:02 +00:00
Tom Lane 4bd983bf34 Patches from Cyril Velter to make shared-memory-conflict-detection code
work in BeOS port.
2001-03-18 18:22:08 +00:00
Philip Warner 5c1b00450c Fixed but in _enableTriggersIfNecessary introduced by previous patches by me
which caused segfault in a data-only retore with BLOBs
2001-03-18 03:45:12 +00:00
Tom Lane fd5bac6d27 Fix coredump due to writing one more byte than we'd allocated. 2001-03-18 02:25:32 +00:00
Tom Lane ae293d33cf Make sure ControlFile logId/logSeg don't go backwards (barely possible given a
slow backend, if we update unconditionally as the code did before).
2001-03-18 00:30:27 +00:00
Tom Lane 5a38af7fd8 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.
2001-03-17 20:54:13 +00:00
Michael Meskes 90c1e2cc43 Fixed bug in handling of pointers to structs. 2001-03-16 13:05:57 +00:00
Hiroshi Inoue 935017457b Oops I forgot to add new files for multibyte support.
Sorry Eiji.
2001-03-16 13:03:04 +00:00
Tom Lane 9d645fd84c 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.
2001-03-16 05:44:33 +00:00
Hiroshi Inoue 9242e6c038 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.

Eiji Tokuya e-tokuya@mail.sankyo-unyu.co.jp
2001-03-16 01:17:23 +00:00
D'Arcy J.M. Cain 551e0aa991 Fix parameter handling.
Fix a bug where cs.execute('select %d + %d', (1, 2)) would get interpreted
as cs.executemany('select %d + %d', (1, 2))
2001-03-15 11:56:05 +00:00
D'Arcy J.M. Cain 37d67eb159 Add WIN32 support. 2001-03-15 11:26:22 +00:00
Tom Lane 7f02049137 Give a more reasonable error message for a bad attribute name applied
to a join or subselect alias ... cf. Oliver Elphick's complaint 13-Mar.
2001-03-14 23:55:33 +00:00
Tom Lane 7fdaf78ed0 Reduce amount of memory used per tuple for after-event triggers. This
is still a memory leak, but a little less bad than it was.
2001-03-14 21:50:32 +00:00
Tom Lane c9f26d7af6 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.
2001-03-14 21:47:50 +00:00
Peter Eisentraut 609fee4717 A much better version of this is now in backend/port/aix. 2001-03-14 21:16:57 +00:00
Peter Eisentraut 8ec7986080 It's "gmake dist" now. 2001-03-14 21:11:53 +00:00
Peter Eisentraut b651540720 For some ungodly reason my etags doesn't have an --output option, but it
does have -o.
2001-03-14 21:07:16 +00:00
Peter Eisentraut e6a4413481 We're past Postgres95 now, and I'm sure Jolly doesn't want to receive any
bug reports.  ;-)
2001-03-14 21:03:38 +00:00
Peter Eisentraut a298589e1c We got automatic dependencies now. 2001-03-14 20:53:13 +00:00
Peter Eisentraut fbc69e29af We're way past 6.3 ... 2001-03-14 20:47:24 +00:00
Peter Eisentraut c785e1e3b0 Update. Things are now build through 'make'. 2001-03-14 20:44:40 +00:00
Tom Lane cfab4f6541 Use SEP_CHAR consistently in forming XLOG pathnames. 2001-03-14 20:23:04 +00:00
Tom Lane 7ebbf20763 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.
2001-03-14 20:12:10 +00:00
Tom Lane c6c1fea06d Move -Bsymbolic for HPUX to Makefile.hpux, per Peter E's recommendation. 2001-03-14 19:35:12 +00:00
Bruce Momjian 9de4b77cee 'waiting' status display had extra space, removed.
Change the administrator to 'an' administrator.
2001-03-14 18:24:34 +00:00
Tom Lane 5dd04603b9 Don't go belly-up if fork() fails for a routine checkpoint subprocess.
Just try again later.
2001-03-14 17:58:46 +00:00
Tom Lane 286d1fc382 Fix numeric modulo operator for case of fractional right argument. 2001-03-14 16:50:37 +00:00
Bruce Momjian 2e7835f7f8 New shutdown wording:
This connection has been terminated by the administrator
2001-03-14 15:14:35 +00:00
Hiroshi Inoue 08bf4d68de Fix some memory leaks. 2001-03-14 09:10:04 +00:00
Hiroshi Inoue ebffbb42ac ifdef out reindex stuff in VACUUM for safety. 2001-03-14 08:40:57 +00:00
Peter Eisentraut f192da1ba3 Provide more useful error message if 'postgres -V' failed. Advertise
pg_ctl '-l' option.
2001-03-13 21:37:15 +00:00
Tom Lane 1b87e24c4a 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...
2001-03-13 20:32:37 +00:00
Philip Warner ccca223b5c - Use subselect when enabling triggers,
- Use exact table names when enabling/disabling triggers
2001-03-13 13:18:44 +00:00
Hiroshi Inoue e376cb6078 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.

A useful addition to src/interfaces/odbc perhaps?

Regards, Dave.
2001-03-13 09:03:24 +00:00
Tom Lane 4d14fe0048 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.
2001-03-13 01:17:06 +00:00
Tom Lane b246510ccc 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.
2001-03-12 23:02:00 +00:00
Peter Eisentraut 671be61916 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.
2001-03-11 11:07:01 +00:00
Tom Lane 9c2c9fcdfb 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.
2001-03-10 23:15:20 +00:00
Tom Lane 5ab642fdf1 Provide a hack to let initialization happen on platforms for which
psqlodbc.c's constructor-making techniques do not work.
2001-03-10 23:12:28 +00:00
Tom Lane eb9033ce95 Do not accept values from sections following the specified section. 2001-03-10 22:30:57 +00:00
Peter Eisentraut a3176dac22 Use install-sh unconditionally. 2001-03-10 10:38:59 +00:00
Tom Lane 2cfc8fcb5d 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!
2001-03-10 04:21:51 +00:00
Hiroshi Inoue e666422ebf 1)Allow the access to indexes with up to 16 keys.
2)Fix some memory leaks.
3)Change some bogus error messages.
2001-03-10 03:34:57 +00:00
Tom Lane 5490195f04 Don't choke on superuser names containing random punctuation. 2001-03-09 22:10:13 +00:00
Peter Eisentraut edebfec803 Recursive distclean shouldn't depend on recursive clean. Subdirectories
handle this.
2001-03-09 21:50:27 +00:00
Hiroshi Inoue 8fff96f1cb hold interupts during LockWaitCancel(). 2001-03-09 06:36:32 +00:00
Tom Lane d73e9df087 A subplan invoked within an aggregate function's argument should
be allowed to receive ungrouped variables of the current query level.
Curious that no one reported this bug before...
2001-03-08 01:49:01 +00:00
Tom Lane 572fda2711 Modify wchar conversion routines to not fetch the next byte past the end
of a counted input string.  Marinos Yannikos' recent crash report turns
out to be due to applying pg_ascii2wchar_with_len to a TEXT object that
is smack up against the end of memory.  This is the second just-barely-
reproducible bug report I have seen that traces to some bit of code
fetching one more byte than it is allowed to.  Let's be more careful
out there, boys and girls.
While at it, I changed the code to not risk a similar crash when there
is a truncated multibyte character at the end of an input string.  The
output in this case might not be the most reasonable output possible;
if anyone wants to improve it further, step right up...
2001-03-08 00:24:34 +00:00