Commit Graph

10282 Commits

Author SHA1 Message Date
Bruce Momjian e4c2967edb Clarify comment. 2002-10-06 03:56:03 +00:00
Tom Lane 916d8164df Restrict CREATE OPERATOR CLASS to superusers, per discussion some weeks
ago.
2002-10-04 22:19:29 +00:00
Tom Lane d2db166c75 Require superuser privilege to create a binary-compatible cast, per
discussion some weeks ago.  Also, add a check that two types to be
binary-equivalenced match as to typlen, typbyval, and typalign; if
they don't then it's surely a mistake to equivalence them.
2002-10-04 22:08:44 +00:00
Tom Lane b8dcb505ec Fix a couple of grammatical errors in error messages. 2002-10-04 17:34:01 +00:00
Tom Lane 3b8ba163d0 Tweak a few of the most heavily used function call points to zero out
just the significant fields of FunctionCallInfoData, rather than MemSet'ing
the whole struct to zero.  Unused positions in the arg[] array will
thereby contain garbage rather than zeroes.  This buys back some of the
performance hit from increasing FUNC_MAX_ARGS.  Also tweak tuplesort.c
code for more speed by marking some routines 'inline'.  All together
these changes speed up simple sorts, like count(distinct int4column),
by about 25% on a P4 running RH Linux 7.2.
2002-10-04 17:19:55 +00:00
Tom Lane aab47baf6c Hack to make it possible to load CREATE CONSTRAINT TRIGGER commands that
are missing the FROM clause (due to a long-ago pg_dump bug).  Patch by
Stephan Szabo, minor tweaking by Tom Lane.
2002-10-03 21:06:23 +00:00
Tom Lane 565c97bea5 In a bootstrap process or standalone backend, set MaxBackends = 1
to avoid unnecessary consumption of semaphores.
2002-10-03 19:19:09 +00:00
Tom Lane edf497dec9 Avoid palloc(0) when MaxBackends = 1. 2002-10-03 19:17:55 +00:00
Tom Lane 9886a46e76 Restore NOTICEs that were mistakenly removed from triggers regression
test expected output.  Tweak contrib/spi Makefile so that refint.so is
by default built with appropriate NOTICE support for regression testing.
2002-10-03 18:40:02 +00:00
Bruce Momjian 793a4ba35e Add SSL documentation info to README.SSL 2002-10-03 17:26:14 +00:00
Bruce Momjian a0bf2503ea The attached patch fixes a number of issues related to compiling the
client
utilities (libpq.dll and psql.exe) for win32 (missing defines,
adjustments to
includes, pedantic casting, non-existent functions) per:
   http://developer.postgresql.org/docs/postgres/install-win32.html.

It compiles cleanly under Windows 2000 using Visual Studio .net. Also
compiles clean and passes all regression tests (regular and contrib)
under Linux.

In addition to a review by the usual suspects, it would be very
desirable for  someone well versed in the peculiarities of win32 to take
a look.

Joe Conway
2002-10-03 17:09:42 +00:00
Bruce Momjian d4eae72513 This patch removes two unused global variables from globals.c
Neil Conway
2002-10-03 17:07:53 +00:00
Tom Lane 71e74a2f58 Re-enable pg_resetxlog to accept -l values in hexadecimal (it used to
be able to do that, but the ability seems to have got lost in the
shuffle).  Add a -o nextOID switch for completeness.  Improve the
documentation to explain how and why to use these switches.
2002-10-02 21:30:13 +00:00
Tom Lane 388ad64dc7 pg_resetxlog was missing support for the pg_control fields added in 7.3. 2002-10-02 19:45:47 +00:00
Tom Lane b813d143ae Alter scale selection for NUMERIC division and transcendental functions
so that precision of result is always at least as good as you'd get from
float8 arithmetic (ie, always at least 16 digits of accuracy).  Per
pg_hackers discussion a few days ago.
2002-10-02 19:21:26 +00:00
Bruce Momjian c74c7e604c Turn GUC log_min_error_statement off by default by setting it to PANIC. 2002-10-02 16:27:57 +00:00
Dave Cramer fd972e7f7e test files added by Kris Jurka 2002-10-01 16:11:30 +00:00
Tom Lane 361f1e1656 Pass less-unsafe parameters to Darwin's NSLinkModule. While this change prevents a backend coredump when loading a broken shlib, it also seems to suppress the error messages that might help debug the problem :-(. Perhaps someone would like to supply a 'linkEdit' hook to get the best of both worlds. But in the meantime, backend crash trumps error reporting. 2002-10-01 05:06:44 +00:00
Barry Lind 1a4431777b Fixed test suite to call PoolingDataSourceTest which was missed
Modified Files:
 	OptionalTestSuite.java
