Tom Lane [Tue, 23 Dec 2003 18:40:53 +0000 (18:40 +0000)]
Push responsibility for selecting out-of-line-assembler TAS code out to
the platform template files, instead of doing it directly in configure.in.
This seems cleaner, and also opens the door to making the choice be
dependent on the compiler being used.
Tom Lane [Tue, 23 Dec 2003 18:13:17 +0000 (18:13 +0000)]
Mop-up for HAS_TEST_AND_SET refactoring. Un-break two or three platforms
that were broken, try to make layout of s_lock.h entries consistent,
use HAVE_SPINLOCKS in preference to HAS_TEST_AND_SET everywhere outside
s_lock.h itself.
Bruce Momjian [Sun, 21 Dec 2003 04:34:36 +0000 (04:34 +0000)]
Back out:
> Attached is a patch that addressed all the discussed issues
> that did not break backward compatability, including the
> ability to output ISO-8601 compliant intervals by setting
> datestyle to iso8601basic.
Bruce Momjian [Sun, 21 Dec 2003 04:30:10 +0000 (04:30 +0000)]
[ This description should have been on the earlier fork/exec
commit, but I am adding it now so it is in CVS.]
The patch basically is a slight rearrangement of the code to allow
fork/exec on Unix, with the ultimate goal of doing CreateProcess on
Win32. The changes are:
o Write out postmaster global variables and per-backend
variables to be read by the exec'ed backend
o Mark some static variables as global when exec is used so
then can be dumped from postmaster.c, marked NON_EXEC_STATIC
o Remove value passing with -p now that we have per-backend
file
o Move some pointer storage out of shared memory for easier
dumping.
o Modified pgsql_temp directory cleanup to handle per-database
directories and the backend exec directory under datadir.
Tom Lane [Sun, 21 Dec 2003 01:23:06 +0000 (01:23 +0000)]
Improve btree's initial-positioning-strategy code so that we never need
to step more than one entry after descending the search tree to arrive at
the correct place to start the scan. This can improve the behavior
substantially when there are many entries equal to the chosen boundary
value. Per suggestion from Dmitry Tkach, 14-Jul-03.
Tom Lane [Sun, 21 Dec 2003 00:33:33 +0000 (00:33 +0000)]
The recent DUMMY_PROCS patch broke accounting for the number of semaphores
needed. This caused us to fail all the time on Darwin, and we'd fail for
some values of maxBackends on SysV-sema platforms, too.
Tom Lane [Sat, 20 Dec 2003 18:45:49 +0000 (18:45 +0000)]
Dept. of third thoughts: in fact, libpq should support SCM_CREDS challenge
even when HAVE_GETPEEREID is defined, else it will be unable to connect to
pre-7.4 backends that are using IDENT authentication.
Tom Lane [Sat, 20 Dec 2003 18:24:52 +0000 (18:24 +0000)]
Fix broken IDENT support for FreeBSD (appears to have been broken by
ill-considered conditional logic in getpeereid patch of 3-Dec-2002).
Per bug #1021.
Bruce Momjian [Sat, 20 Dec 2003 15:32:55 +0000 (15:32 +0000)]
In my mind there were two categories of open issues
a) ones that are 100% backward (such as the comment about
outputting this format)
and
b) ones that aren't (such as deprecating the current
postgresql shorthand of
'1Y1M'::interval = 1 year 1 minute
in favor of the ISO-8601
'P1Y1M'::interval = 1 year 1 month.
Attached is a patch that addressed all the discussed issues that
did not break backward compatability, including the ability to
output ISO-8601 compliant intervals by setting datestyle to
iso8601basic.
Interval values can now be written as ISO 8601 time intervals, using
the "Format with time-unit designators". This format always starts with
the character 'P', followed by a string of values followed
by single character time-unit designators. A 'T' separates the date and
time parts of the interval.
Bruce Momjian [Fri, 19 Dec 2003 23:29:15 +0000 (23:29 +0000)]
Supress ecpg thread test if configure didn't enable threads. Fix
tools/thread to run even if configure didn't enable threads because this
test is used before enabling threads for the OS.
Joe Conway [Fri, 19 Dec 2003 00:02:11 +0000 (00:02 +0000)]
Use a shutdown callback to ensure proper clean up when rescanning
partially-evaluated SRFs. Per report found here:
http://archives.postgresql.org/pgsql-general/2003-12/msg00851.php
Tom Lane [Thu, 18 Dec 2003 22:23:42 +0000 (22:23 +0000)]
Use a shutdown callback to clear setArgsValid in a FuncExprState that is
evaluating a set-valued function. This fixes some additional problems
with rescanning partially-evaluated SRFs.
Tom Lane [Thu, 18 Dec 2003 20:21:37 +0000 (20:21 +0000)]
Ensure set-returning functions in the targetlist of a plan node will be
shut down cleanly if the plan node is ReScanned before the SRFs are run
to completion. This fixes the problem for SQL-language functions, but
still need work on functions using the SRF_XXX() macros.
Peter Eisentraut [Thu, 18 Dec 2003 18:55:09 +0000 (18:55 +0000)]
Move Informix compatibility include files out of the way. compatlib.h
was integrated into ecpg_informix.h, the other ones go into their own
subdirectory that is automatically considered by the embedded preprocessor
when in Informix mode.
Bruce Momjian [Thu, 18 Dec 2003 03:46:45 +0000 (03:46 +0000)]
Here is the definition of relation_byte_size() in optimizer/path/costsize.c:
----------------------------------------------------------------------
/*
* relation_byte_size
* Estimate the storage space in bytes for a given number of tuples
* of a given width (size in bytes).
*/
static double
relation_byte_size(double tuples, int width)
{
return tuples * (MAXALIGN(width) + MAXALIGN(sizeof(HeapTupleData)));
}
Tom Lane [Thu, 18 Dec 2003 00:22:12 +0000 (00:22 +0000)]
Be a little smarter in group_clauses_by_indexkey_for_join: detect cases
where a joinclause is redundant with a restriction clause. Original coding
believed this was impossible and didn't need to be checked for, but that
was a thinko ...
Tom Lane [Wed, 17 Dec 2003 22:11:30 +0000 (22:11 +0000)]
information_schema.constraint_column_usage and key_column_usage should
not discriminate against system columns, since we support constraints on
system columns, and in fact constraints on OID are moderately useful.
Tom Lane [Wed, 17 Dec 2003 19:49:39 +0000 (19:49 +0000)]
Reorder tests in parse_coerce so that ANY/ANYELEMENT/ANYARRAY coercion
does not affect UNKNOWN-type literals or Params. This fixes the recent
complaint about count('x') being broken, and improves consistency in
a few other respects too.
Tom Lane [Wed, 17 Dec 2003 17:07:48 +0000 (17:07 +0000)]
Repair planner failure when there are multiple IN clauses, each with
a join in its subselect. In this situation we *must* build a bushy
plan because there are no valid left-sided or right-sided join trees.
Accordingly, hoary sanity check needs an update. Per report from
Alessandro Depase.
Michael Meskes [Wed, 17 Dec 2003 15:23:45 +0000 (15:23 +0000)]
- Added just another patch by Dave that fixes a reversed order in
variable listing for output variables in cursor definitions
- Fixed incorrect if call in long=>numeric conversion.
Neil Conway [Sun, 14 Dec 2003 00:34:47 +0000 (00:34 +0000)]
I posted some bufmgr cleanup a few weeks ago, but it conflicted with
some concurrent changes Jan was making to the bufmgr. Here's an
updated version of the patch -- it should apply cleanly to CVS
HEAD and passes the regression tests.
This patch makes the following changes:
- remove the UnlockAndReleaseBuffer() and UnlockAndWriteBuffer()
macros, and replace uses of them with calls to the appropriate
functions.
- remove a bunch of #ifdef BMTRACE code: it is ugly & broken
(i.e. it doesn't compile)
- make BufferReplace() return a bool, not an int
- cleanup some logic in bufmgr.c; should be functionality
equivalent to the previous code, just cleaner now
Neil Conway [Sun, 14 Dec 2003 00:10:32 +0000 (00:10 +0000)]
This patch makes some improvements and adds some additional detail
to the documentation on routine database maintainence activities.
I also corrected a bunch of SGML markup.
Peter Eisentraut [Fri, 12 Dec 2003 18:45:10 +0000 (18:45 +0000)]
This patch properly sets the prototype for the on_shmem_exit and
on_proc_exit functions, and adjust all other related code to use
the proper types too.
Tom Lane [Tue, 9 Dec 2003 01:56:20 +0000 (01:56 +0000)]
query_tree_mutator should copy RangeTblEntry nodes even when it's not
planning to modify them itself. Otherwise we end up with shared RTE
substructure, which breaks inheritance_planner because the rte->inh
flag needs to be independent in each copied subquery. Per bug report
from Chris Piker.