Tom Lane [Sun, 23 Jan 2005 02:26:05 +0000 (02:26 +0000)]
The result of a FULL or RIGHT join can't be assumed to be sorted by the
left input's sorting, because null rows may be inserted at various points.
Per report from Ferenc Lutischá¸n.
Tom Lane [Fri, 22 Oct 2004 00:24:39 +0000 (00:24 +0000)]
Prevent pg_ctl from being run as root. Since it uses configuration files
owned by postgres, doing "pg_ctl start" as root could allow a privilege
escalation attack, as pointed out by iDEFENSE. Of course the postmaster would
fail, but we ought to fail a little sooner to protect sysadmins unfamiliar
with Postgres. The chosen fix is to disable root use of pg_ctl in all cases,
just to be confident there are no other holes.
Tom Lane [Wed, 13 Oct 2004 22:22:41 +0000 (22:22 +0000)]
Repair possible failure to update hint bits back to disk, per
http://archives.postgresql.org/pgsql-hackers/2004-10/msg00464.php.
I plan a more permanent fix in HEAD, but for the back branches it seems
best to just touch the places that actually have a problem.
Tom Lane [Fri, 17 Sep 2004 18:29:40 +0000 (18:29 +0000)]
Hashed LEFT JOIN would miss outer tuples with no inner match if the join
was large enough to be batched and the tuples fell into a batch where
there were no inner tuples at all. Thanks to Xiaoyu Wang for finding a
test case that exposed this long-standing bug.
Tom Lane [Wed, 11 Aug 2004 04:09:14 +0000 (04:09 +0000)]
Fix failure to guarantee that a checkpoint will write out pg_clog updates
for transaction commits that occurred just before the checkpoint. This is
an EXTREMELY serious bug --- kudos to Satoshi Okada for creating a
reproducible test case to prove its existence.
Tom Lane [Sat, 20 Mar 2004 18:12:32 +0000 (18:12 +0000)]
Repair multiple memory leaks in getTables(), including one that could
easily exhaust memory on databases with more than a few hundred triggers.
I don't expect any more releases of these old versions, but let's put the
fix in CVS just so it's archived.
Tom Lane [Tue, 29 Jul 2003 22:18:53 +0000 (22:18 +0000)]
Fix longstanding error in _bt_search(): should moveright at top of loop not
bottom. Otherwise we fail to moveright when the root page was split while
we were "in flight" to it. This is not a significant problem when the root
is above the leaf level, but if the root was also a leaf (ie, a single-page
index just got split) we may return the wrong leaf page to the caller,
resulting in failure to find a key that is in fact present. Bug has existed
at least since 7.1, probably forever.
Tom Lane [Mon, 31 Mar 2003 20:33:09 +0000 (20:33 +0000)]
TestConfiguration returns int, not bool. This mistake is relatively
harmless on signed-char machines but would lead to core dump in the
deadlock detection code if char is unsigned. Amazingly, this bug has
been here since 7.1 and yet wasn't reported till now. Thanks to Robert
Bruccoleri for providing the opportunity to track it down.
Tom Lane [Thu, 13 Mar 2003 23:44:07 +0000 (23:44 +0000)]
Async_NotifyHandler must save and restore ImmediateInterruptOK. Fixes
known problem with failure to respond to 'pg_ctl stop -m fast', and
probable problems if SIGINT or SIGTERM arrives while processing a
SIGUSR2 interrupt that arrived while waiting for a new client query.
Tom Lane [Tue, 21 Jan 2003 19:41:26 +0000 (19:41 +0000)]
Back-patch fixes for integer overflows in circle_poly(), path_encode(),
and path_add() --- from Neil Conway. Also, repair recently-detected
errors in lseg_eq(), lseg_ne(), lseg_center().
Tom Lane [Tue, 21 Jan 2003 19:38:21 +0000 (19:38 +0000)]
Back-patch fix for VACUUM being confused by SELECT FOR UPDATE of tuple
that was previously outdated by a transaction that later aborted.
Also, prevent VACUUM from being called inside function.
Tom Lane [Mon, 30 Sep 2002 20:18:59 +0000 (20:18 +0000)]
Back-patch fix for 'can't wait without a PROC structure' failures:
remove separate ShutdownBufferPoolAccess exit callback, and do the
work in ProcKill instead, before we delete MyProc.
Tom Lane [Fri, 20 Sep 2002 21:37:07 +0000 (21:37 +0000)]
Back-patch fix for failure to dump views containing FULL JOIN USING.
The bug is not present in CVS tip due to cleanup of JOIN handling,
but 7.2.* is broken.
Tom Lane [Sat, 15 Jun 2002 18:38:10 +0000 (18:38 +0000)]
Back-patch 7.3 fix to fully parenthesize UNION/EXCEPT/INTERSECT queries
in ruleutils output. The previous partial parenthesization was a hack
to get around grammar restrictions that have since been fixed; and as
Sam O'Connor pointed out, there were cases where it didn't work.
Bruce Momjian [Fri, 7 Jun 2002 21:53:09 +0000 (21:53 +0000)]
Please apply attached patch to contrib/intarray (7.2, 7.3).
Fixed bug with '=' operator for gist__int_ops and
define '=' operator for gist__intbig_ops opclass.
Now '=' operator is consistent with standard 'array' type.
Thanks Achilleus Mantzios for bug report and suggestion.
Tom Lane [Wed, 22 May 2002 17:29:45 +0000 (17:29 +0000)]
Make RelationForgetRelation error out if the relcache entry has nonzero
reference count. This avoids leaving dangling pointers around, as in
recent bug report against sequences (bug# 671).
Tom Lane [Tue, 14 May 2002 18:16:54 +0000 (18:16 +0000)]
Remove unnecessary pfree's in geometric operators. At least one of these
is actively dangerous, per bug report from Ewald Geschwinde 14-May-02,
and several of the rest look suspicious to me. Since there is no longer
any significant value in retail pfree's in these functions, just get
rid of all of them for safety's sake.
A backport patch.
Fix PQescapeBytea/PQunescapeBytea so that they handle bytes > 0x7f.
This is necessary for mulibyte character sequences.
See "[HACKERS] PQescapeBytea is not multibyte aware" thread posted around
2002/04/05 for more details.
Tom Lane [Tue, 2 Apr 2002 05:12:00 +0000 (05:12 +0000)]
Fix CLOG truncation code to not do the Wrong Thing when there are already
wrapped-around databases. The unvacuumed databases might be fine, or
they might not, but things will definitely not be fine if we remove the
wrong CLOG segments. Per trouble report from Gary Wolfe, 1-Apr-2002.
Bruce Momjian [Tue, 19 Mar 2002 14:16:32 +0000 (14:16 +0000)]
> > Users of contrib/tsearch needs after upgrading of module (compiling, installing)
> > to perform sql command:
> > update pg_amop set amopreqcheck = true where amopclaid =
> > (select oid from pg_opclass where opcname = 'gist_txtidx_ops');
>
> Oleg, sorry, I don't understand where this should appear. In the README
> file, and if so, where? Is this something only for people upgrading
> from 7.2?
Sorry Bruce, I was unclear. I have attached patch to Readme.tsearch
Also, It'd be worth to mention in Changes to point users of tsearch
about importang upgrade notices.
Tom Lane [Fri, 15 Mar 2002 19:20:47 +0000 (19:20 +0000)]
Repair two problems with WAL logging of sequence nextvalI() ops, as
per recent pghackers discussion: force a new WAL record at first nextval
after a checkpoint, and ensure that xlog is flushed to disk if a nextval
record is the only thing emitted by a transaction.
Bruce Momjian [Tue, 5 Mar 2002 06:10:49 +0000 (06:10 +0000)]
Please, apply attached patch for contrib/tsearch to 7.2.1 and current
CVS. It fix english stemmer's problem with ending words like
'technology'.
We have found one more bug in english stemmer. The bug is with
'irregular' english words like 'skies' -> 'sky'. Please, apply attached
cumulative patch to 7.2.1 and current CVS instead previous one.
Thank to Thomas T. Thai <tom@minnesota.com> for hard testing. This kind
of bug has significance only for dump/reload database and viewing, but
searching/indexing works right.
Tom Lane [Tue, 5 Mar 2002 05:13:36 +0000 (05:13 +0000)]
Previous patch to mark UNION outputs with common typmod (if any) breaks
three-or-more-way UNIONs, as per example from Josh Berkus. Cause is a
fragile assumption that one tlist's entries will exactly match another.
Restructure code to make that assumption a little less fragile.
Tatsuo Ishii [Tue, 5 Mar 2002 03:45:44 +0000 (03:45 +0000)]
A backport patch:
Fix bug in extract/date_part for milliseconds/miscroseconds and
timestamp/timestamptz combo. Now extract/date_part returns
seconds*1000 or 1000000 + fraction part as the manual stats.
regression test are also fixed.
Tatsuo Ishii [Wed, 27 Feb 2002 01:47:31 +0000 (01:47 +0000)]
Back-patch fix for followings:
Fix bug in COPY FROM when DELIMITER is not in ASCII range.
See pgsql-bugs/pgsql-hackers discussion "COPY FROM is not 8bit clean"
around 2002/02/26 for more details -- Tatsuo Ishii
Tom Lane [Tue, 26 Feb 2002 23:48:47 +0000 (23:48 +0000)]
Back-patch fix for command completion report handling. This is
primarily needed so that INSERTing a row still reports the row's OID
even when there are ON INSERT rules firing additional queries.
Tom Lane [Mon, 25 Feb 2002 21:37:47 +0000 (21:37 +0000)]
Tweak psql's \connect command to not downcase unquoted database and user
names. This is a temporary measure to allow backwards compatibility with
7.2 and earlier pg_dump. 7.2.1 and later pg_dump will double-quote mixed
case names in \connect. Once we feel that older dumps are not a problem
anymore, we can revert this change and treat \connect arguments as normal
SQL identifiers.
Bruce Momjian [Fri, 22 Feb 2002 06:08:48 +0000 (06:08 +0000)]
BACKPATCH:
Please, apply attached patch of contrib/btree_gist to 7.2.1 and current
cvs.
The patch fixes memory leak during creation GiST index on timestamp
column.
Bruce Momjian [Sun, 17 Feb 2002 11:50:09 +0000 (11:50 +0000)]
I think it's important that it's actually documented that they can add
primary keys after the fact!
Also, we need to add regression tests for alter table / add primary key
and alter table / drop constraint. These shouldn't be added until 7.3
tho
methinks...