Commit Graph

20921 Commits

Author SHA1 Message Date
Tom Lane 6fcaaf29da Minor GUC cleanups: document krb_server_hostname and custom_variable_classes
in postgresql.conf.sample, mark custom_variable_classes as SIGHUP not
POSTMASTER to agree with the documentation (I can't see a reason it has
to be POSTMASTER so I think the docs are right).
2005-08-21 03:39:37 +00:00
Bruce Momjian e22443f405 Add:
> * Fix problems with wrong runtime encoding conversion for NLS message files
2005-08-21 01:04:45 +00:00
Tom Lane f39f6b500f Seems that the childXids list would be better based on Oid lists than
integer lists.
2005-08-20 23:45:08 +00:00
Tom Lane 0007490e09 Convert the arithmetic for shared memory size calculation from 'int'
to 'Size' (that is, size_t), and install overflow detection checks in it.
This allows us to remove the former arbitrary restrictions on NBuffers
etc.  It won't make any difference in a 32-bit machine, but in a 64-bit
machine you could theoretically have terabytes of shared buffers.
(How efficiently we could manage 'em remains to be seen.)  Similarly,
num_temp_buffers, work_mem, and maintenance_work_mem can be set above
2Gb on a 64-bit machine.  Original patch from Koichi Suzuki, additional
work by moi.
2005-08-20 23:26:37 +00:00
Tom Lane 2299ceab1c Invoke mksafefunc and mkunsafefunc with :: decoration. This seems a good
idea on consistency grounds, whether or not it really fixes bug #1831.
Michael Fuhr
2005-08-20 19:19:21 +00:00
Tatsuo Ishii ba2fc7eb4b Make GetMultiXactIdMembers() a public function. 2005-08-20 01:29:27 +00:00
Tatsuo Ishii bc3991c185 Add BackendXidGetPid(). 2005-08-20 01:26:36 +00:00
Tom Lane f57e3f4cf3 Repair problems with VACUUM destroying t_ctid chains too soon, and with
insufficient paranoia in code that follows t_ctid links.  (We must do both
because even with VACUUM doing it properly, the intermediate state with
a dangling t_ctid link is visible concurrently during lazy VACUUM, and
could be seen afterwards if either type of VACUUM crashes partway through.)
Also try to improve documentation about what's going on.  Patch is a bit
bulky because passing the XMAX information around required changing the
APIs of some low-level heapam.c routines, but it's not conceptually very
complicated.  Per trouble report from Teodor and subsequent analysis.
This needs to be back-patched, but I'll do that after 8.1 beta is out.
2005-08-20 00:40:32 +00:00
Bruce Momjian 97bb6e89be Fix LRU/ALL description mismatch for GUC parameter. 2005-08-19 18:58:18 +00:00
Bruce Momjian 0c7786bdfc Consistently align comments in postgresql.conf, move some slightly to
the right to stand out.
2005-08-19 01:55:18 +00:00
Tom Lane 77b4bd3b43 Update some obsolete comments --- code is using t_self now, not t_ctid. 2005-08-18 21:34:20 +00:00
Tom Lane dfdf07aab1 Fix up LIMIT/OFFSET planning so that we cope with non-constant LIMIT
or OFFSET clauses by using estimate_expression_value().  The main advantage
of this is that if the expression is a Param and we have a value for the
Param, we'll use that value rather than defaulting.  Also, fix some
thinkos in the logic for combining LIMIT/OFFSET with an externally
supplied tuple fraction (this covers cases like EXISTS(...LIMIT...)).
And make sure the results of all this are shown by EXPLAIN.  Per a
gripe from Merlin Moncure.
2005-08-18 17:51:12 +00:00
Bruce Momjian 96f63aebc8 Add:
> 	o Remove unnecessary abstractions in pg_dump source code
2005-08-18 14:14:31 +00:00
Bruce Momjian 7be1b3ba74 Add hint for to_char(interval) invalid format specifications. 2005-08-18 13:43:08 +00:00
Bruce Momjian a11fe54507 Done:
> * -Prevent to_char() on interval from returning meaningless values
2005-08-18 04:42:41 +00:00
Bruce Momjian e20261128d Fix to_char(interval) to return proper year and century values.
Fix to_char(interval) to return large year/month/day/hour values that
are larger than possible timestamp values.
Prevent to_char(interval) format specifications that make no sense, like
Month.
Clean up formatting.c code to more logically handle return lengths.
2005-08-18 04:37:08 +00:00
Tom Lane f8d0a82bf9 Avoid an Assert failure if OuterUserId hasn't been set yet during
AbortTransaction.  This can happen if a backend's InitPostgres transaction
fails (eg, because the given username is invalid).  Per Alvaro.
2005-08-17 22:14:34 +00:00
Bruce Momjian 63f850cd4d More formatting.c cleanups. 2005-08-17 22:06:53 +00:00
Bruce Momjian 9cd3fb172d Small cleanup. 2005-08-17 21:54:50 +00:00
Bruce Momjian 420fc28ac5 Adjust to_char/from_char code to use boolean "is_to_char" rather than
integer with flags.
2005-08-17 21:47:55 +00:00
Tom Lane cb6a08c9b3 Remove unnecessary configure test for inet_ntop(), per Andrew Dunstan. 2005-08-17 20:20:10 +00:00
Tom Lane ff15b3dac5 Fix declaration of dumpacl, per Alvaro. 2005-08-17 19:45:51 +00:00
Bruce Momjian 28d0515d18 Fix FSM warning to mention increasing max_fsm_pages. Was incorrectly
max_fsm_relations.
2005-08-17 03:50:59 +00:00
Bruce Momjian 26b9dcb640 Minor cleanup. 2005-08-17 01:45:20 +00:00
Bruce Momjian e19e382804 Update comments. 2005-08-16 19:29:38 +00:00
Bruce Momjian e7fb5563af Improve comment. 2005-08-16 19:23:31 +00:00
Bruce Momjian f2ad4cadbf Update pgcvslog comment on how to find branch start time.
Run autoconf/autoheader in case someone forgot in the past.
2005-08-16 17:46:57 +00:00
Tom Lane 6629bc79f1 Reject operator names >= NAMEDATALEN characters. These will not work
anyway, and in assert-enabled builds you are likely to get an assertion
failure.  Backpatch as far as 7.3; 7.2 seems not to have the problem.
2005-08-16 00:48:12 +00:00
Bruce Momjian 070a3ad76b Rename pg_stat_file columns to be more consistent. Split apart change
and creation columns to behave for Unix or Win32.
2005-08-15 23:00:14 +00:00
Tom Lane 24bd9447ac Clean up recent patch for PL handler functions in pg_catalog: the patch
caused PL languages and handlers to be dumped ALWAYS, even in the face
of contrary --schema or --table switches.  Adopt a slightly saner
definition.
2005-08-15 21:50:15 +00:00
Tom Lane 9a9328003d Make createlang and droplang proof against weird search_path settings
by forcing search_path to be just pg_catalog.
2005-08-15 21:02:26 +00:00
Tom Lane 866ffc2fe3 array_in() and array_recv() need to be more paranoid about validating
their OID parameter.  It was possible to crash the backend with
select array_in('{123}',0,0); because that would bypass the needed step
of initializing the workspace.  These seem to be the only two places
with a problem, though (record_in and record_recv don't have the issue,
and the other array functions aren't depending on user-supplied input).
Back-patch as far as 7.4; 7.3 does not have the bug.
2005-08-15 19:40:20 +00:00
Tom Lane e6a30121be int_array_enum function should be using fcinfo->flinfo->fn_extra for
working state, not fcinfo->context.  Silly oversight on my part in last
go-round of fixes.
2005-08-15 19:05:16 +00:00
Tom Lane 87808aef05 Allow the pgstat views to show toast tables as well as regular tables
(the stats system has always collected this info, but the views were
filtering it out).  Modify autovacuum so that over-threshold activity
in a toast table can trigger a VACUUM of the parent table, even if the
parent didn't appear to need vacuuming itself.  Per discussion a month
or so back about "short, wide tables".
2005-08-15 16:25:19 +00:00
Tom Lane 2498d8296e Clean up some stray remaining references to pg_shadow, pg_user, pg_group. 2005-08-15 02:40:36 +00:00
Tom Lane f590ed12f6 Change pg_dump to use pg_roles instead of pg_user on 8.1 and up,
so that it will correctly dump owners of objects owned by non-login roles.
2005-08-15 02:36:30 +00:00
Tom Lane 840b7f5205 Update administrator's guide chapters for ROLEs patch. 2005-08-14 23:35:38 +00:00
Peter Eisentraut bf86bacb2c Change standard_compliant_strings to standard_conforming_strings. 2005-08-14 22:19:50 +00:00
Tom Lane 8ae0d476a9 Update the createuser utility for the ROLEs world. Alvaro Herrera 2005-08-14 20:16:03 +00:00
Tom Lane e36de18191 Fix psql's \d commands to use pg_roles instead of pg_user, so that
they don't miss owners that are NOLOGIN.
2005-08-14 19:20:45 +00:00
Tom Lane 84ccf7212c Fix up tab completion for ROLEs and add some more completion logic for
other stuff; change \du and \dg to be role-aware (Stefan Kaltenbrunner).
Also make tab completion fetch the list of GUC variables from pg_settings
instead of having a hard-wired copy of the list (Tom Lane).
2005-08-14 18:49:30 +00:00
Tom Lane f60d176a5e Tweak catalog cache management algorithms to reduce cost of
SearchCatCacheList and ReleaseCatCacheList.  Previously, we incremented
and decremented the refcounts of list member tuples along with the list
itself, but that's unnecessary, and very expensive when the list is big.
It's cheaper to change only the list refcount.  When we are considering
deleting a cache entry, we have to check not only its own refcount but
its parent list's ... but it's easy to arrange the code so that this
check is not made in any commonly-used paths, so the cost is really nil.
The bigger gain though is to refrain from DLMoveToFront'ing each individual
member tuple each time the list is referenced.  To keep some semblance
of fair space management, lists are just marked as used or not since the
last cache cleanout search, and we do a MoveToFront pass only when about
to run a cleanout.  In combination, these changes reduce the costs of
SearchCatCacheList and ReleaseCatCacheList from about 4.5% of pgbench
runtime to under 1%, according to my gprof results.
2005-08-13 22:18:07 +00:00
Tom Lane 2af9a44fa9 Make pg_stat_file() use OUT parameters so that the user doesn't have to
remember the output parameter set for himself.  It's a bit of a kluge
but fixing array_in to work in bootstrap mode looks worse.
I removed the separate pg_file_length() function, as it no longer has any
real notational advantage --- you can write (pg_stat_file(...)).length.
2005-08-13 19:02:34 +00:00
Bruce Momjian f547909db7 Remove API file.
Marko Kreen
2005-08-13 15:27:41 +00:00
Bruce Momjian 03be45fbe6 CREATE TABLE has optional column names, so change {} to [].
Alvaro.
2005-08-13 02:48:18 +00:00
Bruce Momjian 87688ddf87 The large one adds support for RSA keys and reorganizes
the pubkey functions a bit.  The actual RSA-specific code
there is tiny, most of the patch consists of reorg of the
pubkey code, as lots of it was written as elgamal-only.

---------------------------------------------------------------------------

The SHLIB section was copy-pasted from somewhere and contains
several unnecessary libs.  This cleans it up a bit.

 -lcrypt
   we don't use system crypt()

 -lssl, -lssleay32
   no SSL here

 -lz in win32 section
   already added on previous line

 -ldes
   The chance anybody has it is pretty low.
   And the chance pgcrypto works with it is even lower.

Also trim the win32 section.

---------------------------------------------------------------------------

It is already disabled in Makefile, remove code too.

---------------------------------------------------------------------------

I was bit hasty making the random exponent 'k' a prime.  Further researh
shows that Elgamal encryption has no specific needs in respect to k,
any random number is fine.

It is bit different for signing, there it needs to be 'relatively prime'
to p - 1,  that means GCD(k, p-1) == 1, which is also a lot lighter than
full primality.  As we don't do signing, this can be ignored.

This brings major speedup to Elgamal encryption.

---------------------------------------------------------------------------

o  pgp_mpi_free: Accept NULLs
o  pgp_mpi_cksum: result should be 16bit
o  Remove function name from error messages - to be similar to other
   SQL functions, and it does not match anyway the called function
o  remove couple junk lines

---------------------------------------------------------------------------

o  Support for RSA encryption
o  Big reorg to better separate generic and algorithm-specific code.
o  Regression tests for RSA.

---------------------------------------------------------------------------

o  Tom stuck a CVS id into file.  I doubt the usefulness of it,
   but if it needs to be in the file then rather at the end.
   Also tag it as comment for asciidoc.
o  Mention bytea vs. text difference
o  Couple clarifications

---------------------------------------------------------------------------

There is a choice whether to update it with pgp functions or
remove it.  I decided to remove it, updating is pointless.

I've tried to keep the core of pgcrypto relatively independent
from main PostgreSQL, to make it easy to use externally if needed,
and that is good.  Eg. that made development of PGP functions much
nicer.

But I have no plans to release it as generic library, so keeping such
doc
up-to-date is waste of time.  If anyone is interested in using it in
other products, he can probably bother to read the source too.

Commented source is another thing - I'll try to make another pass
over code to see if there is anything non-obvious that would need
more comments.

---------------------------------------------------------------------------

Marko Kreen
2005-08-13 02:06:21 +00:00
Bruce Momjian abecf1afc2 Add documentation:
>>>I think a more accurate description would be "permissions not
>>>inherited by children," and that isn't necessarily a bug.
>>
>>I agree it may not be a bug - but it's more than the permissions not
>>being inherited: the parent is affected.
>
>
> Not really, once you understand what's happening.  Unless you use
> FROM ONLY, selecting from the parent selects from the parent *and*
> its children.  The parent itself isn't affected, as queries with
> FROM ONLY should demonstrate.  I understand what you're saying --
> that there's an apparent effect on the parent -- but there really
> isn't.

Sean Burlington
2005-08-13 01:55:41 +00:00
Bruce Momjian f810cfb291 Disable strtoul() ERANGE check on Win32, because it isn't thread safe,
and it isn't really required.
2005-08-13 01:34:30 +00:00
Bruce Momjian 27639809d2 Reverse out Assert addition. 2005-08-12 23:13:54 +00:00
Tom Lane 59c016aa9f Pass the type OID as the typioparam for all non-array types, rather than
only composite types as we did in 8.0.  Per discussion with Martijn
van Oosterhout.
2005-08-12 21:49:47 +00:00