Commit Graph

31174 Commits

Author SHA1 Message Date
Robert Haas 0af695fd43 Log restartpoints in the same fashion as checkpoints.
Prior to 9.0, restartpoints never created, deleted, or recycled WAL
files, but now they can.  This code makes log_checkpoints treat
checkpoints and restartpoints symmetrically.  It also adjusts up
the documentation of the parameter to mention restartpoints.

Fujii Masao.  Docs by me, as suggested by Itagaki Takahiro.
2011-02-02 21:08:53 -05:00
Tom Lane cd7d748d51 Repair multiple breakage in Windows-specific code for appending '.exe'. 2011-02-02 20:26:43 -05:00
Tom Lane 907855ac75 Clean up missed change to plpython expected files. 2011-02-02 20:16:27 -05:00
Bruce Momjian 03c25dd900 Mark all GUC variables with <varname> markup, rather than <literal>. 2011-02-02 18:06:38 -05:00
Bruce Momjian 2b6e2dee78 Fix wrong verb in pg_upgrade text message, per Haas. 2011-02-02 16:53:12 -05:00
Bruce Momjian 9d220fc17e Simplify pg_upgrade checking of executable permissions. 2011-02-02 15:40:52 -05:00
Peter Eisentraut 0c5933d010 Wrap PL/Python SPI calls into subtransactions
This allows the language-specific try/catch construct to catch and
handle exceptions arising from SPI calls, matching the behavior of
other PLs.

As an additional bonus you no longer get all the ugly "unrecognized
error in PLy_spi_execute_query" errors.

Jan Urbański, reviewed by Steve Singer
2011-02-02 22:06:10 +02:00
Andrew Dunstan c73fe72e27 Add comment on why we're passing a useless 'false' to the plperl function compiler.
It's for compatibility with modules like PostgreSQL::PLPerl::NYTProf.
2011-02-02 12:45:42 -05:00
Bruce Momjian 5a6ba62be5 Document that CREATE VIEW that uses "*" for the column list will not
auto-add columns later added to the base table.
2011-02-01 17:17:34 -05:00
Bruce Momjian d56d246e70 Properly capitalize hyphenated words in documentation titles. 2011-02-01 17:00:26 -05:00
Bruce Momjian 7106f74e2a Clarify documentation to state that "zero_damaged_pages" does not force
data to disk, so the table or index should be recreated before the
parameter is turned off again.
2011-02-01 16:44:22 -05:00
Peter Eisentraut 15f55cc38a Add validator to PL/Python
Jan Urbański, reviewed by Hitoshi Harada
2011-02-01 22:55:04 +02:00
Bruce Momjian 6c6e6f7fd3 Document that effective cache size does not assume data remains in the
cache between queries.
2011-02-01 15:23:35 -05:00
Bruce Momjian e8cdc238cf Document that Slony can do upgrades easier _because_ it supports
replication between different Postgres major versions.
2011-02-01 15:21:22 -05:00
Bruce Momjian 902aae5ec5 Clarify pg_upgrade install instructions, per suggestion from Robert Haas. 2011-02-01 13:57:43 -05:00
Bruce Momjian d2888d1ca3 Add missing period "." in pg_upgrade documentation. 2011-02-01 13:53:04 -05:00
Bruce Momjian 2bb87a61a8 Add pg_upgrade comment for why we can't use template1 inheritance for
the support functions.
2011-02-01 12:23:08 -05:00
Andrew Dunstan ef19dc6d39 Set up PLPerl trigger data using C code instead of Perl code.
This is an efficiency change, and means we now no longer have to run
"out $_TD; local $_TD = shift;", which was especially pointless in the case of
non-trigger functions where the passed value was always undef anyway.

A tiny open issue is whether we should get rid of the $prolog argument of
mkfunc, and the corresponding pushed value, which is now just a constant "false".

Tim Bunce, reviewed by Alex Hunsaker.
2011-02-01 09:43:25 -05:00
Magnus Hagander 5273f21434 Undefine setlocale() macro on Win32
New versions of libintl redefine setlocale() to a macro
which causes problems when the backend and libintl are
linked against different versions of the runtime, which
is often the case in msvc builds.

Hiroshi Inoue, slightly updated comment by me
2011-02-01 13:19:18 +01:00
Simon Riggs 56b21b7ae3 Re-classify ERRCODE_DATABASE_DROPPED to 57P04 2011-02-01 08:44:01 +00:00
Itagaki Takahiro 0c707aa458 Fix wrong error reports in 'number of array dimensions exceeds the
maximum allowed' messages, that have reported one-less dimensions.

