Commit Graph

26497 Commits

Author SHA1 Message Date
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
Tom Lane 611b4393f2 Make TransactionIdIsInProgress check transam.c's single-item XID status cache
before it goes groveling through the ProcArray.  In situations where the same
recently-committed transaction ID is checked repeatedly by tqual.c, this saves
a lot of shared-memory searches.  And it's cheap enough that it shouldn't
hurt noticeably when it doesn't help.
Concept and patch by Simon, some minor tweaking and comment-cleanup by Tom.
2008-03-11 20:20:35 +00:00
Bruce Momjian ba8a9a9282 Add:
> 	o Consider normalizing fractions in postgresql.conf, perhaps
> 	  using '%'
>
> 	  http://archives.postgresql.org/pgsql-hackers/2007-06/msg00550.php
2008-03-11 20:16:40 +00:00
Bruce Momjian beaef327eb Add:
> * Consider sorting writes during checkpoint
>
>   http://archives.postgresql.org/pgsql-hackers/2007-06/msg00541.php
2008-03-11 20:04:56 +00:00
Bruce Momjian a0e4f5f30a Add:
>
> * Prefix command-line utilities like createuser with 'pg_'
>
>   http://archives.postgresql.org/pgsql-hackers/2007-06/msg00025.php
2008-03-11 19:48:17 +00:00
Bruce Momjian efdb082878 Add:
>
> * Change memory allocation for multi-byte functions so memory is
>   allocated inside conversion functions
>
>   Currently we preallocate memory based on worst-case usage.
2008-03-11 19:44:39 +00:00
Bruce Momjian 177eae145f Add another URL for:
* Consider increasing the number of default statistics target, and
  reduce statistics target overhead

  Also consider having a larger statistics target for indexed columns
  and expression indexes
<
>   http://archives.postgresql.org/pgsql-general/2007-06/msg00542.php
2008-03-11 19:34:12 +00:00
Bruce Momjian 73df8b174e Add URL for:
* Consider increasing the number of default statistics target, and
  reduce statistics target overhead

  Also consider having a larger statistics target for indexed columns
  and expression indexes
>   http://archives.postgresql.org/pgsql-general/2007-05/msg01228.php
>
2008-03-11 19:32:03 +00:00
Bruce Momjian d14ca04e58 Add:
>
> * Consider increasing the number of default statistics target, and
>   reduce statistics target overhead
>
>   Also consider having a larger statistics target for indexed columns
>   and expression indexes
2008-03-11 18:30:50 +00:00
Bruce Momjian 3879b62173 Add:
>
> * Consider using a hash for joining to a large IN (VALUES ...) list
>
>   http://archives.postgresql.org/pgsql-hackers/2007-05/msg00450.php
2008-03-11 18:14:57 +00:00
Bruce Momjian a2c4705702 Add for VACUUM:
>
> * Consider a more compact data representation for dead tuples
>
>   http://archives.postgresql.org/pgsql-patches/2007-05/msg00143.php
2008-03-11 18:05:10 +00:00
Bruce Momjian 8129a814d0 Add URL for:
* Fix problem when multiple subtransactions of the same outer transaction
  hold different types of locks, and one subtransaction aborts

>   http://archives.postgresql.org/pgsql-hackers/2007-05/msg00773.php
2008-03-11 18:01:04 +00:00
Bruce Momjian c3f6ca1e27 Add:
>
> * Add temporal versions of generate_series()
>
>   http://archives.postgresql.org/pgsql-hackers/2007-04/msg01180.php
2008-03-11 17:42:13 +00:00
Bruce Momjian adc0ee5ea1 Add for pl/pgsql:
o Review handling of MOVE and FETCH


http://archives.postgresql.org/pgsql-patches/2007-04/msg00527.php
2008-03-11 17:20:47 +00:00