Commit Graph

18499 Commits

Author SHA1 Message Date
Tom Lane 8f9f198603 Restructure subtransaction handling to reduce resource consumption,
as per recent discussions.  Invent SubTransactionIds that are managed like
CommandIds (ie, counter is reset at start of each top transaction), and
use these instead of TransactionIds to keep track of subtransaction status
in those modules that need it.  This means that a subtransaction does not
need an XID unless it actually inserts/modifies rows in the database.
Accordingly, don't assign it an XID nor take a lock on the XID until it
tries to do that.  This saves a lot of overhead for subtransactions that
are only used for error recovery (eg plpgsql exceptions).  Also, arrange
to release a subtransaction's XID lock as soon as the subtransaction
exits, in both the commit and abort cases.  This avoids holding many
unique locks after a long series of subtransactions.  The price is some
additional overhead in XactLockTableWait, but that seems acceptable.
Finally, restructure the state machine in xact.c to have a more orthogonal
set of states for subtransactions.
2004-09-16 16:58:44 +00:00
Neil Conway 42c0d1f3cd Minor doc tweak: mention that function names can be optionally schema-
qualified.
2004-09-16 04:16:08 +00:00
Neil Conway 6a2869f64e Fix a read of uninitialized memory in array_out(). Perform some minor
cosmetic code cleanup at the same time.
2004-09-16 03:15:54 +00:00
Neil Conway d1b0d965b1 Cosmetic PL/PgSQL fix: declare the second parameter plpgsql_dstring_append
as a const char *, so that we don't need to cast away a const in gram.y
2004-09-14 23:46:46 +00:00
Bruce Momjian 1459d8c4b0 Mark as done:
< * Point-in-time data recovery using backup and write-ahead log,
< * Create native Win32 port, http://momjian.postgresql.org/main/writings/pgsql/project/win32.html
> * -Point-in-time data recovery using backup and write-ahead log
> * -Create native Win32 port
470c470
<     o Fix PL/pgSQL RENAME to work on variables other than OLD/NEW
> 	o Fix PL/pgSQL RENAME to work on variables other than OLD/NEW
2004-09-14 14:34:45 +00:00
Peter Eisentraut cb66748bdf New translation 2004-09-14 05:50:33 +00:00
Peter Eisentraut e992444faa Translation update 2004-09-14 05:44:40 +00:00
Tom Lane db64df4b1c Fix contrib/cube and contrib/seg to compile on Windows.
Andreas Pflug
2004-09-14 04:21:38 +00:00
Tom Lane 92244e8e54 Fix some minor issues with the new Win32 service code for autovacuum,
and add documentation.  Dave Page
2004-09-14 04:06:20 +00:00
Tom Lane b04e70b11e Adjust tsearch2.sql to avoid use of COPY FROM STDIN, so as to
simplify life for the Win32 installer.  Per Dave Page.
2004-09-14 03:58:54 +00:00
Tom Lane 4f7d3e0faf Win32 compile fix for misc_utils.
Claudio Natoli
2004-09-14 03:50:17 +00:00
Tom Lane bf06825e31 Win32 compile fixes for pgbench, pgcrypto, and tsearch.
Claudio Natoli
2004-09-14 03:39:55 +00:00
Tom Lane fc564686a7 Fix contrib/dbase to compile under Win32. Laurent Ballester 2004-09-14 03:28:28 +00:00
Tom Lane 296fb57b20 Make pltcl work on Win32. Magnus Hagander 2004-09-14 03:21:27 +00:00
Neil Conway 65ff0ed455 Fix small memory leak in psql. 2004-09-13 23:07:12 +00:00
Peter Eisentraut adf9a28bb8 Translation update 2004-09-13 20:53:10 +00:00
Tom Lane b2c4071299 Redesign query-snapshot timing so that volatile functions in READ COMMITTED
mode see a fresh snapshot for each command in the function, rather than
using the latest interactive command's snapshot.  Also, suppress fresh
snapshots as well as CommandCounterIncrement inside STABLE and IMMUTABLE
functions, instead using the snapshot taken for the most closely nested
regular query.  (This behavior is only sane for read-only functions, so
the patch also enforces that such functions contain only SELECT commands.)
As per my proposal of 6-Sep-2004; I note that I floated essentially the
same proposal on 19-Jun-2002, but that discussion tailed off without any
action.  Since 8.0 seems like the right place to be taking possibly
nontrivial backwards compatibility hits, let's get it done now.
2004-09-13 20:10:13 +00:00
Peter Eisentraut d69528881a Translation updates 2004-09-13 12:43:27 +00:00
Peter Eisentraut 95c034e311 Translation updates 2004-09-13 12:35:18 +00:00
Peter Eisentraut 77697dcaa3 New translations 2004-09-13 12:20:24 +00:00
Peter Eisentraut b972ab7178 New translation 2004-09-13 12:14:50 +00:00
Peter Eisentraut a67b5bd3b9 Translation updates 2004-09-13 12:11:22 +00:00
Neil Conway 9ffeab55c9 Fix two typos in comments. 2004-09-13 01:45:32 +00:00
Bruce Momjian 409de6be6c Re-add brace removal code but comment it out so we know why we removed
it and have it in case we need it for some special case.
2004-09-12 22:21:30 +00:00
Bruce Momjian 47402a9b00 Remove code that delete braces around single statements. 2004-09-12 22:11:27 +00:00
Tom Lane abc98dcc15 When LockAcquire fails at the stage of creating a proclock object, be
sure to clean up the already-created lock object, if it has no other
references.  Avoids possibly-permanent leak of shared memory.
2004-09-12 18:30:50 +00:00
Tom Lane 493f72606b Renumber SnapshotNow and the other special snapshot codes so that
((Snapshot) NULL) can no longer be confused with a valid snapshot,
as per my recent suggestion.  Define a macro InvalidSnapshot for 0.
Use InvalidSnapshot instead of SnapshotAny as the do-nothing special
case for heap_update and heap_delete crosschecks; this seems a little
cleaner even though the behavior is really the same.
2004-09-11 18:28:34 +00:00
Tom Lane 9835944e54 Ensure that pg_largeobject references opened by lo_import() or lo_export()
will be cleaned up at end of transaction, even when there is no other LO
operation in the transaction.  Per bug report from Daniel Schuchardt.
2004-09-11 15:56:46 +00:00
Bruce Momjian b85faa87b9 Send thread test output to file descriptor 5 like configure does rather
than /dev/null, which Win32 doesn't have.
2004-09-11 02:12:17 +00:00
Bruce Momjian 8becd824aa Check for ignored thread compiler options to reduce compiler noise. 2004-09-11 00:03:06 +00:00
Bruce Momjian 8a54a51863 Done:
< * Have AFTER triggers execute after the appropriate SQL statement in a
> * -Have AFTER triggers execute after the appropriate SQL statement in a
2004-09-10 22:38:52 +00:00
Tom Lane 1d681d6cee Fix some problems with restoring databases owned by non-superusers,
as per bug #1249; and remove the last vestiges of using \connect to
change authorization.
2004-09-10 20:05:18 +00:00
Tom Lane b339d1fff6 Fire non-deferred AFTER triggers immediately upon query completion,
rather than when returning to the idle loop.  This makes no particular
difference for interactively-issued queries, but it makes a big difference
for queries issued within functions: trigger execution now occurs before
the calling function is allowed to proceed.  This responds to numerous
complaints about nonintuitive behavior of foreign key checking, such as
http://archives.postgresql.org/pgsql-bugs/2004-09/msg00020.php, and
appears to be required by the SQL99 spec.
Also take the opportunity to simplify the data structures used for the
pending-trigger list, rename them for more clarity, and squeeze out a
bit of space.
2004-09-10 18:40:09 +00:00
Bruce Momjian 856d1faac1 Add:
> * Make row-wise comparisons work per SQL spec
>
2004-09-10 16:35:56 +00:00
Bruce Momjian af7f6c0a6e Fix #if define 2004-09-10 15:51:47 +00:00
Bruce Momjian 487466a601 Fix palloc call from /port for Cygwin. 2004-09-10 15:23:51 +00:00
Bruce Momjian e515c3b13e Properly include port file for Cygwin. 2004-09-10 15:20:19 +00:00
Bruce Momjian 74248ad673 Minor cleanup. 2004-09-10 14:27:37 +00:00
Bruce Momjian 390c148557 More cleanup. 2004-09-10 14:24:25 +00:00
Bruce Momjian 256ee0d5f3 Use $PORTNAME consistently instead of $host_os, where appropriate. 2004-09-10 13:53:40 +00:00
Bruce Momjian 594be448e1 Add:
> * Remove Win32 rename/unlink looping if unnecessary
2004-09-10 10:03:41 +00:00
Bruce Momjian 777687c6de Add mention loops over unlink/rename might not be needed. 2004-09-10 09:58:21 +00:00
Bruce Momjian e2e1a0cc71 Move undef of rename/unlink so system declarations are unmodified. 2004-09-10 09:53:08 +00:00
Bruce Momjian 3036b84b77 Adjust quotes for win32 build of psql. 2004-09-10 09:45:21 +00:00
Neil Conway bc4911bb43 Fix two typos in comments. 2004-09-10 04:36:42 +00:00
Neil Conway 87438cb90e Apply patch from Steven Singer for contrib/dbmirror. Changes:
-It fixes up some bugs with handling setval calls
-Adds upgrade instructions from prior versions
-Improved the sample config file
-Fixed some things in the clean_pending script
2004-09-10 04:31:06 +00:00
Neil Conway ae7ea1395c psql consistency fixes from Greg Sabino Mullane: have \df show schema and
name first, make sure \di+ shows description last, and make \dl SQL look
a little more standard.
2004-09-10 04:10:53 +00:00
Bruce Momjian 35e88b512e Create pg_config_paths in port/ for win32 builds of psql. 2004-09-10 03:48:54 +00:00
Bruce Momjian 8975dcfcbb Clean up Cygwin test. 2004-09-10 02:49:37 +00:00
Bruce Momjian b493b39004 Move TIMEZONE_GLOBAL out into the proper place. 2004-09-09 14:18:20 +00:00