Alexey Klyukin
2011-02-01 15:21:32 +09:00
Itagaki Takahiro 03282bfa89 Add a link from client_encoding parameter to the list of character sets
in documentation.

Thom Brown
2011-02-01 14:26:17 +09:00
Bruce Momjian 00dd340210 Improve docs for pg_authid encryption description with better markup and
a mention of unencrypted passwords.
2011-01-31 22:53:58 -05:00
Bruce Momjian 2dbed56c5a In pg_authid.rolpassword docs, make "md5" appear as a literal. 2011-01-31 22:29:10 -05:00
Tom Lane 6e2f3ae884 Support LIKE and ILIKE index searches via contrib/pg_trgm indexes.
Unlike Btree-based LIKE optimization, this works for non-left-anchored
search patterns.  The effectiveness of the search depends on how many
trigrams can be extracted from the pattern.  (The worst case, with no
trigrams, degrades to a full-table scan, so this isn't a panacea.  But
it can be very useful.)

Alexander Korotkov, reviewed by Jan Urbanski
2011-01-31 21:34:49 -05:00
Bruce Momjian 6238473adb Fix pg_upgrade to create pg_authid restore functions in the 'postgres'
database, not in the os-user database, per report from Magnus.
2011-01-31 20:16:15 -05:00
Simon Riggs 9e95c9ad55 Create new errcode for recovery conflict caused by db drop on master.
Previously reported as ERRCODE_ADMIN_SHUTDOWN, this case is now
reported as ERRCODE_T_R_DATABASE_DROPPED. No message text change.
Unlikely to happen on most servers, so low impact change to allow
session poolers to correctly handle this situation.

Tatsuo Ishii, edits by me, review by Robert Haas
2011-02-01 00:20:53 +00:00
Heikki Linnakangas 44df84df72 Remove spurious word, spotted by Thom Brown. 2011-01-31 22:52:27 +02:00
Bruce Momjian 49450f01ec Update pg_upgrade docs to mention its use in a less risk-warning way,
and update the pg_upgrade docs to mention its reliance on no changes to
the storage format (the later based on Robert Haas's patch).
2011-01-31 15:21:51 -05:00
Bruce Momjian ff20fbd6c2 Fix SGML markup for upgrade doc addition. 2011-01-31 14:58:49 -05:00
Simon Riggs 8585ad3625 Fix error code for canceling statement due to conflict with recovery.
All retryable conflict errors now have an error code that indicates that
a retry is possible, correcting my incomplete fix of 2010/05/12

Tatsuo Ishii and Simon Riggs, input from Robert Haas and Florian Pflug
2011-01-31 19:20:23 +00:00
Andrew Dunstan 51be78b09a Update docs on building for Windows to accomodate current reality.
Document how to build 64 bit Windows binaries using the MinGW64 tool set.
Remove recommendation against using Mingw as a build platform.
Be more specific about when Cygwin is useful and when it's not,  in
particular note its usefulness for running psql, and
add a note about building on Cygwin in non-C locales.

Per recent discussions.
2011-01-31 13:40:45 -05:00
Bruce Momjian c5ba11f8fb Move upgrade instructions into its own section under "Server Setup and
Operation", merged from upgrade sections in "Installation from Source
Code" and "Backup and Restore".  This now gives a single place for all
upgrade information.
2011-01-31 12:32:03 -05:00
Heikki Linnakangas 32866837f0 Fix typo 2011-01-31 18:29:38 +02:00
Heikki Linnakangas 997b48ed96 Support multiple concurrent pg_basebackup backups.
With this patch, pg_basebackup doesn't write a backup_label file in the
data directory, so it doesn't interfere with a pg_start/stop_backup() based
backup anymore. backup_label is still included in the backup, but it is
injected directly into the tar stream.

Heikki Linnakangas, reviewed by Fujii Masao and Magnus Hagander.
2011-01-31 18:25:39 +02:00
Andrew Dunstan 48c9de8028 Fix typo 2011-01-30 20:34:05 -05:00
Andrew Dunstan 91812df4ed Enable building with the Mingw64 compiler.
This can be used to build 64 bit Windows binaries, not only on 64 bit
Windows but on supported cross-compiling hosts including 32 bit Windows,
Cygwin, Darwin and Linux.
2011-01-30 19:56:46 -05:00
Tom Lane 9688c4e6f1 Make reduce_outer_joins() smarter about semijoins.
reduce_outer_joins() mistakenly treated a semijoin like a left join for
purposes of deciding whether not-null constraints created by the join's
quals could be passed down into the join's left-hand side (possibly
resulting in outer-join simplification there).  Actually, semijoin works
like inner join for this purpose, ie, we do not need to see any rows that
can't possibly satisfy the quals.  Hence, two-line fix to treat semi and
inner joins alike.  Per observation by Andres Freund about a performance
gripe from Yazan Suleiman.

