Commit Graph

383 Commits

Author SHA1 Message Date
Bruce Momjian 050371fccd More cpu cleanups, only for 6.6. 1999-07-13 20:12:51 +00:00
Bruce Momjian 70ce98b77a Rename pg_temp to pg_sorttemp so it does not conflict with temp table names. 1999-07-08 02:46:39 +00:00
Bruce Momjian 97dfff832c Fix to prevent too large tuple from being created. 1999-07-03 00:33:04 +00:00
Vadim B. Mikheev 49f68a8584 Avoid disk writes for read-only transactions. 1999-06-29 04:54:49 +00:00
Bruce Momjian fe90c54800 Add var defines for no testandset 1999-06-26 15:58:28 +00:00
Bruce Momjian 0591bbd558 Patch to allow vacuum on multi-segment tables, from Hiroshi Inoue 1999-06-18 16:47:23 +00:00
Tom Lane 642d21a59b Move default NBuffers setting into config.h, and rename it
to DEF_NBUFFERS for readability.  Make sure the default value is OK
according to postmaster.c's new sanity check for -B values.
1999-06-12 22:17:24 +00:00
Vadim B. Mikheev 3b79cc0c55 Removed bad Assert(!buf->ri_lock) when unlocking exclusively
locked buffer.
1999-06-11 09:00:02 +00:00
Bruce Momjian 3b9ef4d073 Change mdtruncate to truncate and not unlink.
Hiroshi Inoue
1999-06-11 02:39:43 +00:00
Vadim B. Mikheev 78f7ccc982 1. Fix for elog(ERROR, "EvalPlanQual: t_xmin is uncommitted ?!")
and possibly for other cases too:

   DO NOT cache status of transaction in unknown state
   (i.e. non-committed and non-aborted ones)

   Example:
   T1 reads row updated/inserted by running T2 and cache T2 status.
   T2 commits.
   Now T1 reads a row updated by T2 and with HEAP_XMAX_COMMITTED
   in t_infomask (so cached T2 status is not changed).
   Now T1 EvalPlanQual gets updated row version without HEAP_XMIN_COMMITTED
   -> TransactionIdDidCommit(t_xmin) and TransactionIdDidAbort(t_xmin)
   return FALSE and T2 decides that t_xmin is not committed and gets
   ERROR above.

   It's too late to find more smart way to handle such cases and so
   I just changed xact status caching and got rid TransactionIdFlushCache()
   from code.

   Changed: transam.c, xact.c, lmgr.c and transam.h - last three
   just because of TransactionIdFlushCache() is removed.

2. heapam.c:

   T1 marked a row for update. T2 waits for T1 commit/abort.
   T1 commits. T3 updates the row before T2 locks row page.
   Now T2 sees that new row t_xmax is different from xact id (T1)
   T2 was waiting for. Old code did Assert here. New one goes to
   HeapTupleSatisfiesUpdate. Obvious changes too.

3. Added Assert to vacuum.c
4. bufmgr.c: break
   Assert(buf->r_locks == 0 && !buf->ri_lock)
   into two Asserts.
1999-06-10 14:17:12 +00:00
Vadim B. Mikheev 1b812d9358 1. xact.c: update comments about changing MyProc->xid and MyProc->xmin.
2. varsup.c:ReadNewTransactionId(): don't read nextXid from disk -
   this func doesn't allocate next xid, so ShmemVariableCache->nextXid
   may be used (but GetNewTransactionId() must be called first).
3. vacuum.c: change elog(ERROR, "Child item....") to elog(NOTICE) -
   this is not ERROR, proper handling is just not implemented, yet.
4. s_lock.c: increase S_MAX_BUSY by 2 times.
5. shmem.c:GetSnapshotData(): have to call ReadNewTransactionId()
   _after_ SpinAcquire(ShmemIndexLock).
