Commit Graph

27536 Commits

Author SHA1 Message Date
Heikki Linnakangas 5ae29525d1 The logic in systable_beginscan to translate heap attribute numbers to
index column numbers needs to handle the case where you have more than
one scankey on the same index column. toast_fetch_datum_slice() needs it.
2008-11-06 13:07:08 +00:00
Tom Lane 53b4e469ca This maneuver really requires a comment ... 2008-11-05 20:17:18 +00:00
Andrew Dunstan 0db527c05b change fix for suppress_redundant_updates_trigger() where relation has Oids, to only apply if present Oid is invalid, per second thought from TGL 2008-11-05 19:15:15 +00:00
Andrew Dunstan b65ebc7e8b fix suppress_redundant_updates_trigger() where relation has Oids, per gripe from KaiGai Kohei 2008-11-05 18:49:28 +00:00
Peter Eisentraut e2a277bd08 A few additional test cases for array functionality 2008-11-05 12:27:09 +00:00
Tom Lane e0dc7d026f Rename several aliases for PLpgSQL_datum.dno to also be called dno.
Hopefully this will forestall future confusion about their roles.

Jonah Harris
2008-11-05 00:07:54 +00:00
Bruce Momjian e33e0c43fe Document that SSL is only possible on tcp/ip connections in the
postgresql.conf 'ssl' section.
2008-11-04 22:40:40 +00:00
Bruce Momjian c227ccc2f7 Document that 'sslmode' is ignored for Unix domain socket communication;
backpatch to 8.3.X.
2008-11-04 22:36:07 +00:00
Alvaro Herrera b6cb3d0c06 Revert unwanted patch, per Tom. 2008-11-04 21:00:15 +00:00
Alvaro Herrera 45fffcf778 Remove unused rfno from PLpgSQL_recfield
Jonah Harris
2008-11-04 20:58:46 +00:00
Tom Lane 70b6e99e40 Fix bug introduced in recent patch to make plpython cope with OUT arguments:
the proc->argnames array has to be initialized to zero immediately on creation,
since the error recovery path will try to free its elements.
2008-11-04 15:16:48 +00:00
Peter Eisentraut 725ba51f2c Experimental new support for building man pages via docbook2x, an XSL-based
tool chain.  With some polishing, this might help us get rid of our ancient
and crufty man page build mechanism.
2008-11-04 14:58:22 +00:00
Peter Eisentraut 254aecb704 ADD array_ndims function
Author: Robert Haas <robertmhaas@gmail.com>
2008-11-04 14:49:12 +00:00
Peter Eisentraut 9beb9e761b Fix compiler warning about uninitialized variable 2008-11-04 11:04:06 +00:00
Bruce Momjian 4253f016c9 Add missing colon to docs. 2008-11-04 04:18:50 +00:00
Bruce Momjian ac3797a913 Remove tabs from SGML file. 2008-11-04 00:59:45 +00:00
Tom Lane 31b15fe8dc Disallow LOCK TABLE outside a transaction block (or function), since this case
almost certainly represents user error.  Per a gripe from Sebastian Böhm
and subsequent discussion.
2008-11-04 00:57:19 +00:00
Tom Lane 99e0996284 Fix compiler warnings (including a seriously bogus elog call); minor
code beautification.
2008-11-04 00:29:39 +00:00
Tom Lane 1a2b41f498 Use bool for a boolean flag. 2008-11-03 23:49:07 +00:00
Peter Eisentraut 84aa797292 Allow uuid_in() to parse a wider variety of variant input formats for the UUID
data type.  This patch takes the approach of allowing an optional hyphen after
each group of four hex digits.

Author: Robert Haas <robertmhaas@gmail.com>
2008-11-03 22:14:40 +00:00
Tom Lane 48cbe59150 Dept of second thoughts: seems it'd be safer if pg_typeof is marked
stable not immutable, since it depends on system catalog contents.
2008-11-03 21:09:17 +00:00
Tom Lane b4eae023bb Clean up the messy semantics (not to mention inefficiency) of PageGetTempPage
by splitting it into three functions with better-defined behaviors.

