Commit Graph

791 Commits

Author SHA1 Message Date
Joe Conway 64a2e1fdef Apply quote_literal to the start_with argument of connectby. Fixes problem
reported by David Garamond when working with bytea parent and child keys.
2004-02-24 05:25:36 +00:00
Tom Lane 7a57a67278 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:10 +00:00
Bruce Momjian 1d567aee07 The following bug has been logged online:
Bug reference:      1081
Logged by:          Aarjav Trivedi

Email address:      aarjav@cc.gatech.edu

PostgreSQL version: 7.4

Operating system:   Linux

Description:        Spelling error in tsearch2.sql leading to problems
with
tsearch

Details:

On line 620 of tsearch2.sql which is required to install and run
TSEARCH,

REATE FUNCTION tsstat_in(cstring)

should be

CREATE FUNCTION tsstat_in(cstring)

because of this error, TSEARCH fails to work as specified,
2004-02-20 20:42:29 +00:00
Bruce Momjian 51b363ec24 Please apply this patch to contrib/dbmirror
In incorperates changes from myself and a number of contributors.

This update to dbmirror provides:

-replication of sequence operations via setval/nextval
-DBMirror.pl support for logging to syslog
-changed the names of the tables to dbmirror_*  (no quotes required)
-Support for writitng SQL statements to files instead of directly to
 a slave database
-More options for DBMirror.pl in the config files.

Steven Singer
2004-02-17 03:34:35 +00:00
Tom Lane 391c3811a2 Rename SortMem and VacuumMem to work_mem and maintenance_work_mem.
Make btree index creation and initial validation of foreign-key constraints
use maintenance_work_mem rather than work_mem as their memory limit.
Add some code to guc.c to allow these variables to be referenced by their
old names in SHOW and SET commands, for backwards compatibility.
2004-02-03 17:34:04 +00:00
Teodor Sigaev 146aab497e Docs fix from Kris Jurka <books@ejurka.com> 2004-01-26 15:08:52 +00:00
Teodor Sigaev 239760209b Correct type for isalnum 2004-01-19 18:39:45 +00:00
Tom Lane 5390e284db Remove broken (and unnecessary) definition of operator <> for _int4
datatype; the generic array comparators added in 7.4 supersede this.
Per report and patch from Korea PostgreSQL Users' Group.
2004-01-08 23:40:27 +00:00
Tom Lane 2cdace962b Remove incorrect remark about having to restart backend to load a new
version of a shared library.
2003-12-27 18:20:18 +00:00
Teodor Sigaev 125d69cd9b Fix signed char in comparison and check memory allocation 2003-12-18 19:27:53 +00:00
Tom Lane a7e383d241 Repair badly broken estimation of output buffer size in lquery_out(). 2003-12-17 20:15:41 +00:00
Teodor Sigaev 565dc5d1ae Fix integer types to use definition from c.h. Per bug report by Patrick Boulay <patrick.boulay@medrium.com> 2003-12-10 15:54:58 +00:00
Tom Lane ee719299e4 Minor autovacuum fixes from Matthew O'Connor. 2003-12-08 21:54:00 +00:00
Tom Lane 1b5a2dbdff Add fflush() before sleeping, per Matthew O'Connor. 2003-12-08 21:51:31 +00:00
Tom Lane 9c26980f58 Replace unportable and overflow-prone use of 'long long' with safer
'double' arithmetic, per recent discussion.
2003-12-07 19:55:58 +00:00
Teodor Sigaev a5a68766e1 One more fix confusion 2003-12-05 15:37:51 +00:00
Teodor Sigaev 8f678600c2 Avoid confusion start_parse_str function with tsearch V1 2003-12-05 14:27:42 +00:00
Teodor Sigaev 6de3fe3c0d Avoid conflict strndup with glibc 2003-12-04 12:21:11 +00:00
Teodor Sigaev 32580efafb Fix for word with several infinitives 2003-12-03 16:07:48 +00:00
Bruce Momjian ea4b9f14f3 I've run across a pretty serious problem with pg_autovacuum.
pg_autovacuum looses track of any table that's ever been truncated
(possibly other situations too).   When i truncate a table it gets a
new relfilenode in pg_class.  This is a problem because pg_autovacuum
assumes pg_class.relfilenode will join to pg_stats_all_tables.relid.
pg_stats_all_tables.relid is actallly the oid from pg_class, not the
relfilenode.   These two values start out equal so pg_autovacuum works
initially, but it fails later on because of this incorrect assumption.

