Commit Graph

4196 Commits

Author SHA1 Message Date
Bruce Momjian 249ecff611 indicies to indexes from Neil Conway 2001-07-12 20:35:54 +00:00
Tom Lane 3284758a17 Remove grammar restrictions on order of optional clauses in CREATE GROUP.
From Vince Vielhaber.
2001-07-12 18:03:00 +00:00
Bruce Momjian 79d78bb26a Add missing encode file. 2001-07-12 14:05:31 +00:00
Tom Lane b9f3a929ee Create a new HeapTupleSatisfiesVacuum() routine in tqual.c that embodies the
validity checking rules for VACUUM.  Make some other rearrangements of the
VACUUM code to allow more code to be shared between full and lazy VACUUM.
Minor code cleanups and added comments for TransactionId manipulations.
2001-07-12 04:11:13 +00:00
Bruce Momjian 7771436e18 > > Put encode() into base system. Used part of Alex' patch
> > for docs, hope he does not mind ;)

Marko Kreen
2001-07-11 22:14:03 +00:00
Bruce Momjian b6564c445e Disable COPY TO/FROM on views. 2001-07-11 21:53:59 +00:00
Bruce Momjian 461ea6b796 Better document use of ident on localhost, per Tom Lane's idea. 2001-07-11 20:32:11 +00:00
Bruce Momjian 357d9bdce5 Move export to a separate line, per Peter E. 2001-07-11 19:36:41 +00:00
Tom Lane 153f400676 Instead of believing SOMAXCONN from the system header files (which is
a lie on many Unixen), invoke listen() with MIN(MaxBackends*2, 10000).
The clamp value 10000 is configurable in config.h.in, if that proves
to be necessary --- hopefully it won't.
2001-07-11 19:03:07 +00:00
Tom Lane 11ac469f4a Remove direct calls of index_insert(), instead use ExecInsertIndexTuples().
This makes VACUUM work properly with partial indexes, and avoids memory
leakage with functional indexes.  Also, suppress complaint about fewer
index tuples than heap tuples when the index is a partial index.
From Martijn van Oosterhout.
2001-07-11 18:38:07 +00:00
Tom Lane 320b6db090 Changes from Vince Vielhaber to allow the optional clauses of CREATE
USER and ALTER USER to appear in any order, not only the fixed order
they used to be required to appear in.
Also, some changes from Tom Lane to create a FULL option for VACUUM;
it doesn't do anything yet, but I needed to change many of the same
files to make that happen, so now seemed like a good time.
2001-07-10 22:09:29 +00:00
Tom Lane 975da0a75e Remove formatter's assumption that year would never exceed four digits.
Enforce MAXTZLEN for all datestyles, not just some.  Remove macro
definitions that were redundant with datetime.h.
2001-07-10 01:41:47 +00:00
Tom Lane fa9a95d6c4 Remove unnecessarily enthusiastic parenthesizing in reverse-listing of
IS NULL, IS TRUE, and friends (my fault...)
2001-07-10 00:02:02 +00:00
Tom Lane cb052e0bf1 Fix rule rewriter so that new ordering of ON INSERT actions applies
in cases of qualified rules as well as unqualified ones.  Tweak rules
test to avoid cluttering output with dummy SELECT results.  Update
documentation to match code.
2001-07-09 23:50:32 +00:00
Tom Lane 4fe42dfbc3 Add SHARE UPDATE EXCLUSIVE lock mode, coming soon to a VACUUM near you.
Name chosen per pghackers discussion around 6/22/01.
2001-07-09 22:18:34 +00:00
Tom Lane 55432fedd2 Implement LockBufferForCleanup(), which will allow concurrent VACUUM
to wait until it's safe to remove tuples and compact free space in a
shared buffer page.  Miscellaneous small code cleanups in bufmgr, too.
2001-07-06 21:04:26 +00:00
Jan Wieck 9981b0f9ef Fire rule actions ON INSERT after original statement (if not INSTEAD).
Jan
2001-07-06 13:40:47 +00:00
Hiroshi Inoue 852a26f79e Fix my old fault(returns auto variable reference). 2001-07-06 09:41:36 +00:00
Tom Lane fb0919fb83 Don't assume that max offset number stays fixed on a page when we're
not holding a pin on the page.  Use double instead of long to count
rows in relation, so that code still works for > LONG_MAX rows in rel.
2001-07-05 19:33:35 +00:00
Jan Wieck 6497a7fd71 Added GUC configuration options to control access statistics.
Jan
2001-07-05 15:19:40 +00:00
Tom Lane 499c81d3a3 Prohibit a column from appearing twice in a PRIMARY KEY or UNIQUE
constraint.  This case (a) is useless, (b) violates SQL92, and
(c) is certain to cause a failure downstream when we try to create
an index with duplicated column names.  So give an appropriate error
message instead of letting the index failure occur.  Per report from
Colin Strickland.  NOTE: currently, CREATE INDEX fooi ON foo(f1,f1)
still fails with 'cannot insert duplicate key' error.  Should we
change that too?  What about functional indexes?
2001-07-04 17:36:54 +00:00
Tom Lane 3ec9fb893e Add a little more error checking and reporting to readDatum(). 2001-07-03 16:52:48 +00:00
Tom Lane 31c1fea6a8 Start the stats collector at a less randomly chosen time. Bad idea
to start it before we have acquired the data directory lock; also a
bad idea to start it before we have set up to catch SIGCHLD signals.
2001-07-03 16:52:12 +00:00
Tom Lane c8fe66dfb2 Don't go into infinite loop if /home/postgres/testversion/data directory is not writable. 2001-07-03 16:49:48 +00:00
Tom Lane 42748087c1 First non-stub implementation of shared free space map. It's not super
useful as yet, since its primary source of information is (full) VACUUM,
which makes a concerted effort to get rid of free space before telling
the map about it ... next stop is concurrent VACUUM ...
2001-07-02 20:50:46 +00:00
Tom Lane a29f6c095c Make the found-a-buffer-when-we-were-expecting-to-extend-the-rel path
actually work.  It had been throwing an Assert as of my recent changes
to bufmgr.c, but was not really right even before that AFAICT.
2001-07-02 18:47:18 +00:00
Tom Lane 109d50dd35 Under new theory of operation wherein postmaster forks children
immediately, we will fork a child even if the database state does not
permit connections to be accepted (eg, we are in recovery mode).
The child process will correctly reject the connection and exit as
soon as it's finished collecting the connection request message.
However, this means that reaper() must be prepared to see child
process exit signals even while it's waiting for startup or shutdown
process to finish.  As was, a connection request arriving during a
database recovery or shutdown would cause postmaster abort.
2001-07-01 00:06:23 +00:00
Peter Eisentraut 10e9cd2299 Allow default transaction isolation level (a.k.a. set session
characteristics) to be set through GUC.
2001-06-30 22:03:26 +00:00
Peter Eisentraut 55f8fc3bc6 portability enhancements 2001-06-30 19:01:27 +00:00
Tom Lane af5ced9cfd Further work on connecting the free space map (which is still just a
stub) into the rest of the system.  Adopt a cleaner approach to preventing
deadlock in concurrent heap_updates: allow RelationGetBufferForTuple to
select any page of the rel, and put the onus on it to lock both buffers
in a consistent order.  Remove no-longer-needed isExtend hack from
API of ReleaseAndReadBuffer.
2001-06-29 21:08:25 +00:00
Tom Lane 0eab92c0e6 Fix VACUUM so that it can use pages as move targets even if they do not
have any newly-dead tuples on them.  This is a longstanding deficiency
that prevents VACUUM from compacting a file as much as one would expect.
Change requires fixing repair_frag to not assume that fraged_pages is
a subset of vacuum_pages.
Also make some further cleanups of places that assumed page numbers fit
in int and tuple counts fit in uint32.
2001-06-29 20:14:27 +00:00
Tom Lane 39381507b7 Fix longstanding error in VACUUM: sometimes would examine a buffer page
after writing/unpinning it.  An actual failure is unlikely, unless the
system is tremendously short of buffers ... but a bug is a bug.
2001-06-29 16:34:30 +00:00
Jan Wieck 1d4ee0cc1e Turned high-frequently called pgstat functions into macros
for speed.

