Commit Graph

1410 Commits

Author SHA1 Message Date
Tom Lane 89fefd9416 Reduce the permissions check needed to use pgrowlocks() to having
SELECT on the target table.  Per discussion.
2007-08-28 22:59:30 +00:00
Tom Lane a41e46b261 Require SELECT privilege on a table to do dblink_get_pkey(). This is
not all that exciting when the system catalogs are readable by all,
but some people try to lock them down, and would not like this sort of
end run ...
2007-08-27 01:24:50 +00:00
Tom Lane 56f3fb3ba1 Restrict pgrowlocks function to superusers. (This might be too strict,
but no permissions check at all is certainly no good.)  Clean up usage
of some deprecated APIs.
2007-08-27 00:13:51 +00:00
Tom Lane 38c75ecf83 Restrict pgstattuple functions to superusers. (This might be too strict,
but no permissions check at all is certainly no good.)  Clean up usage
of some deprecated APIs.
2007-08-26 23:59:50 +00:00
Tom Lane 0effa088f5 Clean up usage of some deprecated APIs, particularly schema-unsafe
usage of RelationNameGetTupleDesc().
2007-08-26 23:36:32 +00:00
Tom Lane 08fc73c4c3 Code review for btreefuncs additions: restrict to superusers to avoid
exposing user data to others, and clean up usage of deprecated APIs.
2007-08-26 23:22:49 +00:00
Tatsuo Ishii e4a52eca35 The upper limit for -c option of pgbench is now obtained from
(FD_SETSIZE - 10) rather than a hardwired number.
2007-08-25 09:21:14 +00:00
Tom Lane b918bf86c6 Fix combo_decrypt() to throw an error for zero-length input when using a
padded encryption scheme.  Formerly it would try to access res[(unsigned) -1],
which resulted in core dumps on 64-bit machines, and was certainly trouble
waiting to happen on 32-bit machines (though in at least the known case
it was harmless because that byte would be overwritten after return).
Per report from Ken Colson; fix by Marko Kreen.
2007-08-23 16:15:51 +00:00
Tom Lane d097534219 Fix possible core dump from pgbench -d option. Julius Stroffek 2007-08-22 23:03:27 +00:00
Tom Lane 46dedde524 contrib/tsearch2 now fails its regression test because of conflicts with
the core additions.  For the moment I diked it out of contrib/Makefile.
We should look at turning it into a backward-compatibility package.
2007-08-21 01:12:28 +00:00
Tom Lane 82eed4dba2 Arrange to put TOAST tables belonging to temporary tables into special schemas
named pg_toast_temp_nnn, alongside the pg_temp_nnn schemas used for the temp
tables themselves.  This allows low-level code such as the relcache to
recognize that these tables are indeed temporary, which enables various
optimizations such as not WAL-logging changes and using local rather than
shared buffers for access.  Aside from obvious performance benefits, this
provides a solution to bug #3483, in which other backends unexpectedly held
open file references to temporary tables.  The scheme preserves the property
that TOAST tables are not in any schema that's normally in the search path,
so they don't conflict with user table names.

initdb forced because of changes in system view definitions.
2007-07-25 22:16:18 +00:00
Tom Lane 2a275e6d3c Fix pg_buffercache to release buffer partition locks in reverse order,
and add a note about why.  This is not tremendously important right now,
probably, but it will get more urgent if NUM_BUFFER_PARTITIONS is increased
as much as proposed.
2007-07-16 21:20:36 +00:00
Magnus Hagander bbef913250 Quote pathnames so pg_standby works with paths that have
spaces in them.

