aboutsummaryrefslogtreecommitdiff
path: root/src/backend
Commit message (Collapse)AuthorAge
...
* Adjust to_char/from_char code to use boolean "is_to_char" rather thanBruce Momjian2005-08-17
| | | | integer with flags.
* Fix declaration of dumpacl, per Alvaro.Tom Lane2005-08-17
|
* Fix FSM warning to mention increasing max_fsm_pages. Was incorrectlyBruce Momjian2005-08-17
| | | | max_fsm_relations.
* Reject operator names >= NAMEDATALEN characters. These will not workTom Lane2005-08-16
| | | | | anyway, and in assert-enabled builds you are likely to get an assertion failure. Backpatch as far as 7.3; 7.2 seems not to have the problem.
* Rename pg_stat_file columns to be more consistent. Split apart changeBruce Momjian2005-08-15
| | | | and creation columns to behave for Unix or Win32.
* array_in() and array_recv() need to be more paranoid about validatingTom Lane2005-08-15
| | | | | | | | | their OID parameter. It was possible to crash the backend with select array_in('{123}',0,0); because that would bypass the needed step of initializing the workspace. These seem to be the only two places with a problem, though (record_in and record_recv don't have the issue, and the other array functions aren't depending on user-supplied input). Back-patch as far as 7.4; 7.3 does not have the bug.
* Allow the pgstat views to show toast tables as well as regular tablesTom Lane2005-08-15
| | | | | | | | (the stats system has always collected this info, but the views were filtering it out). Modify autovacuum so that over-threshold activity in a toast table can trigger a VACUUM of the parent table, even if the parent didn't appear to need vacuuming itself. Per discussion a month or so back about "short, wide tables".
* Clean up some stray remaining references to pg_shadow, pg_user, pg_group.Tom Lane2005-08-15
|
* Change standard_compliant_strings to standard_conforming_strings.Peter Eisentraut2005-08-14
|
* Tweak catalog cache management algorithms to reduce cost ofTom Lane2005-08-13
| | | | | | | | | | | | | | | | | SearchCatCacheList and ReleaseCatCacheList. Previously, we incremented and decremented the refcounts of list member tuples along with the list itself, but that's unnecessary, and very expensive when the list is big. It's cheaper to change only the list refcount. When we are considering deleting a cache entry, we have to check not only its own refcount but its parent list's ... but it's easy to arrange the code so that this check is not made in any commonly-used paths, so the cost is really nil. The bigger gain though is to refrain from DLMoveToFront'ing each individual member tuple each time the list is referenced. To keep some semblance of fair space management, lists are just marked as used or not since the last cache cleanout search, and we do a MoveToFront pass only when about to run a cleanout. In combination, these changes reduce the costs of SearchCatCacheList and ReleaseCatCacheList from about 4.5% of pgbench runtime to under 1%, according to my gprof results.
* Make pg_stat_file() use OUT parameters so that the user doesn't have toTom Lane2005-08-13
| | | | | | | remember the output parameter set for himself. It's a bit of a kluge but fixing array_in to work in bootstrap mode looks worse. I removed the separate pg_file_length() function, as it no longer has any real notational advantage --- you can write (pg_stat_file(...)).length.
* Reverse out Assert addition.Bruce Momjian2005-08-12
|
* Pass the type OID as the typioparam for all non-array types, rather thanTom Lane2005-08-12
| | | | | only composite types as we did in 8.0. Per discussion with Martijn van Oosterhout.
* Improve documention on loading large data sets into plperl.Bruce Momjian2005-08-12
| | | | David Fetter
* This patch fixes the event type used to log output from theBruce Momjian2005-08-12
| | | | | | | | | | | | stderr-in-service or output-from-syslogger-in-service code. Previously everything was flagged as ERRORs there, which caused all instances to log "LOG: logger shutting down" as error... Please apply for 8.1. I'd also like it considered for 8.0 since logging non-errors as errors can be cause for alarm amongst people who actually look at their logs... Magnus Hagander
* [ backpatched to 8.0.X.]Bruce Momjian2005-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | > >> 3) I restarted the postmaster both times. I got this error > both times. > >> :25: ERROR: could not load library "C:/Program > >> Files/PostgreSQL/8.0/lib/testtrigfuncs.dll": dynamic load error > > > Yes. We really need to look at fixing that error message. I had > > forgotten it completely :-( > > > Bruce, you think we can sneak that in after feature freeze? I would > > call it a bugfix :-) > > Me too. That's been on the radar for awhile --- please do > send in a patch. Here we go, that wasn't too hard :-) Apart from adding the error handling, it does one more thing: it changes the errormode when loading the DLLs. Previously if a DLL was broken, or referenced other DLLs that couldn't be found, a popup dialog box would appear on the screen. Which had to be clicked before the backend could continue. This patch also disables the popup error message for DLL loads. I think this is something we should consider doing for the entire backend - disable those popups, and say we deal with it ourselves. What do you other win32 hackers thinnk about this? In the meantime, this patch fixes the error msgs. Please apply for 8.1 and please consider a backpatch to 8.0. Magnus Hagander
* > Gavin Sherry <swm@linuxworld.com.au> writes:Bruce Momjian2005-08-12
| | | | | | | | | | | | | | | | | | | | | | | | > > I ran across this yesterday on HEAD: > > > template1=# grant select on foo, foo to swm; > > ERROR: tuple already updated by self > > Seems to fail similarly in every version back to 7.2; probably further, > but that's all I have running at the moment. > > > We could do away with the error by producing a unique list of object names > > -- but that would impose an extra cost on the common case. > > CommandCounterIncrement in the GRANT loop would be easier, likely. > I'm having a hard time getting excited about it though... Yeah, its not that exciting but that error message would throw your average user. I've attached a patch which calls CommandCounterIncrement() in each of the grant loops. Gavin Sherry
* Fix up canonicalize_path to do the right thing in all cases (I think ...Tom Lane2005-08-12
| | | | | this was harder than it seemed at first glance). Also push code for checking for ".." in file names into path.c where it belongs.
* Reverse out changes to canonicalize_path(), per suggestion from Tom.Bruce Momjian2005-08-12
|
* Modify canonicalize_path() so if we would return a trailing "..", throwBruce Momjian2005-08-12
| | | | an error instead.
* Code & docs review for server instrumentation patch. File timestampsTom Lane2005-08-12
| | | | | | should surely be timestamptz not timestamp; fix some but not all of the holes in check_and_make_absolute(); other minor cleanup. Also put in the missed catversion bump.
* Change a couple of "can't happen" error messages to be a shade moreTom Lane2005-08-12
| | | | | verbose when they do happen. The "left link changed unexpectedly" one in particular has been seen more than once in the field.
* Remove BufferBlockPointers array in favor of a base + (bufnum) * BLCKSZTom Lane2005-08-12
| | | | | | | | computation. On modern machines this is as fast if not faster, and we don't have to clog the CPU's L2 cache with a tens-of-KB pointer array. If we ever decide to adopt a more dynamic allocation method for shared buffers, we'll probably have to revert this patch, but in the meantime we might as well save a few bytes and nanoseconds. Per Qingqing Zhou.
* Add files to do read I/O on the cluster directory:Bruce Momjian2005-08-12
| | | | | | | | | | | pg_stat_file() pg_read_file() pg_ls_dir() pg_reload_conf() pg_rotate_logfile() Dave Page Andreas Pflug
* Solve the problem of OID collisions by probing for duplicate OIDsTom Lane2005-08-12
| | | | | | | whenever we generate a new OID. This prevents occasional duplicate-OID errors that can otherwise occur once the OID counter has wrapped around. Duplicate relfilenode values are also checked for when creating new physical files. Per my recent proposal.
* Autovacuum loose end mop-up. Provide autovacuum-specific vacuum costTom Lane2005-08-11
| | | | | | | delay and limit, both as global GUCs and as table-specific entries in pg_autovacuum. stats_reset_on_server_start is now OFF by default, but a reset is forced if we did WAL replay. XID-wrap vacuums do not ANALYZE, but do FREEZE if it's a template database. Alvaro Herrera
* Mention MD5 function index for indexing long values.Bruce Momjian2005-08-11
|
* Make new hints follow style guide.Tom Lane2005-08-10
|
* Add hints to cases where indexes fail because of values that are too long.Bruce Momjian2005-08-10
|
* Make backends that are reading the pgstats file verify each backend PIDTom Lane2005-08-09
| | | | | | | against the PGPROC array. Anything in the file that isn't in PGPROC gets rejected as being a stale entry. This should solve complaints about stale entries in pg_stat_activity after a BETERM message has been dropped due to overload.
* Update postgresql.conf to show default ordering for wal_sync_method.Bruce Momjian2005-08-09
|
* Fix crash when reading 'timezone = unknown' from postgresql.conf duringTom Lane2005-08-08
| | | | | SIGHUP; it's not OK for an assign_hook to return a non-malloc'd string. Problem was introduced during timezone library rewrite.
* Avoid useless loop overhead in AtEOXact routines when the backend isTom Lane2005-08-08
| | | | compiled with USE_ASSERT_CHECKING but is running with assert_enabled false.
* Modify AtEOXact_CatCache and AtEOXact_RelationCache to assume that theTom Lane2005-08-08
| | | | | | | | | | | ResourceOwner mechanism already released all reference counts for the cache entries; therefore, we do not need to scan the catcache or relcache at transaction end, unless we want to do it as a debugging crosscheck. Do the crosscheck only in Assert mode. This is the same logic we had previously installed in AtEOXact_Buffers to avoid overhead with large numbers of shared buffers. I thought it'd be a good idea to do it here too, in view of Kari Lavikka's recent report showing a real-world case where AtEOXact_CatCache is taking a significant fraction of runtime.
* Cause ShutdownPostgres to do a normal transaction abort during backendTom Lane2005-08-08
| | | | | | | | exit, instead of trying to take shortcuts. Introduce some additional shutdown callback routines to eliminate kluges like having ProcKill be responsible for shutting down the buffer manager. Ensure that the order of operations during shutdown is predictable and what you would expect given the module layering.
* Fix count_usable_fds() to stop trying to open files once it reachesTom Lane2005-08-07
| | | | | | max_files_per_process. Going further than that is just a waste of cycles, and it seems that current Cygwin does not cope gracefully with deliberately running the system out of FDs. Per Andrew Dunstan.
* COPY performance improvements. Avoid calling CopyGetData for each inputTom Lane2005-08-06
| | | | | | | | | | character, tighten the inner loops of CopyReadLine and CopyReadAttribute, arrange to parse out all the attributes of a line in just one call instead of one CopyReadAttribute call per attribute, be smarter about which client encodings require slow pg_encoding_mblen() loops. Also, clean up the mishmash of static variables and overly-long parameter lists in favor of passing around a single CopyState struct containing all the state data. Original patch by Alon Goldshuv, reworked by Tom Lane.
* ALTER TABLE OWNER must change the ownership of the table's rowtype too.Tom Lane2005-08-04
| | | | | | | | | | | | | This was not especially critical before, but it is now that we track ownership dependencies --- the dependency for the rowtype *must* shift to the new owner. Spotted by Bernd Helmle. Also fix a problem introduced by recent change to allow non-superusers to do ALTER OWNER in some cases: if the table had a toast table, ALTER OWNER failed *even for superusers*, because the test being applied would conclude that the new would-be owner had no create rights on pg_toast. A side-effect of the fix is to disallow changing the ownership of indexes or toast tables separately from their parent table, which seems a good idea on the whole.
* Tweak BgBufferSync() so that a persistent write error on a dirty bufferTom Lane2005-08-02
| | | | | | | doesn't block the bgwriter from making progress writing out other buffers. This was a hard problem in the context of the ARC/2Q design, but it's trivial in the context of clock sweep ... just advance the sweep counter before we try to write not after.
* Prevent planner from including temp tables of other backends when expandingTom Lane2005-08-02
| | | | an inheritance tree. Per recent discussions.
* Clean up CREATE DATABASE processing to make it more robust and get ridTom Lane2005-08-02
| | | | | | | | | | | | of special case for Windows port. Put a PG_TRY around most of createdb() to ensure that we remove copied subdirectories on failure, even if the failure happens while creating the pg_database row. (I think this explains Oliver Siegmar's recent report.) Having done that, there's no need for the fragile assumption that copydir() mustn't ereport(ERROR), so simplify its API. Eliminate the old code that used system("cp ...") to copy subdirectories, in favor of using copydir() on all platforms. This not only should allow much better error reporting, but allows us to fsync the created files before trusting that the copy has succeeded.
* Code and docs review for pg_column_size() patch.Tom Lane2005-08-02
|
* Use ReadDir() not readdir() so as to have some modicum of error checking.Tom Lane2005-08-02
|
* Un-Windows-ify newlines.Tom Lane2005-08-02
|
* Add NOWAIT option to SELECT FOR UPDATE/SHARE.Tom Lane2005-08-01
| | | | | Original patch by Hans-Juergen Schoenig, revisions by Karel Zak and Tom Lane.
* Add ALTER object SET SCHEMA capability for a limited but useful set ofTom Lane2005-08-01
| | | | | | object kinds (tables, functions, types). Documentation is not here yet. Original code by Bernd Helmle, extensive rework by Bruce Momjian and Tom Lane.
* Add per-user and per-database connection limit options.Tom Lane2005-07-31
| | | | | This patch also includes preliminary update of pg_dumpall for roles. Petr Jelinek, with review by Bruce Momjian and Tom Lane.
* Use the standard spelling of the protocol argument to get/setsockopt.Tom Lane2005-07-30
|
* Fix justify_days() for integer datestamp, clean up code.Bruce Momjian2005-07-30
|
* Add GUC variables to control keep-alive times for idle, interval, andBruce Momjian2005-07-30
| | | | | | count. Oliver Jowett