Commit Graph

2882 Commits

Author SHA1 Message Date
e76bb5cfec 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.
2006-01-12 21:49:32 +00:00
12693c6476 Stamp release 7.4.11. 2006-01-05 03:59:48 +00:00
d514752dbf 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.
2006-01-05 00:55:24 +00:00
37cdf43eaa Add port support for unsetenv() in back branches. Needed for locale
environment fix.
2006-01-05 00:51:25 +00:00
b1ea82fee1 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.
2005-12-14 17:07:00 +00:00
9c8c45e218 Stamp 7.4.10. 2005-12-09 20:53:26 +00:00
4082f5e34f Stamp release 7.4.9. 2005-10-03 17:14:24 +00:00
196c9d289e 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).
2005-09-28 21:17:50 +00:00
2ba0540024 Back-patch fixes for problems with VACUUM destroying t_ctid chains too soon,
and with insufficient paranoia in code that follows t_ctid links.
This patch covers the 7.4 branch.
2005-08-25 22:07:21 +00:00
c76de7d85e MemSet() must not cast its pointer argument to int32* until after it has
checked that the pointer is actually word-aligned.  Casting a non-aligned
pointer to int32* is technically illegal per the C spec, and some recent
versions of gcc actually generate bad code for the memset() when given
such a pointer.  Per report from Andrew Morrow.
2005-07-18 15:54:11 +00:00
41d28499a2 When using C-string lookup keys in a dynahash.c hash table, use strncpy()
not memcpy() to copy the offered key into the hash table during HASH_ENTER.
This avoids possible core dump if the passed key is located very near the
end of memory.  Per report from Stefan Kaltenbrunner.
2005-06-18 20:51:59 +00:00
b38bcb2fa0 Push enable/disable of notify and catchup interrupts all the way down
to just around the bare recv() call that gets a command from the client.
The former placement in PostgresMain was unsafe because the intermediate
processing layers (especially SSL) use facilities such as malloc that are
not necessarily re-entrant.  Per report from counterstorm.com.
2005-06-02 21:04:08 +00:00
ab82f60119 Adjust datetime parsing to be more robust. We now pass the length of the
working buffer into ParseDateTime() and reject too-long input there,
rather than checking the length of the input string before calling
ParseDateTime(). The old method was bogus because ParseDateTime() can use
a variable amount of working space, depending on the content of the
input string (e.g. how many fields need to be NUL terminated). This fixes
a minor stack overrun -- I don't _think_ it's exploitable, although I
won't claim to be an expert.

