Tom Lane [Fri, 18 Mar 2005 05:24:24 +0000 (05:24 +0000)]
Need to release buffer pins before attempting to drop files during
backend exit. Per report from Bruce.
Tom Lane [Fri, 18 Mar 2005 03:49:19 +0000 (03:49 +0000)]
Treat EPERM as a non-error case when checking to see if old postmaster
is still alive. This improves our odds of not getting fooled by an
unrelated process when checking a stale lock file. Other checks already
in place, plus one newly added in checkDataDir(), ensure that we cannot
attempt to usurp the place of a postmaster belonging to a different userid,
so there is no need to error out. Add comments indicating the importance
of these other checks.
Bruce Momjian [Thu, 17 Mar 2005 17:28:59 +0000 (17:28 +0000)]
Backpatch to 8.0.X, already in HEAD:
Allow Win32 to support the O_SYNC open flag as an wal_sync_method
method.
Bruce Momjian [Wed, 16 Mar 2005 01:49:20 +0000 (01:49 +0000)]
Add missing include for new lc_ctype_is_c() function.
Per Neil.
Bruce Momjian [Wed, 16 Mar 2005 00:03:02 +0000 (00:03 +0000)]
Prevent locale-aware handling of upper, lower, and initcap when the
locale is C.
Backpatch to 8.0.X because some operating systems were throwing errors
for such operations, rather than ignoring the locale when it was C.
Bruce Momjian [Sun, 13 Mar 2005 22:04:45 +0000 (22:04 +0000)]
Increment all major version numbers in 8.0.X to force recompile of
client aplications so 7.4.X releases can be installed on the same
machine as 8.0.X.
Tom Lane [Sat, 12 Mar 2005 21:12:05 +0000 (21:12 +0000)]
Fix ALTER DATABASE RENAME to allow the operation if user is a superuser
who for some reason isn't marked usecreatedb. Per report from Alexander
Pravking. Also fix sloppy coding in have_createdb_privilege().
Neil Conway [Sat, 12 Mar 2005 06:54:31 +0000 (06:54 +0000)]
Some builds (depends on crypto engine support?) of OpenSSL
0.9.7x have EVP_DigestFinal function which which clears all of
EVP_MD_CTX. This makes pgcrypto crash in functions which
re-use one digest context several times: hmac() and crypt()
with md5 algorithm.
Following patch fixes it by carring the digest info around
EVP_DigestFinal and re-initializing cipher.
Marko Kreen.
Tom Lane [Sat, 12 Mar 2005 01:55:15 +0000 (01:55 +0000)]
Fix problem with infinite recursion between write_syslogger_file and
elog if the former has trouble writing its file. Code review for
Magnus' patch to redirect stderr to syslog on Windows (Bruce's version
seems right, but did some minor prettification).
Backpatch both changes to 8.0 branch.
Bruce Momjian [Fri, 11 Mar 2005 21:47:44 +0000 (21:47 +0000)]
Here's the patch to fix a lot of markup errors in the HTML FAQs. Doesn't
change content (at least not supposed to).
Magnus Hagander
Bruce Momjian [Mon, 7 Mar 2005 21:11:07 +0000 (21:11 +0000)]
Properly implement "Response files" for bcc. Add URL's to describe the
feature for Win32 and bcc.
Teodor Sigaev [Sat, 5 Mar 2005 16:17:47 +0000 (16:17 +0000)]
Prevent rank change in case of duplicate search terms
Tom Lane [Thu, 3 Mar 2005 16:47:43 +0000 (16:47 +0000)]
Replace ARC cache management algorithm with the similar but slightly
simpler 2Q algorithm, to avoid possible problems with the pending patent
on ARC. Testing so far suggests that there is little if any performance
loss from doing this.
Note that this patch is going into the 8.0 branch only; a much more
extensive revision is planned for HEAD.
Tom Lane [Tue, 1 Mar 2005 21:15:10 +0000 (21:15 +0000)]
Release proclock immediately in RemoveFromWaitQueue() if it represents
no held locks. This maintains the invariant that proclocks are present
only for procs that are holding or awaiting a lock; when this is not
true, LockRelease will fail. Per report from Stephen Clouse.
Tom Lane [Tue, 1 Mar 2005 01:40:39 +0000 (01:40 +0000)]
Adjust OR indexscan logic to not generate redundant condition-free OR
indexscans involving partial indexes. These would always be dominated
by a simple indexscan on such an index, so there's no point in considering
them. Fixes overoptimism in a patch I applied last October.
Tom Lane [Tue, 1 Mar 2005 00:25:45 +0000 (00:25 +0000)]
Revert the logic for expanding AND/OR conditions in pred_test() to what
it was in 7.4, and add some comments explaining why it has to be this way.
I broke it for OR'd index predicates in a fit of code cleanup last summer.
Per example from Sergey Koshcheyev.
Bruce Momjian [Sun, 27 Feb 2005 22:38:29 +0000 (22:38 +0000)]
Tab indent all actions in bcc32.mak, and do it on win32.mak too for
consistency. Backpatch only bcc32.mak to 8.0.X.
Teodor Sigaev [Sun, 27 Feb 2005 09:28:07 +0000 (09:28 +0000)]
Further fix int64/float8 time/timetz
Teodor Sigaev [Sun, 27 Feb 2005 00:11:35 +0000 (00:11 +0000)]
Further fix time/timetz...
Bruce Momjian [Sat, 26 Feb 2005 18:50:44 +0000 (18:50 +0000)]
Backpatch clarification of PGPASSWORD to 8.0.X.
Bruce Momjian [Fri, 25 Feb 2005 15:57:41 +0000 (15:57 +0000)]
Add linking from /port to bcc makefile.
Teodor Sigaev [Fri, 25 Feb 2005 14:04:39 +0000 (14:04 +0000)]
Fix float8->int64 transformation
Bruce Momjian [Fri, 25 Feb 2005 00:33:45 +0000 (00:33 +0000)]
Backpatch FAQ to 8.0.X.
Tom Lane [Tue, 22 Feb 2005 19:06:35 +0000 (19:06 +0000)]
Document that only a table's owner may TRUNCATE it. Per Keith Worthington.
Bruce Momjian [Tue, 22 Feb 2005 02:56:37 +0000 (02:56 +0000)]
Update initdb locale/encoding documentation description. Backpatch to
8.0.X.
Bruce Momjian [Mon, 21 Feb 2005 21:22:46 +0000 (21:22 +0000)]
Try to get Borland CC to compile.
Backpatch to 8.0.X which doesn't work right now.
Bruce Momjian [Mon, 21 Feb 2005 17:34:10 +0000 (17:34 +0000)]
Update Russian FAQ.
Viktor Vislobokov
Teodor Sigaev [Mon, 21 Feb 2005 14:10:44 +0000 (14:10 +0000)]
Simplify defines
Teodor Sigaev [Mon, 21 Feb 2005 10:47:52 +0000 (10:47 +0000)]
Fix memory leak for timestamp(with and w/o tz) and time indexes
Neil Conway [Mon, 21 Feb 2005 06:12:41 +0000 (06:12 +0000)]
Fix two typos, per report from Hashem Masoud.
Neil Conway [Mon, 21 Feb 2005 02:14:34 +0000 (02:14 +0000)]
Document the "register" and "unregister" pg_ctl subcommands, for use on
Windows. Patch from Magnus Hagander.
Tom Lane [Sat, 19 Feb 2005 23:16:27 +0000 (23:16 +0000)]
New arrangement to always let the bgwriter do checkpoints broke
CHECKPOINT and some other commands in the context of a standalone
backend. Allow a standalone backend to do its own checkpoints.
Tom Lane [Sat, 19 Feb 2005 19:33:23 +0000 (19:33 +0000)]
Ensure that the resolved datatype of any unknown Param is propagated
into the sub-SELECT targetlist when it appears in the context
INSERT INTO foo SELECT $1 ... Per report from Abhijit Menon-Sen.
Tom Lane [Mon, 14 Feb 2005 06:17:59 +0000 (06:17 +0000)]
ALTER LANGUAGE RENAME has never worked. Per Sergey Yatskevich.
Bruce Momjian [Sun, 13 Feb 2005 16:50:54 +0000 (16:50 +0000)]
Print file name and errno string on rmtree failure.
Backpatch to 8.0.X.
Peter Eisentraut [Fri, 11 Feb 2005 11:53:32 +0000 (11:53 +0000)]
Translation updates
Bruce Momjian [Fri, 11 Feb 2005 04:54:05 +0000 (04:54 +0000)]
Update to Russian FAQ, HEAD and 8.0.X.
Bruce Momjian [Fri, 11 Feb 2005 04:19:18 +0000 (04:19 +0000)]
Mention that some psql environment variables come from libpq and note
more variables can be found in the libpq manual section.
Mention .pgpass in the psql manual page section dealing with connection
parameters and point to the libpq section for more details.
Backpatch to 8.0.X.
Tom Lane [Thu, 10 Feb 2005 20:36:49 +0000 (20:36 +0000)]
Fix SPI cursor support to allow scanning the results of utility commands
that return tuples (such as EXPLAIN). Per gripe from Michael Fuhr.
Side effect: fix an old bug that unintentionally disabled backward scans
for all SPI-created cursors.
Michael Meskes [Thu, 10 Feb 2005 08:07:46 +0000 (08:07 +0000)]
Fixed more parsing bugs in other CREATE statements.
Bruce Momjian [Thu, 10 Feb 2005 04:53:11 +0000 (04:53 +0000)]
Update pginstaller URL to postgresql.org/ftp/win32/.
Backpatch to 8.0.X.
Neil Conway [Wed, 9 Feb 2005 23:27:24 +0000 (23:27 +0000)]
ALTER TABLE ADD COLUMN exhibits a significant memory leak when adding a
column with a default expression. In that situation, we need to rewrite
the heap relation. To evaluate the new default expression, we use
ExecEvalExpr(); however, this can allocate memory in the current memory
context, and ATRewriteTable() does not switch out of the active portal's
heap memory context. The end result is a rather large memory leak (on
the order of gigabytes for a reasonably sized table).
This patch changes ATRewriteTable() to switch to the per-tuple memory
context before beginning the per-tuple loop. It also removes an explicit
heap_freetuple() in the loop, since that is no longer needed.
In an unrelated change, I noticed the code was scanning through the
attributes of the new tuple descriptor for each tuple of the old table.
I changed this to use precomputation, which should slightly speed up
the loop.
Thanks to steve@deefs.net for reporting the leak.
Michael Meskes [Wed, 9 Feb 2005 11:28:21 +0000 (11:28 +0000)]
Fixed bug in parsing of CREATE AS statement.
Tom Lane [Tue, 8 Feb 2005 18:21:59 +0000 (18:21 +0000)]
If we're gonna check for array overrun, we really should do so before
overrunning the array, not after.
Neil Conway [Mon, 7 Feb 2005 03:52:22 +0000 (03:52 +0000)]
Prevent 4 more buffer overruns in the PL/PgSQL parser. This is just a
minimally-invasive fix for stable branches; a cleaner fix will be
committed to HEAD soon.
Neil Conway [Sun, 6 Feb 2005 22:36:10 +0000 (22:36 +0000)]
Better late than never: document that the GiST API changed in 8.0 in the
"incompatibilities" section of the release notes.
Tom Lane [Sun, 6 Feb 2005 20:59:37 +0000 (20:59 +0000)]
Document array behavior for out-of-range subscripts.
Tom Lane [Sun, 6 Feb 2005 20:19:24 +0000 (20:19 +0000)]
Repair CLUSTER failure after ALTER TABLE SET WITHOUT OIDS. Turns out
there are corner cases involving dropping toasted columns in which the
previous coding would fail, too: the new version of the table might not
have any TOAST table, but we'd still propagate possibly-wide values of
dropped columns forward.
Tom Lane [Thu, 3 Feb 2005 23:39:21 +0000 (23:39 +0000)]
Fix minor thinko in logic to set dump order when dumping from a pre-7.3
database: aggregates should be dumped in the same pass as operators,
not in the same pass as functions.
Tom Lane [Thu, 3 Feb 2005 23:30:12 +0000 (23:30 +0000)]
Ensure that all details of the ARC algorithm are hidden within freelist.c.
This refactoring does not change any algorithms or data structures, just
remove visibility of the ARC datastructures from other source files.
Tom Lane [Wed, 2 Feb 2005 22:40:19 +0000 (22:40 +0000)]
Improve performance of fmgr.c calling routines for cases with more than
two arguments. Per suggestions from A. Ogawa.
Tom Lane [Wed, 2 Feb 2005 21:49:49 +0000 (21:49 +0000)]
Adjust constant-folding of CASE expressions so that the simple comparison
form of CASE (eg, CASE 0 WHEN 1 THEN ...) can be constant-folded as it
was in 7.4. Also, avoid constant-folding result expressions that are
certainly unreachable --- the former coding was a bit cavalier about this
and could generate unexpected results for all-constant CASE expressions.
Add regression test cases. Per report from Vlad Marchenko.
Bruce Momjian [Wed, 2 Feb 2005 18:17:34 +0000 (18:17 +0000)]
Improve wording of to_char() change in 8.1:
The 8.1 release will remove the <function>to_char()</> function
for intervals.
Bruce Momjian [Wed, 2 Feb 2005 17:44:51 +0000 (17:44 +0000)]
Backpatch FAQ to 8.0.X.
Bruce Momjian [Wed, 2 Feb 2005 13:42:02 +0000 (13:42 +0000)]
Backpatch FAQ to 8.0.X.
Neil Conway [Tue, 1 Feb 2005 23:29:13 +0000 (23:29 +0000)]
Fix a bug induced by the list-rewrite that resulted in incrementing the
command counter more than necessary. Per report from Michael Fuhr.
Tom Lane [Tue, 1 Feb 2005 23:09:00 +0000 (23:09 +0000)]
Adjust estimate_num_groups() to not clamp per-relation group count
estimate to less than the number of values estimated for any one grouping
Var, as suggested by Manfred. This is intuitively right, and what's
more it puts the plan choices in the subselect regression test back the
way they were before ...
Tom Lane [Tue, 1 Feb 2005 19:35:29 +0000 (19:35 +0000)]
Adjust plpgsql to allow assignment to an element of an array that is
initially NULL. For 8.0 we changed the main executor to have this
behavior in an UPDATE of an array column, but plpgsql's equivalent case
was overlooked. Per report from Sven Willenberger.
Bruce Momjian [Tue, 1 Feb 2005 02:42:03 +0000 (02:42 +0000)]
Backpatch FAQ changes to 8.0.X.
Tom Lane [Tue, 1 Feb 2005 00:59:53 +0000 (00:59 +0000)]
Sync inet formatting code with recent BIND releases. In particular,
fix bug with inconsistent selection of default mask length for
"class D" addresses. Per report from Steve Atkins.
Tom Lane [Sun, 30 Jan 2005 21:31:57 +0000 (21:31 +0000)]
Recommend security@postgresql.org as the contact point for security-related bugs.
Tom Lane [Sun, 30 Jan 2005 19:17:49 +0000 (19:17 +0000)]
Stamp 8.0 branch as 8.0.1.
Peter Eisentraut [Sun, 30 Jan 2005 15:47:30 +0000 (15:47 +0000)]
Translation updates
Bruce Momjian [Sun, 30 Jan 2005 04:45:23 +0000 (04:45 +0000)]
Backpatch FAQ to 8.0.X.
Bruce Momjian [Sun, 30 Jan 2005 04:44:25 +0000 (04:44 +0000)]
FAQ markup fixes.
Bruce Momjian [Sun, 30 Jan 2005 04:26:40 +0000 (04:26 +0000)]
Backpatch FAQ to 8.0.X.
Bruce Momjian [Sun, 30 Jan 2005 04:22:53 +0000 (04:22 +0000)]
Backpatch FAQ changes to 8.0.X.
Tom Lane [Sat, 29 Jan 2005 23:45:53 +0000 (23:45 +0000)]
We haven't had a fixed limit on rule recursion depth since 7.3 ...
but the documentation still said so.
Tom Lane [Sat, 29 Jan 2005 22:35:17 +0000 (22:35 +0000)]
Make sure contrib C functions are marked strict where needed.
Kris Jurka
Tom Lane [Fri, 28 Jan 2005 23:13:26 +0000 (23:13 +0000)]
Add documentation for format_type(), which somehow escaped it before.
Tom Lane [Fri, 28 Jan 2005 22:58:59 +0000 (22:58 +0000)]
Add intset() to README (backpatch teodor's docs fix in HEAD).
Tom Lane [Fri, 28 Jan 2005 22:38:50 +0000 (22:38 +0000)]
Add note cautioning that you can't use an encrypting IDENT server
with Postgres.
Tom Lane [Fri, 28 Jan 2005 20:35:14 +0000 (20:35 +0000)]
When dealing with multiple grouping columns coming from the same table,
clamp the estimated number of groups to table row count over 10, instead
of table row count; this reflects a heuristic that people probably won't
group over a near-unique set of columns, and the knowledge that we don't
currently have any way to estimate the correlation of the columns better
than guessing. This change creates a trivial plan change in one of the
regression tests.
Tom Lane [Fri, 28 Jan 2005 19:36:33 +0000 (19:36 +0000)]
Improve planner's estimation of the space needed for HashAgg plans:
look at the actual aggregate transition datatypes and the actual overhead
needed by nodeAgg.c, instead of using pessimistic round numbers.
Per a discussion with Michael Tiemann.
Tom Lane [Fri, 28 Jan 2005 17:36:04 +0000 (17:36 +0000)]
pg_aggregate.h fails to compile standalone, for lack of an #include
defining List.
Tom Lane [Fri, 28 Jan 2005 00:36:17 +0000 (00:36 +0000)]
Adjust mkdir_p to do stat() before trying mkdir(). Avoids problems on
Solaris and should be a little faster anyway, since in most scenarios
all but perhaps the last path component will already exist.
Tom Lane [Thu, 27 Jan 2005 23:42:44 +0000 (23:42 +0000)]
Check that aggregate creator has the right to execute the transition
functions of the aggregate, at both aggregate creation and execution times.
Tom Lane [Thu, 27 Jan 2005 21:50:06 +0000 (21:50 +0000)]
Now that I look at it, int_array_enum() didn't work either.
Tom Lane [Thu, 27 Jan 2005 21:35:07 +0000 (21:35 +0000)]
Fix security and 64-bit issues in contrib/intagg. This code could
stand to be rewritten altogether, but for now just stick a finger in
the dike.
Peter Eisentraut [Thu, 27 Jan 2005 12:10:04 +0000 (12:10 +0000)]
Backpatch translations
Tom Lane [Wed, 26 Jan 2005 23:20:37 +0000 (23:20 +0000)]
Close all cursors created during a failed subtransaction. This is needed
to avoid problems when a cursor depends on objects created or changed in
the same subtransaction. We'd like to do better someday, but this seems
the only workable answer for 8.0.1.
Tom Lane [Wed, 26 Jan 2005 22:52:01 +0000 (22:52 +0000)]
Propagate ecpg core dump fix into 8.0 branch.
Tom Lane [Wed, 26 Jan 2005 22:25:23 +0000 (22:25 +0000)]
Adjust Windows autovacuum service to retry for up to 5 minutes waiting
for the postmaster to start. Dave Page
Tom Lane [Wed, 26 Jan 2005 21:57:32 +0000 (21:57 +0000)]
On Windows, set the postmaster executable's stack size to 4MB, so that
it agrees with the default value of max_stack_depth.
Tom Lane [Wed, 26 Jan 2005 21:24:27 +0000 (21:24 +0000)]
Minor tweak to avoid unnecessary memory bloat when dumping extremely wide
column values in -d mode. Per report from Marty Scholes. This doesn't
completely solve the issue, because we still need multiple copies of the
field value, but at least one copy can be got rid of painlessly ...
Tom Lane [Wed, 26 Jan 2005 20:42:26 +0000 (20:42 +0000)]
Add docs for a couple of formerly-undocumented geometric conversion functions.
Tom Lane [Wed, 26 Jan 2005 19:44:53 +0000 (19:44 +0000)]
Make pg_dump and pg_restore handle binary archive formats correctly
when using stdout/stdin on Windows.
Tom Lane [Wed, 26 Jan 2005 19:24:21 +0000 (19:24 +0000)]
Use SHGetFolderPath instead of SHGetSpecialFolderPath to find the
APPDATA directory on Windows. Magnus Hagander
Neil Conway [Wed, 26 Jan 2005 08:08:04 +0000 (08:08 +0000)]
Mark the text_soundex() function as "strict", to avoid crashing on NULL
input. Also, may as well mark it "cacheable" as well. From Kris Jurka.
Tom Lane [Tue, 25 Jan 2005 22:44:47 +0000 (22:44 +0000)]
Fix breakage created by addition of separate 'acl pass' in pg_dump.
Also clean up incredibly poor style in TocIDRequired() usage.
Peter Eisentraut [Tue, 25 Jan 2005 17:31:39 +0000 (17:31 +0000)]
Add missing "ko".
Peter Eisentraut [Tue, 25 Jan 2005 17:30:00 +0000 (17:30 +0000)]
Translation update
Tom Lane [Mon, 24 Jan 2005 23:22:13 +0000 (23:22 +0000)]
Fix ALTER TABLE ADD COLUMN so that constraints of domain types are
enforced properly when there is no explicit default value for the new
column. Per report from Craig Perras.
Tom Lane [Mon, 24 Jan 2005 17:46:29 +0000 (17:46 +0000)]
Disallow LOAD to non-superusers. Per report from John Heasman.
Tom Lane [Mon, 24 Jan 2005 02:47:52 +0000 (02:47 +0000)]
Fix memory leak in rtdosplit, per report from Clive Page.
Neil Conway [Mon, 24 Jan 2005 00:14:23 +0000 (00:14 +0000)]
pg_autovacuum fixes from Dave Page:
- Dependency services may not be correctly registered when installing as
a Windows Service.
- The sleep time is changed from milliseconds to seconds as it should
be.
- Error messages during service installation/removal are logged to
stderr.
Tom Lane [Sun, 23 Jan 2005 02:22:34 +0000 (02:22 +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.
Bruce Momjian [Sun, 23 Jan 2005 00:38:05 +0000 (00:38 +0000)]
Add tools/find_gt_lt to find < and > in SGML source.
Lowercase some uppercase tags so tools is more reliable at finding
problems.
Tom Lane [Sun, 23 Jan 2005 00:31:46 +0000 (00:31 +0000)]
pg_dump dumped the wrong tablespace for an index (ie, the parent table's
tablespace instead of the index's own), except when the index was created
as a constraint. Report and fix by Tanida Yutaka.
Tom Lane [Sun, 23 Jan 2005 00:04:20 +0000 (00:04 +0000)]
New routine _getObjectDescription() failed to cope with some aspects of
pre-7.3 pg_dump archive files: namespace isn't there, and in some cases
te->tag may already be quotified. Per report from Alan Pevec and
followup testing.