Commit Graph

24907 Commits

Author SHA1 Message Date
Bruce Momjian 739425dbe3 Document that the COPY delimiter must be an ASCII byte, rather than a
multi-byte value.  It can also be a single-byte encoded character if
the client and server versions match.

Backpatch to 8.2.X.
2007-04-18 00:17:56 +00:00
Bruce Momjian f30a72dcdb Update TODO for plpgsql cursors:
< 		o -Add support for WITH HOLD and SCROLL cursors
> 		o -Add support for SCROLL cursors
> 		o Add support for WITH HOLD cursors
2007-04-17 23:54:32 +00:00
Tom Lane 836feeda9c Fix condition for whether end_heap_rewrite must fsync, per Heikki. 2007-04-17 21:29:31 +00:00
Bruce Momjian 097a200d89 Also done for PL/pgSQL:
< 		o Add support for WITH HOLD and SCROLL cursors
> 		o -Add support for WITH HOLD and SCROLL cursors
2007-04-17 21:22:51 +00:00
Bruce Momjian f672b875ae Done:
< 		o Add MOVE
> 		o -Add MOVE
2007-04-17 21:22:13 +00:00
Bruce Momjian e6facb3b95 Add warning about TODO item:
<   Currently all schemas are owned by the super-user because they are
<   copied from the template1 database.
>   Currently all schemas are owned by the super-user because they are copied
>   from the template1 database.  However, since all objects are inherited
>   from the template database, it is not clear that setting schemas to the db
>   owner is correct.
2007-04-17 20:50:34 +00:00
Tom Lane 4942ee656a Don't assume rd_smgr stays open across all of a rewriteheap operation;
doing so can result in crash if an sinval reset occurs meanwhile.
I believe this explains intermittent buildfarm failures in cluster test.
2007-04-17 20:49:39 +00:00
Bruce Momjian 6c2c6682f6 Not easy, per Alvaro:
< * %Set proper permissions on non-system schemas during db creation
> * Set proper permissions on non-system schemas during db creation
2007-04-17 20:47:55 +00:00
Tom Lane 2e824a8ea9 Rewrite choose_bitmap_and() to make it more robust in the presence of
competing alternatives for indexes to use in a bitmap scan.  The former
coding took estimated selectivity as an overriding factor, causing it to
sometimes choose indexes that were much slower to scan than ones with a
slightly worse selectivity.  It was also too narrow-minded about which
combinations of indexes to consider ANDing.  The rewrite makes it pay more
attention to index scan cost than selectivity; this seems sane since it's
impossible to have very bad selectivity with low cost, whereas the reverse
isn't true.  Also, we now consider each index alone, as well as adding
each index to an AND-group led by each prior index, for a total of about
O(N^2) rather than O(N) combinations considered.  This makes the results
much less dependent on the exact order in which the indexes are
considered.  It's still a lot cheaper than an O(2^N) exhaustive search.
A prefilter step eliminates all but the cheapest of those indexes using
the same set of WHERE conditions, to keep the effective value of N down in
scenarios where the DBA has created lots of partially-redundant indexes.
2007-04-17 20:03:03 +00:00
Tom Lane 2b99411df2 Fix erroneous column counts in some documentation tables. Brian Gough 2007-04-17 17:30:35 +00:00
Tom Lane a7664ca3eb And remove 'em again ... 2007-04-17 01:06:28 +00:00
Tom Lane 91c62e211b Temporarily re-add derived files, in hopes of straightening out their CVS status. 2007-04-17 01:05:10 +00:00
Magnus Hagander 2ee5d945f9 Don't write timing output in quiet mode.
Merlin Moncure
2007-04-16 20:15:38 +00:00
Tom Lane 274dfdb513 Tweak clean_encoding_name() API to avoid need to cast away const.
Kris Jurka
2007-04-16 18:50:49 +00:00
Tom Lane 6ee2a3be4a Fix pg_dump to not crash if -t or a similar switch is used to select a serial
sequence for dumping without also selecting its owning table.  Make it not try
to emit ALTER SEQUENCE OWNED BY in this situation.
Per report from Michael Nolan.
2007-04-16 18:42:10 +00:00
Magnus Hagander de9effb55f Enable IPV6 for all MSVC builds, including the VC6 libpq-only build.
Per request from Hiroshi Saito.
2007-04-16 18:39:19 +00:00
Alvaro Herrera e2a186b03c Add a multi-worker capability to autovacuum. This allows multiple worker
processes to be running simultaneously.  Also, now autovacuum processes do not
count towards the max_connections limit; they are counted separately from
regular processes, and are limited by the new GUC variable
autovacuum_max_workers.