1999-06-06 20:19:35 +00:00
Vadim B. Mikheev 5541abee0d 1. Additional fix against ERROR: Child itemid marked as unused
in CommitTransaction().
2. Changes in GetSnapshotData().
1999-06-03 13:33:13 +00:00
Tom Lane cc384fa240 Round up shmem size estimate to 1Kb boundary. 1999-05-31 18:28:52 +00:00
Vadim B. Mikheev 219bb76d61 Release XactLockTable share lock immediately after this lock is acquired
(no sense to hold it) or we'll be out of lock entries.
Great thanks to Hiroshi Inoue.
1999-05-31 01:48:13 +00:00
Vadim B. Mikheev bbbc211ed1 Fix xid table sizing. 1999-05-29 06:14:43 +00:00
Tom Lane dfefad7db0 Missing semicolons in non-HAS_TEST_AND_SET code paths :-( 1999-05-29 03:58:43 +00:00
Tom Lane dc6d404959 Repair performance problem in SI segment manipulations: iterating
through MAXBACKENDS array entries used to be fine when MAXBACKENDS = 64.
It's not so cool with MAXBACKENDS = 1024 (or more!), especially not in a
frequently-used routine like SIDelExpiredDataEntries.  Repair by making
procState array size be the soft MaxBackends limit rather than the hard
limit, and by converting SIGetProcStateLimit() to a macro.
1999-05-28 17:03:31 +00:00
Bruce Momjian 278bbf4572 Make functions static or NOT_USED as appropriate. 1999-05-26 12:57:23 +00:00
Bruce Momjian fcff1cdf4e Another pgindent run. Sorry folks. 1999-05-25 22:43:53 +00:00
Bruce Momjian 4eadfe8754 Make 0x007f -> (unsigned)0x7f to make pgindent happy. 1999-05-25 22:04:56 +00:00
Bruce Momjian 07842084fe pgindent run over code. 1999-05-25 16:15:34 +00:00
Bruce Momjian 184dd28d5c This is actually more of a fundamental problem with mdtruncate. It
looks
like someone just didn't add support for multiple segments for
truncation.

The following patch seems to do the right thing, for me at least.
It passed my tests, my data looks right(no data that shouldn't be in
there) and regression is ok.

Ole Gjerde
1999-05-17 06:38:41 +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
Bruce Momjian 4853495e03 Change error messages to oids come out as %u and not %d. Change has no
real affect now.
1999-05-10 00:46:32 +00:00
Tom Lane c1167a08ca Add 'temporary file' facility to fd.c, and arrange for temp
files to be closed automatically at transaction abort or commit, should
they still be open.  Also close any still-open stdio files allocated with
AllocateFile at abort/commit.  This should eliminate problems with leakage
of file descriptors after an error.  Also, put in some primitive buffered-IO
support so that psort.c can use virtual files without severe performance
penalties.
1999-05-09 00:52:08 +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 099164039d cleanup 1999-04-30 17:03:04 +00:00
Bruce Momjian f4dcafc825 Clean up typo causing compile failure. 1999-04-30 16:22:46 +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
Bruce Momjian 35b168656b Add disk space message to "can not extend" message. 1999-04-23 19:37:42 +00:00
Tom Lane 5ce851dcda Reduce default file size limit to 1Gb, and move the
configuration constant to config.h.
1999-04-05 22:25:11 +00:00
Tom Lane 0b874f01dd Clean up compile errors and warnings, cf Billy Allie's
complaints (and some of my own).
1999-04-02 04:51:05 +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
Bruce Momjian 58118db39d Add new postgres -O option to allow system table structure changes. 1999-03-17 22:53:31 +00:00
Bruce Momjian 4c9392230a Done.
o overwriting an existing lobj now works
o 8KB garbage block always inserted problem is fixed

Tatsuo Ishii
1999-03-14 16:08:17 +00:00
Bruce Momjian aba8c12f67 We have tested the patches on three platforms:
NetBSD/macppc
LinuxPPC
FreeBSD 2.2.6-RELEASE

All of them seem happy with the regression test. Note that, however,
compiling with optimization enabled on NetBSD/macppc causes an initdb
failure (other two platforms are ok). After checking the asm code, we
are suspecting that might be a compiler(egcs) bug.

Tatsuo Ishii
1999-03-14 16:03:33 +00:00
Tom Lane 731603a92b A few further tweaks to shared memory space estimation.
This change brings the default size of the main shmem block back under 1MB,
which is a fairly popular value for the kernel's SHMMAX parameter.
1999-03-06 21:17:56 +00:00
Bruce Momjian 9aa7e899dc Ok. I found an align problem in lobj that might not appear other than
Solaris/sparc. Please apply included patches to
src/backend/storage/large_object/inv_api.c and try again. (These are

Tatsuo Ishii
1999-02-22 16:46:43 +00:00
Tom Lane bcfdc9df04 Repair some pretty serious problems in dynahash.c and
shared memory space allocation.  It's a wonder we have not seen bug
reports traceable to this area ... it's quite clear that the routine
dir_realloc() has never worked correctly, for example.
1999-02-22 06:16:57 +00:00
Marc G. Fournier 8c3e8a8a0e From: Tatsuo Ishii <t-ishii@sra.co.jp>
Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef
NOT_USED" for current. I have tested these patches in that the
postgres binaries are identical.
1999-02-21 03:49:55 +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 19cc38b28d Large object write-into-middle fix from Tatsuo Ishii. 1999-02-04 14:52:00 +00:00
Bruce Momjian 9322950aa4 Cleanup of source files where 'return' or 'var =' is alone on a line. 1999-02-03 21:18:02 +00:00
Bruce Momjian 4390b0bfbe Add TEMP tables/indexes. Add COPY pfree(). Other cleanups. 1999-02-02 03:45:56 +00:00
Bruce Momjian c91dbcc5c7 The following patch finishes primary key support. Previously, when
a field was labelled as a primary key, the system automatically
created a unique index on the field.  This patch extends it so
that the index has the indisprimary field set.  You can pull a list
of primary keys with the followiing select.

SELECT pg_class.relname, pg_attribute.attname
    FROM pg_class, pg_attribute, pg_index
    WHERE pg_class.oid = pg_attribute.attrelid AND
        pg_class.oid = pg_index.indrelid AND
        pg_index.indkey[0] = pg_attribute.attnum AND
        pg_index.indisunique = 't';

There is nothing in this patch that modifies the template database to
set the indisprimary attribute for system tables.  Should they be
changed or should we only be concerned with user tables?

D'Arcy
1999-01-21 22:48:20 +00:00
Tom Lane 740c9da76d fixes to lock debugging macros from Massimo Dal Zotto 1999-01-17 20:59:56 +00:00
Bruce Momjian 7a6b562fdf Apply Win32 patch from Horak Daniel. 1999-01-17 06:20:06 +00:00
Tom Lane 21badba151 Replace direct inclusions of c.h with inclusion of postgres.h,
to ensure that config.h is included as well.
1999-01-17 03:04:57 +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 58e539e574 Long awaited port for NetBSD/m68k was finally done by Mr. Mutsuki
Nakajima. Since he is not subscribing the mailing list, I'm posting
his patches by his request.  According to him, he has successfully
compiled and passed the regression test on Mac SE/30 running
NetBSD/m68k. Also, another person has reported that with the patches
PostgreSQL is working on NetBSD/sun3 too.
--
Tatsuo Ishii
1998-12-26 18:15:53 +00:00
Bruce Momjian 3cd3be92ff Fix deadlock so it only checks once. 1998-12-18 19:45:38 +00:00
Bruce Momjian b8d5f02e4e I have ported PostgreSQL 6.4 to Cobalt Qube running Linux 2.0.33 with
MIPS cpu (I think it's R4000). I have tested the patches on LinuxPPC
and FreeBSD. I believe they do not harm other platforms.
--
Tatsuo Ishii
1998-12-18 17:25:41 +00:00
Vadim B. Mikheev 3498d878cb SET TRANSACTION ISOLATION LEVEL ...
LOCK TABLE IN ... MODE
...implemented
1998-12-18 09:10:39 +00:00
Vadim B. Mikheev c13a64d7fb Serialized mode works! 1998-12-16 11:53:55 +00:00
Vadim B. Mikheev 3f7fbf85dc Initial MVCC code.
New code for locking buffer' context.
1998-12-15 12:47:01 +00:00
Bruce Momjian afded8add3 Fix for lo_import crash. 1998-12-13 05:07:50 +00:00
Vadim B. Mikheev 6beba218d7 New HeapTuple structure/interface. 1998-11-27 19:52:36 +00:00
Tom Lane 3d87216ab9 Get rid of some minor compiler warnings.
(HP's cc doesn't like if you forward-declare a routine static,
and then don't make it static in the actual definition...)
1998-10-26 01:00:13 +00:00
Bruce Momjian 173c555948 Make functions static or ifdef NOT_USED. Prevent pg_version creation. 1998-10-08 18:30:52 +00:00
Bruce Momjian 237e0a6306 Fix for double free from Tatsuo Ishii 1998-10-06 03:55:43 +00:00
Bruce Momjian 4a9da7e5c4 NS32K lock patch reversed. 1998-09-18 17:18:41 +00:00
Bruce Momjian 33554989c0 Fix for NS32K machine. 1998-09-18 05:36:24 +00:00
Bruce Momjian 6921f364db >
> Open portability issues:
>
> /usr/local should be searched for lib and include for all ports if
present
> (currently not working, I have libreadline there)
>
> the stream functions on AIX need a size_t for addrlen's in
fe-connect.c and pqcomm.c.
>
> lock.c still has an incompatible TPRINTF(flags, args...) definition

Massimo
1998-09-09 18:32:05 +00:00
Bruce Momjian 4b814b1886 offsetof cleanup. 1998-09-04 18:21:11 +00:00
Bruce Momjian f93281a1a1 t_bits alignment fix from Tatsuo Ishii 1998-09-04 18:05:39 +00:00
Bruce Momjian 63e39ab9a9 O2. Seems tas() for PPC (storage/buffer/s_lock.c) never works if
compiled with -O0. Included are patches that should fix the problem
(of course I have confirmed -O2 works with this patch).

BTW, here is a platforms/regression test failure(serious one--backend
death) matrix.

Tatsuo Ishii
1998-09-03 02:14:39 +00:00
Bruce Momjian 58fdae0ddf Fix for indexing problems. 1998-09-02 23:05:37 +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 b686927f4b From: Massimo Dal Zotto <dz@cs.unitn.it>
I have this small patch which fixes a typo in my previous lock patches.
Fortunately the bug affects only user locks.

-
1998-08-28 12:08:03 +00:00
Bruce Momjian 4166f73997 Fix 'd ' should be 'd'. 1998-08-27 01:04:23 +00:00
Marc G. Fournier 7414d61950 From: Massimo Dal Zotto <dz@cs.unitn.it>
> tprintf.patch
>
>       tprintf.patch
>
>       adds functions and macros which implement a conditional trace package
>       with the ability to change flags and numeric options of running
>       backends at runtime.
>       Options/flags can be specified in the command line and/or read from
>       the file pg_options in the data directory.
1998-08-25 21:34:10 +00:00
Marc G. Fournier 53d7d47302 From: Massimo Dal Zotto <dz@cs.unitn.it>
> sinval.patch
>
>       fixes a problem in SI cache which causes table overflow if some
>       backend is idle for a long time while other backends keep adding
>       entries.
>       It uses the new signal handling implemented in tprintf.patch.
>       I have also increacasesed the max number of backends from 32 to 64
>       and the table size from 1000 to 5000.
>       I don't know if anybody is working on SI, but until another
>       solution is found this patch fixes the problem. I have received
>       messages from other people reporting the same problem which I
>       fixed many months ago.
1998-08-25 21:31:20 +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
Bruce Momjian c0b01461db o note that now pg_database has a new attribuite "encoding" even
if MULTIBYTE is not enabled. So be sure to run initdb.

o these patches are made against the latest source tree (after
Bruce's massive patch, I think) BTW, I noticed that after running
regression, the oid field of pg_type seems disappeared.

	regression=> select oid from pg_type; ERROR:  attribute
	'oid' not found

this happens after the constraints test. This occures with/without
my patches. strange...

o pg_database_mb.h, pg_class_mb.h, pg_attribute_mb.h are no longer
used, and shoud be removed.

o GetDatabaseInfo() in utils/misc/database.c removed (actually in
#ifdef 0). seems nobody uses.

t-ishii@sra.co.jp
1998-08-24 01:14:24 +00:00
Bruce Momjian 8ae24a7566 update fixes. 1998-08-20 22:24:11 +00:00
Bruce Momjian 7971539020 heap_fetch requires buffer pointer, must be released; heap_getnext
no longer returns buffer pointer, can be gotten from scan;
	descriptor; bootstrap can create multi-key indexes;
pg_procname index now is multi-key index; oidint2, oidint4, oidname
are gone (must be removed from regression tests); use System Cache
rather than sequential scan in many places; heap_modifytuple no
longer takes buffer parameter; remove unused buffer parameter in
a few other functions; oid8 is not index-able; remove some use of
single-character variable names; cleanup Buffer variables usage
and scan descriptor looping; cleaned up allocation and freeing of
tuples; 18k lines of diff;
1998-08-19 02:04:17 +00:00
Bruce Momjian 79c8d2e3a0 Change owner from oid to int4 type. 1998-08-11 18:28:49 +00:00
Bruce Momjian af5fde7491 Make large objects their own relkind type. Fix dups in pg_class_mb
files.  Fix sequence creation hack for relkind type.
1998-08-06 05:13:14 +00:00
Vadim B. Mikheev 0d78e8c112 Lmgr cleanup, new locking modes for LLL. 1998-08-01 15:26:38 +00:00
Vadim B. Mikheev be8300b18f Use Snapshot in heap access methods. 1998-07-27 19:38:40 +00:00
Marc G. Fournier 5979d73841 From: t-ishii@sra.co.jp
As Bruce mentioned, this is due to the conflict among changes we made.
Included patches should fix the problem(I changed all MB to
MULTIBYTE). Please let me know if you have further problem.

P.S. I did not include pathces to configure and gram.c to save the
file size(configure.in and gram.y modified).
1998-07-26 04:31:41 +00:00
Marc G. Fournier bf00bbb0c4 I really hope that I haven't missed anything in this one...
From: t-ishii@sra.co.jp

Attached are patches to enhance the multi-byte support.  (patches are
against 7/18 snapshot)

* determine encoding at initdb/createdb rather than compile time

Now initdb/createdb has an option to specify the encoding. Also, I
modified the syntax of CREATE DATABASE to accept encoding option. See
README.mb for more details.

For this purpose I have added new column "encoding" to pg_database.
Also pg_attribute and pg_class are changed to catch up the
modification to pg_database.  Actually I haved added pg_database_mb.h,
pg_attribute_mb.h and pg_class_mb.h. These are used only when MB is
enabled. The reason having separate files is I couldn't find a way to
use ifdef or whatever in those files. I have to admit it looks
ugly. No way.

* support for PGCLIENTENCODING when issuing COPY command

commands/copy.c modified.

* support for SQL92 syntax "SET NAMES"

See gram.y.

* support for LATIN2-5
* add UNICODE regression test case
* new test suite for MB

New directory test/mb added.

* clean up source files

Basic idea is to have MB's own subdirectory for easier maintenance.
These are include/mb and backend/utils/mb.
1998-07-24 03:32:46 +00:00
Vadim B. Mikheev 5afe171443 VariableCache (next XID generator) is placed in shmem. 1998-07-21 06:17:39 +00:00
Bruce Momjian e0058b6172 Theses buffer leaks are caused by indexes that are kept open between
calls. Outside a transaction, the backend detects them as buffer
leaks; it sends a NOTICE, and frees them. This sometimes cause a
segmentation fault (at least on Linux). These indexes are initialized
on the first lo_read/lo_write/lo_tell call, and (normally) closed
on a lo_close call.  Thus the buffer leaks appear when lo direct
access functions are used, and not with lo_import/lo_export functions
(libpq version calls lo_close before ending the command, and the
backend version uses another path).

The included patches (against recent snapshot, and against 6.3.2)
cause indexes to be closed on transaction end (that is on explicit
'END' statment, or on command termination outside trasaction blocks),
thus preventing the buffer leaks while increasing performance inside
transactions. Some (all?) 'classic' memory leaks are also removed.

I hope it will be ok.

--- Pascal ANDRE, graduated from Ecole Centrale Paris andre@via.ecp.fr
1998-07-21 04:17:30 +00:00
Bruce Momjian 0da6358f37 Cleanup use of 16 that should be NAMEDATALEN. 1998-07-20 16:57:18 +00:00
Bruce Momjian 34797d4225 Cleanup Name usage. 1998-07-20 16:14:18 +00:00
Bruce Momjian 5aea4062d6 Inline function, rename libpq variablees, change lrel to lockrel. 1998-07-13 16:35:04 +00:00
Bruce Momjian 76dd88f10b Reverse out unused patch. 1998-07-12 04:43:28 +00:00
Bruce Momjian 2a8996f631 Print relation name before vacuum, results after vacuum. 1998-07-12 04:37:55 +00:00
Bruce Momjian 824c6865fa Update lock manager README. 1998-07-06 18:16:07 +00:00
Bruce Momjian d5283ccd3e Rename shared memory area. 1998-06-30 19:09:57 +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 f21fa6a773 Rename lockt to locktype and rename LOCKT to LOCKTYPE. 1998-06-28 21:17:36 +00:00
Bruce Momjian 0cba552301 Update backend flowchart. 1998-06-28 06:17:14 +00:00
Bruce Momjian 54aabaa800 Rename BindingTable to ShmemIndex. 1998-06-27 15:47:48 +00:00
Bruce Momjian 7487a82667 More cleanups for compiler warnings. 1998-06-27 14:06:41 +00:00
Bruce Momjian 48a94aaf51 Rename proc_exit_clear to on_exit_reset. 1998-06-27 13:24:21 +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 8fa93b016a Rename Lockm to Locks. 1998-06-26 19:57:50 +00:00
Bruce Momjian ae6a658584 Rename LockTab to LockTable in function name. 1998-06-26 01:58:46 +00:00
Bruce Momjian eef15f555b Rename BindingTab to BindingTable. 1998-06-25 14:24:35 +00:00
Bruce Momjian 898b3e6f6c Back out some changes I made just for testing. 1998-06-23 17:59:54 +00:00
Bruce Momjian 9dde6b3de9 Add underscores in manual references. 1998-06-23 17:52:38 +00:00
Bruce Momjian cfef6ef4ff cleanups 1998-06-23 16:04:46 +00:00
Bruce Momjian cba0c6559a rename MAIN_MEMORY to STABLE_MEMORY_STORAGE 1998-06-23 15:35:48 +00:00
Bruce Momjian 8ed5918faa Solaris cleanup. 1998-06-19 02:55:19 +00:00
Bruce Momjian c711d41752 Add Assert(). 1998-06-18 04:20:34 +00:00
Bruce Momjian 6ab714e3e8 Cleanup UsePrivateMemory define. 1998-06-18 03:56:08 +00:00
Bruce Momjian 94cc3abe60 Cleanups. 1998-06-18 03:44:00 +00:00
Bruce Momjian 0d8e7f6381 Here is the long awaited optimized version of the S_LOCK patch.
This incorporates all the precedeing patches and emailed suggestions
and the results of the performance testing I posted last week. I
would like to get this tested on as many platforms as possible so
I can verify it went in correctly (as opposed to the horrorshow
last time I sent in a patch).

Once this is confirmed, I will make a tarball of files that can be
dropped into a 6.3.2 source tree as a few people have asked for
this in 6.3.2 as well.

David Gould
1998-06-16 07:18:16 +00:00
Bruce Momjian 6bd323c6b3 Remove un-needed braces around single statements. 1998-06-15 19:30:31 +00:00
Bruce Momjian 27db9ecd0b Fix macros that were not properly surrounded by parens or braces. 1998-06-15 18:40:05 +00:00
Bruce Momjian 212c905e2c Remove fork()/exec() and only do fork(). Small cleanups. 1998-05-29 17:00:34 +00:00
Bruce Momjian b1eb7b5927 Cleanup. 1998-05-26 17:29:07 +00:00
Marc G. Fournier f9322c66d3 Missed the __alpha__ to __alpha change...
From: David Gould <dg@illustra.com>
1998-05-04 23:49:17 +00:00
Marc G. Fournier c73e186948 Okay...this should fix the s_lock() patches from David to what he
currently has...

From: David Gould <dg@illustra.com>
1998-05-04 16:58:59 +00:00
Marc G. Fournier 1d36bdcfa6 Major screwed up s_lock patches...need to be fixed... 1998-05-04 15:45:03 +00:00
Marc G. Fournier 51a1741cfb From: Jeroen van Vianen <jeroenv@design.nl>
Attached patch will add a version() function to Postges, e.g.

template1=> select version();
version
------------------------------------------------------------
PostgreSQL 6.3.2 on i586-pc-linux-gnu, compiled by gcc 2.8.1
(1 row)
1998-04-29 12:41:29 +00:00
Marc G. Fournier 1af6b56427 From: Ryan Kirkpatrick <rkirkpat@nag.cs.colorado.edu>
Ok, I have finally gotten all of the defines for Dec/Alpha and
Linux/Alpha sorted out as Marc asked. There is no longer any need for
'-Dalpha' or '-Dlinuxalpha' in either the Dec/Alpha or the Linux/Alpha
template files (./src/template/{alpha,linuxalpha}). I have replaced every
instance of 'alpha' or '__alpha__' with '__alpha', as that appears to be
the common symbol between C compilers on both operating systems (RH4.2 &
DecUnix 4.0b) for alpha.
1998-04-27 14:46:51 +00:00
Bruce Momjian 09baa3cc81 This patch...
1. Removes the unnecessary "#define AbcRegProcedure 123"'s from
pg_proc.h.

2. Changes those #defines to use the names already defined in
fmgr.h.

3. Forces the make of fmgr.h in backend/Makefile instead of having
it
   made as a dependency in access/common/Makefile  *hack*hack*hack*

4. Rearranged the #includes to a less helter-skelter arrangement,
also
    changing <file.h> to "file.h" to signify a non-system header.

5. Removed "pg_proc.h" from files where its only purpose was for
the
   #defines removed in item #1.

6. Added "fmgr.h" to each file changed for completeness sake.

Turns out that #6 was not necessary for some files because fmgr.h
was being included in a roundabout way SIX levels deep by the first
include.

"access/genam.h"
 ->"access/relscan.h"
   ->"utils/rel.h"
     ->"access/strat.h"
       ->"access/skey.h"
	 ->"fmgr.h"

So adding fmgr.h really didn't add anything to the compile, hopefully
just made it clearer to the programmer.

S Darren.
1998-04-27 04:08:07 +00:00
Bruce Momjian 4cbfeef912 Inline some small functions called for every row. 1998-04-24 14:43:33 +00:00
Bruce Momjian 2ffd727531 ASSERT fixes. 1998-04-06 17:27:54 +00:00
Bruce Momjian 645146260e Cleanup of compiler warnings. 1998-04-06 02:38:26 +00:00
Bruce Momjian 1e801a8f16 Hi,
Attached you'll find a (big) patch that fixes make dep and make
depend in all Makefiles where I found it to be appropriate.

It also removes the dependency in Makefile.global for NAMEDATALEN
and OIDNAMELEN by making backend/catalog/genbki.sh and bin/initdb/initdb.sh
a little smarter.

This no longer requires initdb.sh that is turned into initdb with
a sed script when installing Postgres, hence initdb.sh should be
renamed to initdb (after the patch has been applied :-) )

This patch is against the 6.3 sources, as it took a while to
complete.

Please review and apply,

Cheers,

Jeroen van Vianen
1998-04-06 00:32:26 +00:00
Bruce Momjian 4b6fcc4459 Remove GetDatabaseName/Path and use globals. Make consts later. 1998-04-05 21:04:50 +00:00
Marc G. Fournier 896a42a5a7 From: Maurice Gittens <mgittens@david.gits.nl>
After applying the following patch there remain two
probable buffer overruns detected by Electric Fence during
the regression test.
I'll try find out what causes the remain two ones.

This patch also corrects a typo in smgr.c.
1998-04-01 15:35:33 +00:00
Bruce Momjian 9a0dd4fb18 There's a patch attached to fix gcc 2.8.x warnings, except for the
yyerror ones from bison. It also includes a few 'enhancements' to
the C programming style (which are, of course, personal).

The other patch removes the compilation of backend/lib/qsort.c, as
qsort() is a standard function in stdlib.h and can be used any
where else (and it is). It was only used in
backend/optimizer/geqo/geqo_pool.c, backend/optimizer/path/predmig.c,
and backend/storage/page/bufpage.c

> > Some or all of these changes might not be appropriate for v6.3,
since we > > are in beta testing and since they do not affect the
current functionality.  > > For those cases, how about submitting
patches based on the final v6.3 > > release?

There's more to come. Please review these patches. I ran the
regression tests and they only failed where this was expected
(random, geo, etc).

Cheers,

Jeroen
1998-03-30 16:47:35 +00:00
Bruce Momjian 922c83fe62 OK...here is a patch that will cause the magnetic disk storage
manager to not try to split files in 2 gig chunks.  It will just
try to get another block.

If applied, everything is just as before. But if LET_OS_MANAGE_FILESIZE
is defined, the chaining disappears and the file just keeps on
going, and going, and going, til the OS barfs.

Darren King
1998-03-20 04:22:54 +00:00
Marc G. Fournier 6a9627e792 Last minute clean up for SunOS...
From: t-ishii@sra.co.jp
1998-03-02 05:42:15 +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
Vadim B. Mikheev 3ae4edb245 Fix relation path constraction in mdblindwrt(). 1998-02-23 13:58:04 +00:00
Bruce Momjian 9540d9786e FIFO lock wait queue, with readers grouped together. 1998-02-19 15:04:45 +00:00
Bruce Momjian 24cab6bd0d Goodbye register keyword. Compiler knows better. 1998-02-11 19:14:04 +00:00
Bruce Momjian 2c482cdbf2 Pass attypmod through to executor by adding to Var and Resdom. 1998-02-10 04:02:59 +00:00
Marc G. Fournier 4e9dd95296 From: Peter T Mount <patches@maidast.demon.co.uk>
[This is a repost - it supercedes the previous one. It fixes the patch so
it doesn't bread aix port, plus there's a file missing out of the
original post because difforig doesn't pick up new files. It's now
attached. peter]

This patch brings the JDBC driver up to the current protocol spec.
Basically, the backend now tells the driver what authentication scheme to
use.

The patch also fixes a performance problem with large objects. In the
buffer manager, each fastpath call was sending multiple Notifications to
the backend (sometimes more data in the form of notifications were being
sent than blob data!).
1998-02-02 13:17:01 +00:00
Bruce Momjian 726c3854cb Inline fastgetattr and others so data access does not use function
calls.
1998-01-31 04:39:26 +00:00
Bruce Momjian 0ff43badd5 Lock cleanup 1998-01-28 06:52:58 +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 b4564a98fa Deadlock ceallnup.
(void) change for aix and hp compilers.

protocol cleanup.
1998-01-27 15:35:30 +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