Commit Graph

22915 Commits

Author SHA1 Message Date
Tom Lane e6284649b9 Modify btree to delete known-dead index entries without an actual VACUUM.
When we are about to split an index page to do an insertion, first look
to see if any entries marked LP_DELETE exist on the page, and if so remove
them to try to make enough space for the desired insert.  This should reduce
index bloat in heavily-updated tables, although of course you still need
VACUUM eventually to clean up the heap.

Junji Teramoto
2006-07-25 19:13:00 +00:00
Bruce Momjian edd49fcf69 Add reason for WAL offset reporting:
>
> 	    The offset allows parts of a WAL file to be archived using
> 	    an external program.
2006-07-25 16:23:42 +00:00
Bruce Momjian 8633a9cdff Add offset mention:
< 	  o Add reporting of the current WAL file, perhaps as part of
< 	    partial log file archiving
> 	  o Add reporting of the current WAL file and offset, perhaps as
> 	    part of partial log file archiving
2006-07-25 15:27:24 +00:00
Bruce Momjian cb6f5f1552 Update PITR:
< 	    write-ahead logs [pitr]
> 	    write-ahead logs? [pitr]
< 	    recovery.
> 	    recovery.  A function call to do this would also be useful.
2006-07-25 15:21:48 +00:00
Tom Lane bd112776cd Add missing @OVERRIDE to 'India' config file, per Michael Fuhr.
Add $PostgreSQL$ lines for CVS identity, too.
2006-07-25 13:49:21 +00:00
Bruce Momjian a859695b7e Done:
> 	o -Allow customization of the known set of TZ names (generalize the
2006-07-25 04:11:24 +00:00
Tom Lane d8b5c95ca8 Remove hard-wired lists of timezone abbreviations in favor of providing
configuration files that can be altered by a DBA.  The australian_timezones
GUC setting disappears, replaced by a timezone_abbreviations setting (set this
to 'Australia' to get the effect of australian_timezones).  The list of zone
names defined by default has undergone a bit of cleanup, too.  Documentation
still needs some work --- in particular, should we fix Table B-4, or just get
rid of it?  Joachim Wieland, with some editorializing by moi.
2006-07-25 03:51:23 +00:00
Andrew Dunstan 631ea61883 Use correct ifdef test for cygwin, namely __CYGWIN__ (note underscores). 2006-07-25 01:37:42 +00:00
Tom Lane d0e4a076d1 Make the order of operations in PostmasterMain a bit saner ... some
recent patches had added stuff in rather random spots.
2006-07-25 01:23:34 +00:00
Peter Eisentraut e85b5dae6c Fix spectacular misspellings of procedural language names 2006-07-24 16:55:59 +00:00
Peter Eisentraut e9b4969062 DTrace support, with a small initial set of probes
by Robert Lor
2006-07-24 16:32:45 +00:00
Peter Eisentraut 9dc34b5feb Mark postgresql.conf entries that require server restart; some minor
editing and reformatting.
2006-07-24 10:44:40 +00:00
Andrew Dunstan 20a733d0a0 Remove dubious and redundant (we think) setting of libdir in PATH for non temp-install case. 2006-07-24 01:50:22 +00:00
Tom Lane 8dcaea7be0 Add a fudge factor to genericcostestimate() to prevent the planner from
thinking that indexes of different sizes are equally attractive.  Per
gripe from Jim Nasby.  (I remain unconvinced that there's such a problem
in existing releases, but CVS HEAD definitely has got a problem because
of its new count-only-leaf-pages approach to indexscan costing.)
2006-07-24 01:19:48 +00:00
Tom Lane a794fb0681 Convert the lock manager to use the new dynahash.c support for partitioned
hash tables, instead of the previous kluge involving multiple hash tables.
This partially undoes my patch of last December.
2006-07-23 23:08:46 +00:00
Tom Lane b25dc481c8 Fix oversight in sizing of shared buffer lookup hashtable. Because
BufferAlloc tries to insert a new mapping entry before deleting the old one
for a buffer, we have a transient need for more than NBuffers entries ---
one more in 8.1, and as many as NUM_BUFFER_PARTITIONS more in CVS HEAD.
In theory this could lead to an "out of shared memory" failure if shmem
had already been completely claimed by the time the extra entries were
needed.
2006-07-23 18:34:45 +00:00
Tom Lane 10b9ca3d05 Split the buffer mapping table into multiple separately lockable
partitions, as per discussion.  Passes functionality checks, but
I don't have any performance data yet.
2006-07-23 03:07:58 +00:00
Tom Lane 51ee9fa157 Add support to dynahash.c for partitioning shared hashtables according
to the low-order bits of the entry hash value.  Also make some incidental
cleanups in the dynahash API, such as not exporting the hash header
structs to the world.
2006-07-22 23:04:39 +00:00
Tom Lane c0e9b3139f Hmm, seems --disable-spinlocks has been broken for awhile and nobody
noticed.  Fix SpinlockSemas() to report the correct count considering
that PG 8.1 adds a spinlock to each shared-buffer header.
2006-07-22 21:04:40 +00:00
Tom Lane 98359c3e3f In the recent changes to make the planner account better for cache
effects in a nestloop inner indexscan, I had only dealt with plain index
scans and the index portion of bitmap scans.  But there will be cache
benefits for the heap accesses of bitmap scans too, so fix
cost_bitmap_heap_scan() to account for that.
2006-07-22 15:41:56 +00:00
Andrew Dunstan b0dc1fbbc5 Add libdir to PATH for Cygwin as well as WIN32 - should fix buildfarm eel. 2006-07-22 14:05:20 +00:00
Peter Eisentraut 3b2da547e9 For automatic dependency tracking, replace our sed hackery with the GCC-
-built-in mechanism through the -MP flag.  Adjust the file extensions to
look more like Automake practice.  This frees up the .d suffix for use by
DTrace.
2006-07-21 22:37:37 +00:00
Tom Lane 0144eb92bb Add the full set of comparison functions for type TID, including a btree
opclass.  This is not so much because anyone's likely to create an index
on TID, as that sorting TIDs can be useful.  Also added max and min
aggregates while at it, so that one can investigate the clusteredness of
a table with queries like SELECT min(ctid), max(ctid) FROM tab WHERE ...
Greg Stark and Tom Lane
2006-07-21 20:51:33 +00:00
Tom Lane bc660c4237 Ah, I finally realize why Magnus wanted to add a --bindir option to
pg_regress: there's no other way to cope with testing a relocated
installation.  Seems better to call it --psqldir though, since the
only thing we need to find in that case is psql.  It'd be better if
we could use find_other_exec, but that's not happening unless we are
willing to install pg_regress alongside psql, which seems unlikely
to happen.
2006-07-21 00:24:04 +00:00
Bruce Momjian 9652b79ae4 Update documentation on GRANT SCEMA USAGE, again. 2006-07-20 18:00:03 +00:00
Tom Lane 11f6d2fcba As a stopgap to get the Windows buildfarm members running again, hot-wire
the check on diff's exit status to check for literally 0 or 1.  Someone
should look into why WIFEXITED/WEXITSTATUS don't work for this, but I've
spent more than enough time on it already.
2006-07-20 16:25:30 +00:00
Peter Eisentraut 679de5e573 Make pg_config location overridable for pgxs builds. 2006-07-20 09:30:18 +00:00
Tom Lane 7da24bcbc1 Print out diff status code when we think there's a hard failure.
May help in debugging behavior on Windows.
2006-07-20 03:30:58 +00:00
Tom Lane c3104376f9 Suppress unused-variable compiler warning, per Andrew Dunstan. 2006-07-20 02:15:17 +00:00
Tom Lane 27a83103ea Fix pg_regress.c to report tests in a parallel group when they finish,
not when they're started.  This mimics a subtle point of the behavior
of the old shell script, and gives better feedback when watching the
tests.
2006-07-20 02:10:00 +00:00
Tom Lane 5652ea703b Make pg_regress.c get paths from pg_config_paths.h, instead of -D
switches passed from the Makefile.  This looks like it will fix
problem with virtual vs real paths under msys.
2006-07-20 01:16:57 +00:00
Tom Lane 9dc842f083 Don't try to truncate multixact SLRU files in checkpoints done during xlog
recovery.  In the first place, it doesn't work because slru's
latest_page_number isn't set up yet (this is why we've been hearing reports
of strange "apparent wraparound" log messages during crash recovery, but
only from people who'd managed to advance their next-mxact counters some
considerable distance from 0).  In the second place, it seems a bit unwise
to be throwing away data during crash recovery anwyway.  This latter
consideration convinces me to just disable truncation during recovery,
rather than computing latest_page_number and pushing ahead.
2006-07-20 00:46:42 +00:00
Bruce Momjian a8e44f0b1b Update GRANT USAGE on schema permission description. 2006-07-19 18:42:31 +00:00
Neil Conway c28fbd4589 pgcrypto merge cleanup:
- Few README fixes
  - Keep imath Id string, put $PostgreSQL$ separately.