2002-10-01 04:36:00 +00:00
Dave Cramer 7c553901d7 schema awareness patch provided by Kris Jurka 2002-10-01 00:39:02 +00:00
Bruce Momjian 2a1e4a9006 Add Bear's SSL comments. 2002-09-29 04:06:54 +00:00
Tom Lane 6d0d15c451 Make the world at least somewhat safe for zero-column tables, and
remove the special case in ALTER DROP COLUMN to prohibit dropping a
table's last column.
2002-09-28 20:00:19 +00:00
Tom Lane 23616b47d5 ARGH!
Vacuum must not advance pg_database.datvacuumxid nor truncate CLOG
unless it's processed *all* tables in the database.  Vacuums run by
unprivileged users don't count.

(Beats head against nearest convenient wall...)
2002-09-27 20:57:08 +00:00
Bruce Momjian 3468ed586a > Fix clusterdb to be schema-aware
Please apply the patch attached and this should be solved.

Alvaro Herrera
2002-09-27 17:51:10 +00:00
Tom Lane d2d0f42040 Use heap_formtuple not heap_addheader to construct pg_index tuples.
heap_addheader is wrong because it doesn't cope with varlena fields,
notably indpred.
2002-09-27 15:05:23 +00:00
Tom Lane cb253de21a Don't mess with HEAP_XMAX_INVALID in heaptuple.c routines; there is
no reason to worry about the tuple commit status bits until the tuple
is inserted in a relation by heapam.c.  Also, improve comments for
heap_addheader().
2002-09-27 15:04:08 +00:00
Bruce Momjian 0b1b377569 Have -d5 -d0 not affect the extra variables set with -d5. 2002-09-27 03:59:00 +00:00
Bruce Momjian 1fe4cbb9db Make postgres -d0 set server_min_messages to notice. Reset doesn't work
at this area in the code.
2002-09-27 03:34:15 +00:00
Tom Lane b2ab1e6bc9 Ensure that before truncating CLOG, we force a checkpoint even if no
recent WAL activity has occurred.  Without this, it's possible that a
later crash might leave tuples on disk with un-updated commit status
bits.
2002-09-26 22:58:34 +00:00
Tom Lane c87469e64a Fix problems with loss of tuple commit status bits during WAL redo of
VACUUM FULL tuple moves.  Store full-width t_infomask in WAL, rather
than storing low 8 bits and expecting to be able to reconstruct upper
bits.  While at it, remove redundant t_oid field from WAL headers
(the OID, if present, is now recorded in the data portion of the tuple).
WAL version number bumped --- this does not force an initdb, you can
instead run pg_resetxlog after a clean shutdown of the old postmaster.
2002-09-26 22:46:29 +00:00
Bruce Momjian 72f8efdc98 Back out /pl memory leak patch. Wait for new version. 2002-09-26 05:39:03 +00:00
Bruce Momjian ff5d4cbfca Clean up SSL compiler warnings. 2002-09-26 05:37:58 +00:00
Bruce Momjian b2c34e2bd1 I have attached the pltcl patch again, just in case. For the sake of clarity
let's say this patch superscedes the previous one.

I have also attached a patch addressing the similar memory leak problem in
plpython. This includes a slight adjustment of the tests in the source
directory. The patch also includes a cosmetic change to remove a compiler
warning although I think the change makes the code look worse though.

BTW, by my reckoning the memory leak would occur with prepared plans and
without. If that is not the case then I've been barking up the wrong tree.

Nigel J. Andrews
2002-09-26 05:23:26 +00:00
Bruce Momjian 5ad4faf13a This patch removes a use of uninitialized memory in lmgr/lock.c, by
adding a missing sprintf().

