Commit Graph

11995 Commits

Author SHA1 Message Date
Tom Lane 7863404417 A bunch of changes aimed at reducing backend startup time...
Improve 'pg_internal.init' relcache entry preload mechanism so that it is
safe to use for all system catalogs, and arrange to preload a realistic
set of system-catalog entries instead of only the three nailed-in-cache
indexes that were formerly loaded this way.  Fix mechanism for deleting
out-of-date pg_internal.init files: this must be synchronized with transaction
commit, not just done at random times within transactions.  Drive it off
relcache invalidation mechanism so that no special-case tests are needed.

Cache additional information in relcache entries for indexes (their pg_index
tuples and index-operator OIDs) to eliminate repeated lookups.  Also cache
index opclass info at the per-opclass level to avoid repeated lookups during
relcache load.

Generalize 'systable scan' utilities originally developed by Hiroshi,
move them into genam.c, use in a number of places where there was formerly
ugly code for choosing either heap or index scan.  In particular this allows
simplification of the logic that prevents infinite recursion between syscache
and relcache during startup: we can easily switch to heapscans in relcache.c
when and where needed to avoid recursion, so IndexScanOK becomes simpler and
does not need any expensive initialization.

Eliminate useless opening of a heapscan data structure while doing an indexscan
(this saves an mdnblocks call and thus at least one kernel call).
2002-02-19 20:11:20 +00:00
Tom Lane 8e2998d8a6 Remove some unnecessary pqsignal() calls to shave a few cycles off
backend startup.
2002-02-19 19:54:43 +00:00
Tom Lane 6e546c286c Arrange to call localtime() during postmaster startup. On most Unixen,
the first call of localtime() in a process will read /usr/lib/tztab or
local equivalent.  Better to do this once in the postmaster and inherit
the data by fork() than to have to do it during every backend start.
2002-02-19 19:53:35 +00:00
Tom Lane 9103372f52 Avoid calling pq_flush just after sending AUTH_REQ_OK; this saves one
send() and probable process context swap during backend startup.
2002-02-19 19:49:09 +00:00
Peter Eisentraut 8adf56f77a Privileges on functions and procedural languages 2002-02-18 23:11:58 +00:00
Peter Eisentraut 5e03503126 Set version to 7.3devel. 2002-02-18 21:46:17 +00:00
Bruce Momjian 04802852b6 Add:
> 	o Generate failure on short COPY lines rather than pad NULLs
2002-02-18 16:54:38 +00:00
Tom Lane c89e0d9666 Minor copy-editing. 2002-02-18 16:13:10 +00:00
Tom Lane e4dd067398 Replace number-of-distinct-values estimator equation, per recent
pghackers discussion.
2002-02-18 16:04:14 +00:00
Bruce Momjian b4a5fa4518 Remove MAX/MIN() macros, use c.h Max/Min() instead. 2002-02-18 14:25:40 +00:00
Bruce Momjian d622cf867b Disable LIMIT #,# syntax, as agreed to months ago. Print message saying
to use separate LIMIT/OFFSET clauses.
2002-02-18 06:49:20 +00:00
Bruce Momjian 890a012d0a Reorder postgresql.conf WAL section to be clearer. 2002-02-18 06:42:54 +00:00
Bruce Momjian 5651a1665f Don't mention TIOGA in Makefile and move strdup.c rule into proper
'ifdef' in Makefile.
2002-02-18 06:03:23 +00:00
Bruce Momjian fb8e3f15c0 Add code to preserve paren level display after \g, as submitted months ago. 2002-02-18 05:57:41 +00:00
Hiroshi Inoue c03e7fbadc Remove compile warnings in multibute mode. 2002-02-18 05:54:50 +00:00
Bruce Momjian fbcc0d69e8 Fix param handling of create* admin scripts as described months ago.
Properly handles default values.
2002-02-18 05:48:45 +00:00
Bruce Momjian c9361a7a9c Remove CHECKPOINT call from pgbench -- Not needed and affects performance. 2002-02-18 05:46:41 +00:00
Bruce Momjian c448847378 Add better error text:
elog(LOG, "XLogWrite: new log file created - "
                     "consider increasing 'wal_files' in postgresql.conf.");
2002-02-18 05:44:45 +00:00
Bruce Momjian b0bf66dfbe Add HTML output option to pgcvslog. 2002-02-18 05:33:13 +00:00
Bruce Momjian 865d26fdd6 Update FAQ. 2002-02-18 05:09:01 +00:00
Tatsuo Ishii ab604e8ac3 Fix kanji-coversion key binding. This has been broken since 7.1
Per Yoshinori Ariie's report.
2002-02-18 04:01:27 +00:00
Bruce Momjian 14c1c33f3b Add Neil's Name:
> * Have pg_dump use ADD PRIMARY KEY after COPY, for performance (Neil Conway)
2002-02-18 03:40:13 +00:00
Hiroshi Inoue 3c16d095b5 The version is now 7.01.0010.
1) Handle parameter array.
2) Allow re-use of the connection handle after SQLDisconnect.
3) Reject NULL if no indicator specified.
4) Improve the handling of '_' in table name.
5) Unify internal begin/commit/abort operations.
6) Change SQLTables() to return null not "" for the
   table_owner.
7) Fix a bug about parameter handling reported by Benoit Menendez.
8) Add cast in handling ODBC date/time escape sequences.
9) Fix a bug about cache_size handing in declare/fetch mode.

[ODBC3.0 related]
10) Improve the handling of descriptor handles(ODBC3.0).
11) Improve the type handling of some types for ODBC3.0.