Zdenek Kotala
2008-11-03 20:47:49 +00:00
Andrew Dunstan f0dae70431 suppress_redundant_updates_trigger function. 2008-11-03 20:17:21 +00:00
Alvaro Herrera 4ff0468371 Fix silly typo in previous commit. 2008-11-03 19:26:07 +00:00
Alvaro Herrera d698bf83d1 Fix TransactionIdSetStatusBit so that it doesn't try to change a transaction
from COMMITTED to SUBCOMMITTED during recovery.  This wasn't previously
possible, but it is now due to the recent changes on clog commit protocol for
subtransactions.

Simon Riggs
2008-11-03 19:24:03 +00:00
Tom Lane 13fc2e4df8 Fix two error-recovery bugs in describeOneTableDetails(), and make the code
to dump sequence values cope with sequences outside the search path and/or
having names that need quoting.  No back-patch needed because these are new
problems in 8.4.

Kris Jurka  (also a little bit of code beautification by tgl)
2008-11-03 19:08:56 +00:00
Alvaro Herrera 88dd4b0a0d Reduce the acceptable staleness of pgstat data for autovacuum, per the
longstanding note in the source that this patch removes.
2008-11-03 19:03:41 +00:00
Tom Lane b8fab2411d Add pg_typeof() function.
Brendan Jurd
2008-11-03 17:51:13 +00:00
Bruce Momjian 06c22d7f51 Small shell syntax improvement. 2008-11-03 15:56:47 +00:00
Alvaro Herrera aa3288146a Update URL to Docbook DSSSL stylesheets, per Gabriele Bartolini. 2008-11-03 15:39:38 +00:00
Alvaro Herrera b107299c40 Fix mistakes in comment headers 2008-11-03 15:10:17 +00:00
Magnus Hagander 5e75a5dca9 Fix incorrect comment in SSL code 2008-11-03 14:18:57 +00:00
Tom Lane 3c2313f481 Change the pgstat logic so that the stats collector writes the stats file only
upon requests from backends, rather than on a fixed 500msec cycle.  (There's
still throttling logic to ensure it writes no more often than once per
500msec, though.)  This should result in a significant reduction in stats file
write traffic in typical scenarios where the stats are demanded only
infrequently.

This approach also means that the former difficulty with changing
stats_temp_directory on-the-fly has gone away, so remove the caution about
that as well as the thrashing we did to minimize the trouble window.

In passing, also fix pgstat_report_stat() so that we will send a stats
message if we have function call stats but not table stats to report;
this fixes a bug in the recent patch to support function-call stats.

Martin Pihlak
2008-11-03 01:17:08 +00:00
Tom Lane d7112cfa88 Remove the last vestiges of the MAKE_PTR/MAKE_OFFSET mechanism. We haven't
allowed different processes to have different addresses for the shmem segment
in quite a long time, but there were still a few places left that used the
old coding convention.  Clean them up to reduce confusion and improve the
compiler's ability to detect pointer type mismatches.

Kris Jurka
2008-11-02 21:24:52 +00:00
Tom Lane 902d1cb35f Remove all uses of the deprecated functions heap_formtuple, heap_modifytuple,
and heap_deformtuple in favor of the newer functions heap_form_tuple et al
(which do the same things but use bool control flags instead of arbitrary
char values).  Eliminate the former duplicate coding of these functions,
reducing the deprecated functions to mere wrappers around the newer ones.
We can't get rid of them entirely because add-on modules probably still
contain many instances of the old coding style.

