Commit Graph

26497 Commits

Author SHA1 Message Date
Tom Lane 5507b22dfc Support ALTER TYPE RENAME. Petr Jelinek 2008-03-19 18:38:30 +00:00
Alvaro Herrera a9686591d7 We no longer need a snapshot set after opening the finishing transaction: this
is redundant because autovacuum now always analyzes a single table per
transaction.
2008-03-19 14:18:21 +00:00
Tatsuo Ishii 49639a7b2c Add -M (query mode) option per ITAGAKI Takahiro 2008-03-19 03:33:21 +00:00
Tom Lane 965a2a191a Fix regexp substring matching (substring(string from pattern)) for the corner
case where there is a match to the pattern overall but the user has specified
a parenthesized subexpression and that subexpression hasn't got a match.
An example is substring('foo' from 'foo(bar)?').  This should return NULL,
since (bar) isn't matched, but it was mistakenly returning the whole-pattern
match instead (ie, 'foo').  Per bug #4044 from Rui Martins.

This has been broken since the beginning; patch in all supported versions.
The old behavior was sufficiently inconsistent that it's impossible to believe
anyone is depending on it.
2008-03-19 02:40:37 +00:00
Tatsuo Ishii 8436f9a036 Add libpq new API lo_import_with_oid() which is similar to lo_import()
except that lob's oid can be specified.
2008-03-19 00:39:33 +00:00
Tatsuo Ishii f755f2fef3 Fix tps calculation when -C supplied. Per Yoshiyuki Asaba.
Change Copyright owner from mine to PostgreSQL Global Development Group
Fix minor message typo
2008-03-19 00:29:35 +00:00
Bruce Momjian 2f2b58d642 Spit items:
* Experiment with multi-threaded backend better I/O utilization

  This would allow a single query to make use of multiple I/O channels
  simultaneously.  One idea is to create a background reader that can
  pre-fetch sequential and index scan pages needed by other backends.
  This could be expanded to allow concurrent reads from multiple devices
  in a partitioned table.

* Experiment with multi-threaded backend better CPU utilization

  This would allow several CPUs to be used for a single query, such as
  for sorting or query execution.
2008-03-18 23:35:21 +00:00
Bruce Momjian 8426b5640e Update TODO description:
* Speed WAL recovery by allowing more than one page to be prefetched

  This should be done utilizing the same infrastructure used for
  prefetching in general to avoid introducing complex error-prone code
  in WAL replay.
2008-03-18 23:32:57 +00:00
Bruce Momjian af7680f668 Add find_typedef comments for Linux. 2008-03-18 23:23:08 +00:00
Bruce Momjian 0939946a5e Add find_typedef comment. 2008-03-18 23:04:34 +00:00
Bruce Momjian 61d416e3b2 Add Linux support to find_typedefs, with help from Alvaro. 2008-03-18 22:45:11 +00:00
Tom Lane 0d49838df6 Arrange to "inline" SQL functions that appear in a query's FROM clause,
are declared to return set, and consist of just a single SELECT.  We
can replace the FROM-item with a sub-SELECT and then optimize much as
if we were dealing with a view.  Patch from Richard Rowell, cleaned up
by me.
2008-03-18 22:04:14 +00:00
Bruce Momjian 433c5238bf Add to TODO:
>
> * Consider not storing a NULL bitmap on disk if all the NULLs are
>   trailing
>
>   http://archives.postgresql.org/pgsql-hackers/2007-12/msg00624.php
>   http://archives.postgresql.org/pgsql-patches/2007-12/msg00109.php
>
2008-03-18 18:40:42 +00:00
Peter Eisentraut 2a43c4786d Don't need -Wno-error anymore, because flex is no longer producing warnings. 2008-03-18 17:46:23 +00:00
Peter Eisentraut 8c87cc370f Catch all errors in for and while loops in makefiles. Don't ignore any
errors in any commands, including in various clean targets that have so far
been handled inconsistently.  make -i is available to ignore all errors in
a consistent and official way.
2008-03-18 16:24:50 +00:00
Magnus Hagander 184c42d20d cvsweb lives on anoncvs.postgresql.org these days. 2008-03-18 16:05:07 +00:00
Magnus Hagander c4a195c200 Wiki page about cvs now lives in the main wiki, the one
on developer.postgresql.org is going away.
2008-03-18 16:02:27 +00:00
Bruce Momjian db81819c4f Add TODO URLs for:
o Allow UPDATE tab SET ROW (col, ...) = (SELECT...)