[Thanks to Marcelo Aceto for his useful patches]
12) Allow nested ODBC escape.
13) Allow changing autocommit on/off inside the transaction
    block.
14) Improve the handling of ODBC scalar functions.
2002-02-18 03:16:11 +00:00
Hiroshi Inoue b6db89a02d Separate info30.c from info.c. 2002-02-18 02:15:04 +00:00
Bruce Momjian aedc8a99d5 Add:
> * Have pg_dump use ADD PRIMARY KEY after COPY, for performance
2002-02-18 02:00:43 +00:00
Hiroshi Inoue 22d7fa7de4 Add files for ODBC3.0 support. 2002-02-18 01:43:24 +00:00
Bruce Momjian 26d6e199d9 Added:
> * ODBC
> 	o ODBC 3.0 support
> 	o Unicode(UCS-2) support
> 	o Updatable cursors support
2002-02-18 01:17:16 +00:00
Bruce Momjian 4f5991552c Remove ODBC todo, add to main TODO. 2002-02-18 01:15:46 +00:00
Bruce Momjian 62feef6c95 Fix SGML typo in previous patch. 2002-02-17 13:29:00 +00:00
Bruce Momjian bf4507e3af I think it's important that it's actually documented that they can add
primary keys after the fact!

Also, we need to add regression tests for alter table / add primary key
and alter table / drop constraint.  These shouldn't be added until 7.3
tho
methinks...

Chris
2002-02-17 11:50:09 +00:00
Bruce Momjian a966ac1df0 Clarify params to ALTER TABLE to clearly show single parameters.
e.g. table contraint definition -> table_constraint_definition.
2002-02-16 23:45:48 +00:00
Peter Eisentraut 673b48becb Remove warning about automatic inclusion of sqlca. 2002-02-15 17:46:57 +00:00
Bruce Momjian ceec779ab5 Update FAQ. 2002-02-14 17:15:00 +00:00
Tom Lane 3576820e78 Ensure that a cursor is scanned under the same scanCommandId it was
originally created with, so that the set of visible tuples does not
change as a result of other activity.  This essentially makes PG cursors
INSENSITIVE per the SQL92 definition.  See bug report of 13-Feb-02.
2002-02-14 15:24:10 +00:00
Tom Lane 1392042346 Point out that --adduser actually makes the new user a superuser. This
was mentioned on the man page for the underlying CREATE USER command,
but it should be explained here too.
2002-02-13 19:32:17 +00:00
Bruce Momjian a164407b64 Add DROP COLUMN status from Hiroshi. 2002-02-13 14:36:43 +00:00
Tom Lane fa046b6a92 Use RTLD_NOW, not RTLD_LAZY, as binding mode for dlopen() on all platforms.
This restores the Linux behavior to what it was in PG 7.0 and 7.1, and
causes other platforms to agree.  (Other well-tested platforms like HPUX
were doing it this way already.)  Per pghackers discussion over the past
month or so.
2002-02-12 23:41:25 +00:00
Tom Lane baa0bb97b0 Add warning not to use /usr/ucb/cc on Solaris. 2002-02-12 22:35:07 +00:00
Bruce Momjian 28108b391b Fix tutorial for references problem, from rainer.tammer@spg.schulergroup.com 2002-02-12 22:25:15 +00:00
Bruce Momjian fa8a73caad Clarify working in 'top x items using sequential scan' item 2002-02-12 22:24:36 +00:00
Tom Lane 9832a235c5 Modify COPY TO to emit carriage returns and newlines as backslash escapes
(backslash-r, backslash-n) for protection against newline-conversion
munging.  In future we will also tweak COPY FROM, but this part of the
change should be backwards-compatible.  Per pghackers discussion.
Also, update COPY reference page to describe the backslash conversions
more completely and accurately.
2002-02-12 21:25:41 +00:00
Bruce Momjian c16ef167df Update FAQ. 2002-02-12 17:18:10 +00:00
Bruce Momjian d39a369912 Update FAQ. 2002-02-12 17:14:55 +00:00
Bruce Momjian 0ae55405de Update wal files computation documentation. 2002-02-11 23:25:14 +00:00
Tom Lane 028e13bc08 Tweak GiST code to work correctly on machines where 8-byte alignment
of pointers is required.  Patch from Teodor Sigaev per pghackers
discussion.  It's an ugly kluge but avoids forcing initdb; we'll put
a better fix into 7.3 or later.
2002-02-11 22:41:59 +00:00
Peter Eisentraut 2bd15ad0bc Fix for old FreeBSD versions that don't have RTLD_GLOBAL 2002-02-11 21:38:11 +00:00
Tom Lane 6799a6ca21 Repair problems with EvalPlanQual where target table is scanned as
inner indexscan (ie, one with runtime keys).  ExecIndexReScan must
compute or recompute runtime keys even if we are rescanning in the
EPQ case.  TidScan seems to have comparable problems.  Per bug
noted by Barry Lind 11-Feb-02.
2002-02-11 20:10:50 +00:00
Bruce Momjian 0cdf4d96bc Fix typo.
< 	o prevent lose of indexes, permissions, inheritance (Bruce)
---
> 	o prevent loss of indexes, permissions, inheritance (Bruce)
2002-02-11 18:14:56 +00:00
Bruce Momjian 966e6478b5 Fix flag handling of pg_upgrade. 2002-02-11 15:19:33 +00:00
Tom Lane 15c30b6f9a Be more wary about mixed-case database names and user names. Get
the CREATE DATABASE command right in pg_dump -C case.
2002-02-11 00:18:20 +00:00