summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2008-11-10Make relhasrules and relhastriggers work like relhasindex, namely we letTom Lane
VACUUM reset them to false rather than trying to clean 'em up during DROP.
2008-11-09Replace pg_class.reltriggers with relhastriggers, which is just a boolean hintTom Lane
("there might be triggers") rather than an exact count. This is necessary catalog infrastructure for the upcoming patch to reduce the strength of locking needed for trigger addition/removal. Split out and committed separately for ease of reviewing/testing. In passing, also get rid of the unused pg_class columns relukeys, relfkeys, and relrefs, which haven't been maintained in many years and now have no chance of ever being maintained (because of wishing to avoid locking). Simon Riggs
2008-11-09Add a startup check that pg_xlog and pg_xlog/archive_status exist.Tom Lane
If the latter doesn't exist, automatically recreate it. (We don't do this for pg_xlog, though, per discussion.) Jonah Harris
2008-11-09Add a new GUC variable called "IntervalStyle" that decouples interval outputTom Lane
from DateStyle, and create a new interval style that produces output matching the SQL standard (at least for interval values that fall within the standard's restrictions). IntervalStyle is also used to resolve the conflict between the standard and traditional Postgres rules for interpreting negative interval input. Ron Mayer
2008-11-08Fix recently added code for SQL years-months interval syntax so thatTom Lane
it behaves correctly for a leading minus sign, zero year value, and nonzero month value. Per discussion with Ron Mayer.
2008-11-07Implement ALTER DATABASE SET TABLESPACE to move a whole database (or at leastTom Lane
as much of it as lives in its default tablespace) to a new tablespace. Guillaume Lelarge, with some help from Bernd Helmle and Tom Lane
2008-11-06Improve bulk-insert performance by keeping the current target buffer pinnedTom Lane
(but not locked, as that would risk deadlocks). Also, make it work in a small ring of buffers to avoid having bulk inserts trash the whole buffer arena. Robert Haas, after an idea of Simon Riggs'.
2008-11-06Improve psql's \dC command to take a pattern parameter. Casts are shownTom Lane
if their source or target types match the pattern (using the same definition of "match" as \dT does). Per recent discussion.
2008-11-06The logic in systable_beginscan to translate heap attribute numbers toHeikki Linnakangas
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-05This maneuver really requires a comment ...Tom Lane
2008-11-05change fix for suppress_redundant_updates_trigger() where relation has Oids, ↵Andrew Dunstan
to only apply if present Oid is invalid, per second thought from TGL
2008-11-05fix suppress_redundant_updates_trigger() where relation has Oids, per gripe ↵Andrew Dunstan
from KaiGai Kohei
2008-11-05A few additional test cases for array functionalityPeter Eisentraut
2008-11-05Rename several aliases for PLpgSQL_datum.dno to also be called dno.Tom Lane
Hopefully this will forestall future confusion about their roles. Jonah Harris
2008-11-04Revert unwanted patch, per Tom.Alvaro Herrera
2008-11-04Remove unused rfno from PLpgSQL_recfieldAlvaro Herrera
Jonah Harris
2008-11-04Fix bug introduced in recent patch to make plpython cope with OUT arguments:Tom Lane
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-04ADD array_ndims functionPeter Eisentraut
Author: Robert Haas <robertmhaas@gmail.com>
2008-11-04Fix compiler warning about uninitialized variablePeter Eisentraut
2008-11-04Disallow LOCK TABLE outside a transaction block (or function), since this caseTom Lane
almost certainly represents user error. Per a gripe from Sebastian Böhm and subsequent discussion.
2008-11-04Fix compiler warnings (including a seriously bogus elog call); minorTom Lane
code beautification.
2008-11-03Use bool for a boolean flag.Tom Lane
2008-11-03Allow uuid_in() to parse a wider variety of variant input formats for the UUIDPeter Eisentraut
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-03Dept of second thoughts: seems it'd be safer if pg_typeof is markedTom Lane
stable not immutable, since it depends on system catalog contents.
2008-11-03Clean up the messy semantics (not to mention inefficiency) of PageGetTempPageTom Lane
by splitting it into three functions with better-defined behaviors. Zdenek Kotala
2008-11-03suppress_redundant_updates_trigger function.Andrew Dunstan
2008-11-03Fix silly typo in previous commit.Alvaro Herrera
2008-11-03Fix TransactionIdSetStatusBit so that it doesn't try to change a transactionAlvaro Herrera
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-03Fix two error-recovery bugs in describeOneTableDetails(), and make the codeTom Lane
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-03Reduce the acceptable staleness of pgstat data for autovacuum, per theAlvaro Herrera
longstanding note in the source that this patch removes.
2008-11-03Add pg_typeof() function.Tom Lane
Brendan Jurd
2008-11-03Small shell syntax improvement.Bruce Momjian
2008-11-03Fix mistakes in comment headersAlvaro Herrera
2008-11-03Fix incorrect comment in SSL codeMagnus Hagander
2008-11-03Change the pgstat logic so that the stats collector writes the stats file onlyTom Lane
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-02Remove the last vestiges of the MAKE_PTR/MAKE_OFFSET mechanism. We haven'tTom Lane
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-02Remove all uses of the deprecated functions heap_formtuple, heap_modifytuple,Tom Lane
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-01Move from strcmp to strncmp to be more tolerant for changes to the parser.Michael Meskes
2008-11-01Use string component in index structure.Michael Meskes
2008-11-01Do not eat memory even in case of an out-of-memory error.Michael Meskes
2008-10-31Simplify ExecutorRun's API and save some trivial number of cycles by havingTom Lane
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-31Update FSM on WAL replay. This is a bit limited; the FSM is only updatedHeikki Linnakangas
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-31Allow SQL-language functions to return the output of an INSERT/UPDATE/DELETETom Lane
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-31Added missing ';'Michael Meskes
2008-10-31Unite ReadBufferWithFork, ReadBufferWithStrategy, and ZeroOrReadBufferHeikki Linnakangas
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-31Add test case for CREATE CAST.Heikki Linnakangas
2008-10-31Add support for user-defined I/O conversion casts.Heikki Linnakangas
2008-10-31Message improvementPeter Eisentraut
(also backported to 8.3)
2008-10-30Revert previous patch to put the shared memory segment on win32Magnus Hagander
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-30Update time zone data files to tzdata release 2008i (DST law changes inTom Lane
Argentina, Brazil, Mauritius, Syria).