Tom Lane [Thu, 4 Jan 2001 21:51:49 +0000 (21:51 +0000)]
Back-patch fix for 'btree: failed to add item to the page in _bt_sort (2)'
failure during index creation. This problem should be gone in current
sources, but I just thought I'd commit the 7.0.* patch in case anyone
else needs it.
Tatsuo Ishii [Fri, 17 Nov 2000 04:53:54 +0000 (04:53 +0000)]
Fix bugs in EUC_TW support. This fix includes patches contributed
by Chih-Chang Hsi. See "A Patch for MIC to EUC_TW code converting in
mb support" posting in pgsql-patches list dated 09 Nov 2000.
Tom Lane [Fri, 10 Nov 2000 04:08:25 +0000 (04:08 +0000)]
Stopgap patch for problem with cursors using hash joins: an ABORT
would cause two attempts to delete the hashtable portal, one from
query shutdown and one from portalmem.c. Fix by making hash portals
be treated as 'special' portal names, so that CollectNamedPortals
will not think it should delete them. This code is in need of
complete rewrite (and is already largely rewritten in current
sources), but still need to put a finger in the dike for 7.0.*.
Tom Lane [Thu, 19 Oct 2000 20:52:35 +0000 (20:52 +0000)]
Fix time_larger, time_smaller, timetz_larger, timetz_smaller to meet
nodeAgg.c's expectation that aggregate transition functions never return
pointers to their input values. This is fixed in a much better way in
current sources, but in 7.0.* it's gotta be done like this.
Tom Lane [Sat, 23 Sep 2000 23:50:47 +0000 (23:50 +0000)]
Back-patch code to deduce implied equalities from transitivity of
mergejoin clauses, and add these equalities to the given WHERE clauses.
This is necessary to ensure that sort keys we think are equivalent
really are equivalent as soon as their rels have been joined. Without
this, 7.0 may create an incorrect mergejoin plan.
Tom Lane [Sat, 23 Sep 2000 23:31:24 +0000 (23:31 +0000)]
Back-patch fix that allows AllocateFile() to return errno=ENFILE/EMFILE
after we are no longer able to close any more VFDs. This is needed to
avoid postmaster crash under out-of-file-descriptors conditions.
Tom Lane [Sat, 23 Sep 2000 22:11:41 +0000 (22:11 +0000)]
Back-patch fix for 'Sorcerer's Apprentice' syndrome wherein md.c would
create a vast quantity of zero-length files if asked to access a block
number far beyond the actual end of a relation.
Tom Lane [Sat, 23 Sep 2000 21:15:26 +0000 (21:15 +0000)]
Apply Jeroen van Vianen's patch for failure to check heap_openr failure
in RI triggers. This is fixed in another way in current sources, but
might as well apply this patch to REL7_0 branch so that 7.0.3 need not
suffer this crash.
Tom Lane [Sat, 23 Sep 2000 21:00:05 +0000 (21:00 +0000)]
Back-patch fix to copy sub-Query nodes before planning them. This
fixes problems with subselects appearing in contexts like COALESCE or
BETWEEN, where parser will make multiple links to same subexpression.
Tom Lane [Sun, 28 May 2000 15:40:25 +0000 (15:40 +0000)]
fastpath neglected to pass a valid isNull flag to the function being
called. We hadn't noticed this because C-coded functions mostly don't
pay attention to isNull anyway ... but plpgsql functions sure do ...
This is fixed in another way for 7.1, but 7.0.1 needs this patch.
Tom Lane [Fri, 26 May 2000 17:19:15 +0000 (17:19 +0000)]
Reduce eqsel()'s fudge-factor for estimating the frequency of values
other than the most common value in a column. We had had 0.5, make it
0.1 to make it more likely that an indexscan will be chosen. Really
need better statistics instead, but this should stem the bleeding
meanwhile ...
Tom Lane [Fri, 26 May 2000 01:26:19 +0000 (01:26 +0000)]
After closing frontend socket, set MyProcPort->sock = -1 to ensure that
subsequent I/O attempts fail cleanly. I'm speculating about failure
scenarios in which we do pq_close, then something in a proc_exit routine
opens a file (re-using that kernel FD number), then something else
fails and tries to write an elog message to the frontend ... message
ends up in opened file, oops. No known examples of this but it seems
like a potential hole.
Tom Lane [Thu, 25 May 2000 22:42:19 +0000 (22:42 +0000)]
Modify raw parsetree representation returned by gram.y for SubLinks:
the oper field should be a valid Node structure so it can be dumped by
outfuncs.c without risk of coredump. (We had been using a raw pointer
to character string, which surely is NOT a valid Node.) This doesn't
cause any backwards compatibility problems for stored rules, since
raw unanalyzed parsetrees are never stored.
Tom Lane [Thu, 25 May 2000 21:30:20 +0000 (21:30 +0000)]
Do table renaming in a sane order: physical file rename must happen
*last*, after all updating of system catalogs. In old code, an error
detected during TypeRename left the relation hosed. Also, add a call
to flush the relation's relcache entry, rather than trusting to shared
cache invalidation to flush it for us.
Bruce Momjian [Thu, 25 May 2000 19:09:55 +0000 (19:09 +0000)]
! * Users doing non-blocking connections need to handle the reset
! * themselves, they'll need to check the connection status if we
! * return an error.