Back-patch to 8.4, since this oversight has been there since the current
handling of semijoins was implemented.
2011-01-30 17:04:31 -05:00
Magnus Hagander 507069de6d Add option to include WAL in base backup
When included, this makes the base backup a complete working
"clone" of the initial database, ready to have a postmaster
started against it without the need to set up any log archiving
or similar.

Magnus Hagander, reviewed by Fujii Masao and Heikki Linnakangas
2011-01-30 21:30:09 +01:00
Bruce Momjian 5d5678d7c3 Properly capitalize documentation headings; some only had initial-word
capitalization.
2011-01-29 13:01:48 -05:00
Tom Lane 6f489dca65 Make installation.sgml build standalone again.
We must not try to link to sections that aren't part of the standalone
"make INSTALL" build.  Corrects build failure introduced in commit
159e3d8629.
2011-01-29 12:51:44 -05:00
Magnus Hagander 4ea1a273fb Use GSSAPI library for SSPI auth, when native SSPI is not available
This allows non-Windows clients to connect to a Windows
server with SSPI authentication.

Christian Ullrich, largely modified by me
2011-01-29 17:06:55 +01:00
Robert Haas 7f242d880b Try to avoid running with a full fsync request queue.
When we need to insert a new entry and the queue is full, compact the
entire queue in the hopes of making room for the new entry.  Doing this
on every insertion might worsen contention on BgWriterCommLock, but
when the queue it's full, it's far better than allowing the backend to
perform its own fsync, per testing by Greg Smith as reported in
http://archives.postgresql.org/pgsql-hackers/2011-01/msg02665.php

Original idea from Greg Smith.  Patch by me.  Review by Chris Browne
and Greg Smith
2011-01-29 08:08:41 -05:00
Tom Lane b2826ad52d Copy-edit a paragraph in the contrib/seg documentation.
Although this improves the style, an ulterior motive is to keep the two
table links from breaking across lines in PDF output, per complaint from
Josh Kupershmidt.
2011-01-28 14:34:42 -05:00
Tom Lane 20a0f97273 Rephrase pg_conversion description to avoid splitting link across page.
The link to the CREATE CONVERSION manual page was split across a page
boundary in the PDF output, leading to "\pdfendlink ended up in different
nesting level than \pdfstartlink" error while building PDFs.

It wouldn't be worth changing text that's undergoing active editing to
avoid this, since other editing might result in moving the link away from
the page end anyway.  But this paragraph has been static for a long time,
so might as well fix it to prevent it from being an issue in future.
2011-01-27 18:42:12 -05:00
Tom Lane 4305462497 Update release notes.
Security: CVE-2010-4015
2011-01-27 17:47:10 -05:00
Tom Lane 7ccb6dc2d3 Prevent buffer overrun while parsing an integer in a "query_int" value.
contrib/intarray's gettoken() uses a fixed-size buffer to collect an
integer's digits, and did not guard against overrunning the buffer.
This is at least a backend crash risk, and in principle might allow
arbitrary code execution.  The code didn't check for overflow of the
integer value either, which while not presenting a crash risk was still
bad.

Thanks to Apple Inc's security team for reporting this issue and supplying
the fix.

Security: CVE-2010-4015
2011-01-27 17:42:39 -05:00
Tom Lane 0ac8c8df85 Don't include <asm/ia64regs.h> unnecessarily.
We only need that header when compiling with icc, since the gcc variant of
ia64_get_bsp() uses in-line assembly code.  Per report from Frank Brendel,
the header doesn't exist on all IA64 platforms; so don't include it unless
we need it.
2011-01-27 16:27:27 -05:00
Tom Lane 29d442199a Update release notes for releases 9.0.3, 8.4.7, 8.3.14, and 8.2.20. 2011-01-27 16:09:39 -05:00
Heikki Linnakangas 1e4baa5c96 Update psql's \copyright to match the text we have in the COPYRIGHT file. 2011-01-27 20:20:49 +02:00