This patch fixes that problem.  Applied to HEAD and 7.4.X.

Brian Hirt
2003-12-01 23:19:33 +00:00
Bruce Momjian 15b5d6cfc6 I noticed in the 7.4 release that in contrib/pg_autovacuum, args->logfile is
not initialized if a log file is not specified on the command line.  This
causes an immediate segfault on systems that fill allocated memory with some
value other than zero (my FreeBSD machine uses 0xD0).

Several crashes later I discovered that args->user, password, host, and port
are also used without being initialized.

This doesn't appear to be fixed in CVS and I came up empty on a mailing list
search -- hope it hasn't been reported already.

Craig Boston
2003-12-01 23:13:07 +00:00
PostgreSQL Daemon 55b113257c make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Teodor Sigaev cabdf460d3 Fix free instead of pfree 2003-11-28 12:09:02 +00:00
Joe Conway d1824a5ccb Fix regression in dblink_disconnect() reported by Eduardo Stern:
persistent_conn was left dangling after a disconnect in the
unnamed connection case, causing a subsequent disconnect to
crash the backend.
2003-11-28 05:03:02 +00:00
Teodor Sigaev baeab89de6 Fixes about word with several infiniteve 2003-11-27 16:04:40 +00:00
Joe Conway 5392e73b6c Added missing SPI_finish() calls to get_tuple_of_interest(). Fixes bug
reported by Andrea Grassi.
2003-11-26 20:43:25 +00:00
Teodor Sigaev f5e8bfb4b1 Utility for convert myspell dictionaries to ispell, full README will be later 2003-11-26 14:06:16 +00:00
Tatsuo Ishii 43f77c06bb Patches from Yutaka Tanida. Create primary key indexes after data
insertion to reduce initialization time.
2003-11-26 06:53:18 +00:00
Teodor Sigaev 4ca765f9aa Ignore too long lexeme 2003-11-25 13:33:15 +00:00
Teodor Sigaev c63c1946a2 Optimize. Improve ispell support for compound words. This work was sponsored by ABC Startsiden AS. 2003-11-17 17:34:35 +00:00
Tom Lane fa5c8a055a Cross-data-type comparisons are now indexable by btrees, pursuant to my
pghackers proposal of 8-Nov.  All the existing cross-type comparison
operators (int2/int4/int8 and float4/float8) have appropriate support.
The original proposal of storing the right-hand-side datatype as part of
the primary key for pg_amop and pg_amproc got modified a bit in the event;
it is easier to store zero as the 'default' case and only store a nonzero
when the operator is actually cross-type.  Along the way, remove the
long-since-defunct bigbox_ops operator class.
2003-11-12 21:15:59 +00:00
Bruce Momjian f719f0f6db Typo fix in comment from David Wheeler 2003-11-12 03:27:26 +00:00
Tom Lane c1d62bfd00 Add operator strategy and comparison-value datatype fields to ScanKey.
Remove the 'strategy map' code, which was a large amount of mechanism
that no longer had any use except reverse-mapping from procedure OID to
strategy number.  Passing the strategy number to the index AM in the
first place is simpler and faster.
This is a preliminary step in planned support for cross-datatype index
operations.  I'm committing it now since the ScanKeyEntryInitialize()
API change touches quite a lot of files, and I want to commit those
changes before the tree drifts under me.
2003-11-09 21:30:38 +00:00
Bruce Momjian 6479ee28c0 Fix typo on autovacuum readme. 2003-11-09 03:15:46 +00:00
Bruce Momjian e781a1a95d Here is an update to the dbmirror README file.
-References to older versions of PostgreSQL have been removed(It no
longer
compiles against older versions)
-Added a link to PgPerl at GBorg.

