Commit Graph

14262 Commits

Author SHA1 Message Date
Tom Lane 3f9aec50e7 Flat file cleanup phase 2: make it work for pg_group. The flat group
file now identifies group members by usesysid not name; this avoids
needing to depend on SearchSysCache which we can't use during startup.
(The old representation was entirely broken anyway, since we did not
regenerate the file following RENAME USER.)  It's only a 95% solution
because if the group membership list is big enough to be toasted out
of line, we cannot read it during startup.  I think this will do for
the moment, until we have time to implement the planned pg_role
replacement for pg_group.
2005-02-20 04:45:59 +00:00
Tom Lane 60b2444cc3 Add code to prevent transaction ID wraparound by enforcing a safe limit
in GetNewTransactionId().  Since the limit value has to be computed
before we run any real transactions, this requires adding code to database
startup to scan pg_database and determine the oldest datfrozenxid.
This can conveniently be combined with the first stage of an attack on
the problem that the 'flat file' copies of pg_shadow and pg_group are
not properly updated during WAL recovery.  The code I've added to
startup resides in a new file src/backend/utils/init/flatfiles.c, and
it is responsible for rewriting the flat files as well as initializing
the XID wraparound limit value.  This will eventually allow us to get
rid of GetRawDatabaseInfo too, but we'll need an initdb so we can add
a trigger to pg_database.
2005-02-20 02:22:07 +00:00
Tom Lane 617d16f4ff 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.
2005-02-19 23:16:15 +00:00
Tom Lane 9650d6c7e6 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.
2005-02-19 19:33:08 +00:00
Tom Lane a8593a3463 Convert MemoryContextSwitchTo() into an inline function when using GCC. 2005-02-18 21:52:34 +00:00
Bruce Momjian 3110cd237c Update comment on VACUUM FULL.
Manfred Koizar
2005-02-15 03:50:07 +00:00
Bruce Momjian 1d7dfb1496 Document usage of gettext_noop(). 2005-02-15 01:03:47 +00:00
Bruce Momjian d73e0410bd Improve documentation of signal usage for HAVE_SIGPROCMASK and
non-HAVE_SIGPROCMASK cases in pqinitmask().
2005-02-14 23:02:35 +00:00
Bruce Momjian ad4f06aeb2 Improve documentation of signal usage for HAVE_SIGPROCMASK and
non-HAVE_SIGPROCMASK cases in pqinitmask().
2005-02-14 23:02:03 +00:00
Tom Lane db58ee5be9 ALTER LANGUAGE RENAME has never worked. Per Sergey Yatskevich. 2005-02-14 06:17:44 +00:00
Bruce Momjian bb17a98e3c Print file name and errno string on rmtree failure.
Backpatch to 8.0.X.
2005-02-13 16:50:44 +00:00
Bruce Momjian 67ff8009cf Move plpgsql DEBUG from DEBUG2 to DEBUG1 because it is a user-requested
DEBUG.
2005-02-13 01:25:50 +00:00
Bruce Momjian 7c44e57331 Move plpgsql DEBUG from DEBUG2 to DEBUG1 because it is a user-requested
DEBUG.

Fix a few places where DEBUG1 crept in that should have been DEBUG2.
2005-02-12 23:53:42 +00:00
Tom Lane e9d693411c Add a regression test to verify that the stack depth checker actually
works (and max_stack_depth is not set too high for the platform).
Inspired by trouble report from Brian Betts.
2005-02-11 22:15:12 +00:00
Neil Conway 975e27377a Adjust input routines for float4, float8 and oid to reject the empty string
as valid input (it was previously treated as 0). This input was deprecated
in 8.0 (and a warning was emitted). Regression tests updated.
2005-02-11 04:09:05 +00:00
Tom Lane 4db84f0880 Fix ANALYZE to accumulate some minimal statistics for an all-null column.
Per gripes from Mike Mascari and Bernd Heller.
2005-02-11 00:41:12 +00:00
Tom Lane 42599b322d 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.
2005-02-10 20:36:28 +00:00
Michael Meskes 5cc8884a5d Fixed changelog entry to list correct bug reporter. 2005-02-10 08:08:52 +00:00
Michael Meskes 7e786a82ca Fixed more parsing bugs in other CREATE statements as pointed out by TANIDA
Yutaka <tanida@sra.co.jp>.
2005-02-10 08:06:35 +00:00
Neil Conway 3df9abd1a5 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.
2005-02-09 23:17:26 +00:00
Michael Meskes d32b3aec52 Fixed bug in parsing of CREATE AS statement. 2005-02-09 11:26:44 +00:00
Tom Lane 2a6c032503 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.
2005-02-06 20:19:08 +00:00
Tom Lane 4f82112473 Fix bit-rot in ipc_test.c; it didn't include some stuff that pg_shmem.c
now depends on.
2005-02-05 20:07:16 +00:00
Tom Lane 12179c99b1 Marginal hack to merge adjacent ReleaseBuffer/ReadBuffer calls into
ReleaseAndReadBuffer during GIST index searches.  We already did this
in btree and rtree, might as well do it here too.
2005-02-05 19:38:58 +00:00
Neil Conway 11635c3f6f Refactor some duplicated code in lock.c: create UnGrantLock(), move code
from LockRelease() and LockReleaseAll() into it. From Heikki Linnakangas.
2005-02-04 02:04:53 +00:00
Tom Lane ee467c3530 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.
2005-02-03 23:38:58 +00:00
Tom Lane cc4f58f4cd 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.
2005-02-03 23:29:19 +00:00
Tom Lane ad476170e9 Improve performance of fmgr.c calling routines for cases with more than
two arguments.  Per suggestions from A. Ogawa.
2005-02-02 22:40:04 +00:00
Tom Lane fffb5819ca 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.
2005-02-02 21:49:09 +00:00
Bruce Momjian 68c4804b08 Add to release checklist:
* Update inet/cidr data types with newest Bind patches
2005-02-02 16:58:52 +00:00
Michael Meskes 4b56bd85c0 Fixed bug in parsing of #line statement in declare section. 2005-02-02 15:37:43 +00:00
Neil Conway 73f630500b Add support for temporary views, including documentation and regression
tests. Contributed by Koju Iijima, review from Neil Conway, Gavin Sherry
and Tom Lane.