The launcher now has intelligence to launch workers on each database every
autovacuum_naptime seconds, limited only on the max amount of worker slots
available.

Also, the global worker I/O utilization is limited by the vacuum cost-based
delay feature.  Workers are "balanced" so that the total I/O consumption does
not exceed the established limit.  This part of the patch was contributed by
ITAGAKI Takahiro.

Per discussion.
2007-04-16 18:30:04 +00:00
Tom Lane 42dc4b66e6 Make plancache store cursor options so it can pass them to planner during
a replan.  I had originally thought this was not necessary, but the new
SPI facilities create a path whereby queries planned with non-default
options can get into the cache, so it is necessary.
2007-04-16 18:21:07 +00:00
Tom Lane f01b196597 Support scrollable cursors (ie, 'direction' clause in FETCH) in plpgsql.
Pavel Stehule, reworked a bit by Tom.
2007-04-16 17:21:24 +00:00
Tom Lane 66888f7424 Expose more cursor-related functionality in SPI: specifically, allow
access to the planner's cursor-related planning options, and provide new
FETCH/MOVE routines that allow access to the full power of those commands.
Small refactoring of planner(), pg_plan_query(), and pg_plan_queries()
APIs to make it convenient to pass the planning options down from SPI.

This is the core-code portion of Pavel Stehule's patch for scrollable
cursor support in plpgsql; I'll review and apply the plpgsql changes
separately.
2007-04-16 01:14:58 +00:00
Tom Lane fa92d21a48 Avoid running build_index_pathkeys() in situations where there cannot
possibly be any useful pathkeys --- to wit, queries with neither any
join clauses nor any ORDER BY request.  It's nearly free to check for
this case and it saves a useful fraction of the planning time for simple
queries.
2007-04-15 20:09:28 +00:00
Andrew Dunstan f97d4a267a Add --with-libxslt configure option 2007-04-15 12:48:24 +00:00
Tatsuo Ishii 6041b92238 Make JOHAB client only encoding per discussions in pgsql-hackers
"Server-side support of all encodings" around 2007/3/26.
initdb required.
2007-04-15 10:56:30 +00:00
Tatsuo Ishii bf47e3e419 Fix description how to create conversion function. 2007-04-15 10:49:26 +00:00
Andrew Dunstan 1656cb76f7 revert change to build xml2 until a better fix is found 2007-04-14 12:57:07 +00:00
Bruce Momjian 1b75d634a6 Update TODO:
< 	o Consider reducing on-disk varlena length from four to two
< 	  because a heap row cannot be more than 64k in length
> 	o Consider reducing on-disk varlena length from four bytes to
> 	  two because a heap row cannot be more than 64k in length
2007-04-13 23:23:22 +00:00
Magnus Hagander bf3b8d8ad8 Allow \timing in psql to have a better resolution than ~15ms on Windows.
ITAGAKI Takahiro
2007-04-13 20:40:59 +00:00
Bruce Momjian 5b464e1196 Update Win32 FAQ HTML version to match corrected text version. 2007-04-13 20:00:10 +00:00
Andrew Dunstan 6506a584cc Enable building contrib/xml2 if configured using --with-libxml.
If this breaks things due to missing libxslt, then I'll have to
revert it, but let's see if it breaks the buildfarm.

Workarounds in case libxslt is missing include:
. don't configure with libxml, or
. don't build contrib modules from the contrib Makefile (use the individual module Makefiles instead), or
. change the xml2 Makefile
2007-04-13 18:50:01 +00:00
Magnus Hagander 15ebfeec2d Add O_DIRECT support on Windows.
ITAGAKI Takahiro
2007-04-13 10:30:30 +00:00
Neil Conway 85bbf01e08 Minor fixes for the EXPLAIN reference page. Mention the fact that
EXPLAIN ANALYZE can sometimes be significantly slower than running
the same query normally, and make some minor markup improvements.
2007-04-12 22:39:21 +00:00
Neil Conway 6df6d8e361 Fixes for RESET SESSION patch, per Alvaro. Fix a typo in the RESET
ref page (sorry, my fault!), and simplify the coding of
ResetTempTableNamespace().
2007-04-12 22:34:45 +00:00
Bruce Momjian c0e42e9325 Done:
> * -Add RESET SESSION command to reset all session state
2007-04-12 19:38:26 +00:00
Tom Lane 995ba280c1 Rearrange mdsync() looping logic to avoid the problem that a sufficiently
fast flow of new fsync requests can prevent mdsync() from ever completing.
This was an unforeseen consequence of a patch added in Mar 2006 to prevent
the fsync request queue from overflowing.  Problem identified by Heikki
Linnakangas and independently by ITAGAKI Takahiro; fix based on ideas from
Takahiro-san, Heikki, and Tom.

