aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
* If presented db path has a trailing slash, remove it to avoid generatingTom Lane2002-03-04
| | | | | double slashes in generated filenames. This is not strictly necessary on standard Unixen, but I'm being a neatnik...
* Fix bug in extract/date_part for milliseconds/miscroseconds andTatsuo Ishii2002-03-04
| | | | | | | | | | | timestamp/timestamptz combo. Now extract/date_part returns seconds*1000 or 1000000 + fraction part as the manual stats. regression test are also fixed. See the thread in pgsql-hackers: Subject: Re: [HACKERS] timestamp_part() bug? Date: Sat, 02 Mar 2002 11:29:53 +0900
* Further work on elog cleanup: fix some bogosities in elog's logic aboutTom Lane2002-03-04
| | | | | | | when to send what to which, prevent recursion by introducing new COMMERROR elog level for client-communication problems, get rid of direct writes to stderr in backend/libpq files, prevent non-error elogs from going to client during the authentication cycle.
* Catcaches can now store negative entries as well as positive ones, toTom Lane2002-03-03
| | | | | | | | | | speed up repetitive failed searches; per pghackers discussion in late January. inval.c logic substantially simplified, since we can now treat inserts and deletes alike as far as inval events are concerned. Some repair work needed in heap_create_with_catalog, which turns out to have been doing CommandCounterIncrement at a point where the new relation has non-self-consistent catalog entries. With the new inval code, that resulted in assert failures during a relcache entry rebuild.
* Default server_min_messages is NOTICE.Bruce Momjian2002-03-03
|
* Some kibitzing about appropriate elog levels for sinval messages.Tom Lane2002-03-02
|
* Commit to match discussed elog() changes. Only update is that LOG isBruce Momjian2002-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | now just below FATAL in server_min_messages. Added more text to highlight ordering difference between it and client_min_messages. --------------------------------------------------------------------------- REALLYFATAL => PANIC STOP => PANIC New INFO level the prints to client by default New LOG level the prints to server log by default Cause VACUUM information to print only to the client NOTICE => INFO where purely information messages are sent DEBUG => LOG for purely server status messages DEBUG removed, kept as backward compatible DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added DebugLvl removed in favor of new DEBUG[1-5] symbols New server_min_messages GUC parameter with values: DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC New client_min_messages GUC parameter with values: DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC Server startup now logged with LOG instead of DEBUG Remove debug_level GUC parameter elog() numbers now start at 10 Add test to print error message if older elog() values are passed to elog() Bootstrap mode now has a -d that requires an argument, like postmaster
* Add code to allow profiling of backends on Linux: save and restore theTom Lane2002-03-02
| | | | | profiling timer setting across fork(). The correct way to build a profilable backend on Linux is now gmake PROFILE="-pg -DLINUX_PROFILE"
* Array slice extraction should produce a result array with index lowerTom Lane2002-03-02
| | | | | bounds of 1, not the lower bound subscripts of the original slice. Per bug report from Andre Holzner, 1-Feb-02.
* User and database-specific session defaults for run-time configurationPeter Eisentraut2002-03-01
| | | | variables. New commands ALTER DATABASE ... SET and ALTER USER ... SET.
* array_ref() should set isNull to false explicitly if it's not going toPeter Eisentraut2002-03-01
| | | | return NULL.
* Fix thinko: cost_mergejoin must pay attention to which side of theTom Lane2002-03-01
| | | | mergeclause is which when extracting selectivity info.
* Second thoughts dept: arrange to cache mergejoin scan selectivityTom Lane2002-03-01
| | | | in RestrictInfo nodes, instead of recomputing on every use.
* Teach planner about the idea that a mergejoin won't necessarily readTom Lane2002-03-01
| | | | | | both input streams to the end. If one variable's range is much less than the other, an indexscan-based merge can win by not scanning all of the other table. Per example from Reinhard Max.
* Tweak pg_exec_query_string so that we close down transaction commandTom Lane2002-02-27
| | | | | | | | | before reporting command-complete message for the final command of a query string. This way, any errors detected during finish_xact_command (such as RI violations) will appear to be part of the final command, rather than coming out after the command is reported complete. This avoids confusing PQendcopy and other not-overly-bright clients. Per Lee Harr's bug report of 25-Feb-02.
* Paranoia about data structure lifetime ...Tom Lane2002-02-27
|
* Clean up BeginCommand and related routines. BeginCommand and EndCommandTom Lane2002-02-27
| | | | | | | | | | | are now both invoked once per received SQL command (raw parsetree) from pg_exec_query_string. BeginCommand is actually just an empty routine at the moment --- all its former operations have been pushed into tuple receiver setup routines in printtup.c. This makes for a clean distinction between BeginCommand/EndCommand (once per command) and the tuple receiver setup/teardown routines (once per ExecutorRun call), whereas the old code was quite ad hoc. Along the way, clean up the calling conventions for ExecutorRun a little bit.
* Fix bug in COPY FROM when DELIMITER is not in ASCII range.Tatsuo Ishii2002-02-27
| | | | | See pgsql-bugs/pgsql-hackers discussion "COPY FROM is not 8bit clean" around 2002/02/26 for more details -- Tatsuo Ishii
* Restructure command-completion-report code so that there is just oneTom Lane2002-02-26
| | | | | | | report for each received SQL command, regardless of rewriting activity. Also ensure that this report comes from the 'original' command, not the last command generated by rewrite; this fixes 7.2 breakage for INSERT commands that have actions added by rules. Fernando Nasser and Tom Lane.
* Fix for PAM error message display:Bruce Momjian2002-02-25
| | | | | | | > and that the right fix is to make each of the subsequent calls be in > this same pattern, not to try to emulate their nonsensical style. Dominic J. Eidson
* Add a large number of time zones to the lookup table.Thomas G. Lockhart2002-02-25
| | | | Fix a few apparently-wrong TZ vs DTZ declarations.
* This patch will allow arbitrary levels of analyze / rewritingBruce Momjian2002-02-25
| | | | | | | | | | | | | | | | | | by making the static variables extra_before and extra_after automatic so we can use recursion. It gets much easier to generate extra commands now, and one can rest assured that the extra commands will be properly analyzed/rewritten. Without this patch, if a command produced by transformation tries to use these static lists their first contents would be lost with unpredictable results. I know I could fix this by just using nconc() instead of assignments, but the resulting order of the commands would not be exactly what one could expect. -- Fernando Nasser
* I've attached a simple patch which should improve the performance ofBruce Momjian2002-02-25
| | | | | | | | | | | | | | hashname() and reduce the penalty incured when NAMEDATALEN is increased. I posted this to -hackers a couple days ago, and there haven't been any major complaints. It passes the regression tests. See -hackers for more discussion, as well as the suggestion from Tom Lane on which this patch is based. Unless anyone sees any problems, please apply for 7.3. Cheers, Neil Conway
* Re-add equals documentation with CREATE DATABASE.Bruce Momjian2002-02-25
|
* Remove documentation of equals in CREATE DATABASE. Mention removal ofBruce Momjian2002-02-25
| | | | equals hack for the future.
* Add OWNER option to CREATE DATABASE, so superusers can create databasesTom Lane2002-02-24
| | | | | on behalf of unprivileged users. Also, make '=' optional in CREATE DATABASE syntax. From Gavin Sherry, with kibitzing and docs by Tom Lane.
* pgindent copy.c. Patch wasn't in proper format.Bruce Momjian2002-02-24
|
* Free files on dir open failure in COPY.Bruce Momjian2002-02-24
|
* Add fstat / S_ISDIR checks to make sure we're not trying to use aBruce Momjian2002-02-23
| | | | | | directory for COPY TO/FROM. Brent Verner
* Guard against createdb --location=PGDATA foo; without this, the codeTom Lane2002-02-23
| | | | | tries to create a symlink pointing at itself. Per trouble report from Kenneth McDowell.
* Heimdal support (Kerberos V implementation from KTH)Peter Eisentraut2002-02-23
|
* Save source of GUC settings, allowing different sources to be processed inPeter Eisentraut2002-02-23
| | | | any order without affecting results.
* Make factorial(0) return 1, as per spec.Bruce Momjian2002-02-23
|
* Avoid failures in cash_out and cash_words for INT_MIN.Tom Lane2002-02-19
| | | | Also, 'fourty' -> 'forty'.
* Add casts to suppress gcc warnings on Solaris (where apparently pid_tTom Lane2002-02-19
| | | | is different from int).
* A bunch of changes aimed at reducing backend startup time...Tom Lane2002-02-19
| | | | | | | | | | | | | | | | | | | | | | | | | | Improve 'pg_internal.init' relcache entry preload mechanism so that it is safe to use for all system catalogs, and arrange to preload a realistic set of system-catalog entries instead of only the three nailed-in-cache indexes that were formerly loaded this way. Fix mechanism for deleting out-of-date pg_internal.init files: this must be synchronized with transaction commit, not just done at random times within transactions. Drive it off relcache invalidation mechanism so that no special-case tests are needed. Cache additional information in relcache entries for indexes (their pg_index tuples and index-operator OIDs) to eliminate repeated lookups. Also cache index opclass info at the per-opclass level to avoid repeated lookups during relcache load. Generalize 'systable scan' utilities originally developed by Hiroshi, move them into genam.c, use in a number of places where there was formerly ugly code for choosing either heap or index scan. In particular this allows simplification of the logic that prevents infinite recursion between syscache and relcache during startup: we can easily switch to heapscans in relcache.c when and where needed to avoid recursion, so IndexScanOK becomes simpler and does not need any expensive initialization. Eliminate useless opening of a heapscan data structure while doing an indexscan (this saves an mdnblocks call and thus at least one kernel call).
* Remove some unnecessary pqsignal() calls to shave a few cycles offTom Lane2002-02-19
| | | | backend startup.
* Arrange to call localtime() during postmaster startup. On most Unixen,Tom Lane2002-02-19
| | | | | | the first call of localtime() in a process will read /usr/lib/tztab or local equivalent. Better to do this once in the postmaster and inherit the data by fork() than to have to do it during every backend start.
* Avoid calling pq_flush just after sending AUTH_REQ_OK; this saves oneTom Lane2002-02-19
| | | | send() and probable process context swap during backend startup.
* Privileges on functions and procedural languagesPeter Eisentraut2002-02-18
|
* Replace number-of-distinct-values estimator equation, per recentTom Lane2002-02-18
| | | | pghackers discussion.
* Remove MAX/MIN() macros, use c.h Max/Min() instead.Bruce Momjian2002-02-18
|
* Disable LIMIT #,# syntax, as agreed to months ago. Print message sayingBruce Momjian2002-02-18
| | | | to use separate LIMIT/OFFSET clauses.
* Reorder postgresql.conf WAL section to be clearer.Bruce Momjian2002-02-18
|
* Don't mention TIOGA in Makefile and move strdup.c rule into properBruce Momjian2002-02-18
| | | | 'ifdef' in Makefile.
* Add better error text:Bruce Momjian2002-02-18
| | | | | elog(LOG, "XLogWrite: new log file created - " "consider increasing 'wal_files' in postgresql.conf.");
* Ensure that a cursor is scanned under the same scanCommandId it wasTom Lane2002-02-14
| | | | | | originally created with, so that the set of visible tuples does not change as a result of other activity. This essentially makes PG cursors INSENSITIVE per the SQL92 definition. See bug report of 13-Feb-02.
* Use RTLD_NOW, not RTLD_LAZY, as binding mode for dlopen() on all platforms.Tom Lane2002-02-12
| | | | | | | This restores the Linux behavior to what it was in PG 7.0 and 7.1, and causes other platforms to agree. (Other well-tested platforms like HPUX were doing it this way already.) Per pghackers discussion over the past month or so.
* Modify COPY TO to emit carriage returns and newlines as backslash escapesTom Lane2002-02-12
| | | | | | | | (backslash-r, backslash-n) for protection against newline-conversion munging. In future we will also tweak COPY FROM, but this part of the change should be backwards-compatible. Per pghackers discussion. Also, update COPY reference page to describe the backslash conversions more completely and accurately.
* Tweak GiST code to work correctly on machines where 8-byte alignmentTom Lane2002-02-11
| | | | | | of pointers is required. Patch from Teodor Sigaev per pghackers discussion. It's an ugly kluge but avoids forcing initdb; we'll put a better fix into 7.3 or later.