summaryrefslogtreecommitdiff
path: root/src/backend/utils/init
Commit message (Collapse)AuthorAgeFilesLines
* Defend against starting a non-MULTIBYTE-enabled backend in a databaseTom Lane2001-02-161-5/+8
| | | | with encoding other than SQL_ASCII. Per recent discussion in pghackers.
* Re-read Unix-socket lock file every so often (every CheckPoint interval,Tom Lane2001-01-271-1/+32
| | | | | | actually) to ensure that its file access time doesn't get old enough to tempt a /tmp directory cleaner to remove it. Still another reason we should never have put the sockets in /tmp in the first place ...
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-244-8/+8
|
* Remove useless leftover global variable Ps_status_buffer.Peter Eisentraut2001-01-231-9/+1
|
* Make critical sections (elog->crash) and interrupt holdoff sectionsTom Lane2001-01-191-1/+2
| | | | into distinct concepts, per recent discussion on pghackers.
* Suppress compiler warning in MULTIBYTE code.Tom Lane2001-01-191-1/+2
|
* Minor coding cleanups.Tom Lane2001-01-141-15/+10
|
* Restructure backend SIGINT/SIGTERM handling so that 'die' interruptsTom Lane2001-01-141-4/+7
| | | | | | | are treated more like 'cancel' interrupts: the signal handler sets a flag that is examined at well-defined spots, rather than trying to cope with an interrupt that might happen anywhere. See pghackers discussion of 1/12/01.
* Add more critical-section calls: all code sections that hold spinlocksTom Lane2001-01-121-4/+5
| | | | | | | | | | | are now critical sections, so as to ensure die() won't interrupt us while we are munging shared-memory data structures. Avoid insecure intermediate states in some code that proc_exit will call, like palloc/pfree. Rename START/END_CRIT_CODE to START/END_CRIT_SECTION, since that seems to be what people tend to call them anyway, and make them be called with () like a function call, in hopes of not confusing pg_indent. I doubt that this is sufficient to make SIGTERM safe anywhere; there's just too much code that could get invoked during proc_exit().
* Fix recent breakage of query-cancel logic, see my pghackers messageTom Lane2001-01-071-2/+2
| | | | of 6 Jan 2001 21:55.
* New WAL version - CRC and data blocks backup.Vadim B. Mikheev2000-12-281-1/+47
|
* Clean up backend-exit-time cleanup behavior. Use on_shmem_exit callbacksTom Lane2000-12-181-24/+85
| | | | | | to ensure that we have released buffer refcounts and so forth, rather than putting ad-hoc operations before (some of the calls to) proc_exit. Add commentary to discourage future hackers from repeating that mistake.
* BugfixJan Wieck2000-12-141-1/+5
| | | | | | | | Trying to connect to template0 left a global referenced buffer because the scan of pg_database wasn't ended properly before elog(FATAL). Jan
* No more #ifdef XLOG.Vadim B. Mikheev2000-11-301-16/+1
|
* Get rid of not-very-portable fcntl(F_SETLK) mechanism for locking the UnixTom Lane2000-11-291-186/+212
| | | | | | | | | socket file, in favor of having an ordinary lockfile beside the socket file. Clean up a few robustness problems in the lockfile code. If postmaster is going to reject a connection request based on database state, it will now tell you so before authentication exchange not after. (Of course, a failure after is still possible if conditions change meanwhile, but this makes life easier for a yet-to-be-written pg_ping utility.)
* Significant cleanups in SysV IPC handling (shared mem and semaphores).Tom Lane2000-11-281-24/+8
| | | | | | | | | | | IPC key assignment will now work correctly even when multiple postmasters are using same logical port number (which is possible given -k switch). There is only one shared-mem segment per postmaster now, not 3. Rip out broken code for non-TAS case in bufmgr and xlog, substitute a complete S_LOCK emulation using semaphores in spin.c. TAS and non-TAS logic is now exactly the same. When deadlock is detected, "Deadlock detected" is now the elog(ERROR) message, rather than a NOTICE that comes out before an unhelpful ERROR.
* Fix spelling errors in error message.Tom Lane2000-11-171-3/+3
|
* Change SearchSysCache coding conventions so that a reference count isTom Lane2000-11-162-12/+18
| | | | | | | maintained for each cache entry. A cache entry will not be freed until the matching ReleaseSysCache call has been executed. This eliminates worries about cache entries getting dropped while still in use. See my posting to pg-hackers of even date for more info.
* Extend CREATE DATABASE to allow selection of a template database to beTom Lane2000-11-141-13/+13
| | | | | | | | | | cloned, rather than always cloning template1. Modify initdb to generate two identical databases rather than one, template0 and template1. Connections to template0 are disallowed, so that it will always remain in its virgin as-initdb'd state. pg_dumpall now dumps databases with restore commands that say CREATE DATABASE foo WITH TEMPLATE = template0. This allows proper behavior when there is user-added data in template1. initdb forced!
* Keep track of the last active slot in the shared ProcState array, soTom Lane2000-11-122-64/+23
| | | | | | | | | that search loops only have to scan that far and not through all maxBackends entries. This eliminates a performance penalty for setting maxBackends much higher than the average number of active backends. Also, eliminate no-longer-used 'backend tag' concept. Remove setting of environment variables at backend start (except for CYR_RECODE), since none of them are being examined by the backend any longer.
* Make the backend grok relative paths for the data directory by convertingPeter Eisentraut2000-11-041-1/+57
| | | | it to an absolute path.
* WALVadim B. Mikheev2000-10-281-4/+5
|
* New file naming. Database OID is used as "tablespace" id andVadim B. Mikheev2000-10-161-1/+14
| | | | | relation OID is used as file node on creation but may be changed later if required. Regression Tests Approved (c) -:)))
* Banish caddr_t (mostly), use Datum where appropriate.Peter Eisentraut2000-10-021-2/+2
|
* Implement differentiation between CURRENT_USER and SESSION_USER as per SQL.Peter Eisentraut2000-09-192-31/+63
| | | | | | There is still no effective difference but it will kick in once setuid functions exist (not included here). Make old getpgusername() alias for current_user.
* Code cleanup of user name and user id handling in the backend. The currentPeter Eisentraut2000-09-063-59/+41
| | | | | | | | | | | user is now defined in terms of the user id, the user name is only computed upon request (for display purposes). This is kind of the opposite of the previous state, which would maintain the user name and compute the user id for permission checks. Besides perhaps saving a few cycles (integer vs string), this now creates a single point of attack for changing the user id during a connection, for purposes of "setuid" functions, etc.
* Fix relative path references so that make knowns which dependencies referPeter Eisentraut2000-08-311-3/+4
| | | | | to one another. Sort out builddir vs srcdir variable namings. Remove some now obsoleted make variables.
* Toast all the system-table columns that seem to need it. It turns outTom Lane2000-08-061-2/+6
| | | | | | | | | | | | | | | | that giving pg_proc a toast table required solving the same problems we'd have to solve for pg_class --- pg_proc is one of the relations that gets bootstrapped in relcache.c. Solution is to go back at the end of initialization and read in the *real* pg_class row to replace the phony entry created by formrdesc(). This should work as long as there's no need to touch any toasted values during initialization, which seems a reasonable assumption. Although I did not add a toast-table for every single system table with a varlena attribute, I believe that it would work to just do ALTER TABLE pg_class CREATE TOAST TABLE. So anyone who's really intent on having several thousand ACL entries for a rel could do it. NOTE: I didn't force initdb, but you must do one to see the effects of this patch.
* More functions updated to new fmgr style --- money, name, tid datatypes.Tom Lane2000-08-031-7/+3
| | | | | We're reaching the mopup stage here (good thing too, this is getting tedious).
* Remove dangling else warning (Cyrillic recode stuff)Peter Eisentraut2000-07-141-1/+3
|
* Another round of those unportable config/build changes :-/Peter Eisentraut2000-07-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add option to build with OpenSSL out of the box. Fix thusly exposed bit rot. Although it compiles now, getting this to do something useful is left as an exercise. * Fix Kerberos options to defer checking for required libraries until all the other libraries are checked for. * Change default odbcinst.ini and krb5.srvtab path to PREFIX/etc. * Install work around for Autoconf's install-sh relative path anomaly. Get rid of old INSTL_*_OPTS variables, now that we don't need them anymore. * Use `gunzip -c' instead of g?zcat. Reportedly broke on AIX. * Look for only one of readline.h or readline/readline.h, not both. * Make check for PS_STRINGS cacheable. Don't test for the header files separately. * Disable fcntl(F_SETLK) test on Linux. * Substitute the standard GCC warnings set into CFLAGS in configure, don't add it on in Makefile.global. * Sweep through contrib tree to teach makefiles standard semantics. ... and in completely unrelated news: * Make postmaster.opts arbitrary options-aware. I still think we need to save the environment as well.
* Remove long-dead support for invoking queries from dynamically loadedTom Lane2000-07-081-11/+1
| | | | | | backend functions via backend PQexec(). The SPI interface has long been our only documented way to do this, and the backend pqexec/portal code is unused and suffering bit-rot. I'm putting it out of its misery.
* Remove unused variable. (Hey Peter, you use gcc, why didn't youTom Lane2000-07-031-2/+1
| | | | notice this warning?)
* Version number now set in configure, available through Makefile.globalPeter Eisentraut2000-07-022-9/+53
| | | | | | | | | | and config.h. Adjusted all referring code. Scrapped pg_version and changed initdb accordingly. Integrated src/utils/version.c into src/backend/utils/init/miscinit.c. Changed all callers. Set version number to `7.1devel'. (Non-numeric version suffixes now allowed.)
* First phase of memory management rewrite (see backend/utils/mmgr/READMETom Lane2000-06-283-70/+5
| | | | | | | | | | | | | for details). It doesn't really do that much yet, since there are no short-term memory contexts in the executor, but the infrastructure is in place and long-term contexts are handled reasonably. A few long- standing bugs have been fixed, such as 'VACUUM; anything' in a single query string crashing. Also, out-of-memory is now considered a recoverable ERROR, not FATAL. Eliminate a large amount of crufty, now-dead code in and around memory management. Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and backend startup.
* Big warnings cleanup for Solaris/GCC. Down to about 40 now, butPeter Eisentraut2000-06-141-3/+3
| | | | | | | | | | | we'll get there one day. Use `cat' to create aclocal.m4, not `aclocal'. Some people don't have automake installed. Only run the autoconf rule in the top-level GNUmakefile if the invoker specified `make configure', don't run it automatically because of CVS timestamp skew.
* Another batch of fmgr updates. I think I have gotten all old-styleTom Lane2000-06-131-12/+14
| | | | | functions that take pass-by-value datatypes. Should be ready for port testing ...
* Mark functions as static and ifdef NOT_USED as appropriate.Bruce Momjian2000-06-082-4/+8
|
* Remove NT-specific file open defines by defining our own open macros forBruce Momjian2000-06-021-6/+2
| | | | "rb" and "wb".
* The heralded `Grand Unified Configuration scheme' (GUC)Peter Eisentraut2000-05-311-1/+4
| | | | | | | | | | | | | That means you can now set your options in either or all of $PGDATA/configuration, some postmaster option (--enable-fsync=off), or set a SET command. The list of options is in backend/utils/misc/guc.c, documentation will be written post haste. pg_options is gone, so is that pq_geqo config file. Also removed were backend -K, -Q, and -T options (no longer applicable, although -d0 does the same as -Q). Added to configure an --enable-syslog option. changed all callers from TPRINTF to elog(DEBUG)
* Remove unused include files. Do not touch /port or includes used by defines.Bruce Momjian2000-05-302-4/+2
|
* Generated header files parse.h and fmgroids.h are now copied intoTom Lane2000-05-291-3/+1
| | | | | the src/include tree, so that -I backend is no longer necessary anywhere. Also, clean up some bit rot in contrib tree.
* First round of changes for new fmgr interface. fmgr itself and theTom Lane2000-05-281-1/+2
| | | | | | | key call sites are changed, but most called functions are still oldstyle. An exception is that the PL managers are updated (so, for example, NULL handling now behaves as expected in plperl and plpgsql functions). NOTE initdb is forced due to added column in pg_proc.
* Make the indexes on pg_group be shared system relations.Tom Lane2000-05-051-1/+4
|
* Modify getdatabaseencoding(), pg_encoding_to_char()Tatsuo Ishii2000-05-021-6/+3
| | | | | | pg_char_to_encoding() in multibyte disbaled case so that it does not throw an error, rather return HARD CODED default value (currently SQL_ASCII). This would solve the "non-mb backend vs. mb-enabled frontend" problem.
* Ye-old pgindent run. Same 4-space tabs.Bruce Momjian2000-04-123-140/+158
|
* Implement reindex commandHiroshi Inoue2000-02-181-1/+28
|
* Make ISO date style (e.g. "2000-02-16 09:33") the default.Thomas G. Lockhart2000-02-161-2/+2
| | | | | | | | | | | | | | Implement "date/time grand unification". Transform datetime and timespan into timestamp and interval. Deprecate datetime and timespan, though translate to new types in gram.y. Transform all datetime and timespan catalog entries into new types. Make "INTERVAL" reserved word allowed as a column identifier in gram.y. Remove dt.h, dt.c files, and retarget datetime.h, datetime.c as utility routines for all date/time types. date.{h,c} now deals with date, time types. timestamp.{h,c} now deals with timestamp, interval types. nabstime.{h,c} now deals with abstime, reltime, tinterval types. Make NUMERIC a known native type for purposes of type coersion. Not tested.
* Add:Bruce Momjian2000-01-265-10/+15
| | | | | | * Portions Copyright (c) 1996-2000, PostgreSQL, Inc to all files copyright Regents of Berkeley. Man, that's a lot of files.
* The latest source does not compile on Solaris 7 due toBruce Momjian2000-01-191-1/+2
| | | | | | | | a missing include from a modified file. Here is a patch to fix it:- Keith Parks.