Commit Graph

26460 Commits

Author SHA1 Message Date
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
Tom Lane 4873c96ff3 Fix inappropriately-timed memory context switch in autovacuum_do_vac_analyze.
This accidentally failed to fail before 8.3, because the context we were
switching back to was long-lived anyway; but it sure looks risky as can be
now.  Well spotted by Pavan Deolasee.
2008-03-14 23:49:28 +00:00
Alvaro Herrera 4844529ce4 Fix duplicate word, per Guillaume Lelarge. 2008-03-14 17:28:23 +00:00
Alvaro Herrera adc4e1e635 Fix vacuum so that autovacuum is really not cancelled when doing an emergency
job (i.e. to prevent Xid wraparound problems.)  Bug reported by ITAGAKI
Takahiro in 20080314103837.63D3.52131E4D@oss.ntt.co.jp, though I didn't use his
patch.
2008-03-14 17:25:59 +00:00
Tom Lane be5d6df346 Update release notes for 8.3.1 and 8.2.7 releases. 2008-03-13 23:47:49 +00:00
Tom Lane d31fb0e6b5 Update to tzdata 2008a distribution (Chilean DST law change). 2008-03-13 19:21:43 +00:00
Tom Lane 5e00913daf Fix varstr_cmp's special case for UTF8 encoding on Windows so that strings
that are reported as "equal" by wcscoll() are checked to see if they really
are bitwise equal, and are sorted per strcmp() if not.  We made this happen
a couple of years ago in the regular code path, but it unaccountably got
left out of the Windows/UTF8 case (probably brain fade on my part at the
time).  As in the prior set of changes, affected users may need to reindex
indexes on textual columns.

Backpatch as far as 8.2, which is the oldest release we are still supporting
on Windows.
2008-03-13 18:31:56 +00:00
Tom Lane 3e701a04fe Fix heap_page_prune's problem with failing to send cache invalidation
messages if the calling transaction aborts later on.  Collapsing out line
pointer redirects is a done deal as soon as we complete the page update,
so syscache *must* be notified even if the VACUUM FULL as a whole doesn't
complete.  To fix, add some functionality to inval.c to allow the pending
inval messages to be sent immediately while heap_page_prune is still
running.  The implementation is a bit chintzy: it will only work in the
context of VACUUM FULL.  But that's all we need now, and it can always be
extended later if needed.  Per my trouble report of a week ago.
2008-03-13 18:00:32 +00:00
Bruce Momjian f4bce7e086 Add URL for:
* Do async I/O for faster random read-ahead of data

  Async I/O allows multiple I/O requests to be sent to the disk with
  results coming back asynchronously.

>   http://archives.postgresql.org/pgsql-performance/2007-09/msg00255.php
2008-03-13 01:56:46 +00:00
Tom Lane da6a707c29 Fix pg_plan_queries() to restore the previous setting of ActiveSnapshot
(probably NULL) before exiting.  Up to now it's just left the variable as it
set it, which means that after we're done processing the current client
message, ActiveSnapshot is probably pointing at garbage (because this function
is typically run in MessageContext which will get reset).  There doesn't seem
to have been any code path in which that mattered before 8.3, but now the
plancache module might try to use the stale value if the next client message
is a Bind for a prepared statement that is in need of replanning.  Per report
from Alex Hunsaker.
2008-03-12 23:58:27 +00:00
Bruce Momjian 0d540b097c Add psql TODO:
< * Include the symbolic SQLSTATE name in verbose error reports
<
<   http://archives.postgresql.org/pgsql-general/2007-09/msg00438.php
2008-03-12 20:50:22 +00:00
Bruce Momjian 4fed6e3ffd Add to TODO:
> * Expire published xmin for read-only and idle transactions
>
>   http://archives.postgresql.org/pgsql-hackers/2007-09/msg00343.php
2008-03-12 20:19:46 +00:00
Tom Lane 033eb1581b Fix LISTEN/NOTIFY race condition reported by Laurent Birtz, by postponing
pg_listener modifications commanded by LISTEN and UNLISTEN until the end
of the current transaction.  This allows us to hold the ExclusiveLock on
pg_listener until after commit, with no greater risk of deadlock than there
was before.  Aside from fixing the race condition, this gets rid of a
truly ugly kludge that was there before, namely having to ignore
HeapTupleBeingUpdated failures during NOTIFY.  There is a small potential
incompatibility, which is that if a transaction issues LISTEN or UNLISTEN
and then looks into pg_listener before committing, it won't see any resulting
row insertion or deletion, where before it would have.  It seems unlikely
that anyone would be depending on that, though.

This patch also disallows LISTEN and UNLISTEN inside a prepared transaction.
That case had some pretty undesirable properties already, such as possibly
allowing pg_listener entries to be made for PIDs no longer present, so
disallowing it seems like a better idea than trying to maintain the behavior.
2008-03-12 20:11:46 +00:00
Bruce Momjian 1c228fa5ab Add:
>
> * Consider a special data type for regular expressions
>
>   http://archives.postgresql.org/pgsql-hackers/2007-08/msg01067.php
2008-03-12 19:41:23 +00:00
Bruce Momjian 582f32fd45 Back out text search change to TODO. 2008-03-12 19:40:01 +00:00
Bruce Momjian 4f72bc7fce Update TODO:
* Add array_accum() and array_to_set() functions for arrays

  The standards specify array_agg() and UNNEST.
  http://archives.postgresql.org/pgsql-hackers/2007-08/msg00464.php
2008-03-12 19:32:07 +00:00
Bruce Momjian 3a27ad1b81 Add URL for:
* Consider a simplified API for full text searches

