Commit Graph

71 Commits

Author SHA1 Message Date
Hiroshi Inoue 8a5851880e Fix an Assert bug(was my fault) pointed out by Tom Lane. 2000-04-10 00:45:42 +00:00
Hiroshi Inoue f017d7eeee Check pending cancel request before waiting for lock 2000-02-24 04:36:01 +00:00
Hiroshi Inoue 5525297465 Change cancel while waiting-for-lock stuff. 2000-02-22 09:55:26 +00:00
Hiroshi Inoue a60c9e33e9 fix the TODO
* Allow PQrequestCancel() to terminate when in waiting-for-lock state
Changes are limited to BACKEND,however.
2000-02-21 02:42:37 +00:00
Bruce Momjian 5c25d60244 Add:
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc

to all files copyright Regents of Berkeley.  Man, that's a lot of files.
2000-01-26 05:58:53 +00:00
Hiroshi Inoue 1500e262b5 Fix for TODO item * spinlock stuck problem when elog(FATAL)
and elog(ERROR) inside bufmgr.
2000-01-17 01:15:19 +00:00
Bruce Momjian 7585deb087 I have done the QNX4 port with the current source tree. The number of
backend/Makefiles to be patched could significantly be reduced since
they
have been adopted to the QNX4 needs.

Andreas Kardos
1999-12-16 01:25:23 +00:00
Bruce Momjian 86ef36c907 New NameStr macro to convert Name to Str. No need for var.data anymore.
Fewer calls to nameout.

Better use of RelationGetRelationName.
1999-11-07 23:08:36 +00:00
Bruce Momjian c6411605e1 I have created a small patch that makes possible to compile pgsql on newer
Cygwin snapshots (tested on 990115 which is recommended to use - it fixes
some errors in B20.1)

And I have another patch for including <sys/ipc.h> before <sys/sem.h> in
backend/storage/lmgr/proc.c - it is required due the design of cygipc
headers

                        Dan
