aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
...
* Fix one more place where we were expecting lcons() to be nondestructiveTom Lane2004-11-20
| | | | | | | to the original List; per report from Sebastian BÎck. I think this is the last such bug --- I examined every lcons() call in the backend and the rest seem OK --- but it's nervous-making that we're still finding 'em so many months after the List rewrite went in.
* Fix unportable isdigit() call --- must cast arg to unsigned char.Tom Lane2004-11-20
|
* Move pgstat_report_tabstat() call so that stats are not reported to theTom Lane2004-11-20
| | | | | | collector until the transaction commits. Per recent discussion, this should avoid confusing autovacuum when an updating transaction runs for a long time.
* Improve error reporting for SSL connection failures. Remove redundantTom Lane2004-11-20
| | | | | free operations in client_cert_cb --- openssl will also attempt to free these structures, resulting in core dumps.
* Whoops, missed converting the other sleep() call to pg_usleep().Tom Lane2004-11-18
|
* Force pg_database updates out to disk immediately after ALTER DATABASE;Tom Lane2004-11-18
| | | | | | | | this is to avoid scenarios where incoming backends find no live copies of a database's row because the only live copy is in an as-yet-unwritten shared buffer, which they can't see. Also, use FlushRelationBuffers() for forcing out pg_database, instead of the much more expensive BufferSync(). There's no need to write out pages belonging to other relations.
* Fix off-by-one memory allocation, as reported by Rod Taylor. AlsoTom Lane2004-11-17
| | | | avoid repalloc'ing twice when once is sufficient.
* Use pg_usleep() not sleep(), per Andrew Dunstan.Tom Lane2004-11-17
|
* Minor adjustment of message style.Tom Lane2004-11-17
|
* Win32 build cleanups, from Andrew Dunstan.Neil Conway2004-11-17
|
* Remove debugging printf from #ifdef WIN32 section.Neil Conway2004-11-17
|
* Micro-optimization of markpos() and restrpos() in btree and hash indexes.Neil Conway2004-11-17
| | | | | | Rather than using ReadBuffer() to increment the reference count on an already-pinned buffer, we should use IncrBufferRefCount() as it is faster and does not require acquiring the BufMgrLock.
* Don't allow pg_start_backup() to be invoked if archive_command has notNeil Conway2004-11-17
| | | | been defined. Patch from Gavin Sherry, editorializing by Neil Conway.
* Fix Win32 problems with signals and sockets, by making the forkexec codeTom Lane2004-11-17
| | | | | | even uglier than it was already :-(. Also, on Windows only, use temporary shared memory segments instead of ordinary files to pass over critical variable values from postmaster to child processes. Magnus Hagander
* Prevent a backend crash when processing CREATE TABLE commands withNeil Conway2004-11-16
| | | | | | | | more than 65K columns, or when the created table has more than 65K columns due to adding inherited columns from parent relations. Fix a similar crash when processing SELECT queries with more than 65K target list entries. In all three cases we would eventually detect the error and elog, but the check was being made too late.
* Translation updatePeter Eisentraut2004-11-16
|
* Use dynamically-sized buffers in pgwin32_is_service().Tom Lane2004-11-16
| | | | Magnus Hagander
* Rethink plpgsql's way of handling SPI execution during an exception block.Tom Lane2004-11-16
| | | | | | | | | We don't really want to start a new SPI connection, just keep using the old one; otherwise we have memory management problems as illustrated by John Kennedy's bug report of today. This requires a bit of a hack to ensure the SPI stack state is properly restored, but then again what we were doing before was a hack too, strictly speaking. Add a regression test to cover this case.
* Remove GUC USERLIMIT variable category, making the affected variablesTom Lane2004-11-14
| | | | | | | plain SUSET instead. Also delay processing of options received in client connection request until after we know if the user is a superuser, so that SUSET values can be set that way by legitimate superusers. Per recent discussion.
* There is no need for ReadBuffer() call sites to check that the returnedNeil Conway2004-11-14
| | | | | | buffer is valid, as ReadBuffer() will elog on error. Most of the call sites of ReadBuffer() got this right, but this patch fixes those call sites that did not.
* > I think in addition the system global name "sharemem.1" should be made moreBruce Momjian2004-11-12
| | | | | | | > pg specific, like "PostgreSQL.1". I have not done this since a new compile > would not detect a running old beta. But now would be the time (or never). Zeugswetter Andreas
* Remember to close the file on failure (pretty much redundant, really,Tom Lane2004-11-12
| | | | since this path will lead to postmaster exit anyway...)
* Un-break custom_variable_classes kluge ... mea culpa.Tom Lane2004-11-11
|
* Remove obsolete comment from btbuild() and hashbuild(): we no longer useNeil Conway2004-11-11
| | | | a global variable to control building indexes.
* Allow planner to fold "stable" functions to constants when formingTom Lane2004-11-09
| | | | selectivity estimates, per recent discussion.
* Put in place some defenses against being fooled by accidental match ofTom Lane2004-11-09
| | | | | | | | | shared memory segment ID. If we can't access the existing shmem segment, it must not be relevant to our data directory. If we can access it, then attach to it and check for an actual match to the data directory. This should avoid some cases of failure-to-restart-after-boot without introducing any significant risk of failing to detect a still-running old backend.
* Translation updatesPeter Eisentraut2004-11-09
|
* Clarify some error messagesPeter Eisentraut2004-11-09
|
* Translation updatePeter Eisentraut2004-11-09
|
* Use a hopefully-more-reliable method of detecting default selectivityTom Lane2004-11-09
| | | | | | | | | | | estimates when combining the estimates for a range query. As pointed out by Miquel van Smoorenburg, the existing check for an impossible combined result would quite possibly fail to detect one default and one non-default input. It seems better to use the default range query estimate in such cases. To do so, add a check for an estimate of exactly DEFAULT_INEQ_SEL. This is a bit ugly because it introduces additional coupling between clauselist_selectivity and scalarltsel/scalargtsel, but it's not like there wasn't plenty already...
* Kris Jurka pointed out that the qualified_name production wasn'tTom Lane2004-11-08
| | | | | | | | | | working as intended --- for some reason, FROM a.b.c was getting parsed as if it were a function name and not a qualified name. I think there must be a bug in bison, because it should have complained that the grammar was ambiguous. Anyway, fix it along the same lines previously used for func_name vs columnref, and get rid of the right-recursion in attrs that seems to have confused bison.
* Fix unportable code in SockAddr_cidr_mask: you can't assume thatTom Lane2004-11-08
| | | | | shifting left by full word width gives zero. Per bug report from Tyson Thomson.
* Translation updatePeter Eisentraut2004-11-07
|
* When implementing a coercion to a domain type with a combinedTom Lane2004-11-06
| | | | | | type-and-length coercion function, make sure that the coercion function is told the correct typmod. Fixes Kris Jurka's example of a domain over bit(N).
* Now that we advertize only CIDR address in pg_hba.conf, removeBruce Momjian2004-11-06
| | | | duplicates sample entries from comments.
* pred_test() logic was being too narrow-minded about where it might findTom Lane2004-11-05
| | | | RestrictInfo nodes in the query expression. Per example from James Robinson.
* Create 'default_tablespace' GUC variable that supplies a TABLESPACETom Lane2004-11-05
| | | | | | | | | | clause implicitly whenever one is not given explicitly. Remove concept of a schema having an associated tablespace, and simplify the rules for selecting a default tablespace for a table or index. It's now just (a) explicit TABLESPACE clause; (b) default_tablespace if that's not an empty string; (c) database's default. This will allow pg_dump to use SET commands instead of tablespace clauses to determine object locations (but I didn't actually make it do so). All per recent discussions.
* Small message clarificationsPeter Eisentraut2004-11-05
|
* Translation updatePeter Eisentraut2004-11-05
|
* Minor documentation updates from Simon Riggs.Tom Lane2004-11-04
|
* Translation updatesPeter Eisentraut2004-11-02
|
* Add comment to postmaster.c that get_progname() will call exit if itBruce Momjian2004-11-02
| | | | can't strdup().
* timestamptz_trunc() should only recalculate the timezone when truncatingTom Lane2004-11-01
| | | | | | | | | to DAY precision or coarser; leave the timezone alone when precision is HOUR or less. This avoids surprises for inputs near a DST transition time, as per example from Matthew Gabeler-Lee. (The only reason we recalculate at all is so that outputs that are supposed to represent days will come out as local midnight, and that's not relevant for sub-day precision.)
* Invent pg_next_dst_boundary() and rewrite DetermineLocalTimeZone() toTom Lane2004-11-01
| | | | | | | | | | | | use it, as per my proposal of yesterday. This gives us a means of determining the zone offset to impute to an unlabeled timestamp that is both efficient and reliable, unlike all our previous tries involving mktime() and localtime(). The behavior for invalid or ambiguous times at a DST transition is fixed to be really and truly "assume standard time", fixing a bug that has come and gone repeatedly but was back again in 7.4. (There is some ongoing discussion about whether we should raise an error instead, but for the moment I'll make it do what it was previously intended to do.)
* Update comment to point to proper file.Bruce Momjian2004-11-01
|
* I found a corner case in which it is possible for RI_FKey_check's callTom Lane2004-10-30
| | | | | | | | | | | | | | of HeapTupleSatisfiesItself() to trigger a hint-bit update on the tuple: if the row was updated or deleted by a subtransaction of my own transaction that was later rolled back. This cannot occur in pre-8.0 of course, so the hint-bit patch applied a couple weeks ago is OK for existing releases. But for 8.0 it seems we had better fix things so that RI_FKey_check can pass the correct buffer number to HeapTupleSatisfiesItself. Accordingly, add fields to the TriggerData struct to carry the buffer ID(s) for the old and new tuple(s). There are other possible solutions but this one seems cleanest; it will allow other AFTER-trigger functions to safely do tqual.c calls if they want to. Put new fields at end of struct so that there is no API breakage.
* Change COMMIT back to the old behavior of emitting command tag COMMIT,Tom Lane2004-10-30
| | | | | not ROLLBACK, for the case of COMMIT outside a transaction block. Alvaro Herrera
* Rearrange order of pre-commit operations: must close cursors before doingTom Lane2004-10-29
| | | | ON COMMIT actions. Per bug report from Michael Guerin.
* Fix failure to think clearly about encoding conversion errors in COPY.Tom Lane2004-10-29
| | | | | | | | | We can't regurgitate the unconverted string as I first thought, because the elog.c mechanisms will assume the error message data is in the server encoding and attempt a reverse conversion. Eventually it might be worth providing a short-circuit path to support this, but for now the simplest solution is to abandon trying to report back the line contents after a conversion failure. Per bug report from Sil Lee, 27-Oct-2004.
* Add DEBUG1-level logging of checkpoint start and end. Also, reduce theTom Lane2004-10-29
| | | | | | 'recycled log files' and 'removed log files' messages from DEBUG1 to DEBUG2, replacing them with a count of files added/removed/recycled in the checkpoint end message, as per suggestion from Simon Riggs.