Jan
2001-06-29 16:29:37 +00:00
Tom Lane f889b12be9 Fix erroneous GUC variable references from commandline-GUC patch. 2001-06-29 16:05:57 +00:00
Tom Lane fb2c3289ff Repair logic error for multi-key indexes. From Oleg Bartunov. 2001-06-28 16:00:07 +00:00
Tom Lane e0c9301c87 Install infrastructure for shared-memory free space map. Doesn't actually
do anything yet, but it has the necessary connections to initialization
and so forth.  Make some gestures towards allowing number of blocks in
a relation to be BlockNumber, ie, unsigned int, rather than signed int.
(I doubt I got all the places that are sloppy about it, yet.)  On the
way, replace the hardwired NLOCKS_PER_XACT fudge factor with a GUC
variable.
2001-06-27 23:31:40 +00:00
Tom Lane 5ba723e950 Fix a couple remaining places where GUC variables were assigned to
directly, rather than through SetConfigOption().
2001-06-25 23:03:03 +00:00
Tom Lane 2e67a67715 Fix a couple remaining places where GUC variables were assigned to
directly, rather than through SetConfigOption().
2001-06-25 22:56:05 +00:00
Tom Lane 4d58a7ca87 Optimizer can now estimate selectivity of IS NULL, IS NOT NULL,
IS TRUE, etc, with some degree of verisimilitude.  Split out
selectivity support functions from builtins.h into a new header
file selfuncs.h, so as to reduce the number of header files builtins.h
must depend on.  Fix a few missing inclusions exposed thereby.
From Joe Conway, with some kibitzing from Tom Lane.
2001-06-25 21:11:45 +00:00
Tom Lane c31545af27 Suppress gcc warning. 2001-06-25 20:20:02 +00:00
Bruce Momjian 06f6404c42 Back out BYTEA binary compatibility changes. 2001-06-24 02:41:21 +00:00
Peter Eisentraut f1423cd9fc Since a missing pg_pwd file is a valid situation, don't print an error
message in that case.
2001-06-23 23:26:17 +00:00
Bruce Momjian 6a7f23c213 > Marko Kreen <marko@l-t.ee> writes:
> > secure_ctx changes too.  it will be PGC_BACKEND after '-p'.
>
> Oh, okay, I missed that part.  Could we see the total state of the
> patch --- ie, a diff against current CVS, not a bunch of deltas?
> I've gotten confused about what's in and what's out.