1999-10-12 14:54:28 +00:00
Vadim B. Mikheev 4793740367 XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.
First step in cleaning up backend initialization code.
Fix for FATAL: now FATAL is ERROR + exit.
1999-10-06 21:58:18 +00:00
Tom Lane e812458b27 Several changes here, not very related but touching some of the same files.
* Buffer refcount cleanup (per my "progress report" to pghackers, 9/22).
* Add links to backend PROC structs to sinval's array of per-backend info,
and use these links for routines that need to check the state of all
backends (rather than the slow, complicated search of the ShmemIndex
hashtable that was used before).  Add databaseOID to PROC structs.
* Use this to implement an interlock that prevents DESTROY DATABASE of
a database containing running backends.  (It's a little tricky to prevent
a concurrently-starting backend from getting in there, since the new
backend is not able to lock anything at the time it tries to look up
its database in pg_database.  My solution is to recheck that the DB is
OK at the end of InitPostgres.  It may not be a 100% solution, but it's
a lot better than no interlock at all...)
* In ALTER TABLE RENAME, flush buffers for the relation before doing the
rename of the physical files, to ensure we don't get failures later from
mdblindwrt().
* Update TRUNCATE patch so that it actually compiles against current
sources :-(.
You should do "make clean all" after pulling these changes.
1999-09-24 00:25:33 +00:00
Bruce Momjian 3406901a29 Move some system includes into c.h, and remove duplicates. 1999-07-17 20:18:55 +00:00
Bruce Momjian a71802e12e Final cleanup. 1999-07-16 05:00:38 +00:00
Bruce Momjian 2e6b1e63a3 Remove unused #includes in *.c files. 1999-07-15 22:40:16 +00:00
Bruce Momjian fcff1cdf4e Another pgindent run. Sorry folks. 1999-05-25 22:43:53 +00:00
Bruce Momjian 07842084fe pgindent run over code. 1999-05-25 16:15:34 +00:00
Bruce Momjian 564842a617 Hi, Bruce!
These are my last changes to lmgr fixing deadlock handling.
Please apply them to cvs...

Vadim
1999-05-13 15:55:45 +00:00
Vadim B. Mikheev 122abf3af3 Fix LMGR for MVCC.
Get rid of Extend lock mode.
1999-05-07 01:23:11 +00:00
Bruce Momjian 52f1b2f3b6 Prevent priority inversion in locking by checking for existing locks
before going into queue behind person with higher piority.
1999-04-30 02:04:51 +00:00
Vadim B. Mikheev fdf6be80f9 1. Vacuum is updated for MVCC.
2. Much faster btree tuples deletion in the case when first on page
   index tuple is deleted (no movement to the left page(s)).
3. Remember blkno of new root page in BTPageOpaque of
   left/right siblings when root page is splitted.
1999-03-28 20:32:42 +00:00
Tom Lane 9d197856dd Rearrange handling of MAXBACKENDS a little bit. The default setting
of MAXBACKENDS is now 1024, since all it's costing is about 32 bytes of memory
per array slot.  configure's --with-maxbackends switch now controls DEF_MAXBACKENDS
which is simply the default value of the postmaster's -N switch.  Thus,
the out-of-the-box configuration will still limit you to 64 backends,
but you can go up to 1024 backends simply by restarting the postmaster with
a different -N switch --- no rebuild required.
1999-02-21 01:41:55 +00:00
Tom Lane 4c31393135 Reorder startup ops so that if preallocation of semas fails,
postmaster will release whatever it did get before dying.
1999-02-19 07:10:48 +00:00
Tom Lane e77b630cf0 Allow maximum number of backends to be set at configure time
(--with-maxbackends).  Add a postmaster switch (-N backends) that allows
the limit to be reduced at postmaster start time.  (You can't increase it,
sorry to say, because there are still some fixed-size arrays.)
Grab the number of semaphores indicated by min(MAXBACKENDS, -N) at
postmaster startup, so that this particular form of bogus configuration
is exposed immediately rather than under heavy load.
1999-02-19 06:06:39 +00:00
Bruce Momjian 6724a50787 Change my-function-name-- to my_function_name, and optimizer renames. 1999-02-13 23:22:53 +00:00
Bruce Momjian 6059c5a141 Update for deadlock detection. 1998-12-29 19:32:08 +00:00
Bruce Momjian 06c120e67e Update for deadlock timer. 1998-12-29 18:36:29 +00:00
Bruce Momjian f659ec545f Fix for deadlock timer timeout. 1998-12-29 18:29:18 +00:00
Bruce Momjian 3cd3be92ff Fix deadlock so it only checks once. 1998-12-18 19:45:38 +00:00
Bruce Momjian fa1a8d6a97 OK, folks, here is the pgindent output. 1998-09-01 04:40:42 +00:00
Bruce Momjian af74855a60 Renaming cleanup, no pgindent yet. 1998-09-01 03:29:17 +00:00
Marc G. Fournier 7dbcf31be2 From: Massimo Dal Zotto <dz@cs.unitn.it>
lock.patch

        I have rewritten lock.c cleaning up the code and adding better
        assert checking I have also added some fields to the lock and
        xid tags for better support of user locks. There is also a new
        function which returns an array of pids owning a lock.
        I'm using this code from over six months and it works fine.
1998-08-25 21:20:32 +00:00
Vadim B. Mikheev be8300b18f Use Snapshot in heap access methods. 1998-07-27 19:38:40 +00:00
Bruce Momjian 2584029e31 Rename locking structure names to be clearer. Add narrative to
backend flowchart.
1998-06-30 02:33:34 +00:00
Bruce Momjian 54aabaa800 Rename BindingTable to ShmemIndex. 1998-06-27 15:47:48 +00:00
Bruce Momjian e747c58718 Fix for hang after postmaster restart. Add new proc_exit and
shmem_exit to replace exitpg().
1998-06-27 04:53:49 +00:00
Bruce Momjian 8ed5918faa Solaris cleanup. 1998-06-19 02:55:19 +00:00
Bruce Momjian 6bd323c6b3 Remove un-needed braces around single statements. 1998-06-15 19:30:31 +00:00
Bruce Momjian a32450a585 pgindent run before 6.3 release, with Thomas' requested changes. 1998-02-26 04:46:47 +00:00
Bruce Momjian d067f83b27 pgindent changes for Thomas proc/lock cleanup 1998-02-25 00:31:23 +00:00
Bruce Momjian 19ba229299 Fix for locking problems an dpriority. 1998-02-24 19:58:26 +00:00
Bruce Momjian 9540d9786e FIFO lock wait queue, with readers grouped together. 1998-02-19 15:04:45 +00:00
Bruce Momjian 8abd424369 More deadlock code to check for escallation locks.
offsetof() addition to local socket size.
1998-01-28 02:29:40 +00:00
Bruce Momjian 862927f443 Real deadlock detection. 1998-01-27 03:00:43 +00:00
Bruce Momjian c16ebb0f67 getpid/pid cleanup 1998-01-25 05:15:15 +00:00
Bruce Momjian 0e8ac82c63 Fix a variety of locking problems like newer lock waiters getting
lock before older waiters, and having readlock people not share
locks if a writer is waiting for a lock, and waiting writers not
getting priority over waiting readers.
1998-01-23 22:16:48 +00:00
Bruce Momjian 661bb38812 Cleanup deadlock message. 1998-01-23 06:01:36 +00:00
Bruce Momjian 679d39b9c8 Goodbye ABORT. Hello ERROR for all errors. 1998-01-07 21:07:04 +00:00
Bruce Momjian 0d9fc5afd6 Change elog(WARN) to elog(ERROR) and elog(ABORT). 1998-01-05 03:35:55 +00:00
Bruce Momjian 9f133d23ff Remove duplocate lock_timeout value. 1997-10-30 17:23:59 +00:00
Bruce Momjian 3f365ba0fc Inline memset() as MemSet(). 1997-09-18 20:22:58 +00:00