Commit Graph

21090 Commits

Author SHA1 Message Date
Neil Conway d6bc885bb9 Minor SGML markup fixes. 2005-09-13 15:24:57 +00:00
Alvaro Herrera c93912b711 Document the new autovacuum daemon. 2005-09-13 01:51:18 +00:00
Tom Lane 2a11a4937e Fix cut-and-paste-o in TCP keepalives documentation. 2005-09-12 23:09:05 +00:00
Neil Conway fe9f96b14c Minor documentation tweak: make the capitalization of a section title
consistent with the other sections in this chapter.
2005-09-12 22:39:30 +00:00
Tom Lane f59b05c95d Ensure that any memory leaked during an error inside the bgwriter is
recovered.  I did not see any actual leak while testing this in CVS tip,
but 8.0 definitely has a problem with leaking the space temporarily
palloc'd by BufferSync().  In any case this seems a good idea to forestall
similar problems in future.  Per report from Arjen van der Meijden.
2005-09-12 22:20:16 +00:00
Neil Conway 9813fc1bae Make the documentation of GUC variables a separate chapter, rather than
a section of the "Server Run-time Environment" chapter. Also, move the
SGML for the new chapter to a separate file and fix the resulting
fallout.
2005-09-12 22:11:38 +00:00
Tom Lane 37a3ed6e40 Update manual's introduction to indexes to reflect 8.1 changes; in
particular the addition of bitmap scans and the relaxation of rules
about when multicolumn indexes can be used.  Also some minor editorial
work in other parts of the chapter.
2005-09-12 19:17:45 +00:00
Neil Conway f7259f5ba6 Fix a mistake in the documentation for SPI_getbinval(), per Michael Fuhr. 2005-09-12 18:40:19 +00:00
Tom Lane b93a72afbf Forgot to add pg_pltemplate to the list of shared system catalogs that
appears in the REINDEX ref page.
2005-09-12 16:43:29 +00:00
Michael Meskes c959d370bf Fixed transaction command handling to not ignore savepoints and to correctly check for errors. 2005-09-12 11:57:53 +00:00
Neil Conway 4fe4563550 Add a few items to the release notes, and make a few more minor cleanups. 2005-09-12 05:10:12 +00:00
Tom Lane cc3bda37f7 Tweak TCP-keepalive code so that an invalid setting doesn't cause us
to drop connections unceremoniously.  Also some other marginal cleanups:
don't query getsockopt() repeatedly if it fails, and avoid having the
apparent definition of struct Port depend on which system headers you
might have included or not.  Oliver Jowett and Tom Lane.
2005-09-12 02:26:33 +00:00
Neil Conway f7a5f90c46 Many small improvements and copy edits to the release notes. Use "—"
rather than "-" for the "dash" character. Correct SGML markup. Make
references to the names of contributors more consistent. Rewrite a bit
of prose, and make some other similar cleanups.
2005-09-11 23:40:33 +00:00
Tom Lane c7d1a8d428 Fix some corner-case bugs in _sendSQLLine's parsing of SQL commands
> found in a pg_dump archive.  It had problems with dollar-quote tags
broken across bufferload boundaries (this may explain bug report from
Rod Taylor), also with dollar-quote literals of the form $a$a$...,
and was also confused about the rules for backslash in double quoted
identifiers (ie, they're not special).  Also put in placeholder support
for E'...' literals --- this will need more work later.
2005-09-11 04:10:25 +00:00
Tom Lane e1a7d1b9f3 Avoid changing stdin/stdout to binary mode on Windows unless that is
really the source or destination of the archive.  I think this will
resolve recent complaints that password prompting is broken in pg_restore
on Windows.  Note that password prompting and reading from stdin is an
unworkable combination on Windows ... but that was true anyway.
2005-09-11 00:36:14 +00:00
Bruce Momjian d1348895a7 Update URL for FAQ_MINGW. 2005-09-10 05:21:52 +00:00
Tom Lane 35979e6c35 Given its current definition that depends on time(NULL), timetz_zone
is certainly no longer immutable, but must indeed be marked volatile.
I wonder if it should use the value of now() (that is, transaction
start time) so that it could be marked stable.  But it's probably not
important enough to be worth changing the code for ... indeed, I'm not
even going to force an initdb for this catalog change, seeing that we
just did one a few hours ago.
2005-09-09 06:51:12 +00:00
Tom Lane f2ebd01ef0 timestamptz_izone should return the input, not NULL, when the input
is a non-finite timestamp, for consistency with related functions.
In other words: +infinity rotated to a different timezone is still
+infinity.
2005-09-09 06:46:14 +00:00
Tom Lane a239af02c3 Fix the various forms of AT TIME ZONE to accept either timezones found
in the zic database or zone names found in the date token table.  This
preserves the old ability to do AT TIME ZONE 'PST' along with the new
ability to do AT TIME ZONE 'PST8PDT'.  Per gripe from Bricklen Anderson.
Also, fix some inconsistencies in usage of TZ_STRLEN_MAX --- the old
code had the potential for one-byte buffer overruns, though given
alignment considerations it's unlikely there was any real risk.
2005-09-09 02:31:50 +00:00
Tom Lane 48123de717 Create the pg_pltemplate system catalog to hold template information
for procedural languages.  This replaces the hard-wired table I had
originally proposed as a stopgap solution.  For the moment, the initial
contents only include languages shipped with the core distribution.
2005-09-08 20:07:42 +00:00
Tom Lane c18cabe8ab Update regression tests for new USA timezone data. Mea culpa for not
realizing that the regression tests could be affected.
2005-09-08 16:49:04 +00:00
Tom Lane 69d48cefd1 Update timezone data files to release 2005m of the zic database.
Among other changes, this reflects the recently passed change in USA
daylight savings rules.
2005-09-07 21:39:25 +00:00
Tom Lane e0dedd0559 Implement a preliminary 'template' facility for procedural languages,
as per my recent proposal.  For now the template data is hard-wired in
proclang.c --- this should be replaced later by a new shared system
catalog, but we don't want to force initdb during 8.1 beta.  This change
lets us cleanly load existing dump files even if they contain outright
wrong information about a PL's support functions, such as a wrong path
to the shared library or a missing validator function.  Also, we can
revert the recent kluges to make pg_dump dump PL support functions that
are stored in pg_catalog.
While at it, I removed the code in pg_regress that replaced $libdir
with a hardcoded path for temporary installations.  This is no longer
needed given our support for relocatable installations.
2005-09-05 23:50:49 +00:00
Tom Lane e35e6b1c37 Back out prior patch and instead just suppress SubqueryScan elimination
when there are extra resjunk columns in the child node.  I found some
additional cases involving Append nodes that weren't handled by the
prior patch, and it's not clear how to fix them in the same way without
breaking inheritance cases.  So the prudent path seems to be to narrow
the scope of the optimization.
2005-09-05 18:59:38 +00:00
Tom Lane 2da2d34770 Clean up version comparison/display code, per gripe from Michael Fuhr. 2005-09-05 18:05:13 +00:00
Tom Lane 03728942c2 For non-projecting plan node types such as Limit, set_plan_references
has to recopy the input plan node's targetlist if it removes a
SubqueryScan node just below the non-projecting node.  For simplicity
I made it recopy always.  Per bug report from Allan Wang and Michael Fuhr.
2005-09-05 17:25:01 +00:00
Andrew Dunstan 2739e1d1c2 Add a note about CSV lines with trailing spaces.
Suggestion by Darcy Buskermolen, reworded by me.
2005-09-05 14:44:05 +00:00
Bruce Momjian 656fe39b84 Conditionally output the server version number in psql if it doesn't
exactly match the client version number, and warn about major version
mismatches.
2005-09-05 13:59:08 +00:00
Alvaro Herrera e8f35414ef Fix typo in Richard's last name. 2005-09-04 13:40:24 +00:00
Tom Lane a17dbec893 libpgport routines need nonstandard palloc to work on Windows.
Propagate hack that's in dirmod.c to copydir.c.
2005-09-03 15:55:00 +00:00
Bruce Momjian b72fe49b9c Add idea:
<   cmin/cmax pair and is stored in local memory.
>   cmin/cmax pair and is stored in local memory.  Another idea is to
>   store both cmin and cmax only in local memory.
2005-09-03 00:41:30 +00:00
Bruce Momjian 11b5c554c2 Add log display label for unnamed server-side portals. 2005-09-02 21:50:54 +00:00
Tom Lane 0802078556 Fix the spelling. 2005-09-02 21:25:30 +00:00
Bruce Momjian 264cd5f04a Update.
< 	  have its heap and index files truncated.  One issue is
< 	  that no other backend should be able to add to the table
< 	  at the same time, which is something that is currently
< 	  allowed.
> 	  removed or have its heap and index files truncated.  One
> 	  issue is that no other backend should be able to add to
> 	  the table at the same time, which is something that is
> 	  currently allowed.
2005-09-02 21:23:05 +00:00
Bruce Momjian ef6d5b4e25 Update:
> 	o Allow COPY on a newly-created table to skip WAL logging
450a452,456
> 	  On crash recovery, the table involved in the COPY would
> 	  have its heap and index files truncated.  One issue is
> 	  that no other backend should be able to add to the table
> 	  at the same time, which is something that is currently
> 	  allowed.
2005-09-02 21:10:59 +00:00
Bruce Momjian f8ec875c39 Update:
< 	o Allow COPY into an empty table to skip WAL logging
> 	o Allow COPY into an new table to skip WAL logging
2005-09-02 21:01:20 +00:00
Bruce Momjian 4506ec95cf Update listen_addresses description.
Darcy Buskermolen
2005-09-02 21:00:59 +00:00
Bruce Momjian 5bddded69c Add:
> * Use UTF8 encoding for NLS messages so all server encodings can
>   read them properly
<         o %Add support for Unicode
<
< 	  To fix this, the data needs to be converted to/from UTF16/UTF8
<           so the Win32 wcscoll() can be used, and perhaps other functions
< 	  like towupper().  However, UTF8 already works with normal
< 	  locales but provides no ordering or character set classes.
2005-09-02 20:11:34 +00:00
Bruce Momjian 3bea1a353f Update wording:
<   could only see committed rows from another transaction. However,
>   could only see rows from another completed transaction. However,
981c981
<   proper visibility of the row, for example, for cursors.
>   proper visibility of the row's cmin, for example, for cursors.
2005-09-02 19:51:37 +00:00
Bruce Momjian da08559e9b Add:
> 	o Allow COPY into an empty table to skip WAL logging
2005-09-02 19:39:15 +00:00
Tom Lane 35e9b1cc1e Clean up a couple of ad-hoc computations of the maximum number of tuples
on a page, as suggested by ITAGAKI Takahiro.  Also, change a few places
that were using some other estimates of max-items-per-page to consistently
use MaxOffsetNumber.  This is conservatively large --- we could have used
the new MaxHeapTuplesPerPage macro, or a similar one for index tuples ---
but those places are simply declaring a fixed-size buffer and assuming it
will work, rather than actively testing for overrun.  It seems safer to
size these buffers in a way that can't overflow even if the page is
corrupt.
2005-09-02 19:02:20 +00:00
Tom Lane 962a4bb69f In copy_file, use a palloc'd buffer instead of just a local char array;
a local array isn't guaranteed to have any particular alignment, and
so it could slow down the data transfer.
2005-09-02 18:55:32 +00:00
Bruce Momjian fad7e8edac Add text:
* Merge xmin/xmax/cmin/cmax back into three header fields

  Before subtransactions, there used to be only three fields needed to
  store these four values. This was possible because only the current
  transaction looks at the cmin/cmax values. If the current transaction
  created and expired the row the fields stored where xmin (same as
  xmax), cmin, cmax, and if the transaction was expiring a row from a
  another transaction, the fields stored were xmin (cmin was not
  needed), xmax, and cmax. Such a system worked because a transaction
  could only see committed rows from another transaction. However,
  subtransactions can see rows from outer transactions, and once the
  subtransaction completes, the outer transaction continues, requiring
  the storage of all four fields. With subtransactions, an outer
  transaction can create a row, a subtransaction expire it, and when the
  subtransaction completes, the outer transaction still has to have
  proper visibility of the row, for example, for cursors.

  One possible solution is to create a phantom cid which represents a
  cmin/cmax pair and is stored in local memory.
2005-09-02 15:22:44 +00:00
Tom Lane 6c0398a73f Add some notes about how pg_dump relates to the practices recommended
under 'Populating a Database'.
2005-09-02 03:19:53 +00:00
Tom Lane 9a412be5eb Update performance discussion for 8.1. Add a little more explanatory
material in the EXPLAIN section, update examples to match current reality,
show examples of bitmap indexscans as well as plain ones.
2005-09-02 00:57:57 +00:00
Bruce Momjian 55af2a4337 Duplicate:
< * Maintain a map of recently-expired rows
<
<   This allows vacuum to target specific pages for possible free space
<   without requiring a sequential scan.
<
Update entry:

>   One complexity is that index entries still have to be vacuumed, and
>   doing this without an index scan (by using the heap values to find the
>   index entry) might be slow and unreliable, especially for user-defined
>   index functions.
2005-09-02 00:49:57 +00:00
Tom Lane ce128c01a6 Correct comment about why contrib/xml2 isn't built automatically. 2005-09-01 22:02:44 +00:00
Tom Lane e32a2ec68e Update storage.sgml to reflect current reality. 2005-09-01 20:01:53 +00:00
Tom Lane a635ab46be Short-circuit AllocSetReset if nothing has been palloc'd in the memory
context since the previous AllocSetReset.  Original patch by Atsushi Ogawa,
editorialized on a little bit by Tom Lane.
2005-09-01 18:15:42 +00:00
Bruce Momjian 91a21b532d 8.0.3 is now the most recent version. 2005-09-01 16:18:51 +00:00