]> git.ipfire.org Git - thirdparty/postgresql.git/log
thirdparty/postgresql.git
19 years agoRepair problems with the result of lookup_rowtype_tupdesc() possibly being
Tom Lane [Tue, 17 Jan 2006 17:33:37 +0000 (17:33 +0000)] 
Repair problems with the result of lookup_rowtype_tupdesc() possibly being
discarded by cache flush while still in use.  This is a minimal patch that
just copies the tupdesc anywhere it could be needed across a flush.  Applied
to back branches only; Neil Conway is working on a better long-term solution
for HEAD.

19 years agoWhen using GCC on AMD64 and PPC, ECPGget_variable() takes a va_list *, not
Neil Conway [Sun, 15 Jan 2006 22:47:21 +0000 (22:47 +0000)] 
When using GCC on AMD64 and PPC, ECPGget_variable() takes a va_list *, not
a va_list. Christof Petig's previous patch made this change, but neglected
to update ecpglib/descriptor.c, resulting in a compiler warning (and a
likely runtime crash) on AMD64 and PPC.

19 years agoFix pg_ctl crash on "unregister" when a data directory is not specified.
Peter Eisentraut [Sat, 14 Jan 2006 16:18:30 +0000 (16:18 +0000)] 
Fix pg_ctl crash on "unregister" when a data directory is not specified.
by Magnus Hagander

19 years agoWe neglected to apply domain constraints on UNKNOWN parameters to
Neil Conway [Thu, 12 Jan 2006 22:29:22 +0000 (22:29 +0000)] 
We neglected to apply domain constraints on UNKNOWN parameters to
prepared statements, per report from David Wheeler.

19 years agoRepair "Halloween problem" in EvalPlanQual: a tuple that's been inserted by
Tom Lane [Thu, 12 Jan 2006 21:49:19 +0000 (21:49 +0000)] 
Repair "Halloween problem" in EvalPlanQual: a tuple that's been inserted by
our own command (or more generally, xmin = our xact and cmin >= current
command ID) should not be seen as good.  Else we may try to update rows
we already updated.  This error was inserted last August while fixing the
even bigger problem that the old coding wouldn't see *any* tuples inserted
by our own transaction as good.  Per report from Euler Taveira de Oliveira.

19 years agoUse a more bulletproof test for whether finite() and isinf() are present.
Tom Lane [Thu, 12 Jan 2006 19:24:02 +0000 (19:24 +0000)] 
Use a more bulletproof test for whether finite() and isinf() are present.
It seems that recent gcc versions can optimize away calls to these functions
even when the functions do not exist on the platform, resulting in a bogus
positive result.  Avoid this by using a non-constant argument and ensuring
that the function result is not simply discarded.  Per report from
François Laupretre.