> 	  http://archives.postgresql.org/pgsql-patches/2007-04/msg00315.php
> 	  http://archives.postgresql.org/pgsql-patches/2008-03/msg00237.php
2008-03-18 15:30:59 +00:00
Alvaro Herrera d54bb24cdd Move elog(DEBUG4) call outside the locked area, per suggestion from Tom Lane. 2008-03-18 12:36:43 +00:00
Bruce Momjian 7e2be4e513 Add URLs for :
* Speed WAL recovery by allowing more than one page to be prefetched

  This involves having a separate process that can be told which pages
  the recovery process will need in the near future.

>   http://archives.postgresql.org/pgsql-general/2007-12/msg00683.php
>   http://archives.postgresql.org/pgsql-hackers/2007-12/msg00497.php
<
2008-03-18 03:59:45 +00:00
Tom Lane 8e850b9159 Advance multiple array keys rightmost-first instead of leftmost-first
during a bitmap index scan.  This cannot affect the query results
(since we're just dumping the TIDs into a bitmap) but it might offer
some advantage in locality of access to the index.  Per Greg Stark.
2008-03-18 03:54:52 +00:00
Bruce Momjian a2f1827dfd Add TODO:
> 	o Recreate pg_xlog/archive_status/ if it doesn't exist after
> 	  restoring from a PITR backup
>
> 	  http://archives.postgresql.org/pgsql-hackers/2007-12/msg00487.php
2008-03-18 02:37:05 +00:00
Tom Lane 206b1e558a Fix our printf implementation to follow spec: if a star parameter
value for a precision is negative, act as though precision weren't
specified at all, that is the whole .* part of the format spec should
be ignored.  Our previous coding took it as .0 which is certainly
wrong.  Per report from Kris Jurka and local testing.

Possibly this should be back-patched, but it would be good to get
some more testing first; in any case there are no known cases where
there's really a problem on the backend side.
2008-03-18 01:49:44 +00:00
Bruce Momjian 9706f54d5d Add to TODO:
>
> * Consider Cartesian joins when both relations are needed to form an
>   indexscan qualification for a third relation
>
>   http://archives.postgresql.org/pgsql-performance/2007-12/msg00090.php
2008-03-18 00:43:01 +00:00
Bruce Momjian ec62bdff06 Add URL for:
o Allow COPY to report error lines and continue

          This requires the use of a savepoint before each COPY line is
          processed, with ROLLBACK on COPY failure.
> 	  http://archives.postgresql.org/pgsql-hackers/2007-12/msg00572.php
2008-03-18 00:23:41 +00:00
Bruce Momjian 3777cde067 Add to TODO:
>
> * Allow SSL key file permission checks to be optionally disabled when
>   sharing SSL keys with other applications
>
>   http://archives.postgresql.org/pgsql-bugs/2007-12/msg00069.php
2008-03-17 23:56:30 +00:00
Bruce Momjian b1f0cdaf84 Add:
>
> * Reduce BIT data type overhead using short varlena headers
>
>   http://archives.postgresql.org/pgsql-general/2007-12/msg00273.php
2008-03-17 23:49:33 +00:00
Bruce Momjian 9970141794 Add to TODO:
> * Reduce file system activity overhead of statistics file pgstat.stat
>
>   http://archives.postgresql.org/pgsql-general/2007-12/msg00106.php
>
2008-03-17 23:32:21 +00:00
Bruce Momjian e56dfc778d Add to TODO:
> * Consider if CommandCounterIncrement() can avoid its
>   AcceptInvalidationMessages() call
>
>   http://archives.postgresql.org/pgsql-committers/2007-11/msg00585.php
2008-03-17 22:59:01 +00:00
Bruce Momjian c10b0a7a73 Add URL for:
* Add SQL:2003 WITH RECURSIVE (hierarchical) queries to SELECT

>   http://archives.postgresql.org/pgsql-hackers/2007-11/msg01334.php
2008-03-17 22:54:23 +00:00
Bruce Momjian 187e884a6a Add:
>
> 	o Remove pre-7.3 pg_dump code that assumes pg_depend does not exit
2008-03-17 22:53:02 +00:00
Bruce Momjian cd66b94637 Add URL for:
* Improve text search error messages

>   http://archives.postgresql.org/pgsql-hackers/2007-11/msg01146.php
2008-03-17 22:45:20 +00:00
Bruce Momjian 0b5eaef2e3 Added to TODO:
> * Improve text search error messages
>
>   http://archives.postgresql.org/pgsql-hackers/2007-10/msg00966.php
>
>
> * Fix /contrib/ltree operator
>
>   http://archives.postgresql.org/pgsql-bugs/2007-11/msg00044.php
2008-03-17 22:34:23 +00:00
Bruce Momjian 5db762ef00 Add TODO:
>
> 	o Fix server restart problem when the server was shutdown during
> 	  a PITR backup
>
> 	  http://archives.postgresql.org/pgsql-hackers/2007-11/msg00800.php
>
2008-03-17 21:49:11 +00:00
Bruce Momjian 3a1e7b24a7 Adjust TODO spacing. 2008-03-17 21:45:14 +00:00
Bruce Momjian 3ff83c333e Add TODO URL for:
* Consider increasing the number of default statistics target, and
  reduce statistics target overhead

>   http://archives.postgresql.org/pgsql-hackers/2008-01/msg01066.php
2008-03-17 21:09:30 +00:00
Peter Eisentraut a7b7b07af3 Enable probes to work with Mac OS X Leopard and other OSes that will
support DTrace in the future.

Switch from using DTRACE_PROBEn macros to the dynamically generated macros.
Use "dtrace -h" to create a header file that contains the dynamically
generated macros to be used in the source code instead of the DTRACE_PROBEn
macros.  A dummy header file is generated for builds without DTrace support.

Author: Robert Lor <Robert.Lor@sun.com>
2008-03-17 19:44:41 +00:00
Peter Eisentraut e7115a224a We need to rebuild objfiles.txt when one of the subdirectories' objfiles.txt
changed in case a new file got added.
2008-03-17 18:24:56 +00:00
Bruce Momjian f09f055d32 Add:
>
> 	o Allow Kerberos to disable stripping of realms so we can
> 	  check the username@realm against multiple realms
>
> 	  http://archives.postgresql.org/pgsql-hackers/2007-11/msg00009.php
2008-03-17 18:22:44 +00:00
Magnus Hagander 7cbfa7565e Fix postgres --describe-config for guc enums, breakage noted by Alvaro.
While at it, rename option lookup functions to make names clearer, per
discussion with Tom.
2008-03-17 17:45:09 +00:00
Tom Lane 164899db1c Revert thinko introduced into prefix_selectivity() by my recent patch:
make_greater_string needs the < procedure not the >= one.  Spotted by
Peter.
2008-03-17 17:13:54 +00:00
Alvaro Herrera 23057f51f5 Move ProcState definition into sinvaladt.c from sinvaladt.h, since it's not
needed anywhere after my previous patch.  Noticed by Tom Lane.

Also, remove #include <signal.h> from sinval.c.
2008-03-17 11:50:27 +00:00
Tom Lane 0c5962c054 Grab some low-hanging fruit in the new hash index build code.
oprofile shows that a nontrivial amount of time is being spent in
repeated calls to index_getprocinfo, which really only needs to be
called once.  So do that, and inline _hash_datum2hashkey to make it
work.
2008-03-17 03:45:36 +00:00
Tom Lane 32846f8152 Fix TransactionIdIsCurrentTransactionId() to use binary search instead of
linear search when checking child-transaction XIDs.  This makes for an
important speedup in transactions that have large numbers of children,
as in a recent example from Craig Ringer.  We can also get rid of an
ugly kluge that represented lists of TransactionIds as lists of OIDs.

Heikki Linnakangas
2008-03-17 02:18:55 +00:00
Bruce Momjian a7c58abeb1 Done:
> 	o -During index creation, pre-sort the tuples to improve build speed
2008-03-17 01:46:42 +00:00
Tom Lane ff213239c5 Add a note to the CREATE INDEX reference page about the impact of
maintenance_work_mem and effective_cache_size on index creation speed.
2008-03-16 23:57:51 +00:00
Tom Lane 787eba734b When creating a large hash index, pre-sort the index entries by estimated
bucket number, so as to ensure locality of access to the index during the
insertion step.  Without this, building an index significantly larger than
available RAM takes a very long time because of thrashing.  On the other
hand, sorting is just useless overhead when the index does fit in RAM.
We choose to sort when the initial index size exceeds effective_cache_size.

This is a revised version of work by Tom Raney and Shreya Bhargava.
2008-03-16 23:15:08 +00:00
Alvaro Herrera ec6550c6c0 Modify interactions between sinval.c and sinvaladt.c. The code that actually
deals with the queue, including locking etc, is all in sinvaladt.c.  This means
that the struct definition of the queue, and the queue pointer, are now
internal "implementation details" inside sinvaladt.c.

Per my proposal dated 25-Jun-2007 and followup discussion.
2008-03-16 19:47:34 +00:00
Magnus Hagander a3f66eac01 Some cleanups of enum-guc code, per comments from Tom. 2008-03-16 16:42:44 +00:00
Tom Lane c9a1cc694a Change hash index creation so that rather than always establishing exactly
two buckets at the start, we create a number of buckets appropriate for the
estimated size of the table.  This avoids a lot of expensive bucket-split
actions during initial index build on an already-populated table.

This is one of the two core ideas of Tom Raney and Shreya Bhargava's patch
to reduce hash index build time.  I'm committing it separately to make it
easier for people to test the effects of this separately from the effects
of their other core idea (pre-sorting the index entries by bucket number).
2008-03-15 20:46:31 +00:00