aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/init/miscinit.c
Commit message (Collapse)AuthorAge
...
* 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.
* Don't go into infinite loop if /home/postgres/testversion/data directory is ↵Tom Lane2001-07-03
| | | | not writable.
* Handle reading of startup packet and authentication exchange after forkingPeter Eisentraut2001-06-20
| | | | | | | | | | a new postmaster child process. This should eliminate problems with authentication blocking (e.g., ident, SSL init) and also reduce problems with the accept queue filling up under heavy load. The option to send elog output to a different file per backend (postgres -o) has been disabled for now because the initialization would have to happen in a different order and it's not clear we want to keep this anyway.
* has_table_privilege functions from Joe Conway (with some kibitzing fromTom Lane2001-06-14
| | | | | | Tom Lane). For the moment, only the OID/name variants are provided. I didn't force initdb, but the additions to the 'privileges' regress test won't pass until you do one.
* Don't assume free(NULL) is OK. Yes, I know ANSI C says it is.Tom Lane2001-06-13
|
* Adjust WAL code so that checkpoints truncate the xlog at the previousTom Lane2001-06-06
| | | | | | | | | | | | checkpoint's redo pointer, not its undo pointer, per discussion in pghackers a few days ago. No point in hanging onto undo information until we have the ability to do something with it --- and this solves a rather large problem with log space for long-running transactions. Also, change all calls of write() to detect the case where write returned a count less than requested, but failed to set errno. Presume that this situation indicates ENOSPC, and give the appropriate error message, rather than a random message associated with the previous value of errno.
* Check for malloc failure.Tom Lane2001-06-01
|
* Suppress compiler warnings about pid_t vs int.Tom Lane2001-05-18
|
* Add SET SESSION AUTHORIZATION command.Peter Eisentraut2001-05-08
|
* getdatabaseencoding() and PG_encoding_to_char() were being sloppy aboutTom Lane2001-04-16
| | | | | converting char* strings to type 'name'. Imagine my surprise when 7.1 release coredumped upon start when compiled --enable-multibyte ...
* pgindent run. Make it all clean.Bruce Momjian2001-03-22
|
* Patches from Cyril Velter to make shared-memory-conflict-detection codeTom Lane2001-03-18
| | | | work in BeOS port.
* XLOG (and related) changes:Tom Lane2001-03-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Store two past checkpoint locations, not just one, in pg_control. On startup, we fall back to the older checkpoint if the newer one is unreadable. Also, a physical copy of the newest checkpoint record is kept in pg_control for possible use in disaster recovery (ie, complete loss of pg_xlog). Also add a version number for pg_control itself. Remove archdir from pg_control; it ought to be a GUC parameter, not a special case (not that it's implemented yet anyway). * Suppress successive checkpoint records when nothing has been entered in the WAL log since the last one. This is not so much to avoid I/O as to make it actually useful to keep track of the last two checkpoints. If the things are right next to each other then there's not a lot of redundancy gained... * Change CRC scheme to a true 64-bit CRC, not a pair of 32-bit CRCs on alternate bytes. Polynomial borrowed from ECMA DLT1 standard. * Fix XLOG record length handling so that it will work at BLCKSZ = 32k. * Change XID allocation to work more like OID allocation. (This is of dubious necessity, but I think it's a good idea anyway.) * Fix a number of minor bugs, such as off-by-one logic for XLOG file wraparound at the 4 gig mark. * Add documentation and clean up some coding infelicities; move file format declarations out to include files where planned contrib utilities can get at them. * Checkpoint will now occur every CHECKPOINT_SEGMENTS log segments or every CHECKPOINT_TIMEOUT seconds, whichever comes first. It is also possible to force a checkpoint by sending SIGUSR1 to the postmaster (undocumented feature...) * Defend against kill -9 postmaster by storing shmem block's key and ID in postmaster.pid lockfile, and checking at startup to ensure that no processes are still connected to old shmem block (if it still exists). * Switch backends to accept SIGQUIT rather than SIGUSR1 for emergency stop, for symmetry with postmaster and xlog utilities. Clean up signal handling in bootstrap.c so that xlog utilities launched by postmaster will react to signals better. * Standalone bootstrap now grabs lockfile in target directory, as added insurance against running it in parallel with live postmaster.