Back-patch as far as 8.1 because a previous back-patch introduced the problem
into 8.1 ...
2007-04-12 17:10:55 +00:00
Tom Lane ebb6bae539 Cancel pending fsync requests during WAL replay of DROP DATABASE, per bug
report from David Darville.  Back-patch as far as 8.1, which may or may not
have the problem but it seems a safe change anyway.
2007-04-12 15:04:35 +00:00
Magnus Hagander b60ddffa93 Install debugger symbols (in their own directory) 2007-04-12 12:46:20 +00:00
Magnus Hagander 4dd3365086 Enable IPV6 when building with MSVC. 2007-04-12 07:03:00 +00:00
Neil Conway d13e903bea RESET SESSION, plus related new DDL commands. Patch from Marko Kreen,
reviewed by Neil Conway. This patch adds the following DDL command
variants: RESET SESSION, RESET TEMP, RESET PLANS, CLOSE ALL, and
DEALLOCATE ALL. RESET SESSION is intended for use by connection
pool software and the like, in order to reset a client session
to something close to its initial state.

Note that while most of these command variants can be executed
inside a transaction block (but are not transaction-aware!),
RESET SESSION cannot. While this is inconsistent, it is intended
to catch programmer mistakes: RESET SESSION in an open transaction
block is probably unintended.
2007-04-12 06:53:49 +00:00
Bruce Momjian e6e47f278d Update text, per Greg Stark:
< 	o Allow single-byte header storage for arrays
> 	o Allow single-byte header storage for array elements
2007-04-11 21:02:31 +00:00
Tom Lane 226a100568 Code review for btree page split WAL reduction patch. Make it actually work
(original code *always* created a full-page image for the left page, thus
leaving the intended savings unrealized), avoid risk of not having enough room
on the page during xlog restore, squeeze out another couple bytes in the xlog
record, clean up neglected comments.
2007-04-11 20:47:38 +00:00
Bruce Momjian f7424b0d4b Add:
> 	o Allow single-byte header storage for arrays
2007-04-10 01:33:39 +00:00
Bruce Momjian 170fa82b1a Add:
> 	o Have WITH CONSTRAINTS also create constraint indexes
> 	  http://archives.postgresql.org/pgsql-patches/2007-04/msg00149.php
2007-04-10 01:22:12 +00:00
Tom Lane 56218fbc48 Minor tweaking of index special-space definitions so that the various
index types can be reliably distinguished by examining the special space
on an index page.  Per my earlier proposal, plus the realization that
there's no need for btree's vacuum cycle ID to cycle through every possible
16-bit value.  Restricting its range a little costs nearly nothing and
eliminates the possibility of collisions.
Memo to self: remember to make bitmap indexes play along with this scheme,
assuming that patch ever gets accepted.
2007-04-09 22:04:08 +00:00
Bruce Momjian 485d9ca96f Add URL for:
* Simplify ability to create partitioned tables
>   http://archives.postgresql.org/pgsql-hackers/2007-04/msg00151.php
2007-04-09 21:18:29 +00:00
Magnus Hagander 6e09df9d26 Add cancel handlers so it's possible to Ctrl-C clusterdb, reindexdb
and vacuumdb.
ITAGAKI Takahiro, with minor fixes from me.
2007-04-09 18:21:22 +00:00
Bruce Momjian bbed5ba914 Done:
> 	o -Make CLUSTER preserve recently-dead tuples per MVCC requirements
2007-04-08 02:17:02 +00:00
Tom Lane e51ac1b899 Minor editorialization on CLUSTER reference page. 2007-04-08 02:07:35 +00:00
Tom Lane 7b78474da3 Make CLUSTER MVCC-safe. Heikki Linnakangas 2007-04-08 01:26:33 +00:00
Tatsuo Ishii 2fca2c05e7 Add -F option to set fillfactor for tellers, accounts and branches.
Patch contributed by Pavan Deolasee. Along with Japanese doc
modification by Tatsuo Ishii.
2007-04-08 01:15:07 +00:00
Bruce Momjian c218c0bfda Done:
> 	o -Add more logical syntax CLUSTER table USING index;
2007-04-08 00:36:08 +00:00