Ok, here it is.  Cleared the ctx comment too - after -p
it will be PGC_BACKEND in any case.

Marko Kreen
2001-06-23 22:23:49 +00:00
Bruce Momjian a0c12d5e90 Add TEMPORARY sequences and have SERIAL on a temp table have a temporary
sequence.
2001-06-23 00:07:34 +00:00
Bruce Momjian 9e39ffe4cd Attached is documentation describing plperlu differences from plperl.
Alex Pilosov
2001-06-22 21:37:14 +00:00
Jan Wieck 140ddb78fe The new files for statistical system views.
Jan
2001-06-22 19:18:36 +00:00
Jan Wieck 8d80b0d980 Statistical system views (yet without the config stuff, but
it's hard to keep such massive changes in sync with the tree
so I need to get it in and work from there now).

Jan
2001-06-22 19:16:24 +00:00
Tom Lane d8d9ed931e Add support to lock manager for conditionally locking a lock (ie,
return without waiting if we can't get the lock immediately).
Not used yet, but will be needed for concurrent VACUUM.
2001-06-22 00:04:59 +00:00
Tom Lane 695e575470 Tweak error message. 2001-06-21 19:45:45 +00:00
Bruce Momjian bcde8ea7cf Fix strangely formatted comment. 2001-06-21 18:25:54 +00:00