aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/init/miscinit.c
Commit message (Collapse)AuthorAge
* Restructure smgr API as per recent proposal. smgr no longer depends onTom Lane2004-02-10
| | | | | | | | | the relcache, and so the notion of 'blind write' is gone. This should improve efficiency in bgwriter and background checkpoint processes. Internal restructuring in md.c to remove the not-very-useful array of MdfdVec objects --- might as well just use pointers. Also remove the long-dead 'persistent main memory' storage manager (mm.c), since it seems quite unlikely to ever get resurrected.
* Win32 signals cleanup. Patch by Magnus Hagander, with input from ClaudioNeil Conway2004-02-08
| | | | | | | | | | | | | | | | | | | | | | Natoli and Bruce Momjian (and some cosmetic fixes from Neil Conway). Changes: - remove duplicate signal definitions from pqsignal.h - replace pqkill() with kill() and redefine kill() in Win32 - use ereport() in place of fprintf() in some error handling in pqsignal.c - export pg_queue_signal() and make use of it where necessary - add a console control handler for Ctrl-C and similar handling on Win32 - do WaitForSingleObjectEx() in CHECK_FOR_INTERRUPTS() on Win32; query cancelling should now work on Win32 - various other fixes and cleanups
* Here's the latest win32 signals code, this time in the form of a patchBruce Momjian2004-01-27
| | | | | | | | | | | | | | | | | against the latest shapshot. It also includes the replacement of kill() with pqkill() and sigsetmask() with pqsigsetmask(). Passes all tests fine on my linux machine once applied. Still doesn't link completely on Win32 - there are a few things still required. But much closer than before. At Bruce's request, I'm goint to write up a README file about the method of signals delivery chosen and why the others were rejected (basically a summary of the mailinglist discussions). I'll finish that up once/if the patch is accepted. Magnus Hagander
* Ensure that close() and fclose() are checked for errors, at least inTom Lane2004-01-26
| | | | | | cases involving writes. Per recent discussion about the possibility of close-time failures on some filesystems. There is a TODO item for this, too.
* [Forced commit to add log message that I fat-fingered last time]Tom Lane2004-01-08
| | | | | Give a more reasonable error message when lock file exists but has zero length; prior code confused this with could-not-read-file case.
* makeTom Lane2004-01-07
|
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-29
|
* Various message fixes, among those fixes for the previous round of fixesPeter Eisentraut2003-09-26
|
* Message editing: remove gratuitous variations in message wording, standardizePeter Eisentraut2003-09-25
| | | | | terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
* Repair some REINDEX problems per recent discussions. The relcache isTom Lane2003-09-24
| | | | | | | | | | | | | now able to cope with assigning new relfilenode values to nailed-in-cache indexes, so they can be reindexed using the fully crash-safe method. This leaves only shared system indexes as special cases. Remove the 'index deactivation' code, since it provides no useful protection in the shared- index case. Require reindexing of shared indexes to be done in standalone mode, but remove other restrictions on REINDEX. -P (IgnoreSystemIndexes) now prevents using indexes for lookups, but does not disable index updates. It is therefore safe to allow from PGOPTIONS. Upshot: reindexing system catalogs can be done without a standalone backend for all cases except shared catalogs.
* Remove --enable-recode feature, since it's been broken by IPv6 changes,Tom Lane2003-08-04
| | | | and seems to have too few users to justify maintaining.
* Update copyrights to 2003.Bruce Momjian2003-08-04
|
* pgindent run.Bruce Momjian2003-08-04
|
* Adjust 'permission denied' messages to be more useful and consistent.Tom Lane2003-08-01
|
* Cause library-preload feature to report error if specified initializationTom Lane2003-07-31
| | | | | function is not found. Also, make all the PL libraries have initialization functions with standard names. Patch from Joe Conway.
* A visit from the message-style police ...Tom Lane2003-07-28
|
* elog mop-up: bring some straggling fprintf(stderr)'s into the elog world.Tom Lane2003-07-27
|
* Tom, happier with the attached patch?Bruce Momjian2003-07-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I'd have to disagree with regards to the memory leaks not being worth a mention - any such leak can cause problems when the PostgreSQL installation is either unattended, long-living andor has very high connection levels. Half a kilobyte on start-up isn't negligible in this light. Regards, Lee. Tom Lane writes: > Lee Kindness <lkindness@csl.co.uk> writes: > > Guys, attached is a patch to fix two memory leaks on start-up. > > I do not like the changes to miscinit.c. In the first place, it is not > a "memory leak" to do a one-time allocation of state for a proc_exit > function. A bigger complaint is that your proposed change introduces > fragile coupling between CreateLockFile and its callers, in order to > save no resources worth mentioning. More, it introduces an assumption > that the globals directoryLockFile and socketLockFile don't change while > the postmaster is running. UnlinkLockFile should unlink the file that > it was originally told to unlink, regardless of what happens to those > globals. > > If you are intent on spending code to free stuff just before the > postmaster exits, a better fix would be for UnlinkLockFile to free its > string argument after using it. Lee Kindness
* Error message editing in backend/utils (except /adt).Tom Lane2003-07-25
|
* Add is_superuser parameter reporting, soon to be used by psql.Tom Lane2003-06-27
|
* First batch of object rename commands.Peter Eisentraut2003-06-27
|
* Add Win32 path handling for / vs. \ and drive letters.Bruce Momjian2003-04-04
|
* > I can see a couple possible downsides: (a) the library might have someBruce Momjian2003-03-20
| | | | | | | | | | | | | | | | | | | | | | | > weird behavior across fork boundaries; (b) the additional memory space > that has to be duplicated into child processes will cost something per > child launch, even if the child never uses it. But these are only > arguments that it might not *always* be a prudent thing to do, not that > we shouldn't give the DBA the tool to do it if he wants. So fire away. Here is a patch for the above, including a documentation update. It creates a new GUC variable "preload_libraries", that accepts a list in the form: preload_libraries = '$libdir/mylib1:initfunc,$libdir/mylib2' If ":initfunc" is omitted or not found, no initialization function is executed, but the library is still preloaded. If "$libdir/mylib" isn't found, the postmaster refuses to start. In my testing with PL/R, it reduces the first call to a PL/R function (after connecting) from almost 2 seconds, down to about 8 ms. Joe Conway
* Get rid of last few unadorned 'permission denied' messages.Tom Lane2003-01-27
|
* Where available, use utime() or utimes() to update the file mod timeTom Lane2003-01-25
| | | | | | of the socket file and socket lock file; this should prevent both of them from being removed by even the stupidest varieties of /tmp-cleaning script. Per suggestion from Giles Lean.
* More cleanup of userid to be AclId rather than Oid.Bruce Momjian2002-12-05
|
* This patch removes a bunch of superfluous #include directives: ifBruce Momjian2002-11-08
| | | | | | | | postgres.h or c.h includes a system header (such as stdio.h or stdlib.h), there's no need to specifically include it in any of the .c files in the backend. Neil Conway
* pgindent run.Bruce Momjian2002-09-04
|
* Remove sys/types.h in files that include postgres.h, and hence c.h,Bruce Momjian2002-09-02
| | | | because c.h has sys/types.h.
* Implement DROP CONVERSIONTatsuo Ishii2002-07-25
| | | | Add regression test
* Update copyright to 2002.Bruce Momjian2002-06-20
|
* Katherine Ward wrote:Jan Wieck2002-06-11
| | | | | | | | | | | | | | > Changes to avoid collisions with WIN32 & MFC names... > 1. Renamed: > a. PROC => PGPROC > b. GetUserName() => GetUserNameFromId() > c. GetCurrentTime() => GetCurrentDateTime() > d. IGNORE => IGNORE_DTF in include/utils/datetime.h & utils/adt/datetim > > 2. Added _P to some lex/yacc tokens: > CONST, CHAR, DELETE, FLOAT, GROUP, IN, OUT Jan
* Merge the last few variable.c configuration variables into the genericTom Lane2002-05-17
| | | | | | | | | GUC support. It's now possible to set datestyle, timezone, and client_encoding from postgresql.conf and per-database or per-user settings. Also, implement rollback of SET commands that occur in a transaction that later fails. Create a SET LOCAL var = value syntax that sets the variable only for the duration of the current transaction. All per previous discussions in pghackers.
* Accept SET SESSION AUTHORIZATION DEFAULT and RESET SESSION AUTHORIZATIONTom Lane2002-05-06
| | | | | | | | to reset session userid to the originally-authenticated name. Also, relax SET SESSION AUTHORIZATION to allow specifying one's own username even if one is not superuser, so as to avoid unnecessary error messages when loading a pg_dump file that uses this command. Per discussion from several months ago.
* Create an internal semaphore API that is not tied to SysV semaphores.Tom Lane2002-05-05
| | | | | | As proof of concept, provide an alternate implementation based on POSIX semaphores. Also push the SysV shared-memory implementation into a separate file so that it can be replaced conveniently.
* Fix compile errors in CYR_RECODE code, per report from Oliver Elphick.Tom Lane2002-05-03
|
* Support toasting of shared system relations, and provide toast tables forTom Lane2002-04-27
| | | | | | | | | pg_database, pg_shadow, pg_group, all of which now have potentially-long fields. Along the way, get rid of SharedSystemRelationNames list: shared rels are now identified in their include/pg_catalog/*.h files by a BKI_SHARED_RELATION macro, while indexes and toast rels inherit sharedness automatically from their parent table. Fix some bugs with failure to detoast pg_group.grolist during ALTER GROUP.
* Authentication improvements:Bruce Momjian2002-04-04
| | | | | | | | | | | | | | A new pg_hba.conf column, USER Allow specifiction of lists of users separated by commas Allow group names specified by + Allow include files containing lists of users specified by @ Allow lists of databases, and database files Allow samegroup in database column to match group name matching dbname Removal of secondary password files Remove pg_passwd utility Lots of code cleanup in user.c and hba.c New data/global/pg_pwd format New data/global/pg_group file
* 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...
* 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
* User and database-specific session defaults for run-time configurationPeter Eisentraut2002-03-01
| | | | variables. New commands ALTER DATABASE ... SET and ALTER USER ... SET.
* Fix use of 'char' to hold result of getc, per bug report forwarded byTom Lane2002-01-09
| | | | Oliver Elphick. A few other minor cleanups while at it.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-25
| | | | tests pass.
* Set optreset on platforms that have it before launching postmasterTom Lane2001-10-19
| | | | | | subprocesses; perhaps this will fix portability problem just noted by Lockhart. Also, move test for bad permissions of DataDir to a more logical place.
* Ensure that all startup paths (postmaster, standalone postgres, orTom Lane2001-10-19
| | | | | | | bootstrap) check for a valid PG_VERSION file before looking at anything else in the data directory. This fixes confusing error report when trying to start current sources in a pre-7.1 data directory. Per trouble report from Rich Shepard 10/18/01.
* Add a new function "pg_client_encoding" which returns the current clientTatsuo Ishii2001-10-12
| | | | | | side encoding name. This is necessary for client API's such as JDBC to perform correct encoding conversions. See my email "[HACKERS] pg_client_encoding" 10 Sep 2001.
* Make the world somewhat safe for (not from) DELETE FROM pg_shadow;Peter Eisentraut2001-09-08
| | | | | | | | | | | | | | | | | | | | | Assign the fixed user id 1 to the user created by initdb. A stand-alone backend will always set the user id to 1. (Consequently, the name of that user is no longer important.) In stand-alone mode, the user id 1 will have implicit superuser status, to allow repairs even if there are no users defined. Print a warning message when starting in stand-alone mode when no users are defined. Disallow dropping the current user and session user. Granting/revoking superuser status also grants/revokes usecatupd. (Previously, it would never grant it back. This could lead to "deadlocks".) CREATE USER and CREATE GROUP will start allocating user ids at 100 (unless explicitly specified), to prevent accidental creation of a superuser (plus some room for future extensions).
* Add conver/convert2 functions. They are similar to the SQL99's convert.Tatsuo Ishii2001-08-15
|
* Seems like a bad idea to free() a string we are about to use in anTom Lane2001-08-06
| | | | error message.
* Check that the data directory does not have group or world access; removePeter Eisentraut2001-08-06
| | | | a similar check on postgresql.conf.