Patch from Marko Kreen.
2006-07-19 17:05:50 +00:00
Tom Lane 60cfe25e68 Adjust spawn_process() to avoid unnecessary overhead processes: we can
just exec instead of creating a subprocess.  This reduces process usage
from four processes per parallel test to two.  I have no idea whether
a comparable optimization is possible or useful in the Windows port.
2006-07-19 17:02:59 +00:00
Bruce Momjian 87c3129e2e Update WIN32 quoting roles documentation. 2006-07-19 17:01:24 +00:00
Tom Lane 5b8b137b16 Adjust pg_regress to print out the exact string given to system() when
'make install' or 'initdb' fails.  Also minor simplification of fgets()
usage --- fgets guarantees a trailing null anyway.
2006-07-19 16:23:17 +00:00
Bruce Momjian 9d9a65bfa7 Add WIN32 compile suggestion to pginclude README. 2006-07-19 15:06:06 +00:00
Tom Lane fe2c4e414a kill() is declared in <signal.h> per Single Unix Spec. 2006-07-19 05:21:57 +00:00
Tom Lane 1c5531b108 Tweak command quoting for Windows (I'd forgotten about SYSTEMQUOTE). 2006-07-19 04:50:57 +00:00
Tom Lane bcee9e8c09 Remove unnecessary inclusion of libpq into pg_regress --- overly
enthusiastic copy and paste ...
2006-07-19 04:02:31 +00:00
Tom Lane a38c85bd5d Rewrite pg_regress as a C program instead of a shell script.
This allows it to be used on Windows without installing mingw
(though you do still need 'diff'), and opens the door to future
improvements such as message localization.
Magnus Hagander and Tom Lane.
2006-07-19 02:37:00 +00:00
Tom Lane 88295244be copydir() and rmtree() need to use lstat, not stat, to behave as expected
with symlinks.  Noted while trying to use rmtree in new C-code pg_regress.
2006-07-18 22:36:46 +00:00
Bruce Momjian 11b7aecbd4 The Win32 DEF files that are generated for libpq contain the attribute
"DESCRIPTION", which is actually only allowed for device drivers. The
compilers ignore it with a warning - if we remove them, we get rid of
the warning.

Magnus Hagander
2006-07-18 22:18:08 +00:00
Bruce Momjian 5ca68299be Add pginclude testing ideas. 2006-07-18 19:19:59 +00:00
Bruce Momjian c5fad5f35e Done:
o -Display IN, INOUT, and OUT parameters in \df
2006-07-18 18:20:51 +00:00
Bruce Momjian fcd1b0d891 Mark a few functions as static or NOT_USED. 2006-07-18 17:42:01 +00:00
Tom Lane 84e6042725 Make pg_regress a tad simpler and more general-purpose by removing its
code to forcibly drop regressuser[1-4] and regressgroup[1-2].  Instead,
let the privileges.sql test do that for itself (this is made easy by
the recent addition of DROP ROLE IF EXISTS).  Per a recent patch proposed
by Joachim Wieland --- the rest of his patch is superseded by the
rewrite into C, but this is a good idea we should adopt.
2006-07-18 00:32:42 +00:00
Bruce Momjian 2256d299bb Mention dependency problems caused by pgrminclude on include files. 2006-07-17 19:37:21 +00:00
Neil Conway d77f73eb2a Improve psql's \df slash command to include the argument names and modes
(OUT or INOUT) of the function. Patch from David Fetter, editorialization
by Neil Conway.
2006-07-17 00:21:23 +00:00