aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
* Change Win32 dlerror message to:Bruce Momjian2004-12-02
| | | | return "dynamic loading error";
* Disallow the combination VACUUM FULL FREEZE for safety's sake, for theTom Lane2004-12-02
| | | | | | | | | reasons I outlined in pghackers a few days ago. Also, undo someone's overly optimistic decision to reduce tuple state checks from if (...) elog() to Asserts. If I trusted this code more, I might think it was a good idea to disable these checks in production installations. But I don't.
* Teach regex_fixed_prefix() the correct handling of advanced regexTom Lane2004-12-02
| | | | | | escapes --- they aren't simply quoted characters. Problem noted by Antti Salmela. Also fix problem with incorrect handling of multibyte characters when followed by a quantifier.
* Make some adjustments to reduce platform dependencies in plan selection.Tom Lane2004-12-02
| | | | | | | | | | In particular, there was a mathematical tie between the two possible nestloop-with-materialized-inner-scan plans for a join (ie, we computed the same cost with either input on the inside), resulting in a roundoff error driven choice, if the relations were both small enough to fit in sort_mem. Add a small cost factor to ensure we prefer materializing the smaller input. This changes several regression test plans, but with any luck we will now have more stability across platforms.
* Fix timestamptz_age() to do calculation in local timezone not GMT, per bug 1332.Tom Lane2004-12-01
|
* Change planner to use the current true disk file size as its estimate ofTom Lane2004-12-01
| | | | | | | | | | | | | | | | | a relation's number of blocks, rather than the possibly-obsolete value in pg_class.relpages. Scale the value in pg_class.reltuples correspondingly to arrive at a hopefully more accurate number of rows. When pg_class contains 0/0, estimate a tuple width from the column datatypes and divide that into current file size to estimate number of rows. This improved methodology allows us to jettison the ancient hacks that put bogus default values into pg_class when a table is first created. Also, per a suggestion from Simon, make VACUUM (but not VACUUM FULL or ANALYZE) adjust the value it puts into pg_class.reltuples to try to represent the mean tuple density instead of the minimal density that actually prevails just after VACUUM. These changes alter the plans selected for certain regression tests, so update the expected files accordingly. (I removed join_1.out because it's not clear if it still applies; we can add back any variant versions as they are shown to be needed.)
* Avoid scribbling on original parsetree during DECLARE CURSOR. ThisTom Lane2004-11-28
| | | | | | prevents problems when the DECLARE is in a portal and is executed repeatedly, as is possible in v3 protocol. Per analysis by Oliver Jowett, though I didn't use his patch exactly.
* Work around lack of NLS support in libpgport by making those componentsPeter Eisentraut2004-11-27
| | | | | | who use it scan the relevant source files for their own catalog. It creates a bit of duplicate work for translators, but it gets the job done for now.
* Update of conformance information to SQL:2003Peter Eisentraut2004-11-27
| | | | | | by Troels Arvin, Simon Riggs, Elein Mustain Make spelling of SQL standard names uniform.
* Install Tcl regex fixes to sync our regex engine with Tcl 8.4.8 (up fromTom Lane2004-11-24
| | | | | 8.4.1). This corrects some curious regex bugs, though not the greediness issue I was hoping to find a solution for :-(
* Our interface code for Spencer's regexp package was checking for regexpTom Lane2004-11-24
| | | | | | | error conditions during regexp compile, but not during regexp execution; any sort of "can't happen" errors would be treated as no-match instead of being reported as they should be. Noticed while trying to duplicate a reported Tcl bug.
* A client_encoding specification coming from the connection request hasTom Lane2004-11-24
| | | | | | | | | | to be processed by GUC before InitPostgres, because any required lookup of the encoding conversion function has to be done during InitializeClientEncoding. So, I broke this last week by moving GUC processing to after InitPostgres :-(. What we can do as a compromise is process non-SUSET variables during command line scanning (the same as before), and postpone the processing of only SUSET variables. None of the SUSET variables need to be set before InitPostgres.
* Assert that BufferIsPinned() in IncrBufferRefCount(), rather than usingNeil Conway2004-11-24
| | | | | a home-brewed combination of assertions that boiled down to the same thing.
* Fix rounding problem in dynahash.c's decision about when the targetTom Lane2004-11-21
| | | | | | | | fill factor has been exceeded. We usually run with ffactor == 1, but the way the test was coded, it wouldn't split a bucket until the actual fill factor reached 2.0, because of use of integer division. Change from > to >= so that it will split more aggressively when the table starts to get full.
* Reduce the default size of the PortalHashTable in order to save aTom Lane2004-11-21
| | | | | | few cycles during transaction exit. A typical session probably wouldn't have as many as half a dozen portals open at once, so the original value of 64 seems far larger than needed.
* Patch of 2004-03-30 corrected date_part(timestamp) for extractingTom Lane2004-11-20
| | | | | the year from a BC date, but failed to make the same fix in date_part(timestamptz).
* Avoid scanning the relcache during AtEOSubXact_RelationCache when thereTom Lane2004-11-20
| | | | | is nothing to do, which is most of the time. This is another simple improvement to cut subtransaction entry/exit overhead.
* Reduce the default size of the local lock hash table. There's usuallyTom Lane2004-11-20
| | | | | | | no need for it to be nearly as big as the global hash table, and since it's not in shared memory it can grow if it does need to be bigger. By reducing the size, we speed up hash_seq_search(), which saves a significant fraction of subtransaction entry/exit overhead.
* 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.