Commit Graph

5944 Commits

Author SHA1 Message Date
Tom Lane 66dbcd47ed Fix "Unable to identify an operator =$" problem that occurred when pgsql
expressions were written without spaces between operators and operands.
Problem was that something like "if new.f1=new.f2 then" would be translated
to "if $1=$2 then", and the Postgres lexer would tokenize that the wrong
way.  Fix is to emit spaces around $paramno constructs to ensure they are
seen as separate tokens.
1999-11-28 22:02:17 +00:00
Tom Lane fb55fa0478 Remove obsolete note about pg_vlock lock file. 1999-11-28 02:17:43 +00:00
Tom Lane aa903cf07c Remove pg_vlock locking from VACUUM, allowing multiple VACUUMs to run in
parallel --- and, not incidentally, removing a common reason for needing
manual cleanup by the DB admin after a crash.  Remove initial global
delete of pg_statistics rows in VACUUM ANALYZE; this was not only bad
for performance of other backends that had to run without stats for a
while, but it was fundamentally broken because it was done outside any
transaction.  Surprising we didn't see more consequences of that.
Detect attempt to run VACUUM inside a transaction block.  Check for
query cancel request before starting vacuum of each table.  Clean up
vacuum's private portal storage if vacuum is aborted.
1999-11-28 02:10:01 +00:00
Tom Lane d2914c38b6 Delete pg_statistics rows for a relation during heap_destroy_with_catalog.
By dropping stats rows here, we eliminate the need for VACUUM to do a
wholesale remove of stats rows.  Before, pg_statistics was wiped clean
at the start of VACUUM, ensuring poor planning results for any backends
running in parallel until VACUUM got around to rebuilding the stats for
the relations they are accessing.
1999-11-28 02:03:04 +00:00
Tom Lane 0ffe17aec6 lmgr.c didn't check for failure return from LockAcquire(). Boo hiss. 1999-11-28 01:58:08 +00:00
Tom Lane b982c3b683 Add missing SpinRelease() to a couple of error exits --- bug found while
testing concurrent VACUUMs.
1999-11-28 01:56:48 +00:00
Tom Lane 4dded12faa COPY to a relation should keep write lock till transaction commit.
Thanks to Hiroshi for spotting the problem.
1999-11-27 21:52:53 +00:00
Tom Lane 37432f5a6c pg_statistic has an index now too... 1999-11-27 21:05:04 +00:00
Tom Lane adbf98a77f Fix references to backend/port files so that they actually work. 1999-11-27 19:43:20 +00:00
Tom Lane a4fec9ec34 Oops, forgot to commit this one last week. Part of patch to update
regress test expected outputs for change in 'Cannot insert a duplicate key'
error message wording.
1999-11-27 17:56:18 +00:00
Bruce Momjian a7f14616c6 Change // to /* */ 1999-11-26 17:26:38 +00:00
Bruce Momjian 1592c3179f Update TODO list. 1999-11-26 04:38:59 +00:00
Bruce Momjian 09f185a040 Fix missing prototype psql warning. 1999-11-26 04:36:48 +00:00
Bruce Momjian 78bc83fedf * Includes tab completion. It's not magic, but it's very cool. At any
rate
  it's better than what used to be there.

* Does proper SQL "host variable" substitution as pointed out by Andreas
  Zeugwetter (thanks): select * from :foo; Also some changes in how ':'
  and ';' are treated (escape with \ to send to backend). This does
_not_
  affect the '::' cast operator, but perhaps others that contain : or ;
  (but there are none right now).

* To show description with a <something> listing, append '?' to command
  name, e.g., \df?. This seemed to be the convenient and logical
solution.
  Or append a '+' to see more useless information, e.g., \df+.

* Fixed fflush()'ing bug pointed out by Jan during the regression test
  discussion.

* Added LastOid variable. This ought to take care of TODO item "Add a
  function to return the last inserted oid, for use in psql scripts"
  (under CLIENTS)
  E.g.,