Also, fix error in description of WITH CHECK OPTION clause in the CREATE
VIEW reference page: it should be "CASCADED", not "CASCADE".
2005-02-02 06:36:02 +00:00
Neil Conway f94197ef35 Fix a bug induced by the list-rewrite that resulted in incrementing the
command counter more than necessary. Per report from Michael Fuhr.
2005-02-01 23:28:40 +00:00
Tom Lane a3f945a1b2 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 ...
2005-02-01 23:08:13 +00:00
Tom Lane 2a8874841d 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.
2005-02-01 19:35:14 +00:00
Tom Lane 0a92c58b7c 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.
2005-02-01 00:59:09 +00:00
Tom Lane 875b0c62fa 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.
2005-01-28 20:34:27 +00:00
Tom Lane 0bf2587df4 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.
2005-01-28 19:34:28 +00:00
Tom Lane c3a4e22e82 pg_aggregate.h fails to compile standalone, for lack of an #include
defining List.
2005-01-28 17:35:53 +00:00
Tom Lane bb1bd3276e 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.
2005-01-28 00:34:32 +00:00
Tom Lane 5ae5e3bfe6 Check that aggregate creator has the right to execute the transition
functions of the aggregate, at both aggregate creation and execution times.
2005-01-27 23:42:18 +00:00
Neil Conway f76730e35a Small patch to move get_grosysid() from catalog/aclchk.c to
utils/cache/lsyscache.c where it can be used by other things.  Also
cleans up both get_usesysid() and get_grosysid() a bit. From Stephen
Frost.
2005-01-27 23:36:15 +00:00
Neil Conway a885ecd6ef Change heap_modifytuple() to require a TupleDesc rather than a
Relation. Patch from Alvaro Herrera, minor editorializing by
Neil Conway.
2005-01-27 23:24:11 +00:00
Neil Conway ffaaf27eb4 Provide a more descriptive error message when the return type of an SRF
does not match what the query expected. From Brendan Jurd, minor
editorializing by Neil Conway.
2005-01-27 06:36:42 +00:00
Tom Lane f07b9689c9 Generalize TRUNCATE to support truncating multiple tables in one
command.  This is useful because we can allow truncation of tables
referenced by foreign keys, so long as the referencing table is
truncated in the same command.

Alvaro Herrera
2005-01-27 03:19:37 +00:00
Neil Conway 4fe201237f Add regression tests for recent cursor/savepoint bug fixed by Alvaro and
Tom.
2005-01-27 01:32:00 +00:00
Tom Lane aba691b728 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.
2005-01-26 23:20:21 +00:00
Tom Lane bf7737a938 On Windows, set the postmaster executable's stack size to 4MB, so that
it agrees with the default value of max_stack_depth.
2005-01-26 21:55:26 +00:00
Tom Lane 7969649bd5 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 ...
2005-01-26 21:24:12 +00:00
Tom Lane 9d58b9645e Make pg_dump and pg_restore handle binary archive formats correctly
when using stdout/stdin on Windows.
2005-01-26 19:44:43 +00:00
Tom Lane 889f038129 Use SHGetFolderPath instead of SHGetSpecialFolderPath to find the
APPDATA directory on Windows.  Magnus Hagander
2005-01-26 19:24:03 +00:00
Tom Lane fd5437c78b Fix breakage created by addition of separate 'acl pass' in pg_dump.
Also clean up incredibly poor style in TocIDRequired() usage.
2005-01-25 22:44:31 +00:00
Peter Eisentraut 5ca9687fe4 Add missing "ko". 2005-01-25 17:32:00 +00:00
Michael Meskes d314616d12 Fixed segfault due to freeing a struct definition twice if it was a named struct used in a typedef. 2005-01-25 12:51:31 +00:00
Neil Conway 4405e74355 Regression tests for recent bugfix to ALTER TABLE ADD COLUMN: ensure that
constraints on domain types are properly enforced, even if the newly
added column has no default value. Per bug #1433.
2005-01-25 03:22:19 +00:00
Tom Lane beaf5ae623 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.
2005-01-24 23:21:57 +00:00
Tom Lane ad538d8bcd Disallow LOAD to non-superusers. Per report from John Heasman. 2005-01-24 17:46:16 +00:00
Tom Lane 0ffe9f7946 Fix memory leak in rtdosplit, per report from Clive Page. 2005-01-24 02:47:26 +00:00
Bruce Momjian 0960dc2293 Document why CREATE CONSTRAINT TRIGGER doesn't tab complete. 2005-01-23 15:58:50 +00:00
Tom Lane 94e4778a31 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:21:36 +00:00
Bruce Momjian d08889aa8b Add tools/find_gt_lt to find < and > in SGML source.
Lowercase some uppercase tags so tools is more reliable at finding
problems.
2005-01-23 00:30:59 +00:00
Tom Lane bdbfd343a2 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.
2005-01-23 00:30:26 +00:00
Tom Lane 3e2e58ba37 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.
2005-01-23 00:03:54 +00:00
Bruce Momjian 112654c72c Mention issue with < and > in docs. 2005-01-22 23:39:21 +00:00
Neil Conway 5df3fc67a7 This patch updates the regression tests to allow "make installcheck" to
pass if "default_with_oids" is set to false. I took the approach of
explicitly adding WITH OIDS to the CREATE TABLEs where necessary, rather
than tweaking the default_with_oids GUC var.
2005-01-22 05:12:33 +00:00
Neil Conway fa471dac02 Trivial fix: remove some stray leading whitespace. 2005-01-20 22:54:57 +00:00
Neil Conway a341a96c01 Refactor transformExpr() by creating separate functions for most of the
expression types.
2005-01-19 23:45:24 +00:00
Neil Conway d600c1db7a Add some basic regression tests for refcursors in PL/PgSQL. 2005-01-19 04:32:40 +00:00
Neil Conway b4297c177c This patch makes some improvements to the rtree index implementation:
(1) Keep a pin on the scan's current buffer and mark buffer. This
avoids the need to do a ReadBuffer() for each tuple produced by the
scan. Since ReadBuffer() is expensive, this is a significant win.

(2) Convert a ReleaseBuffer(); ReadBuffer() pair into
ReleaseAndReadBuffer(). Surely not a huge win, but it saves a lock
acquire/release...

(3) Remove a bunch of duplicated code in rtget.c; make rtnext() handle
both the "initial result" and "subsequent result" cases.

(4) Add support for index tuple killing

(5) Remove rtscancache(): it is dead code, for the same reason that
gistscancache() is dead code (an index scan ought not be invoked with
NoMovementScanDirection).