Along the way, fix a bug reported by Mark Dilger: the working buffer
allocated by interval_in() was too short, which resulted in rejecting
some perfectly valid interval input values. I added a regression test for
this fix.
2005-05-26 02:14:32 +00:00
26f64e4c7a Stamp release 7.4.8. 2005-05-05 20:08:35 +00:00
3e65431bc1 array_map can't use the fn_extra field of the provided fcinfo struct as
its private storage, because that belongs to the function that it is
supposed to call.  Per report from Ezequiel Tolnay.
2005-03-24 21:51:04 +00:00
5bb38455e6 Back-port heap_deformtuple() into 7.4 branch; needed for planned fix for
CLUSTER failure after ALTER TABLE SET WITHOUT OIDS.
2005-02-06 20:15:32 +00:00
9c1bb68356 Stamp release 7.4.7. 2005-01-30 19:32:22 +00:00
dddc2afb6e 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.
2005-01-23 02:23:30 +00:00
7447537803 Stamp release 7.4.6. 2004-10-22 00:26:24 +00:00
c86cc37f62 Repair bug that would allow libpq to think a command had succeeded when
it really hadn't, due to double output of previous command's response.
Fix prevents recursive entry to libpq routines.  Found by Jan Wieck.
2004-09-26 00:26:56 +00:00
0bdacf50f1 Brand 7.4.5 ... now that was our shortest-lived release ever ... 2004-08-18 03:11:25 +00:00
17663e1aeb Stamp 7.4.4. 2004-08-15 00:24:04 +00:00
d508e0ddd2 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.
2004-08-11 04:08:02 +00:00
ba57e33d7f Stamp 7.4.3. Still need release notes. 2004-06-11 18:17:54 +00:00
1532e3a8aa Adjust PageGetMaxOffsetNumber to ensure sane behavior on uninitialized
pages, even when the macro's result is stored into an unsigned variable.
2004-06-05 17:42:50 +00:00
9086c46f22 Tweak findTargetlistEntry so that bare names occurring in GROUP BY clauses
are sought first as local FROM columns, then as local SELECT-list aliases,
and finally as outer FROM columns; the former behavior made outer FROM
columns take precedence over aliases.  This does not change spec
conformance because SQL99 allows only the first case anyway, and it seems
more useful and self-consistent.  Per gripe from Dennis Bjorklund 2004-04-05.
2004-04-18 18:13:31 +00:00
21a7569b1a Handle draft version of getpwuid_r() that accepts only four arguments.
Backpatch to 7.4.X.  Required for Solaris 7 & 8.
2004-03-20 15:39:40 +00:00
49bc9c45c9 Brand 7.4.2. Release notes still need work. 2004-03-05 19:57:22 +00:00
819bfac66a Junkfilter logic to force a projection step during SELECT INTO was too
simplistic; it recognized SELECT * FROM but not SELECT * FROM LIMIT.
Per bug report from Jeff Bohmer.
2004-03-02 18:56:28 +00:00
aed597102c anyarray really needs to be declared with typalign = 'd', so that entries
in pg_statistic are correctly aligned if they contain values that require
double alignment.  Too bad we cannot force initdb for this in 7.4 branch.
2004-02-24 22:59:22 +00:00
6b534f3c33 Replace opendir/closedir calls throughout the backend with AllocateDir
and FreeDir routines modeled on the existing AllocateFile/FreeFile.
Like the latter, these routines will avoid failing on EMFILE/ENFILE
conditions whenever possible, and will prevent leakage of directory
descriptors if an elog() occurs while one is open.
Also, reduce PANIC to ERROR in MoveOfflineLogs() --- this is not
critical code and there is no reason to force a DB restart on failure.
All per recent trouble report from Olivier Hubaut.
2004-02-23 23:03:43 +00:00
95a6dbf12b Do a direct probe during postmaster startup to determine the maximum
number of openable files and the number already opened.  This eliminates
depending on sysconf(_SC_OPEN_MAX), and allows much saner behavior on
platforms where open-file slots are used up by semaphores.
2004-02-23 20:46:16 +00:00
8c99671a3b Implement a solution to the 'Turkish locale downcases I incorrectly'
problem, per previous discussion.  Make some additional changes to
centralize the knowledge of just how identifier downcasing is done,
in hopes of simplifying any future tweaking in this area.
2004-02-21 00:35:13 +00:00
29760bbdaf Properly set NEED_REENTRANT_FUNCS for threaded libpq/ecpg.
Without this patch, no thread locking or *_r functions were being used.
2004-02-11 17:32:09 +00:00
94db74f370 Fix oversight in optimization that avoids an unnecessary projection step
when scanning a table that we need all the columns from.  In case of
SELECT INTO, we have to check that the hasoids flag matches the desired
output type, too.  Per report from Mike Mascari.
2004-01-22 02:23:35 +00:00
cf88f005f2 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.
2003-12-18 22:23:55 +00:00
dc254c8674 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.
2003-12-18 20:21:53 +00:00
735614c1cf Stamp 7.4.1.
Update 7.4.1 FAQ's to current.
2003-12-13 16:57:36 +00:00
b255350864 Planner failed to be smart about binary-compatible expressions in pathkeys
and hash bucket-size estimation.  Issue has been there awhile but is more
critical in 7.4 because it affects varchar columns.  Per report from
Greg Stark.
2003-12-03 17:45:38 +00:00
6fe6e33db6 The attached patch enables contrib/cube to build cleanly under Cygwin
(again).  Please consider this patch for the 7.4.1 branch (if there
will be one) too.

Jason Tishler
2003-12-02 12:40:08 +00:00
bcdf28eb02 Install all the headers files that the ones that are already installed
depend on.
2003-11-25 19:10:15 +00:00
83ab17e051 Rename USE_THREADS to ENABLE_THREAD_SAFETY to avoid name clash with Perl.
Fixes compliation failure with --enable-thread-safety --with-perl and Perl
5.6.1.
2003-11-24 13:11:27 +00:00
d422b5b887 Update win32 include file on 7.4 branch. 2003-11-13 05:06:56 +00:00
1d42f3246a Fix thinko in reltime and tinterval operator classes that I added a
couple months ago: the >= and > operators were swapped.  Not worth
forcing an initdb for this, but we should get it right in the release.
Will be patched separately in HEAD.
2003-11-11 21:23:26 +00:00
87c93e112b Cause stats processes to detach from shared memory when started, so that
they do not prevent the postmaster from deleting the shmem segment during
a post-backend-crash restart cycle.  Per recent discussion.
2003-11-07 21:56:02 +00:00
77a8f230cc Improve wording of spinlocks-missing compilation error message. 2003-11-04 09:43:56 +00:00
f016c92ea4 Fix some corner cases in ACL manipulation: don't foul up on an empty
ACL array, and force languages to be treated as owned by the bootstrap
user ID.  (pg_language should have a lanowner column, but until it does
this will have to do as a workaround.)
2003-10-29 22:20:54 +00:00
ce26858fac Update for m68k from Peter. 2003-10-26 01:41:10 +00:00
72ecc222b7 Fix #elif typo. 2003-10-26 00:27:59 +00:00
1fdbc8cc20 Update linux/mips port.
Add m68k to linux port.
2003-10-26 00:26:13 +00:00