summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2005-12-01Retry in FileRead and FileWrite if Windows returns ERROR_NO_SYSTEM_RESOURCES.Tom Lane
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.
2005-12-01Check for overflow in strtol() while parsing datetime inputs.Tom Lane
Michael Fuhr.
2005-11-30Rearrange code in pg_atoi() to avoid assuming that isspace() cannotTom Lane
change errno. No reported bugs here, but why take a chance?
2005-11-30- Made several variables "const char *" instead of "char *" as proposed by ↵Michael Meskes
Qingqing Zhou <zhouqq@cs.toronto.edu>. - Replaced all strdup() calls by ECPGstrdup().
2005-11-18Fix performance issue in exprTypmod(): for a COALESCE expression, itTom Lane
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.
2005-11-16Update error message and documentation for fsync test.Bruce Momjian
2005-11-16Update test_fsync to honor -f.Bruce Momjian
Backpatch to 8.0.X.
2005-11-13Force the second argument of SUBSTRING(foo FOR bar) to be int4, to avoidTom Lane
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.
2005-11-10When in transaction-aborted state, reject Bind message for portals containingTom Lane
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.
2005-11-09Fix misspelling of 'listen_addresses', per Devrim.Tom Lane
2005-11-05Repair an error introduced by log_line_prefix patch: it is not acceptableTom Lane
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.
2005-11-04Ensure that we only create one ConsoleCtrlHandler per psql process,Tom Lane
so as to avoid performance issues and possible ultimate crash on long psql scripts. Per Merlin Moncure.
2005-11-03Fix longstanding race condition in transaction log management: there was aTom Lane
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.
2005-11-01Provide a --no-locale option for pg_regress and a corresponding NOLOCALE=1Andrew Dunstan
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.
2005-10-26Properly update the 'group' flatfile when modifying the user, in caseBruce Momjian
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
2005-10-25Fix longstanding bug that would sometimes let the planner generate a bad planTom Lane
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.
2005-10-20Postpone pg_timezone_initialize() until after creation of postmaster.pid,Tom Lane
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.
2005-10-19Back-patch fix for proper labeling of whole-row Datums generated fromTom Lane
subquery results.
2005-10-14Pass a strdup'd ident string to openlog(), to ensure that reallocationTom Lane
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.
2005-10-14[ Backpatch to 8.0.X.]Bruce Momjian
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
2005-10-12Fix longstanding bug found by Atsushi Ogawa: _bt_check_unique would markTom Lane
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.
2005-10-11Fix typo in sample pg_hba.conf; per IRC report from Bernhard Neuhauser.Neil Conway
2005-10-11Fix oversight in 8.0 modification of RestrictInfo data structures.Tom Lane
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.
2005-10-03COPY's test for read-only transaction was backward; it prohibited COPY TOREL8_0_4Tom Lane
where it should prohibit COPY FROM. Found by Alon Goldshuv.
2005-10-03Stamp release 8.0.4.Tom Lane
2005-10-03Preserve tuple OIDs during ATRewriteTable. Per gripe from Duncan Crombie.Tom Lane
2005-09-28Repair planning bug introduced in 7.4: outer-join ON clauses that referencedTom Lane
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-28Translation updates for the 8.0 branchAlvaro Herrera
2005-09-23Backpatch to 8.0.X:Bruce Momjian
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.
2005-09-20Return proper value for psql -f filename failure if filename open fails.Bruce Momjian
Backpatch to 8.0.X.
2005-09-12Ensure that any memory leaked during an error inside the bgwriter isTom Lane
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.
2005-09-12Fixed transaction command handling to not ignore savepoints and to correctly ↵Michael Meskes
check for errors.
2005-09-11Avoid changing stdin/stdout to binary mode on Windows unless that isTom Lane
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.
2005-09-08Update regression tests for new USA timezone data. Mea culpa for notTom Lane
realizing that the regression tests could be affected.
2005-09-07Update timezone data files to release 2005m of the zic database.Tom Lane
Among other changes, this reflects the recently passed change in USA daylight savings rules.
2005-09-03Translation updatePeter Eisentraut
2005-08-30Fix missing rows in queryTeodor Sigaev
update a=.. where a... with GiST index on column 'a'
2005-08-29Sigh, looks like you need '.set mips2' before you can access MIPSTom Lane
SYNC instruction.
2005-08-28Add a SYNC instruction to the S_UNLOCK sequence for MIPS.Tom Lane
2005-08-27Get the MIPS assembler syntax right. Also add a separate sync command;Tom Lane
the reference I consulted yesterday said SC does a SYNC, but apparently this is not true on newer MIPS processors, so be safe.
2005-08-26Another try at the inlined MIPS spinlock code. Can't test this myself,Tom Lane
but for sure it's not any more broken than the prior version.
2005-08-26Back-port recent MIPS and M68K spinlock improvements to 8.0 branch.Tom Lane
2005-08-25Back-patch fixes for problems with VACUUM destroying t_ctid chains too soon,Tom Lane
and with insufficient paranoia in code that follows t_ctid links. This patch covers the 8.0 branch.
2005-08-24 - Check for NULL before checking whether argument is an array.Michael Meskes
- Removed stray character from string quoting. - Fixed check to report missing varchar pointer implementation.
2005-08-23Fix broken lrand48() implementation, per Merlin Moncure.Tom Lane
2005-08-20Invoke mksafefunc and mkunsafefunc with :: decoration. This seems a goodTom Lane
idea on consistency grounds, whether or not it really fixes bug #1831. Michael Fuhr
2005-08-16Reject operator names >= NAMEDATALEN characters. These will not workTom Lane
anyway, and in assert-enabled builds you are likely to get an assertion failure. Backpatch as far as 7.3; 7.2 seems not to have the problem.
2005-08-15array_in() and array_recv() need to be more paranoid about validatingTom Lane
their OID parameter. It was possible to crash the backend with select array_in('{123}',0,0); because that would bypass the needed step of initializing the workspace. These seem to be the only two places with a problem, though (record_in and record_recv don't have the issue, and the other array functions aren't depending on user-supplied input). Back-patch as far as 7.4; 7.3 does not have the bug.
2005-08-12This patch fixes the event type used to log output from theBruce Momjian
stderr-in-service or output-from-syslogger-in-service code. Previously everything was flagged as ERRORs there, which caused all instances to log "LOG: logger shutting down" as error... Please apply for 8.1. I'd also like it considered for 8.0 since logging non-errors as errors can be cause for alarm amongst people who actually look at their logs... Magnus Hagander
2005-08-12[ backpatched to 8.0.X.]Bruce Momjian
> >> 3) I restarted the postmaster both times. I got this error > both times. > >> :25: ERROR: could not load library "C:/Program > >> Files/PostgreSQL/8.0/lib/testtrigfuncs.dll": dynamic load error > > > Yes. We really need to look at fixing that error message. I had > > forgotten it completely :-( > > > Bruce, you think we can sneak that in after feature freeze? I would > > call it a bugfix :-) > > Me too. That's been on the radar for awhile --- please do > send in a patch. Here we go, that wasn't too hard :-) Apart from adding the error handling, it does one more thing: it changes the errormode when loading the DLLs. Previously if a DLL was broken, or referenced other DLLs that couldn't be found, a popup dialog box would appear on the screen. Which had to be clicked before the backend could continue. This patch also disables the popup error message for DLL loads. I think this is something we should consider doing for the entire backend - disable those popups, and say we deal with it ourselves. What do you other win32 hackers thinnk about this? In the meantime, this patch fixes the error msgs. Please apply for 8.1 and please consider a backpatch to 8.0. Magnus Hagander