The end result is about a 10% improvement in rtree index scan perf,
according to contrib/rtree_gist/bench.
2005-01-18 23:25:55 +00:00
Neil Conway 1f5299bc3f Replace the use of "0" with "NULL" where appropriate in dllist.c, for
good style and to satisfy sparse. From Alvaro Herrera.
2005-01-18 22:59:32 +00:00
Bruce Momjian b4e7e9ad6f Win32 8.1 stamp. 2005-01-18 14:39:46 +00:00
Bruce Momjian 31197bbdf5 Update version stamps for 8.1 as listed in RELEASE_CHANGES. 2005-01-18 05:00:35 +00:00
Peter Eisentraut f87e5b295c Translation updates 2005-01-17 21:21:18 +00:00
PostgreSQL Daemon c22b7eccd3 its that time ... tag it for release 2005-01-17 20:47:10 +00:00
Peter Eisentraut 1723f1f7ae Translation updates 2005-01-17 20:27:44 +00:00
Peter Eisentraut bb60ef23ed Translation updates 2005-01-17 14:55:34 +00:00
Peter Eisentraut f099cb0ede Translation updates 2005-01-17 10:00:06 +00:00
Peter Eisentraut 3332c0722d Fix format string error. 2005-01-17 09:06:31 +00:00
Neil Conway 48e2bb13c9 This trivial patch adds a regression test for CASE expressions that use
an untyped literal in the CASE's test expression. This adds test
coverage for a bug that was fixed by Tom on January 12.
2005-01-17 03:39:37 +00:00
Peter Eisentraut 0d45116eb0 Translation updates 2005-01-17 03:09:08 +00:00
Peter Eisentraut 0be1166352 New translation 2005-01-17 03:05:37 +00:00
Peter Eisentraut 83ef003f2c Translation updates 2005-01-17 02:41:50 +00:00
Tom Lane 299ae4356b Adjust warning message about Windows console code page to point to
the right place in the docs, and gettext()ify it.
2005-01-15 05:43:06 +00:00
Tom Lane 7a6a7d57b4 pg_regress now needs to know that Windows hasn't got unix sockets,
per Andrew Dunstan.  Also, don't override the user's value of PGHOST
in the 'make installcheck' case.  I think the latter was an ill-considered
workaround for the Windows code back when libpq didn't properly default
to localhost on Unix-socket-less platforms.
2005-01-15 04:15:51 +00:00
Tom Lane 9fa1843454 postgres -boot would print the wrong program name in event of a
failure in SelectConfigFiles().  Cosmetic issue, but ...
2005-01-14 21:08:44 +00:00
Tom Lane 9d83358499 Update obsolete comment, per Alvaro. 2005-01-14 17:53:33 +00:00
Tom Lane 982e998064 Add missing gettext() calls in find_my_exec(). It's probably too late
to get these strings translated, but we may as well have them be
translatable as not.
2005-01-14 17:47:49 +00:00
Tom Lane ce6e2fada0 plperl trigger handler tried to fetch new/old tuples even when fired
as a statement trigger :-(.  Per report from Sokolov Yura.
2005-01-14 16:25:42 +00:00
Peter Eisentraut 75112d4b5d Translation updates 2005-01-14 08:57:06 +00:00
Bruce Momjian 29e58330a6 Change Win32 client configuration files from *.txt to *.conf. 2005-01-14 00:25:56 +00:00
Tom Lane 2730eb9ae4 Change exec_eval_simple_expr's param list allocation call from
MemoryContextAllocZero back to MemoryContextAlloc, same as it was in 7.4.
The zeroing is unnecessary since all the meaningful fields are filled in
just below.  I had made it do that out of neatnik-ism, but some testing
with an example provided by Pavel Stehule showed that the zeroing was
accounting for about 5% of the runtime in a compute-intensive plpgsql
function.  That seems a bit high of a price for neatnik-ism...
2005-01-13 23:07:34 +00:00
Peter Eisentraut 66d8165a8b Translation updates 2005-01-13 21:24:40 +00:00
Peter Eisentraut f680aaeafa Translation updates 2005-01-13 19:06:37 +00:00
Tom Lane 3810c23fe4 Adjust src/tutorial Makefile so that it can use pgxs. This allows the
tutorial to be used without necessarily having a configured source tree.
2005-01-13 18:23:22 +00:00
Tom Lane c06b31dc31 get_names_for_var didn't do recursion for unnamed JOIN vars quite right;
got it wrong when the JOIN was in an outer query level.  Per example from
Laurie Burrow.  Also fix same issue in markTargetListOrigin.  I think the
latter is only a latent bug since we currently don't apply markTargetListOrigin
except at the outer level ... but should do it right anyway.
2005-01-13 17:19:10 +00:00
Tom Lane cbd8913245 Remove unportable assumption that it's okay to use the target buffer
of an sprintf() as a source string.  Demonstrably does not work with
recent gcc and/or glibc on some platforms.
2005-01-13 01:40:13 +00:00
Tom Lane 40f32f351a Add conditional inclusion of <com_err.h> to support old 'heimdal'
version of Kerberos.  Per report from Reinhard Max.
2005-01-12 21:37:54 +00:00
Tom Lane 2ec1aa4cb8 Re-allow an untyped literal as the test expression of a CASE, ie
CASE 'a' WHEN 'a' THEN 1 ELSE 2 END.  This worked in 7.4 and before
but had been broken due to premature freezing of the type of the test
expression.  Per gripe from GÄbor SzÃcs.
2005-01-12 17:32:36 +00:00
Tom Lane 8251e0b2fb Increase MAXLISTEN to a more generous value, and add an error message
telling when it has been exceeded.  Per trouble report from
Jean-GÅrard Pailloncy.
2005-01-12 16:38:17 +00:00
Tom Lane 6bb51348b0 Ensure that the test postmaster started by 'make check' listens to as
few 'listen_addresses' as possible --- on most systems, none at all,
just the Unix socket.  This avoids spurious check failures due to bogus
DNS setups, and is probably a good idea from a security standpoint anyway.
Per trouble report from Jean-GÅrard Pailloncy.
2005-01-12 16:19:51 +00:00
Tom Lane d3d00715e2 interval_out failed to mention 'ago' for negative intervals in SQL and
GERMAN datestyles.  Ancient bug reported by Terry Lee Tucker.
2005-01-11 18:33:46 +00:00
Tom Lane 5f0a468454 Fix tracking of dump-order dependencies for stand-alone composite types.
Per report from Robert Koepferl.
2005-01-11 17:55:25 +00:00
Tom Lane e24801654a plperl was not being quite paranoid enough about detecting 'undef' values
returned by Perl.  Per report from Nicolas Addington.
2005-01-11 06:08:45 +00:00
PostgreSQL Daemon 6ff408707e up release to rc5 2005-01-11 05:29:21 +00:00
Tom Lane 38498a28df Clean up pg_dump's handling of ownership for indexes (including
pkey/unique constraint indexes) and schemas.  Per report from
Michael Fuhr.
2005-01-11 05:14:13 +00:00
Tom Lane fc299179df Separate the functions of relcache entry flush and smgr cache entry flush
so that we can get the size of a shared inval message back down to what it
was in 7.4 (and simplify the logic too).  Phase 2 of fixing the
'SMgrRelation hashtable corrupted' problem.
2005-01-10 21:57:19 +00:00
Tom Lane 0ce4d56924 Phase 1 of fix for 'SMgrRelation hashtable corrupted' problem. This
is the minimum required fix.  I want to look next at taking advantage of
it by simplifying the message semantics in the shared inval message queue,
but that part can be held over for 8.1 if it turns out too ugly.
2005-01-10 20:02:24 +00:00
Michael Meskes cc7cd8774a Fixed segfault in adjust_informix due to missing varchar type. 2005-01-10 12:58:30 +00:00
Peter Eisentraut c2719ae503 Translation updates 2005-01-10 08:14:35 +00:00
Tom Lane a54ea1f75e Comment out check for substitution of private key file on Windows,
since st_ino can't be trusted on that platform.  Per report from T.J.
2005-01-10 00:37:12 +00:00
Tom Lane 8e4f4078d8 Un-break MSVC build, per Andrew Dunstan. 2005-01-10 00:19:51 +00:00
Tom Lane 521e8888e9 Undo an unadvertised change in the API of pg_atoi. In all previous
releases, a nonzero 'c' argument meant that the input string could be
terminated by either that character or \0.  Recent refactoring broke
that, causing the thing to scan for 'c' only.  This went undetected
because no part of the main code actually passes nonzero 'c'.  However
it broke tsearch2 and possibly other user-written code that assumed
the old definition.  Per report from Tom Hebbron.
2005-01-09 21:03:19 +00:00
Peter Eisentraut 84620860d9 New translations 2005-01-09 17:38:19 +00:00
Peter Eisentraut a58e738cd7 Translation updates 2005-01-09 17:32:05 +00:00
Peter Eisentraut 8511a1b734 New translation 2005-01-09 17:10:29 +00:00
Peter Eisentraut 11ca6d580c Translation updates 2005-01-09 17:07:27 +00:00
Tom Lane 8afe005f42 Consistently use geteuid() not getuid(); there were a few places deviating
from our long-established standard.
2005-01-08 22:51:15 +00:00
Tom Lane 3b5152cac6 Improve comments in sample config files. 2005-01-07 23:59:17 +00:00
PostgreSQL Daemon 75a59ad6d1 upgrade tags to rc4 2005-01-07 02:44:31 +00:00
Tom Lane bbeeea1437 Minor mop-up for Windows home-directory stuff, per Magnus. 2005-01-06 21:41:45 +00:00
Tom Lane c2f7e3e227 Don't list port twice in SUBDIRS. Caught by Honda Shigehiro. 2005-01-06 21:00:24 +00:00
Tom Lane 6f864be004 Revert -Wl, change to Makefile.osf, as the allegedly more standard
syntax apparently does not work for all toolchains on that platform.
Per Honda Shigehiro.
2005-01-06 20:56:50 +00:00
Tom Lane 4717992b4e Instead of a bare recv() to read the server's response to an SSL
request packet, use pqReadData().  This has the same effect since
conn->ssl isn't set yet and we aren't expecting more than one byte.
The advantage is that we will correctly detect loss-of-connection
instead of going into an infinite loop.  Per report from Hannu Krosing.
2005-01-06 20:06:58 +00:00
Tom Lane a3f98d5795 Adjust lookup of client-side profile files (.pgpass and so on) as per
discussion on pgsql-hackers-win32 list.  Documentation still needs to
be tweaked --- I'm not sure how to refer to the APPDATA folder in
user documentation.
2005-01-06 18:29:11 +00:00
Dennis Bjorklund b8139ea397 Translation updates 2005-01-06 12:23:33 +00:00
Dennis Bjorklund 90f1507275 Translation updates 2005-01-06 12:14:36 +00:00
Dennis Bjorklund 883730edc8 Translation updates 2005-01-06 11:44:12 +00:00
Peter Eisentraut 381de28eb0 Translation updates 2005-01-06 09:07:17 +00:00
Peter Eisentraut c43bd11683 Translation updates 2005-01-06 08:46:07 +00:00
Tom Lane d97ae8230e Make the various places that determine the user's "home directory"
consistent.  On Unix we now always consult getpwuid(); $HOME isn't used
at all.  On Windows the code currently consults $USERPROFILE, or $HOME
if that's not defined, but I expect this will change as soon as the win32
hackers come to a consensus.  Nothing done yet about changing the file
names used underneath $USERPROFILE.
2005-01-06 01:00:12 +00:00
Tom Lane fdbeaaf90a Keep translations in step with synopses. 2005-01-06 00:11:56 +00:00
Tom Lane edf3832b5c Clean up code in libpq that obtains user's home directory: make a single
subroutine that can hide platform dependencies.  The WIN32 path is still
a stub, but I await a fix from one of the win32 hackers.
Also clean up unnecessary #ifdef WIN32 ugliness in a couple of places.
2005-01-04 23:18:25 +00:00
Tom Lane d877de9e6b Make pg_dump --oids work when default_with_oids = off. Per report from
Michael Fuhr.
2005-01-04 22:27:46 +00:00
Peter Eisentraut 073149c6b2 Translation update 2005-01-04 19:42:01 +00:00
Peter Eisentraut 852b4ae5c2 Fix typo 2005-01-04 07:06:01 +00:00
Peter Eisentraut a2a5526ecb Translation updates 2005-01-03 22:39:24 +00:00
Tom Lane c9d8edc906 Repair bufmgr deadlock problem reported by Michael Wildpaner. Must take
share lock on a buffer being written out before releasing BufMgrLock in
the BufferAlloc code path; if we do it later we might block on someone
who's re-pinned the buffer.  I believe this is only an issue for BufferAlloc
and not the other places that call FlushBuffer.  BufferSync must continue
to do it the old way since it may well be trying to write buffers that
other backends have pinned; but it should not be holding any conflicting
locks.  FlushRelationBuffers is okay since it's got exclusive lock at the
relation level.
2005-01-03 18:49:41 +00:00
Bruce Momjian 4ea43bdfdf Update copyright script. 2005-01-03 06:16:54 +00:00
Tom Lane a17e589046 Adjust a few more copyright notices to match the format expected by
the src/tools/copyright script.
2005-01-01 22:14:33 +00:00
Tom Lane 7e1c8ef4fc Some more missed copyright notices. Many of these look like they
should have been caught by the src/tools/copyright script ... why
weren't they?
2005-01-01 20:44:34 +00:00
Bruce Momjian 2daed8c5b3 Update copyrights that were missed. 2005-01-01 05:43:09 +00:00
PostgreSQL Daemon 2ff501590b Tag appropriate files for rc3
Also performed an initial run through of upgrading our Copyright date to
extend to 2005 ... first run here was very simple ... change everything
where: grep 1996-2004 && the word 'Copyright' ... scanned through the
generated list with 'less' first, and after, to make sure that I only
picked up the right entries ...
2004-12-31 22:04:05 +00:00
Tom Lane 7cd25199a9 Clean up win32ver.o on Windows, per Magnus. 2004-12-31 19:09:37 +00:00
Tom Lane 0686fe331f make clean must remove zic$(X) for Windows, per Magnus. 2004-12-31 19:01:54 +00:00
Michael Meskes 1fbdb6bc9f Fixed segfault in connect when specifying no database name. 2004-12-30 09:36:37 +00:00
Tom Lane 96ecf9d5aa Support Sun's compiler on SunOS4 (a/k/a Solaris 9). Per ayan@ayan.net 2004-12-29 23:47:40 +00:00
Tom Lane eee5abce46 Refactor EXEC_BACKEND code so that postmaster child processes reattach
to shared memory as soon as possible, ie, right after read_backend_variables.
The effective difference from the original code is that this happens
before instead of after read_nondefault_variables(), which loads GUC
information and is apparently capable of expanding the backend's memory
allocation more than you'd think it should.  This should fix the
failure-to-attach-to-shared-memory reports we've been seeing on Windows.
Also clean up a few bits of unnecessarily grotty EXEC_BACKEND code.
2004-12-29 21:36:09 +00:00
Peter Eisentraut e14018dc5e Translation updates 2004-12-29 02:30:16 +00:00
Tom Lane d9236a69fc Make libpq default to localhost connections on machines without Unix-domain
sockets, rather than failing as it formerly did.  Revert the
thereby-obsoleted patch to make psql supply the localhost default.
2004-12-28 23:17:54 +00:00
Tom Lane 361f354109 Make sure --with-pgport option propagates into postgresql.conf.
Per gripe from Josh Berkus.
2004-12-27 20:39:21 +00:00
Tom Lane 370f90970d Cause pg_hba.conf file inclusion (@file stuff) to behave as documented,
that is, files are sought in the same directory as the referencing file.
Also allow absolute paths in @file constructs.  Improve documentation
to actually say what is allowed in an included file.
2004-12-27 19:19:24 +00:00
Peter Eisentraut 6dac6b89a0 Translation update 2004-12-27 14:24:22 +00:00
Tom Lane 42f167f8b1 Fix func_ptr declaration for netbsd-mac68k, per Rémi Zara. 2004-12-26 23:20:12 +00:00
Tom Lane 5cfdd68f84 Rearrange include file contents into a saner order, add inclusion of
<signal.h>.  Per Andrew Dunstan.
2004-12-26 19:20:33 +00:00
Tom Lane f0c08ae7c9 Remove 'optimization' to skip resolve_symlinks() when the found
executable file isn't itself a symlink.  We still need to run the
algorithm so that any directory symlinks in the path to the
executable are replaced by a true path.  Noticed this on seeing
pg_config give me a completely wrong answer for --pkglibdir when
I called it through a symlink to the installation bindir.
2004-12-24 16:55:43 +00:00
Tom Lane 9405e14e00 Switch order of WHERE clauses in tab completion queries, as suggested
by Rod Taylor.  The foo_is_visible() functions are relatively slow and
so it pays to check them after checking the name pattern match.
2004-12-24 15:42:05 +00:00
Tom Lane 08457504f0 Avoid memory leakage during VACUUM FULL when an index expression or
index predicate uses temporary memory for evaluation.  Per example
from Jean-Gerard Pailloncy.
2004-12-23 22:42:15 +00:00
Bruce Momjian f9a134b6e4 Add missing ecpg prototype for newly added functions. 2004-12-23 13:19:17 +00:00
Michael Meskes f0299325e4 Added PGTYPEStimestamp_add_interval written by Dave Cramer.
Fixed parsing of defines to make sure they used more than once.
2004-12-23 10:46:10 +00:00
Tom Lane 3621657a61 Use float8-small-is-zero for netbsd on m68k, per Rémi Zara. 2004-12-23 03:49:40 +00:00
Tom Lane 63a90720b4 Remove extra parenthesis. 2004-12-23 00:03:24 +00:00
Tom Lane bfa5f30481 Awhile back I added some code to StartupCLOG() to forcibly zero out
the remainder of the current clog page during system startup.  While
this was a good idea, it turns out the code fails if nextXid is
exactly at a page boundary, because we won't have created the "current"
clog page yet in that case.  Since the page will be correctly zeroed
when we execute the first transaction on it, the solution is just to
do nothing when exactly at a page boundary.  Per trouble report from
Dave Hartwig.
2004-12-22 18:45:49 +00:00
Tom Lane 71d21577de Add '-Wl,' prefix to linker switches consistently. Remove shlib_symbolic
macros, which aren't used anywhere and haven't been for some time.
2004-12-21 18:47:42 +00:00
Tom Lane 96b42de9a8 exec_eval_simple_expr() needs to do CommandCounterIncrement() not just
GetTransactionSnapshot() to ensure ActiveSnapshot advances properly.
Sigh.  Extend regression test so it reveals this error too.
2004-12-21 18:33:36 +00:00
Bruce Momjian c21c658b36 Add error checking for starting a win32 service using pg_ctl. 2004-12-21 17:58:30 +00:00
Bruce Momjian 556e72124c Return proper error exit code on pg_ctl -w start failure. 2004-12-21 17:38:01 +00:00
Peter Eisentraut ca4736ab92 Translation update 2004-12-21 11:14:18 +00:00
PostgreSQL Daemon 2ddcd4cad5 tag files for rc2 2004-12-21 02:53:33 +00:00
Tom Lane f0cbfcd399 Patch to make libpq.rc be a built-for-distribution file was a few
bricks shy of a load.
2004-12-21 02:14:41 +00:00
Bruce Momjian 93b808e9c9 Mention libpq.rc.in is now the file to update for releases. 2004-12-20 21:00:48 +00:00
Tom Lane 6cd2c9f752 Ensure that 'disabling statistics collector' is logged in all failure
paths of pgstat_init.  Responds to confusion exhibited by Christoph Haller.
2004-12-20 19:17:56 +00:00
Tom Lane ed06824978 Add support for Latin9 encoding in to_ascii(). Jaime Casanova 2004-12-20 19:00:37 +00:00
Tom Lane b5ae0d69da Mark the TimeZone parameter as GUC_REPORT, so that JDBC can find out
when it changes.  Per request from Kris Jurka.
2004-12-20 18:15:07 +00:00
Tom Lane 80855ba8ca In pipe_read_line Windows code, loop to ensure we get a whole line
from the child process; fixes observed problems when the returned
version number is '8.0.0' rather than '8.0.0rc1'.  Magnus Hagander
2004-12-20 17:40:59 +00:00
Tom Lane da59a70c09 Remove direct inclusions of <com_err.h> as well as configure test for
its presence.  This amounts to desupporting Kerberos 5 releases 1.0.*,
which is small loss, and simplifies use of our Kerberos code on platforms
with Red-Hat-style include file layouts.  Per gripe from John Gray and
followup discussion.
2004-12-20 17:13:41 +00:00
Tom Lane 59bffa3707 Adjust pg_resetxlog to handle 8.0 WAL file names properly. 2004-12-20 01:42:11 +00:00
Tom Lane e184663b24 plpgsql's exec_eval_simple_expr() now has to take responsibility for
advancing ActiveSnapshot when we are inside a volatile function.
Per example from Gaetano Mendola.  Add a regression test to catch
similar problems in future.
2004-12-19 20:20:27 +00:00
Tom Lane 1553be4a0b Prevent evaluation of backticks while discarding unwanted arguments
after an unknown or failed psql backslash command, and also while
discarding "extra" arguments of a putatively valid backslash command.
In the case of an unknown/failed command, make sure we discard the
whole rest of the line, rather than trying to resume at the next
backslash.  Per discussion with Thomer Gil.
2004-12-19 19:39:47 +00:00
Bruce Momjian f69cf1fc14 Mention why unixware doesn't handle threading in 8.0. 2004-12-19 04:09:48 +00:00
Bruce Momjian f167dc8802 Test for POSIX.1c 2-arg sigwait() and fail on single-arg version. 2004-12-19 04:06:23 +00:00
Bruce Momjian 9af9320750 Add Win32 version stamps that increment each day for proper SYSTEM32
DLL pginstaller installs.
2004-12-19 02:16:31 +00:00
Bruce Momjian 08690d0688 Allow NetBSD, m64k to compile the ASM spinlock code.
R?mi Zara
2004-12-18 22:12:52 +00:00
Tom Lane d0a6042f9f Make array_cat more paranoid about checking datatypes in empty arrays. 2004-12-17 20:59:58 +00:00
Tom Lane bd3bc4076e array_map failed to insert correct result type in an empty array.
Per example from Florian Pflug.
2004-12-17 20:58:26 +00:00
Tom Lane 1ef38f2691 In a PGXS build, expect to find the postgres executable already installed,
rather than in $(top_builddir)/src/backend/postgres.  Sean Chittenden
2004-12-17 03:52:49 +00:00
Neil Conway 480777e56c Allow 'ELSEIF' as an alternative to 'ELSIF' in PL/PgSQL. There have been
several reports of users being confused when they attempt to use ELSEIF
and run into trouble due to PL/PgSQL's lax parser. The parser will be
improved for 8.1, but we can fix most of the problem by allowing ELSEIF
for now.
2004-12-17 03:51:36 +00:00
Tom Lane dfdae5d63c Hook up the plpython result-object nrows and status methods correctly.
Adjust documentation to match current reality.
2004-12-17 02:14:48 +00:00
Tom Lane ff5a354ece Fix is-it-time-for-a-checkpoint logic so that checkpoint_segments can
usefully be larger than 255.  Per gripe from Simon Riggs.
2004-12-17 00:10:36 +00:00
Bruce Momjian ccac38ffb4 Update release changes list to mention pg_config.h.win32. 2004-12-16 22:11:06 +00:00
Bruce Momjian e757f884bc Update version for Win32-client include file. 2004-12-16 22:05:07 +00:00
Tom Lane 8ec9608326 Cause configure --with-tcl to check for presence of <tcl.h>, as per
gripe from John Gray.  Also fix thinko in pltcl Makefile: if a special
Tcl include directory is specified, that ought to be searched first.
2004-12-16 20:41:01 +00:00
Bruce Momjian d0c01f29df Allow --enable-thread-safety with --disable-shared libraries by passing
PTHREAD_LIBS to all libpq-usage builds.
2004-12-16 18:13:07 +00:00
Bruce Momjian b5498167d7 Allow AIX to use --enable-thread-safety by passing PTHREAD_LIBS to
binary compiles, and adjust configure tests for AIX.
2004-12-16 17:48:29 +00:00
Peter Eisentraut cd380b99cd Translation updates 2004-12-16 11:31:55 +00:00
Tom Lane dd29fc2f61 Fix another place broken by new List implementation :-(. Per example
from goranpop@nspoint.net.  I think this escaped notice because in
simple cases the list is NIL on entry.
2004-12-15 21:13:34 +00:00
Tom Lane 84dbd5a8f6 Disallow SETOF in the input of parseTypeString(). Formerly it was
silently ignored, allowing one to write bizarre things like
	DECLARE x setof int;
in plpgsql.  This has misled at least one novice into thinking that
plpgsql variables could be sets ...
2004-12-15 20:15:17 +00:00
Tom Lane c3d6c7d8f9 Calculation of keys_are_unique flag was wrong for cases involving
redundant cross-datatype comparisons.  Per example from Merlin Moncure.
2004-12-15 19:16:39 +00:00
Peter Eisentraut 6ad835f55f New translations 2004-12-15 17:50:20 +00:00
Peter Eisentraut fe4d1df375 Translation updates 2004-12-15 17:39:54 +00:00
Peter Eisentraut b8bbd15892 Translation update 2004-12-15 17:14:11 +00:00
Tom Lane 86a069bbed Cope with circularities involving a view's ON SELECT rule. I originally
thought there couldn't be any, but the folly of this was exposed by an
example from andrew@supernews.com 5-Dec-2004.  The patch applies the
identical logic already used for table constraints and defaults to ON
SELECT rules, so I have reasonable confidence in it even though it might
look like complicated logic.
2004-12-14 22:16:32 +00:00
Tom Lane 94e467061e Fix pg_dump to ensure that a comment on a table CHECK constraint cannot
be emitted too soon.  The previous code got this right in the case where
the CHECK was emitted as a separate ALTER TABLE command, but not in the
case where the CHECK is emitted right in CREATE TABLE.  Per report from
Slawomir Sudnik.

Note: this code is pretty ugly; it'd perhaps be better to treat comments
as independently sortable dump objects.  That'd be much too invasive a
change for RC time though.
2004-12-14 21:35:20 +00:00
Peter Eisentraut ec4aa14b68 Fix typo 2004-12-14 11:11:20 +00:00
Neil Conway 75e39c441e Prevent pg_resetxlog from being run as root. If this is allowed, some
root-owned files will be written to the data directory, leaving it in an
unusable state.
2004-12-14 01:59:41 +00:00
Peter Eisentraut 93c4a14e5c New translation 2004-12-13 22:54:20 +00:00
Peter Eisentraut 6ccb04f341 Translation updates 2004-12-13 21:49:10 +00:00
Bruce Momjian 36af887d6b Clearify which version numbers are bumped for major and minor releases. 2004-12-13 17:28:54 +00:00
Peter Eisentraut 5483936ed3 New translations 2004-12-13 16:30:53 +00:00
Peter Eisentraut 965dd791f4 Translation updates 2004-12-13 16:28:23 +00:00
Tom Lane d4b49b4bd4 Avoid generating excess (and illegal) parentheses around an aliased JOIN
in prettyprint mode.  Andreas Pflug
2004-12-13 00:33:06 +00:00
Neil Conway cda3e5836e Add regression tests for the fix committed by Tom for casting between
the row types of parent/child tables.
2004-12-12 22:49:50 +00:00
Tom Lane c604ed56e3 PREPARE and EXPLAIN need to copy the source query just like we recently
had to do in DECLARE CURSOR.  AFAICS these are all the places affected.
PREPARE case per example from Michael Fuhr, EXPLAIN case located by
grepping for planner calls ...
2004-12-12 20:17:06 +00:00
Peter Eisentraut f9a6ba184a Add missing newlines at end of error messages. 2004-12-12 18:26:29 +00:00
Peter Eisentraut 373825c9cd Translation updates 2004-12-12 18:09:18 +00:00
Peter Eisentraut cf5539112c Fix problems with certain shells (e.g., FreeBSD, Cygwin) clearing the
exit status in multiline traps.
2004-12-12 15:34:15 +00:00
Tom Lane 984791e0e1 Upgrade formrdesc() so that it can correctly initialize the tupledesc
(rd_att) field of a nailed-in-cache relcache entry.  This fixes the bug
reported by Alvaro 8-Dec-2004; I believe it probably also explains
Grant Finnemore's report of 10-Sep-2004.

In an unrelated change in the same file, put back 7.4's response to
failure to rename() the relcache init file, ie, unlink the useless
temp file.  I did not put back the warning message, since there might
actually be some reason not to have that.
2004-12-12 05:07:50 +00:00
Tom Lane 12b1b5d837 Instead of supposing (wrongly, in the general case) that the rowtype
of an inheritance child table is binary-compatible with the rowtype of
its parent, invent an expression node type that does the conversion
correctly.  Fixes the new bug exhibited by Kris Shannon as well as a
lot of old bugs that would only show up when using multiple inheritance
or after altering the parent table.
2004-12-11 23:26:51 +00:00
Peter Eisentraut b89df8fe60 Translation updates 2004-12-11 20:19:24 +00:00
Peter Eisentraut a31ec86ebe Translation updates 2004-12-11 20:10:14 +00:00
Peter Eisentraut e82cd783a1 Translation updates 2004-12-11 19:56:07 +00:00
Peter Eisentraut 4de679c710 Translation updates 2004-12-11 19:45:34 +00:00
Peter Eisentraut 10e960fb39 Translation updates 2004-12-11 19:09:08 +00:00
Peter Eisentraut 022a00b5f3 Translation updates 2004-12-11 19:03:49 +00:00
Tom Lane d5df606cb2 ActiveSnapshot must be set to something valid while running deferred
triggers during COMMIT.  Per trouble report from Frank van Vugt.
2004-12-06 23:57:17 +00:00
Peter Eisentraut 8efc721d52 Translation updates 2004-12-06 22:10:42 +00:00
Michael Meskes ec7806db2c Fixed bug in parsing of typedef'ed array sizes.
Synced parser.
2004-12-06 20:35:35 +00:00
Neil Conway b3f3092cad Fix off-by-1 bug in pg_ctl in -D handling, per report from pjmodos@parba.cz 2004-12-06 01:09:20 +00:00
Bruce Momjian e09567d850 Back out addition of Win1252 encoding. 2004-12-04 18:19:33 +00:00
Tom Lane 59b3b8014d As long as we're forcing an ORDER BY in these four join queries, we had
better make sure the sort order is totally specified; else we get burnt
by platform-specific behavior of qsort() with equal keys.  Per buildfarm
results.
2004-12-03 22:19:28 +00:00
Tom Lane 8090616847 Use StrNCpy not strncpy to fill hash key, to ensure the resulting key
is null-terminated.  I think this is not a real bug because the parser
would always have truncated the identifier to NAMEDATALEN-1 already,
but let's be safe.  Per report from Klocwork.
2004-12-03 21:26:31 +00:00
Tom Lane 2ee3a720a4 Adjust help message for --no-owner, per Alvaro Herrera. 2004-12-03 18:48:19 +00:00
Bruce Momjian cb99679aad > If it bothers you that much. I'd make a flag, cleared at the start of
> each COPY, and then where we test for CR or LF in CopyAttributeOutCSV,
> if the flag is not set then set it and issue the warning.

Andrew Dunstan
2004-12-03 17:13:28 +00:00
Bruce Momjian 9ef75bb21c Fix compile breakage from SIGPIPE fix for threading. 2004-12-03 01:58:43 +00:00
Bruce Momjian 08e0b34bad Back out fix for Unicode characters above 0x10000 2004-12-03 01:20:33 +00:00
Tom Lane 5d7a555d0f Code review for recent libpq changes. Be more careful about error
handling in SIGPIPE processing; avoid unnecessary pollution of application
link-symbol namespace; spell 'pointer to function' in the conventional
way.
2004-12-02 23:20:21 +00:00
Bruce Momjian 1d006ce95e > I have installed your patch and adjusted the names of the standards
> throughout to the spellings suggested by your book.

Great.

A follow-up patch for current CVS HEAD is attached, and available at
http://troels.arvin.dk/db/pgsql/conformance/pgsql-sql-conformance-
followup.patch

The patch
 - includes a core feature ID that had been left
   out by mistake (C011)
 - updates the sql_feature_packages.txt table to
   reflect changes in SQL:2003 which were not
   covered properly in my last patch

Troels Arvin
2004-12-02 22:51:28 +00:00
Bruce Momjian 12e678201d > I enclose a short patch to reduce the PGARCH_RESTART_INTERVAL from 60
> seconds to 10 seconds. The original number was plucked from thin air
> some months ago, and I'd like to review that now based upon further
> thought, observation and experience.
>
> This change has little or no effect on performance, since the interval
> is there mainly to avoid repeated respawn attempts if archiver fails at
> startup. Archiver start-up time is very quick, so there is little danger
> of exceeding 10 seconds.
>
> On a busy system, if the archiver does die, then many files can build up
> in the 60 seconds before respawning. That xlog file backlog could take
> some time to clear. This then leaves a larger than normal window of data
> loss for a possibly long period.
>
> It's a minor change only, with no other effect on function.

Simon Riggs
2004-12-02 22:40:18 +00:00
Bruce Momjian 4ea4f8bd06 Fix for Unicode characters above 0x10000.
John Hansen
2004-12-02 22:37:14 +00:00
Bruce Momjian 917c8bb407 On win32, there is currently no way to get the equivalent function of
the "ps" argument list on Unix - meaning that there is no way to
identify for example the stats processors or the bgwriter.

This patch adds this functionality, in a bit of a crufty way. It creates
a kernel Event object with the name of what would be in the title. This
can be viewed using for example Process Explorer.

It's been very handy for me during both debugging and using. I haven't
figured a better way, but perhaps someone has one that's less crufty? If
not, here is at least a working patch :-)