ISHIDA Akio
2007-07-16 08:40:52 +00:00
Tom Lane 37e347a7e0 Get rid of overly cute, unportable, probably not very efficient substitute
for 'bool'.  Per buildfarm warnings.
2007-07-15 23:57:13 +00:00
Tom Lane 93624bcda0 Fix CHECK_RELATION_BLOCK_RANGE macro, which was not merely producing
a warning but was outright wrong.
2007-07-15 23:46:20 +00:00
Tom Lane 4608f359a6 Fix a passel of signed vs unsigned char warnings. 2007-07-15 23:30:19 +00:00
Tom Lane cfd6c89b04 Silence a rather odd compiler warning. In passing, make this file's
error messages look at least a little bit like the message style
guidelines say.
2007-07-15 23:09:26 +00:00
Tom Lane a190eb3d7d Avoid possibly-unportable initializer, per buildfarm warning. 2007-07-15 22:57:48 +00:00
Tom Lane 84a0445c4d Change a couple of exit(0) to return 0 to suppress complaints from
not-too-bright compilers.  Per buildfarm results.
2007-07-15 22:54:21 +00:00
Tom Lane 7176e60bc8 Silence Solaris compiler warnings, per buildfarm. 2007-07-15 22:49:36 +00:00
Tom Lane 10a91e0add Silence Solaris compiler warning, per buildfarm. 2007-07-15 22:43:40 +00:00
Tom Lane af18d3d05c Fix compile warning on Solaris, per buildfarm. (Why have we got
three slightly different copies of this file?)
2007-07-15 22:40:28 +00:00
Tom Lane cd54eb2b5b Fix possible portability problem, per buildfarm warnings. 2007-07-15 22:34:26 +00:00
Tom Lane c11b8dcdbb Fix unportable use of isspace(), per buildfarm results. 2007-07-15 22:32:53 +00:00
Tom Lane 4f09b55dc3 Simplify overly-cute array coding to avoid an apparent gcc bug, which
may or may not be harmless.  Report from Stefan, patch from Heikki.
2007-07-12 23:10:57 +00:00
Joe Conway d92583f88e Restrict non-superusers to password authenticated connections
to prevent possible escalation of privilege. Provide new SECURITY
DEFINER functions with old behavior, but initially REVOKE ALL
from public for these functions. Per list discussion and design
proposed by Tom Lane. A different approach will be used for
back-branches, committed separately.
2007-07-08 17:12:38 +00:00
Jan Wieck 9fbcf6625e Changed new \usleep command into \sleep with an optional time unit
argument to specify us, ms or s. As per suggestion by Peter E.

Jan
2007-07-06 20:17:02 +00:00
Jan Wieck 0f17da9b3e Added a new scripting meta command
\usleep [milliseconds|:variable]

which can be used in -f scripts to insert a thinking time between
other commands.

Jan
2007-07-06 13:36:55 +00:00
Tom Lane b09c248bdd Fix PGXS conventions so that extensions can be built against Postgres
installations whose pg_config program does not appear first in the PATH.
Per gripe from Eddie Stanley and subsequent discussions with Fabien Coelho
and others.
2007-06-26 22:05:04 +00:00
Magnus Hagander b13cc9579c The functions bt_metap, bt_page_stats and bt_page_items had moved
from contrib/pgstattuple to pageinspect. We've already fixed English
documentation, but Japanese version does not catch up.

ITAGAKI Takahiro
2007-06-07 09:56:25 +00:00
Tom Lane 31edbadf4a Downgrade implicit casts to text to be assignment-only, except for the ones
from the other string-category types; this eliminates a lot of surprising
interpretations that the parser could formerly make when there was no directly
applicable operator.

Create a general mechanism that supports casts to and from the standard string
types (text,varchar,bpchar) for *every* datatype, by invoking the datatype's
I/O functions.  These new casts are assignment-only in the to-string direction,
explicit-only in the other, and therefore should create no surprising behavior.
Remove a bunch of thereby-obsoleted datatype-specific casting functions.

The "general mechanism" is a new expression node type CoerceViaIO that can
actually convert between *any* two datatypes if their external text
representations are compatible.  This is more general than needed for the
immediate feature, but might be useful in plpgsql or other places in future.

This commit does nothing about the issue that applying the concatenation
operator || to non-text types will now fail, often with strange error messages
due to misinterpreting the operator as array concatenation.  Since it often
(not always) worked before, we should either make it succeed or at least give
a more user-friendly error; but details are still under debate.

