summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2010-02-19Translation updates for 9.0alpha4Peter Eisentraut
2010-02-18Volatile-ize all five places where we expect a PG_TRY block to restoreTom Lane
old memory context in plpython. Before only one of them was marked volatile, but per report from Zdenek Kotala, some compilers do the wrong thing here.
2010-02-18Provide some rather hokey ways for EXPLAIN to print FieldStore and assignmentTom Lane
ArrayRef expressions that are not in the immediate context of an INSERT or UPDATE targetlist. Such cases never arise in stored rules, so ruleutils.c hadn't tried to handle them. However, they do occur in the targetlists of plans derived from such statements, and now that EXPLAIN VERBOSE tries to print targetlists, we need some way to deal with the case. I chose to represent an assignment ArrayRef as "array[subscripts] := source", which is fairly reasonable and doesn't omit any information. However, FieldStore is problematic because the planner will fold multiple assignments to fields of the same composite column into one FieldStore, resulting in a structure that is hard to understand at all, let alone display comprehensibly. So in that case I punted and just made it print the source expression(s). Backpatch to 8.4 --- the lack of functionality exists in older releases, but doesn't seem to be important for lack of anything that would call it.
2010-02-18Fix ExecEvalArrayRef to pass down the old value of the array element or sliceTom Lane
being assigned to, in case the expression to be assigned is a FieldStore that would need to modify that value. The need for this was foreseen some time ago, but not implemented then because we did not have arrays of composites. Now we do, but the point evidently got overlooked in that patch. Net result is that updating a field of an array element doesn't work right, as illustrated if you try the new regression test on an unpatched backend. Noted while experimenting with EXPLAIN VERBOSE, which has also got some issues in this area. Backpatch to 8.3, where arrays of composites were introduced.
2010-02-18Fix pq_getbyte_if_available() function. It was confused on what itHeikki Linnakangas
returns if no data is immediately available. Patch by me with numerous fixes from Fujii Masao and Magnus Hagander.
2010-02-18date_recv should accept infinities.Itagaki Takahiro
Reported by James William Pye.
2010-02-18Force READY portals into FAILED state when a transaction or subtransactionTom Lane
is aborted, if they were created within the failed xact. This prevents ExecutorEnd from being run on them, which is a good idea because they may contain references to tables or other objects that no longer exist. In particular this is hazardous when auto_explain is active, but it's really rather surprising that nobody has seen an issue with this before. I'm back-patching this to 8.4, since that's the first version that contains auto_explain or an ExecutorEnd hook, but I wonder whether we shouldn't back-patch further.
2010-02-18Fix up pg_dump's treatment of large object ownership and ACLs. We now emitTom Lane
a separate archive entry for each BLOB, and use pg_dump's standard methods for dealing with its ownership, ACL if any, and comment if any. This means that switches like --no-owner and --no-privileges do what they're supposed to. Preliminary testing says that performance is still reasonable even with many blobs, though we'll have to see how that shakes out in the field. KaiGai Kohei, revised by me
2010-02-17Take care to reprocess an uncommitted notify message.Tom Lane
Oversight in my changes to cope with possible errors during message processing; spotted by Joachim Wieland.
2010-02-17Another typo fix.Magnus Hagander
Thom Brown
2010-02-17Use a fatal warning check with what looks like a more portable error ↵Andrew Dunstan
message. Error noticed by Tom and buildfarm member kite.
2010-02-17Stamp HEAD as 9.0devel, and update various places that were referring to 8.5Tom Lane
(hope I got 'em all). Per discussion, this release will be 9.0 not 8.5.
2010-02-17Support new syntax and improve handling of parentheses in psql tab-completion.Itagaki Takahiro
Newly supported syntax are: - ALTER {TABLE|INDEX|TABLESPACE} {SET|RESET} with options - ALTER TABLE ALTER COLUMN {SET|RESET} with options - ALTER TABLE ALTER COLUMN SET STORAGE - CREATE INDEX CONCURRENTLY - CREATE INDEX ON (without name) - CREATE INDEX ... USING with pg_am.amname instead of hard-corded names - CREATE TRIGGER with events - DROP AGGREGATE function with arguments
2010-02-17When updating ShmemVariableCache from a checkpoint record, be sure to setTom Lane
all the values derived from oldestXid, not just that field. Brain fade in one of my patches associated with flat file removal, exposed by a report from Fujii Masao. With this change, xidVacLimit should always be valid, so remove a couple of bits of complexity associated with the previous assumption that sometimes it wouldn't get set right away.
2010-02-17Prevent #option dump from crashing on FORI statement with null step. ↵Tom Lane
Reported by Pavel.
2010-02-17log_error_verbosity is now LOGGING_WHAT category.Tom Lane
2010-02-17Make NOTIFY_PAYLOAD_MAX_LENGTH depend explicitly on BLCKSZ andTom Lane
NAMEDATALEN, so this code doesn't go nuts with smaller than default BLCKSZ or larger than default NAMEDATALEN. The standard value is still exactly 8000.
2010-02-16Replace the pg_listener-based LISTEN/NOTIFY mechanism with an in-memory queue.Tom Lane
In addition, add support for a "payload" string to be passed along with each notify event. This implementation should be significantly more efficient than the old one, and is also more compatible with Hot Standby usage. There is not yet any facility for HS slaves to receive notifications generated on the master, although such a thing is possible in future. Joachim Wieland, reviewed by Jeff Davis; also hacked on by me.
2010-02-16Add query text to auto_explain output.Andrew Dunstan
Still to be done: fix docs and fix regression failures under auto_explain.
2010-02-16Clean up package namespace use and use of Safe in plperl.Andrew Dunstan
Prevent use of another buggy version of Safe.pm. Only register the exit handler if we have successfully created an interpreter. Change log level of perl warnings from NOTICE to WARNING. The infrastructure is there if in future we decide to allow DBAs to specify extra modules that will be allowed in trusted code. However, for now the relevant variables are declared as lexicals rather than as package variables, so that they are not (or should not be) accessible. Mostly code from Tim Bunce, reviewed by Alex Hunsaker, with some tweaks by me.
2010-02-16Move log_error_verbosity GUC setting to "What to log" section, andBruce Momjian
document the behavior of terse and verbose output options.
2010-02-16Honor to_char() "FM" specification in YYY, YY, and Y; it was alreadyBruce Momjian
honored by YYYY. Also document Oracle "toggle" FM behavior. Per report from Guy Rouillier
2010-02-16Prevent psql version banner from being printed by the \c command if theBruce Momjian
versions match, per report from Peter.
2010-02-16Have SELECT and CREATE TABLE AS queries return a row count. While thisBruce Momjian
is invisible in psql, other interfaces, like libpq, make this value visible. Boszormenyi Zoltan
2010-02-16Remove personal copyright now that file has been rewritten usingBruce Momjian
existing *.pl conversion script. Andreas 'ads' Scherbaum
2010-02-16Clarify documentation on the behavior of unnamed bind queries.Bruce Momjian
2010-02-16revert to showing buffer counts in explain (buffers)Greg Stark
2010-02-16Add emulation of non-blocking sockets to the win32 socket/signal layer,Magnus Hagander
and use this in pq_getbyte_if_available. It's only a limited implementation which swithes the whole emulation layer no non-blocking mode, but that's enough as long as non-blocking is only used during a short period of time, and only one socket is accessed during this time.
2010-02-16Do not check nan values for infinity. Some system are not able to handle this.Michael Meskes
By Zoltán Böszörményi
2010-02-15Move main error message text in plperl into errmsg from errdetail,Alvaro Herrera
and move the context information into errcontext instead of errmsg. This makes them better conform to our guidelines. Also remove a few errcode declarations that were providing the default value ERRCODE_INTERNAL_ERROR.
2010-02-15When sorting functions in pg_dump, break ties (same name) by number of argumentsPeter Eisentraut
2010-02-15Fix another stupid typo...Magnus Hagander
Jan Urbanski
2010-02-15Fix typo in commentAlvaro Herrera
2010-02-15Temporarily disable fsyncing the database directory in CREATE DATABASEGreg Stark
until we can work out portability issues the build farm uncovered. In passing avoid fsyncing subdirectories twice.
2010-02-15remove an unused variable 'dirfd'.Itagaki Takahiro
2010-02-15Add psql tab completion for DO blocks.Itagaki Takahiro
Also adjust documentation of DO. Patch from David Fetter and subsequent discussion.
2010-02-15Display explain buffers measurements in memory units rather than blocks. ↵Greg Stark
Also show "Total Buffer Usage" to hint that these are totals not averages per loop
2010-02-15Speed up CREATE DATABASE by deferring the fsyncs until after copyingGreg Stark
all the data and using posix_fadvise to nudge the OS into flushing it earlier. This also hopefully makes CREATE DATABASE avoid spamming the cache. Tests show a big speedup on Linux at least on some filesystems. Idea and patch from Andres Freund.
2010-02-14Wrap calls to SearchSysCache and related functions using macros.Robert Haas
The purpose of this change is to eliminate the need for every caller of SearchSysCache, SearchSysCacheCopy, SearchSysCacheExists, GetSysCacheOid, and SearchSysCacheList to know the maximum number of allowable keys for a syscache entry (currently 4). This will make it far easier to increase the maximum number of keys in a future release should we choose to do so, and it makes the code shorter, too. Design and review by Tom Lane.
2010-02-14Make CREATE DATABASE safe against losing whole files by fsyncing theGreg Stark
directory and not just the individual files. Back-patch to 8.1 -- before that we just called "cp -r" and never fsynced anything anyways.
2010-02-14Make the msvc build system ask python about details of version and installationMagnus Hagander
prefix, instead of assuming it will always be following the default layout. All information we need is not available on Windows, but the number of assumptions are at least fewer this way than before. Based on suggestions from James William Pye.
2010-02-13Improve C comment about why we return "0 0" for some tags.Bruce Momjian
2010-02-13Don't expose the inline definition of MemoryContextSwitchTo when FRONTEND isTom Lane
defined. Its reference to CurrentMemoryContext causes link failures on some platforms, evidently because the inline function gets compiled despite lack of use. Per buildfarm member warthog.
2010-02-13Improvements to ps message of startup process during Hot Standby.Simon Riggs
Message is reset earlier and potential bug avoided. Andres Freund
2010-02-13Fix relcache init file invalidation during Hot Standby for the caseSimon Riggs
where a database has a non-default tablespaceid. Pass thru MyDatabaseId and MyDatabaseTableSpace to allow file path to be re-created in standby and correct invalidation to take place in all cases. Update and rework xact_commit_desc() debug messages. Bug report from Tom by code inspection. Fix by me.
2010-02-13Support inlining various small performance-critical functions on non-GCCTom Lane
compilers, by applying a configure check to see if the compiler will accept an unreferenced "static inline foo ..." function without warnings. It is believed that such warnings are the only reason not to declare inlined functions in headers, if the compiler understands "inline" at all. Kurt Harriman
2010-02-13Re-enable max_standby_delay = -1 using deadlock detection on startupSimon Riggs
process. If startup waits on a buffer pin we send a request to all backends to cancel themselves if they are holding the buffer pin required and they are also waiting on a lock. If not, startup waits until max_standby_delay before cancelling any backend waiting for the requested buffer pin.
2010-02-13Introduce WAL records to log reuse of btree pages, allowing conflictSimon Riggs
resolution during Hot Standby. Page reuse interlock requested by Tom. Analysis and patch by me.
2010-02-12Tweak the order of processing of WITH clauses so that they are processedTom Lane
before we start analyzing the parent statement. This is to make it more clear that the WITH isn't affected by anything in the parent. I don't believe there's any actual bug here, because the stuff that was being done before WITH didn't affect subqueries; but it's certainly a potential for error (and apparently misled Marko into committing some real errors...).
2010-02-12Add regression test files inadvertantly omitted in plperl.on_plperl{u}_init ↵Andrew Dunstan
patch