Neil Conway
2002-09-26 05:18:30 +00:00
Bruce Momjian 3c104bc4ed Pass postmaster -d down to the postgres backend to trigger special -d
handling in the backend.
2002-09-26 05:17:00 +00:00
Bruce Momjian 15b95cf872 Allow SSL to work withouth client-side certificate infrastructure. 2002-09-26 04:41:55 +00:00
Tom Lane 8a6fab412e Remove ShutdownBufferPoolAccess exit callback, and do the work in
ProcKill instead, where we still have a PGPROC with which to wait on
LWLocks.  This fixes 'can't wait without a PROC structure' failures
occasionally seen during backend shutdown (I'm surprised they weren't
more frequent, actually).  Add an Assert() to LWLockAcquire to help
catch any similar mistakes in future.  Fix failure to update MyProcPid
for standalone backends and pgstat processes.
2002-09-25 20:31:40 +00:00
Barry Lind 7bf1c8b0ad Applied patch from Aaron Mulder (ammulder@alumni.princeton.edu) that fixes
jdbc datasource support for jdk1.4/jdbc3

 Modified Files:
 	jdbc/build.xml jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/jdbc2/optional/BaseDataSource.java
 	jdbc/org/postgresql/jdbc2/optional/PGObjectFactory.java
 	jdbc/org/postgresql/jdbc2/optional/PooledConnectionImpl.java
 	jdbc/org/postgresql/jdbc2/optional/PoolingDataSource.java
 	jdbc/org/postgresql/test/jdbc2/optional/BaseDataSourceTest.java
 	jdbc/org/postgresql/test/jdbc2/optional/OptionalTestSuite.java
 	jdbc/org/postgresql/test/jdbc3/Jdbc3TestSuite.java
 Added Files:
 	jdbc/org/postgresql/jdbc3/Jdbc3ConnectionPool.java
 	jdbc/org/postgresql/jdbc3/Jdbc3ObjectFactory.java
 	jdbc/org/postgresql/jdbc3/Jdbc3PooledConnection.java
 	jdbc/org/postgresql/jdbc3/Jdbc3PoolingDataSource.java
 	jdbc/org/postgresql/jdbc3/Jdbc3SimpleDataSource.java
 	jdbc/org/postgresql/test/jdbc2/optional/PoolingDataSourceTest.java
 	jdbc/org/postgresql/test/jdbc3/Jdbc3ConnectionPoolTest.java
 	jdbc/org/postgresql/test/jdbc3/Jdbc3PoolingDataSourceTest.java
 	jdbc/org/postgresql/test/jdbc3/Jdbc3SimpleDataSourceTest.java
 	jdbc/org/postgresql/test/util/MiniJndiContext.java
 	jdbc/org/postgresql/test/util/MiniJndiContextFactory.java
2002-09-25 07:01:31 +00:00
Tom Lane c6367df506 Change default privileges for languages and functions to be PUBLIC USAGE
and PUBLIC EXECUTE, respectively.  Per discussion about easing updates
from prior versions.
2002-09-24 23:14:25 +00:00
Tom Lane e92bec2844 Update some obsolete comments and column descriptions. 2002-09-24 21:26:44 +00:00
Peter Eisentraut 12bb3679db Remove useless O_DIROPEN stuff. 2002-09-24 20:20:10 +00:00
Peter Eisentraut 8c3ab663ab Tweak conversion names to follow the established naming scheme, and
document that scheme.
2002-09-24 20:14:59 +00:00
Tom Lane 83fd58dff0 Add missing correction of sublevelsup when pulling up a subquery.
Fixes problem with cases like
SELECT * FROM foo t WHERE NOT EXISTS (SELECT remoteid FROM
(SELECT f1 as remoteid FROM foo WHERE f1 = t.f1) AS t1)
2002-09-24 18:38:23 +00:00
Tom Lane 233ecca7c9 Further thinking about heap_mark4update: in HeapTupleSelfUpdated case,
executor should not return the tuple as successfully marked, because in
fact it's been deleted.  Not clear that this case has ever been seen
in practice (I think you'd have to write a SELECT FOR UPDATE that calls
a function that deletes some row the SELECT will visit later...) but we
should be consistent.  Also add comments to several other places that
got it right but didn't explain what they were doing.
2002-09-23 22:57:44 +00:00
Peter Eisentraut 0d3be98ae9 Move PyGreSQL usage documentation from README into DocBook. Some other
editing.
2002-09-23 21:10:13 +00:00
Tom Lane 5fa3418304 Disallow VACUUM, ANALYZE, TRUNCATE on temp tables belonging to other
backends.  Given that temp tables now store data locally in the local
buffer manager, these things are not going to work safely.
2002-09-23 20:43:41 +00:00
Bruce Momjian f9a1ea6fa7 Obviously noone has ever tested the doubling of availiable result ids
up to
reaching the hard limit. After opening 16(=current REST_START value)
results via pg_exec, the next pg_exec tries to find an empty slot
forever :-( . In PgSetResultId file pgtclId.c in the for loop there
has to be done a break, if res_max ist reached. The piece of code
should look like
        if (resid == connid->res_max)
        {
            resid = 0;
            break;   /* the break as to be added */
        }

now everything works (double available results after reaching
RES_START up to reaching RES_HARD_MAX)

Gerhard Hintermayer
2002-09-23 01:43:23 +00:00
Tom Lane bc1088c28a Get rid of bogus use of heap_mark4update in reindex operations (cf.
recent bug report).  Fix processing of nailed-in-cache indexes;
it appears that REINDEX DATABASE has been broken for months :-(.
2002-09-23 00:42:48 +00:00
Tom Lane df3e7b3a51 In UpdateStats(), don't bother to update the pg_class row if it already
contains the correct statistics.  This is a partial solution for the
problem of allowing concurrent CREATE INDEX commands: unless they commit
at nearly the same instant, the second one will see the first one's
pg_class updates as committed, and won't try to update again, thus
avoiding the 'tuple concurrently updated' failure.
2002-09-22 23:03:58 +00:00
Tom Lane 1d01d484c1 Remove commas for compatibility with newer releases of bison. 2002-09-22 21:56:47 +00:00