Steven Singer
2003-10-27 02:52:45 +00:00
Tom Lane 5319ba3803 Update README file to show 7.4 oidjoins relationships. The regression
test was updated previously, but documentation is lagging.
2003-10-19 22:15:32 +00:00
Bruce Momjian 62fdc3dd60 I have run pg_autovacuum on AIX, so that can, at least loosely, be
considered "tested."

And I have turned all of the 7.4 HISTORY material into DocBook for
release.sgml

Christopher Browne
2003-10-16 03:47:28 +00:00
Bruce Momjian 18e5addb96 Fix core dump on root starting pg_autovacuum.
Change conditionals to be more constent with our code

if (const == var) => if (var == const).
2003-10-10 19:26:25 +00:00
Bruce Momjian 1dad866bb4 Someone report me small bug in contrib/pg_dumplo today. It's problem
with a little dirty snprintf() usage which I used some years ago:

    snprintf(path, BUFSIZ, "%s/lo_dump.index", path);

Karel Zak
2003-10-09 13:38:05 +00:00
Bruce Momjian 7ceadb8fab Change some awkward wording in the pg_autovacuum README file. I really
only read this because of Niel :-)

Robert Treat
2003-10-08 18:18:04 +00:00
Tom Lane 08c33c426b Attached is a patch for contrib/tablefunc. It fixes two issues raised by
Lars Boegild Thomsen (full email below) and also corrects the regression
expected output for a recent backend message adjustment. Please apply.

Joe Conway
2003-10-02 03:51:40 +00:00
Bruce Momjian 6000e32805 I've not changed any malloc/calloc to palloc. It looks to me that these memory
areas are for the lifetime of the backend and in the interests of not breaking
something that's not broken I left alone.

Note for anyone reading this and wanting it for tsearch-v2-stable (i.e. for 7.3
backend) this patch probably will not apply cleanly to that source. It should
be simple enough to see what's going on and apply the changes by hand if need
be.


--
Nigel J. Andrews
2003-09-29 18:54:38 +00:00
Bruce Momjian 04e401f97f A) Fixes a bug that prevented mirroring of data on a table that has had
a column dropped.

B) Updated the documentation for the 7.4 release.

Steven Singer
2003-09-29 18:16:48 +00:00
Bruce Momjian 44f8c5c10a Make dbf2pg safe for non-ASCII character sets.
M?rcio Dick Smiderle
2003-09-27 22:24:49 +00:00
Jan Wieck e9ff025345 Fixed calculation of bid when generating accounts. Used to create
accounts.bid values of zero.

Jan
2003-09-27 19:15:34 +00:00
Tom Lane 03858c078b Add positive defense against dropped columns, per suggestion from
Christopher Kings-Lynne.  Also fix a couple more schema-awareness issues.
2003-09-24 05:38:38 +00:00
Teodor Sigaev 0b1ee9b5a3 fix hlfinditem function. Thanks to "Stphane Bidoul" <stephane.bidoul@softwareag.com>.
The 'word' variable there is initialised from
the prs->words array, but immediately after,
that array may be reallocated, thus leaving
word pointing to unallocated memory.
2003-09-22 13:32:33 +00:00
Tom Lane 3f43446e36 Persuade tsearch/tsearch2 to work (or at least pass their regression
tests) when using flex 2.5.31.  The fix is to *not* try to use palloc
and pfree for allocations within the lexer; when you do that, the
yy_buffer_stack gets freed at inopportune times.  The code is already
set up to do manual deallocation, so I see no particular advantage to
using palloc anyway.
2003-09-14 18:44:23 +00:00
Tom Lane 0e9b05bde9 expected results for dblink test seem to be out of date ... 2003-09-14 02:30:07 +00:00