19 years agoFix pg_tzset() to ensure that 'lclmem' (the static variable holding
Tom Lane [Tue, 10 Jan 2006 20:16:25 +0000 (20:16 +0000)] 
Fix pg_tzset() to ensure that 'lclmem' (the static variable holding
the localtime timezone data) is not overwritten until we know the data
is good.  tzload() is capable of failing after having begun modifying
the struct it's pointed at, and in such cases the static data was left
in a corrupt state.  Bug does not exist pre-8.0 (since we didn't have
this code then) nor post-8.0 (since we already changed the code to
tzload into local variables initially).  Per report from Nick Martens.

19 years agoIn PLy_function_build_args(), the code loops repeatedly, constructing
Neil Conway [Tue, 10 Jan 2006 00:33:48 +0000 (00:33 +0000)] 
In PLy_function_build_args(), the code loops repeatedly, constructing
one argument at a time and then inserting the argument into a Python
list via PyList_SetItem(). This "steals" the reference to the argument:
that is, the reference to the new list member is now held by the Python
list itself. This works fine, except if an elog occurs. This causes the
function's PG_CATCH() block to be invoked, which decrements the
reference counts on both the current argument and the list of arguments.
If the elog happens to occur during the second or subsequent iteration
of the loop, the reference count on the current argument will be
decremented twice.

The fix is simple: set the local pointer to the current argument to NULL
immediately after adding it to the argument list. This ensures that the
Py_XDECREF() in the PG_CATCH() block doesn't double-decrement.

19 years agoFix pg_dump to add the required OPERATOR() decoration to schema-qualified
Tom Lane [Mon, 9 Jan 2006 21:16:37 +0000 (21:16 +0000)] 
Fix pg_dump to add the required OPERATOR() decoration to schema-qualified
operator names.  This is needed when dumping operator definitions that have
COMMUTATOR (or similar) links to operators in other schemas.
Apparently Daniel Whitter is the first person ever to try this :-(

19 years agoStop perl from hijacking stdio and other stuff on Windows.
Andrew Dunstan [Sun, 8 Jan 2006 15:51:19 +0000 (15:51 +0000)] 
Stop perl from hijacking stdio and other stuff on Windows.

19 years agoAdd RelationOpenSmgr() calls to ensure rd_smgr is valid when we try to
Tom Lane [Sat, 7 Jan 2006 22:46:07 +0000 (22:46 +0000)] 
Add RelationOpenSmgr() calls to ensure rd_smgr is valid when we try to
use it.  While it normally has been opened earlier during btree index
build, testing shows that it's possible for the link to be closed again
if an sinval reset occurs while the index is being built.

19 years agoFix failure to apply domain constraints to a NULL constant that's added to
Tom Lane [Fri, 6 Jan 2006 20:11:24 +0000 (20:11 +0000)] 
Fix failure to apply domain constraints to a NULL constant that's added to
an INSERT target list during rule rewriting.  Per report from John Supplee.

19 years agoRelease-note updates and copy editing. REL8_0_6
Tom Lane [Fri, 6 Jan 2006 03:00:20 +0000 (03:00 +0000)] 
Release-note updates and copy editing.

19 years agoFix Windows-only postmaster code to reject a connection request and continue,
Tom Lane [Fri, 6 Jan 2006 02:58:40 +0000 (02:58 +0000)] 
Fix Windows-only postmaster code to reject a connection request and continue,
rather than elog(FATAL), when there is no more room in ShmemBackendArray.
This is a security issue since too many connection requests arriving close
together could cause the postmaster to shut down, resulting in denial of
service.  Reported by Yoshiyuki Asaba, fixed by Magnus Hagander.

19 years agoGenerate back-branch configure scripts with the appropriate version of autoconf.
Tom Lane [Fri, 6 Jan 2006 02:30:52 +0000 (02:30 +0000)] 
Generate back-branch configure scripts with the appropriate version of autoconf.

19 years agoConvert Assert checking for empty page into a regular test and elog.
Tom Lane [Fri, 6 Jan 2006 00:16:09 +0000 (00:16 +0000)] 
Convert Assert checking for empty page into a regular test and elog.
The consequences of overwriting a non-empty page are bad enough that
we should not omit this test in production builds.

19 years agoFix ReadBuffer() to correctly handle the case where it's trying to extend
Tom Lane [Fri, 6 Jan 2006 00:04:33 +0000 (00:04 +0000)] 
Fix ReadBuffer() to correctly handle the case where it's trying to extend
the relation but it finds a pre-existing valid buffer.  The buffer does not
correspond to any page known to the kernel, so we *must* do smgrextend to
ensure that the space becomes allocated.  The 7.x branches all do this
correctly, but the corner case got lost somewhere during 8.0 bufmgr rewrites.
(My fault no doubt :-( ... I think I assumed that such a buffer must be
not-BM_VALID, which is not so.)

19 years agoNew pgcrypto item wording.
Bruce Momjian [Thu, 5 Jan 2006 15:18:29 +0000 (15:18 +0000)] 
New pgcrypto item wording.

19 years agoWording improvements.
Bruce Momjian [Thu, 5 Jan 2006 15:12:03 +0000 (15:12 +0000)] 
Wording improvements.

19 years agoImprove markup.
Bruce Momjian [Thu, 5 Jan 2006 14:53:18 +0000 (14:53 +0000)] 
Improve markup.

19 years agoUpdate release notes.
Bruce Momjian [Thu, 5 Jan 2006 05:23:09 +0000 (05:23 +0000)] 
Update release notes.

19 years agoStamp relesae 8.0.6.
Bruce Momjian [Thu, 5 Jan 2006 04:00:29 +0000 (04:00 +0000)] 
Stamp relesae 8.0.6.

19 years agoArrange to set the LC_XXX environment variables to match our locale setup.
Tom Lane [Thu, 5 Jan 2006 00:55:07 +0000 (00:55 +0000)] 
Arrange to set the LC_XXX environment variables to match our locale setup.
Back-patch of previous fix in HEAD for plperl-vs-locale issue.

19 years agoWhen the remote query result has a different number of columns
Joe Conway [Tue, 3 Jan 2006 23:47:24 +0000 (23:47 +0000)] 
When the remote query result has a different number of columns
than the local query specifies (e.g. in the FROM clause),
throw an ERROR (instead of crashing). Fix for bug #2129 reported
by Akio Iwaasa.

19 years agoThere is a signedness bug in Openwall gen_salt code that pgcrypto uses.
Tom Lane [Tue, 3 Jan 2006 23:46:44 +0000 (23:46 +0000)] 
There is a signedness bug in Openwall gen_salt code that pgcrypto uses.
This makes the salt space for md5 and xdes algorithms a lot smaller than
it should be.

Marko Kreen

19 years agoFix incorrect treatment of RL_PROMPT_START_IGNORE/RL_PROMPT_END_IGNORE,
Tom Lane [Tue, 3 Jan 2006 23:32:40 +0000 (23:32 +0000)] 
Fix incorrect treatment of RL_PROMPT_START_IGNORE/RL_PROMPT_END_IGNORE,
per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343616 via Martin Pitt.

19 years agoAdd checks to verify that a plpgsql function returning a rowtype is actually
Tom Lane [Tue, 3 Jan 2006 22:48:28 +0000 (22:48 +0000)] 
Add checks to verify that a plpgsql function returning a rowtype is actually
returning the rowtype it's supposed to return.  Per reports from David Niblett
and Michael Fuhr.

19 years agoRemove DOS line endings ("\r\n") from several .po files. DOS line endings
Neil Conway [Sun, 1 Jan 2006 10:14:59 +0000 (10:14 +0000)] 
Remove DOS line endings ("\r\n") from several .po files. DOS line endings
are inconsistent with the rest of the .po files, and apparently cause
problems for Sun's cc. Per report on IRC from "bitvector2".

19 years agoIndex: src/pl/plpython/plpython.c
Neil Conway [Thu, 29 Dec 2005 21:47:49 +0000 (21:47 +0000)] 
Index: src/pl/plpython/plpython.c
===================================================================
RCS file: /Users/neilc/postgres/cvs_root/pgsql/src/pl/plpython/plpython.c,v
retrieving revision 1.67
diff -c -r1.67 plpython.c
*** src/pl/plpython/plpython.c 26 Dec 2005 04:28:48 -0000 1.67
--- src/pl/plpython/plpython.c 29 Dec 2005 16:54:57 -0000
***************
*** 2,8 ****
   * plpython.c - python as a procedural language for PostgreSQL
   *
   * This software is copyright by Andrew Bosma
!  * but is really shameless cribbed from pltcl.c by Jan Weick, and
   * plperl.c by Mark Hollomon.
   *
   * The author hereby grants permission to use, copy, modify,
--- 2,8 ----
   * plpython.c - python as a procedural language for PostgreSQL
   *
   * This software is copyright by Andrew Bosma
!  * but is really shamelessly cribbed from pltcl.c by Jan Wieck, and
   * plperl.c by Mark Hollomon.
   *
   * The author hereby grants permission to use, copy, modify,
***************
*** 1996,2002 ****
   int i,
   rv;
   PLyPlanObject *plan;
-  char    *nulls;
   MemoryContext oldcontext;

   if (list != NULL)
--- 1996,2001 ----
***************
*** 2018,2024 ****
   if (nargs != plan->nargs)
   {
   char    *sv;
-
   PyObject   *so = PyObject_Str(list);

   if (!so)
--- 2017,2022 ----
***************
*** 2036,2048 ****
   oldcontext = CurrentMemoryContext;
   PG_TRY();
   {
!  nulls = palloc(nargs * sizeof(char));

   for (i = 0; i < nargs; i++)
   {
   PyObject   *elem,
      *so;
-  char    *sv;

   elem = PySequence_GetItem(list, i);
   if (elem != Py_None)
--- 2034,2045 ----
   oldcontext = CurrentMemoryContext;
   PG_TRY();
   {
!  char    *nulls = palloc(nargs * sizeof(char));

   for (i = 0; i < nargs; i++)
   {
   PyObject   *elem,
      *so;

   elem = PySequence_GetItem(list, i);
   if (elem != Py_None)
***************
*** 2051,2070 ****
   if (!so)
   PLy_elog(ERROR, "function \"%s\" could not execute plan",
    PLy_procedure_name(PLy_curr_procedure));
!  sv = PyString_AsString(so);

!  /*
!   * FIXME -- if this elogs, we have Python reference leak
!   */
!  plan->values[i] =
!  FunctionCall3(&(plan->args[i].out.d.typfunc),
!    CStringGetDatum(sv),
!  ObjectIdGetDatum(plan->args[i].out.d.typioparam),
!    Int32GetDatum(-1));

!  Py_DECREF(so);
!  Py_DECREF(elem);

   nulls[i] = ' ';
   }
   else
--- 2048,2073 ----
   if (!so)
   PLy_elog(ERROR, "function \"%s\" could not execute plan",
    PLy_procedure_name(PLy_curr_procedure));
!  Py_DECREF(elem);

!  PG_TRY();
!  {
!  char *sv = PyString_AsString(so);

!  plan->values[i] =
!  FunctionCall3(&(plan->args[i].out.d.typfunc),
!    CStringGetDatum(sv),
!  ObjectIdGetDatum(plan->args[i].out.d.typioparam),
!    Int32GetDatum(-1));
!  }
!  PG_CATCH();
!  {
!  Py_DECREF(so);
!  PG_RE_THROW();
!  }
!  PG_END_TRY();

+  Py_DECREF(so);
   nulls[i] = ' ';
   }
   else

19 years agoFix long standing Asian multibyte charsets bug.
Tatsuo Ishii [Sat, 24 Dec 2005 10:11:32 +0000 (10:11 +0000)] 
Fix long standing Asian multibyte charsets bug.
See:

Subject: [HACKERS] bugs with certain Asian multibyte charsets
From: Tatsuo Ishii <ishii@sraoss.co.jp>
To: pgsql-hackers@postgresql.org
Date: Sat, 24 Dec 2005 18:25:33 +0900 (JST)

for more details.

19 years agoFix make_relative_path() to support cases where target_path and bin_path
Tom Lane [Fri, 23 Dec 2005 22:34:33 +0000 (22:34 +0000)] 
Fix make_relative_path() to support cases where target_path and bin_path
differ by more than the last directory component.  Instead of insisting
that they match up to the last component, accept whatever common prefix
they have, and try to replace the non-matching part of bin_path with
the non-matching part of target_path in the actual executable's path.
In one way this is tighter than the old code, because it insists on
a match to the part of bin_path we want to substitute for, rather than
blindly stripping one directory component from the executable's path.
Per gripe from Martin Pitt and subsequent discussion.

19 years agoAdjust string comparison so that only bitwise-equal strings are considered
Tom Lane [Thu, 22 Dec 2005 22:50:14 +0000 (22:50 +0000)] 
Adjust string comparison so that only bitwise-equal strings are considered
equal: if strcoll claims two strings are equal, check it with strcmp, and
sort according to strcmp if not identical.  This fixes inconsistent
behavior under glibc's hu_HU locale, and probably under some other locales
as well.  Also, take advantage of the now-well-defined behavior to speed up
texteq, textne, bpchareq, bpcharne: they may as well just do a bitwise
comparison and not bother with strcoll at all.

NOTE: affected databases may need to REINDEX indexes on text columns to be
sure they are self-consistent.

19 years agoFix word's length in pg_regexec call
Teodor Sigaev [Wed, 21 Dec 2005 13:08:14 +0000 (13:08 +0000)] 
Fix word's length in pg_regexec call

19 years agoDefend against crash while processing Describe Statement or Describe Portal
Tom Lane [Wed, 14 Dec 2005 17:06:51 +0000 (17:06 +0000)] 
Defend against crash while processing Describe Statement or Describe Portal
messages, when client attempts to execute these outside a transaction (start
one) or in a failed transaction (reject message, except for COMMIT/ROLLBACK
statements which we can handle).  Per report from Francisco Figueiredo Jr.

19 years agoFix a *different* problem with whole-row Vars afflicting 8.0 branch.
Tom Lane [Wed, 14 Dec 2005 16:30:20 +0000 (16:30 +0000)] 
Fix a *different* problem with whole-row Vars afflicting 8.0 branch.
This is a back-port of a fix made to markTargetListOrigin() on 2005-04-25.

19 years agoTranslation updates REL8_0_5
Peter Eisentraut [Fri, 9 Dec 2005 22:16:16 +0000 (22:16 +0000)] 
Translation updates

19 years agoStamp 8.0.5.
Tom Lane [Fri, 9 Dec 2005 20:49:38 +0000 (20:49 +0000)] 
Stamp 8.0.5.

19 years agoAdd release notes for back branches (7.3 and up).
Tom Lane [Fri, 9 Dec 2005 20:40:38 +0000 (20:40 +0000)] 
Add release notes for back branches (7.3 and up).
Also minor improvements to 8.1.1 release notes.

19 years agoDocumentation fix: s/event_object_name/event_object_table/g
Peter Eisentraut [Thu, 8 Dec 2005 20:45:26 +0000 (20:45 +0000)] 
Documentation fix: s/event_object_name/event_object_table/g

19 years agoFix bgwriter's failure to release buffer pins and open files after an
Tom Lane [Thu, 8 Dec 2005 19:19:45 +0000 (19:19 +0000)] 
Fix bgwriter's failure to release buffer pins and open files after an
error.  This probably explains bug #2099 and could also account for
mysterious VACUUM hangups.

19 years agoFix stupid bug with sizeof
Teodor Sigaev [Tue, 6 Dec 2005 18:22:21 +0000 (18:22 +0000)] 
Fix stupid bug with sizeof

19 years agoIn a nestloop inner indexscan, it's OK to use pushed-down baserestrictinfo
Tom Lane [Tue, 6 Dec 2005 16:50:55 +0000 (16:50 +0000)] 
In a nestloop inner indexscan, it's OK to use pushed-down baserestrictinfo
clauses even if it's an outer join.  This is a corner case since such
clauses could only arise from weird OUTER JOIN ON conditions, but worth
fixing.  Per example from Ron at cheapcomplexdevices.com.

19 years agoAdd regression test to see if the min/max values of int8 convert correctly.
Tom Lane [Mon, 5 Dec 2005 04:14:07 +0000 (04:14 +0000)] 
Add regression test to see if the min/max values of int8 convert correctly.

19 years agoFix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX.
Tom Lane [Sat, 3 Dec 2005 20:16:50 +0000 (20:16 +0000)] 
Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX.
Per example from Dirk Pirschel.

19 years agoFix obsolete description of -h option, per Andreas Schmidt.
Tom Lane [Fri, 2 Dec 2005 23:14:02 +0000 (23:14 +0000)] 
Fix obsolete description of -h option, per Andreas Schmidt.

19 years agoRetry in FileRead and FileWrite if Windows returns ERROR_NO_SYSTEM_RESOURCES.
Tom Lane [Thu, 1 Dec 2005 20:24:49 +0000 (20:24 +0000)] 
Retry in FileRead and FileWrite if Windows returns ERROR_NO_SYSTEM_RESOURCES.
Also add a retry for Unixen returning EINTR, which hasn't been reported
as an issue but at least theoretically could be.  Patch by Qingqing Zhou,
some minor adjustments by me.

19 years agoCheck for overflow in strtol() while parsing datetime inputs.
Tom Lane [Thu, 1 Dec 2005 17:56:54 +0000 (17:56 +0000)] 
Check for overflow in strtol() while parsing datetime inputs.
Michael Fuhr.

19 years agoRearrange code in pg_atoi() to avoid assuming that isspace() cannot
Tom Lane [Wed, 30 Nov 2005 23:10:34 +0000 (23:10 +0000)] 
Rearrange code in pg_atoi() to avoid assuming that isspace() cannot
change errno.  No reported bugs here, but why take a chance?

19 years ago- Made several variables "const char *" instead of "char *" as proposed by Qingqing...
Michael Meskes [Wed, 30 Nov 2005 12:51:07 +0000 (12:51 +0000)] 
- Made several variables "const char *" instead of "char *" as proposed by Qingqing Zhou <zhouqq@cs.toronto.edu>.
- Replaced all strdup() calls by ECPGstrdup().

19 years agoFix performance issue in exprTypmod(): for a COALESCE expression, it
Tom Lane [Fri, 18 Nov 2005 23:08:28 +0000 (23:08 +0000)] 
Fix performance issue in exprTypmod(): for a COALESCE expression, it
recursed twice on its first argument, leading to exponential time spent
on a deep nest of COALESCEs ... such as a deeply nested FULL JOIN would
produce.  Per report from Matt Carter.

19 years agoProperly document return value of strpos().
Bruce Momjian [Wed, 16 Nov 2005 03:56:08 +0000 (03:56 +0000)] 
Properly document return value of strpos().

19 years agoUpdate error message and documentation for fsync test.
Bruce Momjian [Wed, 16 Nov 2005 03:44:51 +0000 (03:44 +0000)] 
Update error message and documentation for fsync test.

19 years agoUpdate test_fsync to honor -f.
Bruce Momjian [Wed, 16 Nov 2005 01:34:11 +0000 (01:34 +0000)] 
Update test_fsync to honor -f.

Backpatch to 8.0.X.

19 years agoForce the second argument of SUBSTRING(foo FOR bar) to be int4, to avoid
Tom Lane [Sun, 13 Nov 2005 19:12:05 +0000 (19:12 +0000)] 
Force the second argument of SUBSTRING(foo FOR bar) to be int4, to avoid
surprising results when it's some other numeric type.  This doesn't solve
the generic problem of surprising implicit casts to text, but it's a
low-impact way of making sure this particular case behaves sanely.
Per gripe from Harald Fuchs and subsequent discussion.

19 years agoWhen in transaction-aborted state, reject Bind message for portals containing
Tom Lane [Thu, 10 Nov 2005 00:31:49 +0000 (00:31 +0000)] 
When in transaction-aborted state, reject Bind message for portals containing
anything but transaction-exiting commands (ROLLBACK etc).  We already rejected
Parse and Execute in such cases, so there seems little point in allowing Bind.
This prevents at least an Assert failure, and probably worse things, since
there's a lot of infrastructure that doesn't work when not in a live
transaction.  We can also simplify the Bind logic a bit by rejecting messages
with a nonzero number of parameters, instead of the former kluge to silently
substitute NULL for each parameter.  Per bug #2033 from Joel Stevenson.

19 years agoFix misspelling of 'listen_addresses', per Devrim.
Tom Lane [Wed, 9 Nov 2005 17:44:22 +0000 (17:44 +0000)] 
Fix misspelling of 'listen_addresses', per Devrim.

19 years agoRepair an error introduced by log_line_prefix patch: it is not acceptable
Tom Lane [Sat, 5 Nov 2005 03:05:05 +0000 (03:05 +0000)] 
Repair an error introduced by log_line_prefix patch: it is not acceptable
to assume that the string pointer passed to set_ps_display is good forever.
There's no need to anyway since ps_status.c itself saves the string, and
we already had an API (get_ps_display) to return it.
I believe this explains Jim Nasby's report of intermittent crashes in
elog.c when %i format code is in use in log_line_prefix.
While at it, repair a previously unnoticed problem: on some platforms such as
Darwin, the string returned by get_ps_display was blank-padded to the maximum
length, meaning that lock.c's attempt to append " waiting" to it never worked.

19 years agoBackpatch FAQ's for 8.0.X.
Bruce Momjian [Sat, 5 Nov 2005 01:36:42 +0000 (01:36 +0000)] 
Backpatch FAQ's for 8.0.X.

19 years agoEnsure that we only create one ConsoleCtrlHandler per psql process,
Tom Lane [Fri, 4 Nov 2005 18:35:51 +0000 (18:35 +0000)] 
Ensure that we only create one ConsoleCtrlHandler per psql process,
so as to avoid performance issues and possible ultimate crash on long
psql scripts.  Per Merlin Moncure.

19 years agoFix incorrect header size macros
Teodor Sigaev [Thu, 3 Nov 2005 18:15:47 +0000 (18:15 +0000)] 
Fix incorrect header size macros

19 years agoFix longstanding race condition in transaction log management: there was a
Tom Lane [Thu, 3 Nov 2005 00:23:43 +0000 (00:23 +0000)] 
Fix longstanding race condition in transaction log management: there was a
very narrow window in which SimpleLruReadPage or SimpleLruWritePage could
think that I/O was needed when it wasn't (and indeed the buffer had already
been assigned to another page).  This would result in an Assert failure if
Asserts were enabled, and probably in silent data corruption if not.
Reported independently by Jim Nasby and Robert Creager.

I intend a more extensive fix when 8.2 development starts, but this is a
reasonably low-impact patch for the existing branches.

19 years agoProvide a --no-locale option for pg_regress and a corresponding NOLOCALE=1
Andrew Dunstan [Tue, 1 Nov 2005 15:32:52 +0000 (15:32 +0000)] 
Provide a --no-locale option for pg_regress and a corresponding NOLOCALE=1
setting for the regression makefile, allowing Windows users to force locale
settings since Windows does not get its locale from the environment.

Per Petr Jelinek.

19 years agoProperly update the 'group' flatfile when modifying the user, in case
Bruce Momjian [Wed, 26 Oct 2005 13:43:28 +0000 (13:43 +0000)] 
Properly update the 'group' flatfile when modifying the user, in case
they were added to a group.  Also fix visibility of our own changes when
creating the group file.  This fixes:

        test=> CREATE GROUP g1;
        CREATE GROUP

        test=> CREATE USER u1 IN GROUP g1;
        CREATE USER
        test=> \! cat /u/pg/data/global/pg_group
        "g1"    "u1"

        test=> CREATE USER u2 IN GROUP g1;
        CREATE USER
        test=> \! cat /u/pg/data/global/pg_group
        "g1"    "u1" "u2"

        test=> ALTER USER u2 RENAME TO u3;
        ALTER USER
        test=> \! cat /u/pg/data/global/pg_group
        "g1"    "u1" "u3"

[ this code does not exist in CVS head.]

Per report from Dennis Vshivkov

19 years agoUpdate AIX FAQ, backpatch.
Bruce Momjian [Wed, 26 Oct 2005 13:20:47 +0000 (13:20 +0000)] 
Update AIX FAQ, backpatch.

19 years agoFix longstanding bug that would sometimes let the planner generate a bad plan
Tom Lane [Tue, 25 Oct 2005 20:30:35 +0000 (20:30 +0000)] 
Fix longstanding bug that would sometimes let the planner generate a bad plan
for an outer join; symptom is bogus error "RIGHT JOIN is only supported with
merge-joinable join conditions".  Problem was that select_mergejoin_clauses
did its tests in the wrong order.  We need to force left join not right join
for a merge join when there are non-mergeable join clauses; but the test for
this only accounted for mergejoinability of the clause operator, and not
whether the left and right Vars were of the proper relations.  Per report
from Jean-Pierre Pelletier.

19 years agoPostpone pg_timezone_initialize() until after creation of postmaster.pid,
Tom Lane [Thu, 20 Oct 2005 20:06:03 +0000 (20:06 +0000)] 
Postpone pg_timezone_initialize() until after creation of postmaster.pid,
since it can take a fair amount of time and this can confuse boot scripts
that expect postmaster.pid to appear quickly.  Move initialization of SSL
library and preloaded libraries to after that point, too, just for luck.
Per reports from Tony Caduto and others.

19 years agoPrevent core dump in contrib version of autovacuum when a table has been
Tom Lane [Thu, 20 Oct 2005 16:14:39 +0000 (16:14 +0000)] 
Prevent core dump in contrib version of autovacuum when a table has been
dropped.  Per report from daveg (not his patch, though).

19 years agoBack-patch fix for proper labeling of whole-row Datums generated from
Tom Lane [Wed, 19 Oct 2005 22:51:26 +0000 (22:51 +0000)] 
Back-patch fix for proper labeling of whole-row Datums generated from
subquery results.

19 years agoPass a strdup'd ident string to openlog(), to ensure that reallocation
Tom Lane [Fri, 14 Oct 2005 16:41:13 +0000 (16:41 +0000)] 
Pass a strdup'd ident string to openlog(), to ensure that reallocation
of GUC memory doesn't cause us to start emitting a bogus ident string.
Per report from Han Holl.  Also some trivial code cleanup in write_syslog.

19 years ago[ Backpatch to 8.0.X.]
Bruce Momjian [Fri, 14 Oct 2005 01:50:23 +0000 (01:50 +0000)] 
[ Backpatch to 8.0.X.]

Also I fixed a bug in a bug fix I committed a few weeks ago. he check
for a varchar pointer was incomplete.

Michael Meskes

19 years agoFix longstanding bug found by Atsushi Ogawa: _bt_check_unique would mark
Tom Lane [Wed, 12 Oct 2005 17:18:15 +0000 (17:18 +0000)] 
Fix longstanding bug found by Atsushi Ogawa: _bt_check_unique would mark
the wrong buffer dirty when trying to kill a dead index entry that's on
a page after the one it started on.  No risk of data corruption, just
inefficiency, but still a bug.

19 years agoFix typo in sample pg_hba.conf; per IRC report from Bernhard Neuhauser.
Neil Conway [Tue, 11 Oct 2005 22:59:11 +0000 (22:59 +0000)] 
Fix typo in sample pg_hba.conf; per IRC report from Bernhard Neuhauser.

19 years agoFix oversight in 8.0 modification of RestrictInfo data structures.
Tom Lane [Tue, 11 Oct 2005 16:45:00 +0000 (16:45 +0000)] 
Fix oversight in 8.0 modification of RestrictInfo data structures.
A RestrictInfo representing an OR clause now contains two versions of
the contained expression, one with sub-RestrictInfos and one without.
clause_selectivity() should descend to the version with sub-RestrictInfos
so that it has a chance of caching its results for the OR's sub-clauses.
Failing to do so resulted in redundant planner effort.

19 years agoBackpatch merge_db() example for PL/PgSQL to 8.0. Patch from David
Neil Conway [Thu, 6 Oct 2005 21:21:27 +0000 (21:21 +0000)] 
Backpatch merge_db() example for PL/PgSQL to 8.0. Patch from David
Fetter, fixes by Neil Conway.

19 years agoUpdate Japanese FAQ.
Bruce Momjian [Wed, 5 Oct 2005 11:51:27 +0000 (11:51 +0000)] 
Update Japanese FAQ.

 Jun Kuwamura

19 years agoUpdate version number in faq.
Bruce Momjian [Wed, 5 Oct 2005 11:27:10 +0000 (11:27 +0000)] 
Update version number in faq.

19 years agoUpdate FAQ's in 8.0.X branch. (very small changes)
Bruce Momjian [Tue, 4 Oct 2005 14:18:43 +0000 (14:18 +0000)] 
Update FAQ's in 8.0.X branch.  (very small changes)

19 years agoAdd FAQ_hungarian.html to 8.0.X branch.
Bruce Momjian [Tue, 4 Oct 2005 14:17:44 +0000 (14:17 +0000)] 
Add FAQ_hungarian.html to 8.0.X branch.

19 years agoCOPY's test for read-only transaction was backward; it prohibited COPY TO REL8_0_4
Tom Lane [Mon, 3 Oct 2005 23:43:29 +0000 (23:43 +0000)] 
COPY's test for read-only transaction was backward; it prohibited COPY TO
where it should prohibit COPY FROM.  Found by Alon Goldshuv.

19 years agoStamp release 8.0.4.
Tom Lane [Mon, 3 Oct 2005 17:07:18 +0000 (17:07 +0000)] 
Stamp release 8.0.4.

19 years agoUpdate release notes for pending back-branch releases.
Tom Lane [Mon, 3 Oct 2005 16:04:51 +0000 (16:04 +0000)] 
Update release notes for pending back-branch releases.

19 years agoPreserve tuple OIDs during ATRewriteTable. Per gripe from Duncan Crombie.
Tom Lane [Mon, 3 Oct 2005 02:45:25 +0000 (02:45 +0000)] 
Preserve tuple OIDs during ATRewriteTable.  Per gripe from Duncan Crombie.

19 years agoRepair planning bug introduced in 7.4: outer-join ON clauses that referenced
Tom Lane [Wed, 28 Sep 2005 21:17:24 +0000 (21:17 +0000)] 
Repair planning bug introduced in 7.4: outer-join ON clauses that referenced
only the inner-side relation would be considered as potential equijoin clauses,
which is wrong because the condition doesn't necessarily hold above the point
of the outer join.  Per test case from Kevin Grittner (bug#1916).

19 years agoTranslation updates for the 8.0 branch
Alvaro Herrera [Wed, 28 Sep 2005 13:11:00 +0000 (13:11 +0000)] 
Translation updates for the 8.0 branch

19 years agoUpdate Russian FAQ.
Bruce Momjian [Wed, 28 Sep 2005 11:33:42 +0000 (11:33 +0000)] 
Update Russian FAQ.

Victor Vislobokov

19 years agoBackpatch to 8.0.X:
Bruce Momjian [Fri, 23 Sep 2005 21:02:37 +0000 (21:02 +0000)] 
Backpatch to 8.0.X:

In several places PL/Python was calling PyObject_Str() and then
PyString_AsString() without checking if the former had returned
NULL to indicate an error.  PyString_AsString() doesn't expect a
NULL argument, so passing one causes a segmentation fault.  This
patch adds checks for NULL and raises errors via PLy_elog(), which
prints details of the underlying Python exception.  The patch also
adds regression tests for these checks.  All tests pass on my
Solaris 9 box running HEAD and Python 2.4.1.

19 years agoUpdate FAQ's in 8.0.X branch.
Bruce Momjian [Thu, 22 Sep 2005 22:14:11 +0000 (22:14 +0000)] 
Update FAQ's in 8.0.X branch.

19 years agoReturn proper value for psql -f filename failure if filename open fails.
Bruce Momjian [Tue, 20 Sep 2005 18:59:15 +0000 (18:59 +0000)] 
Return proper value for psql -f filename failure if filename open fails.

Backpatch to 8.0.X.

19 years agoUpdate Snowball. I have to update it because of
Teodor Sigaev [Thu, 15 Sep 2005 11:56:58 +0000 (11:56 +0000)] 
Update Snowball. I have to update it because of
old version doesn't available on Snowball's site and new version
of stemmers can't be compiled with old interface.

19 years agoEnsure that any memory leaked during an error inside the bgwriter is
Tom Lane [Mon, 12 Sep 2005 22:20:30 +0000 (22:20 +0000)] 
Ensure that any memory leaked during an error inside the bgwriter is
recovered.  I did not see any actual leak while testing this in CVS tip,
but 8.0 definitely has a problem with leaking the space temporarily
palloc'd by BufferSync().  In any case this seems a good idea to forestall
similar problems in future.  Per report from Arjen van der Meijden.

19 years agoFix a mistake in the documentation for SPI_getbinval(), per Michael Fuhr.
Neil Conway [Mon, 12 Sep 2005 18:49:08 +0000 (18:49 +0000)] 
Fix a mistake in the documentation for SPI_getbinval(), per Michael Fuhr.

19 years agoFixed transaction command handling to not ignore savepoints and to correctly check...
Michael Meskes [Mon, 12 Sep 2005 11:58:33 +0000 (11:58 +0000)] 
Fixed transaction command handling to not ignore savepoints and to correctly check for errors.

19 years agoAvoid changing stdin/stdout to binary mode on Windows unless that is
Tom Lane [Sun, 11 Sep 2005 00:36:35 +0000 (00:36 +0000)] 
Avoid changing stdin/stdout to binary mode on Windows unless that is
really the source or destination of the archive.  I think this will
resolve recent complaints that password prompting is broken in pg_restore
on Windows.  Note that password prompting and reading from stdin is an
unworkable combination on Windows ... but that was true anyway.

19 years agoUpdate regression tests for new USA timezone data. Mea culpa for not
Tom Lane [Thu, 8 Sep 2005 16:49:18 +0000 (16:49 +0000)] 
Update regression tests for new USA timezone data.  Mea culpa for not
realizing that the regression tests could be affected.

19 years agoUpdate timezone data files to release 2005m of the zic database.
Tom Lane [Wed, 7 Sep 2005 21:39:41 +0000 (21:39 +0000)] 
Update timezone data files to release 2005m of the zic database.
Among other changes, this reflects the recently passed change in USA
daylight savings rules.

19 years agoTranslation update
Peter Eisentraut [Sat, 3 Sep 2005 07:41:58 +0000 (07:41 +0000)] 
Translation update

19 years agoFix missing rows in query
Teodor Sigaev [Tue, 30 Aug 2005 07:57:48 +0000 (07:57 +0000)] 
Fix missing rows in query
update a=.. where a... with GiST index on column 'a'

19 years agoSigh, looks like you need '.set mips2' before you can access MIPS
Tom Lane [Mon, 29 Aug 2005 00:41:44 +0000 (00:41 +0000)] 
Sigh, looks like you need '.set mips2' before you can access MIPS
SYNC instruction.

19 years agoAdd a SYNC instruction to the S_UNLOCK sequence for MIPS.
Tom Lane [Sun, 28 Aug 2005 18:26:07 +0000 (18:26 +0000)] 
Add a SYNC instruction to the S_UNLOCK sequence for MIPS.

19 years agoGet the MIPS assembler syntax right. Also add a separate sync command;
Tom Lane [Sat, 27 Aug 2005 16:22:58 +0000 (16:22 +0000)] 
Get the MIPS assembler syntax right.  Also add a separate sync command;
the reference I consulted yesterday said SC does a SYNC, but apparently
this is not true on newer MIPS processors, so be safe.