Kris Jurka
2008-11-02 01:45:28 +00:00
Michael Meskes 492059daba Move from strcmp to strncmp to be more tolerant for changes to the parser. 2008-11-01 19:53:35 +00:00
Michael Meskes ef9ed9b6aa Use string component in index structure. 2008-11-01 12:42:14 +00:00
Michael Meskes e6c7f7c1ad Do not eat memory even in case of an out-of-memory error. 2008-11-01 08:55:21 +00:00
Tom Lane df5a99612d Simplify ExecutorRun's API and save some trivial number of cycles by having
it just return void instead of sometimes returning a TupleTableSlot.  SQL
functions don't need that anymore, and noplace else does either.  Eliminating
the return value also means one less hassle for the ExecutorRun hook functions
that will be supported beginning in 8.4.
2008-10-31 21:07:55 +00:00
Heikki Linnakangas e9816533e3 Update FSM on WAL replay. This is a bit limited; the FSM is only updated
on non-full-page-image WAL records, and quite arbitrarily, only if there's
less than 20% free space on the page after the insert/update (not on HOT
updates, though). The 20% cutoff should avoid most of the overhead, when
replaying a bulk insertion, for example, while ensuring that pages that
are full are marked as full in the FSM.

This is mostly to avoid the nasty worst case scenario, where you replay
from a PITR archive, and the FSM information in the base backup is really
out of date. If there was a lot of pages that the outdated FSM claims to
have free space, but don't actually have any, the first unlucky inserter
after the recovery would traverse through all those pages, just to find
out that they're full. We didn't have this problem with the old FSM
implementation, because we simply threw the FSM information away on a
non-clean shutdown.
2008-10-31 19:40:27 +00:00
Tom Lane 9b46abb7c4 Allow SQL-language functions to return the output of an INSERT/UPDATE/DELETE
RETURNING clause, not just a SELECT as formerly.

A side effect of this patch is that when a set-returning SQL function is used
in a FROM clause, performance is improved because the output is collected into
a tuplestore within the function, rather than using the less efficient
value-per-call mechanism.
2008-10-31 19:37:56 +00:00
Michael Meskes cd97f98844 Added missing ';' 2008-10-31 16:36:13 +00:00
Heikki Linnakangas 19c8dc839b Unite ReadBufferWithFork, ReadBufferWithStrategy, and ZeroOrReadBuffer
functions into one ReadBufferExtended function, that takes the strategy
and mode as argument. There's three modes, RBM_NORMAL which is the default
used by plain ReadBuffer(), RBM_ZERO, which replaces ZeroOrReadBuffer, and
a new mode RBM_ZERO_ON_ERROR, which allows callers to read corrupt pages
without throwing an error. The FSM needs the new mode to recover from
corrupt pages, which could happend if we crash after extending an FSM file,
and the new page is "torn".

Add fork number to some error messages in bufmgr.c, that still lacked it.
2008-10-31 15:05:00 +00:00
Peter Eisentraut 29077051de The conversion rule from postgres.sgml to postgres.xml didn't work with
BSD sed.  So write it in Perl, which is more portable and a bit faster, too.
We already use Perl for standard documentation builds, so this imposes no
additional requirement.
2008-10-31 14:35:30 +00:00
Heikki Linnakangas a1d2e16550 Add test case for CREATE CAST. 2008-10-31 09:17:17 +00:00
Heikki Linnakangas 092bc49653 Add support for user-defined I/O conversion casts. 2008-10-31 08:39:22 +00:00
Peter Eisentraut 34e37d58ed Message improvement
(also backported to 8.3)
2008-10-31 07:15:11 +00:00
Tom Lane d1e384884c Update back-branch release notes. 2008-10-30 22:22:24 +00:00
Magnus Hagander 9cc0222680 Revert previous patch to put the shared memory segment on win32
in the Global\ namespace, because it caused permission errors on
a lot of platforms.

We need to come up with something better for 8.4, but for now
revert to the pre-8.3.4 behaviour.
2008-10-30 17:04:09 +00:00
Tom Lane c8a18a282b Update time zone data files to tzdata release 2008i (DST law changes in
Argentina, Brazil, Mauritius, Syria).
2008-10-30 13:16:52 +00:00