Magnus Hagander
2004-12-02 22:28:22 +00:00
Bruce Momjian 7af770d005 Add Charset WIN1252 support.
Roland Volkmann
2004-12-02 22:14:38 +00:00
Bruce Momjian d76589114d Change Win32 dlerror message to:
return "dynamic loading error";
2004-12-02 19:38:50 +00:00
Tom Lane e9c03c3b1b Disallow the combination VACUUM FULL FREEZE for safety's sake, for the
reasons I outlined in pghackers a few days ago.

Also, undo someone's overly optimistic decision to reduce tuple state
checks from if (...) elog() to Asserts.  If I trusted this code more,
I might think it was a good idea to disable these checks in production
installations.  But I don't.
2004-12-02 19:28:49 +00:00
Bruce Momjian f7bae20d67 Don't bother adding to cflags/cppflags, just set them because configure
handles that, and make solaris debug use no optimization.
2004-12-02 18:11:40 +00:00
Bruce Momjian 8408f65252 Rework libpq threaded SIGPIPE handling to avoid interference with
calling applications.  This is done by blocking sigpipe in the libpq
thread and using sigpending/sigwait to possibily discard any sigpipe we
generated.
2004-12-02 15:32:54 +00:00
Tom Lane 76e8a87f15 Teach regex_fixed_prefix() the correct handling of advanced regex
escapes --- they aren't simply quoted characters.  Problem noted by
Antti Salmela.  Also fix problem with incorrect handling of multibyte
characters when followed by a quantifier.
2004-12-02 02:45:07 +00:00
Tom Lane 4e91824b94 Make some adjustments to reduce platform dependencies in plan selection.
In particular, there was a mathematical tie between the two possible
nestloop-with-materialized-inner-scan plans for a join (ie, we computed
the same cost with either input on the inside), resulting in a roundoff
error driven choice, if the relations were both small enough to fit in
sort_mem.  Add a small cost factor to ensure we prefer materializing the
smaller input.  This changes several regression test plans, but with any
luck we will now have more stability across platforms.
2004-12-02 01:34:18 +00:00
Bruce Momjian ee9007a2e1 Allow libpq to build on MS Visual Studio .NET 2003 on Windows XP. 2004-12-01 23:42:26 +00:00
Tom Lane 1e6457dfce Fix timestamptz_age() to do calculation in local timezone not GMT, per bug 1332. 2004-12-01 19:57:49 +00:00
Tom Lane 5374d097de Change planner to use the current true disk file size as its estimate of
a relation's number of blocks, rather than the possibly-obsolete value
in pg_class.relpages.  Scale the value in pg_class.reltuples correspondingly
to arrive at a hopefully more accurate number of rows.  When pg_class
contains 0/0, estimate a tuple width from the column datatypes and divide
that into current file size to estimate number of rows.  This improved
methodology allows us to jettison the ancient hacks that put bogus default
values into pg_class when a table is first created.  Also, per a suggestion
from Simon, make VACUUM (but not VACUUM FULL or ANALYZE) adjust the value
it puts into pg_class.reltuples to try to represent the mean tuple density
instead of the minimal density that actually prevails just after VACUUM.
These changes alter the plans selected for certain regression tests, so
update the expected files accordingly.  (I removed join_1.out because
it's not clear if it still applies; we can add back any variant versions
as they are shown to be needed.)
2004-12-01 19:00:56 +00:00
Bruce Momjian a6c1377085 Add \n to end of output for psql \s with no history file name.
This prevents the next psql prompt from showing up on the end of the
last history line.
2004-11-30 20:00:34 +00:00