Peter Eisentraut and Tom Lane
2007-06-05 21:31:09 +00:00
Tom Lane bd0a260928 Make CREATE/DROP/RENAME DATABASE wait a little bit to see if other backends
will exit before failing because of conflicting DB usage.  Per discussion,
this seems a good idea to help mask the fact that backend exit takes nonzero
time.  Remove a couple of thereby-obsoleted sleeps in contrib and PL
regression test sequences.
2007-06-01 19:38:07 +00:00
Peter Eisentraut 7ce9b3683e Make some messages more consistent 2007-05-31 15:13:06 +00:00
Bruce Momjian 18e3992e56 Add standard error redirection for OS/X & darwin startup script.
Les Hill
2007-05-30 19:58:34 +00:00
Bruce Momjian 87a9473276 Update /contrib OS/X startup files, and move to a separate OS/X
directory.

Mark Cotner and David Fetter
2007-05-30 18:10:38 +00:00
Tom Lane a868e24660 Avoid assuming that the fields of struct timeval have exactly type long.
This is probably incorrect on some platforms, and definitely draws a
compiler warning on Darwin.
2007-05-24 18:54:10 +00:00
Peter Eisentraut 4e3cb9ca48 Add deprecation notice about planned removal in 8.4 and advice to try using
the newer XML stuff in core.

(This should probably also be referred to in the release notes.)
2007-05-24 11:13:08 +00:00
Alvaro Herrera 0f6e2d085d Remove unsupported -u option from pg_standby example usage.
From Pavel Stehule.
2007-05-22 15:31:44 +00:00
Bruce Momjian 9c326ad6bc Add CVS comment for recent commit:
Moved page-level functions from pgstattuple to
contrib/pageinspect.
2007-05-17 21:43:19 +00:00
Bruce Momjian 64058429c5 Add database page inspection /contrib module.
Simon and Heikki
2007-05-17 19:11:25 +00:00
Andrew Dunstan 0f77636c2e Remove directory qualification in <ossp/uuid.h> because it's not always installed in ossp.
Workaround for when it is: include the ossp directory using --with-includes.
2007-05-15 19:47:51 +00:00
Tom Lane 0fef38da21 Tweak hash index AM to use the new ReadOrZeroBuffer bufmgr API when fetching
pages it intends to zero immediately.  Just to show there is some use for that
function besides WAL recovery :-).
Along the way, fold _hash_checkpage and _hash_pageinit calls into _hash_getbuf
and friends, instead of expecting callers to do that separately.
2007-05-03 16:45:58 +00:00
Peter Eisentraut 3591ca1fbf Make some functions immutable.
thanks Marko Kreen
2007-04-22 21:16:18 +00:00
Peter Eisentraut 83ebe3a562 Fix typo 2007-04-22 21:12:25 +00:00
Peter Eisentraut 74496bc298 Contrib module uuid-ossp for generating UUID values using the OSSP UUID
library.  New configure option --with-ossp-uuid to activate.
2007-04-21 17:26:18 +00:00
Andrew Dunstan f97d4a267a Add --with-libxslt configure option 2007-04-15 12:48:24 +00:00
Andrew Dunstan 1656cb76f7 revert change to build xml2 until a better fix is found 2007-04-14 12:57:07 +00:00
Andrew Dunstan 6506a584cc Enable building contrib/xml2 if configured using --with-libxml.
If this breaks things due to missing libxslt, then I'll have to
revert it, but let's see if it breaks the buildfarm.

Workarounds in case libxslt is missing include:
. don't configure with libxml, or
. don't build contrib modules from the contrib Makefile (use the individual module Makefiles instead), or
. change the xml2 Makefile
2007-04-13 18:50:01 +00:00
Tatsuo Ishii 2fca2c05e7 Add -F option to set fillfactor for tellers, accounts and branches.
Patch contributed by Pavan Deolasee. Along with Japanese doc
modification by Tatsuo Ishii.
2007-04-08 01:15:07 +00:00
Bruce Momjian b0194ab110 Add the usage count statistics to the information available in
contrib/pgbuffercache.

Greg Smith
2007-04-07 16:09:14 +00:00