>   http://archives.postgresql.org/pgsql-hackers/2007-08/msg01067.php
2008-03-12 19:30:59 +00:00
Bruce Momjian 0a81e99384 Add for Win32 TODO:
>
> 	o Convert MSVC build system to remove most batch files
>
> 	  http://archives.postgresql.org/pgsql-hackers/2007-08/msg00961.php
2008-03-12 19:28:03 +00:00
Bruce Momjian 8522e59e13 Add URL for:
* Add REINDEX CONCURRENTLY, like CREATE INDEX CONCURRENTLY

>   http://archives.postgresql.org/pgsql-performance/2007-08/msg00289.php
2008-03-12 19:15:25 +00:00
Bruce Momjian a690d09aab Add for Win32 TODO:
> 	o Diagnose problem where shared memory can sometimes not be
> 	  attached by postmaster children
>
> 	  http://archives.postgresql.org/pgsql-general/2007-08/msg01377.php
>
2008-03-12 18:33:54 +00:00
Bruce Momjian ef34846cd1 Add to TODO:
>
> * Remove use of MAKE_PTR and MAKE_OFFSET macros
>
>   http://archives.postgresql.org/pgsql-general/2007-08/msg01510.php
2008-03-12 18:32:29 +00:00
Bruce Momjian c7302beb58 Add to TODO:
>
> * Add array_accum() and array_to_set() functions for arrays
>
>   http://archives.postgresql.org/pgsql-hackers/2007-08/msg00464.php
2008-03-12 15:14:50 +00:00
Tom Lane b7a67c2840 Add a comment explaining one of the ways that pgbench fails to fully
comply with TPC-B.  Per Itagaki Takahiro and discussion of bug#3681.
2008-03-12 02:18:33 +00:00
Bruce Momjian 3030f18a1b Add URL for:
* Improve speed with indexes

  For large table adjustments during VACUUM FULL, it is faster to cluster
  or reindex rather than update the index.  Also, index updates can bloat
  the index.


>   http://archives.postgresql.org/pgsql-hackers/2007-08/msg00307.php
2008-03-12 01:48:08 +00:00
Bruce Momjian ab2ff36465 Add:
>
> * Allow domains to be cast
>
>   http://archives.postgresql.org/pgsql-hackers/2003-06/msg01206.php
>   http://archives.postgresql.org/pgsql-hackers/2007-08/msg00289.php
2008-03-12 01:40:09 +00:00
Bruce Momjian 232c4b4038 Add:
>
> * Consider simplifying how memory context resets handle child contexts
>
>   http://archives.postgresql.org/pgsql-patches/2007-08/msg00067.php
2008-03-12 01:35:00 +00:00
Bruce Momjian 381e4cde45 Add URL for:
>   http://archives.postgresql.org/pgsql-hackers/2007-08/msg00082.php
2008-03-12 01:21:25 +00:00
Bruce Momjian b21e8b2e1e Add URL for:
* Consider increasing NUM_CLOG_BUFFERS

>   http://archives.postgresql.org/pgsql-performance/2007-08/msg00024.php
2008-03-12 01:08:32 +00:00
Bruce Momjian e6729a3bee Add URL for:
* Consider increasing NUM_CLOG_BUFFERS
>
>   http://archives.postgresql.org/pgsql-hackers/2007-08/msg00030.php
>
2008-03-12 01:03:04 +00:00
Bruce Momjian def329d165 Prevent psql \copy from accepting multiple string parameters, e.g.
test=> \copy billing_data from ../BillingSamplePricerFile.csv with csv
	   header quote as '"' null as 'abc' null as '123'
	\copy: parse error at "null"

Per report from Stephen Frost
2008-03-11 23:30:56 +00:00
Bruce Momjian 288579ca71 Update TODO:
o Allow COPY in CSV mode to control whether a quoted zero-length
          string is treated as NULL

          Currently this is always treated as a zero-length string,
          which generates an error when loading into an integer column
2008-03-11 23:17:05 +00:00
Bruce Momjian fc8d249457 add to TODO COPY:
>
> 	o Allow COPY in CSV mode to control whether "" is treated as NULL
>
> 	  http://archives.postgresql.org/pgsql-hackers/2007-07/msg00905.php
2008-03-11 22:47:28 +00:00
Bruce Momjian 5db5d70a6d Add to pl/pgsql:
>
> 	o Improve logic of determining if an identifier is a a
> 	  variable or column name
>
> 	  http://archives.postgresql.org/pgsql-hackers/2007-07/msg00436.php
2008-03-11 22:31:02 +00:00
Bruce Momjian 8dc75d062f Add:
>
> * Add automated check for invalid C++ source code constructs
>
>   http://archives.postgresql.org/pgsql-patches/2007-07/msg00056.php
2008-03-11 21:25:02 +00:00
Bruce Momjian 1ac2627ab0 Add:
> * Research use of signals and sleep wake ups
>
>   http://archives.postgresql.org/pgsql-hackers/2007-07/msg00003.php
2008-03-11 21:13:13 +00:00
Bruce Momjian 56c7614bb2 Add:
* Test to see if calling PreallocXlogFiles() from the background writer
  will help with WAL segment creation latency

  http://archives.postgresql.org/pgsql-patches/2007-06/msg00340.php
2008-03-11 21:06:10 +00:00
Bruce Momjian 955ddc3e7d < * Consider adding buffers the BGW finds reusable to the free list
> * Consider adding buffers the background writer finds reusable to the
>   free list
>
> * Consider wither increasing BM_MAX_USAGE_COUNT improves performance
>
>   http://archives.postgresql.org/pgsql-hackers/2007-06/msg01007.php
2008-03-11 20:46:20 +00:00
Bruce Momjian 639c6cb712 Add URL for:
* Reduce storage space for small NUMERICs

>   http://archives.postgresql.org/pgsql-hackers/2007-06/msg00715.php
2008-03-11 20:28:13 +00:00