insert into foo values(...);
insert into bar values(..., :LastOid);
\echo $LastOid

* \d command shows constraints, rules, and triggers defined on the table
  (in addition to indices)

* Various fixes, optimizations, corrections

* Documentation update as well


Note: This now requires snprintf(), which, if necessary, is taken from
src/backend/port. This is certainly a little weird, but it should
suffice
until a source tree cleanup is done.

Enjoy.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-11-26 04:24:17 +00:00
Bruce Momjian c83b4d1cd8 Fix for bool casting. 1999-11-25 19:15:20 +00:00
Jan Wieck 4069d48aa7 Added another single byte oriented decompressor, useful for
comparision functions.

Added all lztext comparision functions, operators and a default
operator class for nbtree on lztext.

Jan
1999-11-25 01:28:07 +00:00
Bruce Momjian 4ae43c84c3 Add opid to selectivity function call. 1999-11-25 00:21:34 +00:00
Bruce Momjian 922e53e6ea Enable pg_statistic cache use. 1999-11-25 00:15:57 +00:00
Bruce Momjian 8f401e8042 Cleanup for pg_statistic commit. 1999-11-24 17:09:28 +00:00
Bruce Momjian 74f418eb9a Add pg_statistic index, add missing Hiroshi file. 1999-11-24 16:52:50 +00:00
Tatsuo Ishii 61a93ed2da Add multi-byte support to lztextlen() 1999-11-24 03:45:12 +00:00
Bruce Momjian 95997e159b Rename heap_replace to heap_update. 1999-11-24 00:58:48 +00:00
Bruce Momjian bb10bf319e Rename heap_replace to heap_update. 1999-11-24 00:44:37 +00:00
Bruce Momjian 6f9ff92cc0 Tid access method feature from Hiroshi Inoue, Inoue@tpf.co.jp 1999-11-23 20:07:06 +00:00
Bruce Momjian 54ffd4677a ecpg ECPGFree fix from Rene Hogendoorn. 1999-11-23 19:47:14 +00:00
Bruce Momjian 85bb91a319 Fix _cplusplus test in both trees. 1999-11-23 18:49:55 +00:00
Bruce Momjian f0e18e967c Cleanup paths in install files. 1999-11-23 18:24:55 +00:00
Bruce Momjian a895cb7837 Change v6.5.2 to 6.5.2. 1999-11-23 18:08:07 +00:00
Michael Meskes 36b0f67335 *** empty log message *** 1999-11-23 10:32:16 +00:00
Bruce Momjian 7e5e7ab71b Update opclass to be non-unique. 1999-11-23 04:47:39 +00:00
Tom Lane 838fb5c233 Update for change of 'duplicate key' message. 1999-11-23 04:19:39 +00:00
Tom Lane b04bdf1290 Reduce ReleaseLruFile failure from FATAL to ERROR grade; offhand I don't
see that this should be a worse way to fail to open a file than any other.
1999-11-23 01:08:36 +00:00
Tom Lane d831990167 verify_password() leaked a file descriptor if it failed to find the given
userid in the flat password file.  Do it enough times and the postmaster
panicked :-(
1999-11-23 01:04:38 +00:00
Bruce Momjian 90e0b668a4 Update TODO list. 1999-11-22 18:05:47 +00:00
Bruce Momjian fc955b14ea Add system indexes to match all caches.
Make all system indexes unique.
Make all cache loads use system indexes.
Rename *rel to *relid in inheritance tables.
Rename cache names to be clearer.
1999-11-22 17:56:41 +00:00
Michael Meskes e30c2d67ef *** empty log message *** 1999-11-22 12:48:48 +00:00
Tom Lane 316c4c57e2 Clean up some problems in error recovery --- elog() was pretty broken
for the case of errors in backend startup, and proc_exit's method for
coping with errors during proc_exit was *completely* busted.  Fixed per
discussions on pghackers around 11/6/99.
1999-11-22 02:06:31 +00:00
Tom Lane bb203c75a9 Come to think of it, DropBuffers() could have the same problem as
ReleaseRelationBuffers --- need to wait if anyone is trying to flush
out that buffer.
1999-11-22 02:03:21 +00:00
Tom Lane 6b5d8e14b4 ReleaseRelationBuffers() failed to check for I/O in progress on a buffer
it wants to release.  This leads to a race condition: does the backend
that's trying to flush the buffer do so before the one that's deleting the
relation does so?  Usually no problem, I expect, but on occasion this could
lead to hard-to-reproduce complaints from md.c, especially mdblindwrt.
1999-11-22 01:19:42 +00:00
Tom Lane 610dfa6d55 Combine index_info and find_secondary_indexes into a single routine that
returns a list of RelOptInfos, eliminating the need for static state
in index_info.  That static state was a direct cause of coredumps; if
anything decided to elog(ERROR) partway through an index_info search of
pg_index, the next query would try to close a scan pointer that was
pointing at no-longer-valid memory.  Another example of the reasons to
avoid static state variables...
1999-11-21 23:25:47 +00:00
Tom Lane 40d3e92541 index_destroy() must grab exclusive access to the parent table
of the index it wants to destroy.  This ensures that no other backend is
actively scanning or updating that index.  Getting exclusive access on
the index alone is NOT sufficient, because the executor is rather
cavalier about getting locks on indexes --- see ExecOpenIndices().
It might be better to grab index locks in the executor, but I'm not
sure the extra lockmanager traffic is really worth it just to make
index_destroy cleaner.
1999-11-21 20:01:10 +00:00
Tom Lane 3047b444e8 Clean up comments. 1999-11-21 19:56:12 +00:00
Tom Lane d8ba3dfb0b Change backend-side COPY to write files with permissions 644 not 666
(whoever thought world-writable files were a good default????).  Modify
the pg_pwd code so that pg_pwd is created with 600 permissions.  Modify
initdb so that permissions on a pre-existing PGDATA directory are not
blindly accepted: if the dir is already there, it does chmod go-rwx
to be sure that the permissions are OK and the dir actually is owned
by postgres.
1999-11-21 04:16:17 +00:00
Tom Lane 76ccf73f2b Repair problem exposed by Jan's new parallel-regression-test scaffold:
inval.c thought it could safely use the catcache to look up the OIDs of
system relations.  Not good, considering that inval.c could be called
during catcache loading, if a shared-inval message arrives.  Rip out the
lookup logic and instead use the known OIDs from pg_class.h.
1999-11-21 01:58:22 +00:00
Tom Lane 9ba0172f41 Tweak run_check.sh so it prints the name of each test in a parallel group
as that test finishes --- helps to give the impression that something is
happening...
1999-11-21 01:53:39 +00:00
Tom Lane 79f39c4d34 My latest fixes to gram.y cause CREATE TABLE t (f1 bool default 1 < 2)
to be accepted, but constraints regress test was expecting it to fail.
1999-11-20 21:41:31 +00:00
Tom Lane ea4ae10849 Fix problems with CURRENT_DATE and related functions being used in
table defaults or rules: translate them to a function call so that
parse_coerce doesn't reduce them to a date or time constant immediately.
Also, eliminate a lot of redundancy in the expression grammar by
defining a new nonterminal com_expr, which contains all the productions
that can be shared by a_expr and b_expr.
1999-11-20 21:39:36 +00:00
Tom Lane 3267e2978f Fix a couple of portability problems in Jan's first-cut parallel test
script.  This is way cool...
1999-11-20 20:21:31 +00:00
Jan Wieck 43499af4ab New parallel regression test shell and related things.
Jan
1999-11-19 18:51:52 +00:00
Bruce Momjian 58d1eeaafe Fix for arm32 and fix for dbname with dash. 1999-11-18 21:47:41 +00:00