summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2004-11-21Reduce the default size of the PortalHashTable in order to save aTom Lane
few cycles during transaction exit. A typical session probably wouldn't have as many as half a dozen portals open at once, so the original value of 64 seems far larger than needed.
2004-11-21While fixing plperl and pltcl, I realized plpgsql wasn't doingTom Lane
subtransactions quite right either: the ReleaseCurrentSubTransaction call should occur inside the PG_TRY, so that the proper path is taken if an error occurs during subtransaction commit. This assumes that AbortSubTransaction can cope with the state left behind if CommitSubTransaction fails partway through, but we were already requiring that.
2004-11-21Suppress remaining compile warnings, and add a comment about whyTom Lane
it's not really broken. Andrew Dunstan
2004-11-21Fix plperl and pltcl error handling per my previous proposal. SPITom Lane
operations are now run as subtransactions, so that errors in them can be reported as ordinary Perl or Tcl errors and caught by the normal error handling convention of those languages. Also do some minor code cleanup in pltcl.c: extract a large chunk of duplicated code in pltcl_SPI_execute and pltcl_SPI_execute_plan into a shared subroutine.
2004-11-20Patch of 2004-03-30 corrected date_part(timestamp) for extractingTom Lane
the year from a BC date, but failed to make the same fix in date_part(timestamptz).
2004-11-20Fix up makefile dependencies for pg_config_paths.h.Tom Lane
2004-11-20Avoid scanning the relcache during AtEOSubXact_RelationCache when thereTom Lane
is nothing to do, which is most of the time. This is another simple improvement to cut subtransaction entry/exit overhead.
2004-11-20Reduce the default size of the local lock hash table. There's usuallyTom Lane
no need for it to be nearly as big as the global hash table, and since it's not in shared memory it can grow if it does need to be bigger. By reducing the size, we speed up hash_seq_search(), which saves a significant fraction of subtransaction entry/exit overhead.
2004-11-20Fix plperl's elog() function to convert elog(ERROR) into Perl croak(),Tom Lane
rather than longjmp'ing clear out of Perl and thereby leaving Perl in a broken state. Also some minor prettification of error messages. Still need to do something with spi_exec_query() error handling.
2004-11-20Fix one more place where we were expecting lcons() to be nondestructiveTom Lane
to the original List; per report from Sebastian BÎck. I think this is the last such bug --- I examined every lcons() call in the backend and the rest seem OK --- but it's nervous-making that we're still finding 'em so many months after the List rewrite went in.
2004-11-20On some HPUX versions/hardware, it seems we need to include libgcc.a inTom Lane
the regression test shared libraries.
2004-11-20Fix unportable isdigit() call --- must cast arg to unsigned char.Tom Lane
2004-11-20Move pgstat_report_tabstat() call so that stats are not reported to theTom Lane
collector until the transaction commits. Per recent discussion, this should avoid confusing autovacuum when an updating transaction runs for a long time.
2004-11-20Make sure we produce a useful error message for the case where theTom Lane
postgresql.crt file simply isn't there, too.
2004-11-20Improve error reporting for SSL connection failures. Remove redundantTom Lane
free operations in client_cert_cb --- openssl will also attempt to free these structures, resulting in core dumps.
2004-11-19Clean up rpath handling for HPUX --- we can't use the cc-style rpathTom Lane
switch syntax when calling ld directly.
2004-11-19Set rpath for plperl and plpython to ensure we can find the .so filesTom Lane
for the languages even when not installed in a standard directory. pltcl may need this treatment as well, but we don't have the right path conveniently available, so I'll leave it alone as long as there aren't actual reports of trouble.
2004-11-19Modify the platform-specific makefiles so that macro 'rpath' is definedTom Lane
in terms of macro 'rpathdir', as I proposed a few weeks ago. In itself this commit shouldn't change the behavior at all, but it opens the door to using special rpaths for the PL shared libraries, as seems to be needed for plperl in particular.
2004-11-18Fix memory clobber problem reported by John Hansen: plperl_safe_init()Tom Lane
may expand the Perl stack, therefore we must SPAGAIN to reload the local stack pointer after calling it. Also a couple other marginal readability improvements.
2004-11-18Whoops, missed converting the other sleep() call to pg_usleep().Tom Lane
2004-11-18Translation updatePeter Eisentraut
2004-11-18Force pg_database updates out to disk immediately after ALTER DATABASE;Tom Lane
this is to avoid scenarios where incoming backends find no live copies of a database's row because the only live copy is in an as-yet-unwritten shared buffer, which they can't see. Also, use FlushRelationBuffers() for forcing out pg_database, instead of the much more expensive BufferSync(). There's no need to write out pages belonging to other relations.
2004-11-17Include <getopt.h> if available, to avoid warnings on Windows.Tom Lane
2004-11-17Remove ill-considered suppression of gcc warnings in plperl, and fixTom Lane
some of the bugs exposed thereby. The remaining 'might be used uninitialized' warnings look like live bugs, but I am not familiar enough with Perl/C hacking to tell how to fix them.
2004-11-17Fix off-by-one memory allocation, as reported by Rod Taylor. AlsoTom Lane
avoid repalloc'ing twice when once is sufficient.
2004-11-17Set DEFAULT_EDITOR to notepad.exe on Windows, as per recent discussion.Tom Lane
2004-11-17Force LANG=en on Windows, since system may fail to default to English.Tom Lane
2004-11-17Add installcheck-parallel regression test target. Magnus HaganderTom Lane
2004-11-17Use pg_usleep() not sleep(), per Andrew Dunstan.Tom Lane
2004-11-17Miscellaneous Cygwin build fixes from Reini Urban.Tom Lane
2004-11-17Add variant regression file to support BSDen that underflow to plus zero insteadTom Lane
of minus zero. Per Andrew Dunstan.
2004-11-17Install include/port header files, and fix PGXS build to use them.Tom Lane
Fabien COELHO
2004-11-17Adjust SHLIB_LINK for cygwin case.Tom Lane
Reini Urban
2004-11-17Be sure length limit passed to snprintf matches what malloc was given.Tom Lane
Just paranoia ...
2004-11-17Minor adjustment of message style.Tom Lane
2004-11-17Win32 build cleanups, from Andrew Dunstan.Neil Conway
2004-11-17Remove debugging printf from #ifdef WIN32 section.Neil Conway
2004-11-17Micro-optimization of markpos() and restrpos() in btree and hash indexes.Neil Conway
Rather than using ReadBuffer() to increment the reference count on an already-pinned buffer, we should use IncrBufferRefCount() as it is faster and does not require acquiring the BufMgrLock.
2004-11-17Don't allow pg_start_backup() to be invoked if archive_command has notNeil Conway
been defined. Patch from Gavin Sherry, editorializing by Neil Conway.
2004-11-17Fix Win32 problems with signals and sockets, by making the forkexec codeTom Lane
even uglier than it was already :-(. Also, on Windows only, use temporary shared memory segments instead of ordinary files to pass over critical variable values from postmaster to child processes. Magnus Hagander
2004-11-16Prevent a backend crash when processing CREATE TABLE commands withNeil Conway
more than 65K columns, or when the created table has more than 65K columns due to adding inherited columns from parent relations. Fix a similar crash when processing SELECT queries with more than 65K target list entries. In all three cases we would eventually detect the error and elog, but the check was being made too late.
2004-11-16Translation updatePeter Eisentraut
2004-11-16Adjust safety restrictions for plperl functions. Andrew Dunstan'sTom Lane
patch, but allow srand and disallow sprintf as per subsequent discussion.
2004-11-16Suppress duplicate rules for lib$(NAME).a on WIN32 and Cygwin.Tom Lane
Andrew Dunstan
2004-11-16Use dynamically-sized buffers in pgwin32_is_service().Tom Lane
Magnus Hagander
2004-11-16Rethink plpgsql's way of handling SPI execution during an exception block.Tom Lane
We don't really want to start a new SPI connection, just keep using the old one; otherwise we have memory management problems as illustrated by John Kennedy's bug report of today. This requires a bit of a hack to ensure the SPI stack state is properly restored, but then again what we were doing before was a hack too, strictly speaking. Add a regression test to cover this case.
2004-11-15Don't quote the value of EDITOR on Unix, only on Windows. Per discussion.Tom Lane
2004-11-14Use English-style quotes in error messages, per Serguei Mokhov.Tom Lane
2004-11-14Remove GUC USERLIMIT variable category, making the affected variablesTom Lane
plain SUSET instead. Also delay processing of options received in client connection request until after we know if the user is a superuser, so that SUSET values can be set that way by legitimate superusers. Per recent discussion.
2004-11-14There is no need for ReadBuffer() call sites to check that the returnedNeil Conway
buffer is valid, as ReadBuffer() will elog on error. Most of the call sites of ReadBuffer() got this right, but this patch fixes those call sites that did not.