Commit Graph

20471 Commits

Author SHA1 Message Date
Tom Lane 223f82d4da Now that we know last_statrequest > last_statwrite can be observed in the
buildfarm, expend a little more effort on the log message for it.
2010-03-24 16:07:10 +00:00
Andrew Dunstan 23244d6f24 Mark "installcheck-parallel", "world", "install-world" and "installcheck-world" make targets as PHONY. Fujii Masao. 2010-03-24 13:14:02 +00:00
Heikki Linnakangas de3483acfa Update description of walrcv_receive() function to match reality. 2010-03-24 06:25:39 +00:00
Bruce Momjian 96189dbe66 Document in postgresql.conf that the max_standby_delay default is 30
'seconds'.
2010-03-24 03:13:45 +00:00
Peter Eisentraut 8a367d441b Remove useless double assignment
GCC 4.5 complained about it.
2010-03-23 22:12:06 +00:00
Tom Lane d0049f8eee Fix regression test breakage from recent change in default name of exclusion-constraint index. 2010-03-22 17:43:28 +00:00
Simon Riggs 37afd3ef4e Shorten suffix of automatically created indexes to "_excl" when using
exclusion constraints, in line with string length of other pre-9.0 suffixes.
2010-03-22 15:24:11 +00:00
Tom Lane 8d3c4aa614 Fix an oversight in join-removal optimization: we have to check not only for
plain Vars that are generated in the inner rel and used above the join, but
also for PlaceHolderVars.  Per report from Oleg K.
2010-03-22 13:57:16 +00:00
Michael Meskes ecac5e6bfc Fixed ECPG regression test to make sure it uses absolute paths for include
files instead of relative ones which break vpath builds.
2010-03-22 07:41:20 +00:00
Michael Meskes 075d44120f Adding special command line option that is now needed for the one ecpg regression test that was changed. 2010-03-21 14:26:58 +00:00
Michael Meskes b4d298ac23 ECPG's parser now accepts and handles variables as arguments for the FREE command.
Informix allows variables as argument to the embedded SQL command FREE. Given
that we only allow freeing cursors via FREE for compatibility reasons only we
should do the same.
2010-03-21 11:56:45 +00:00
Michael Meskes 654fff2311 Adjusted regression test results to the change I made in debug output for ecpglib. 2010-03-21 11:38:16 +00:00
Michael Meskes a9dd217861 Correctly name functions in debug output in ecpglib. When the functions were
refactored the debug output wasn't adjusted.
2010-03-21 11:33:44 +00:00
Michael Meskes 1d66a1cca1 ECPG only copied #include statements instead of processing them according to
commandline option "-i". This change fixes this and adds a test case. It also
honors #include_next, although this is probably never used for embedded SQL.
2010-03-21 10:49:52 +00:00
Peter Eisentraut c248d17120 Message tuning 2010-03-21 00:17:59 +00:00
Michael Meskes 1dff2a0f25 Fixed ecpg parser to allow more than one C preprocessor command inside a declare section. 2010-03-20 18:53:00 +00:00
Simon Riggs bf6285b3a7 Further corrections of mismatching struct and btree SizeOf macros.
In this case, correction is to remove now unused fields from struct.
Since these were unused and full of garbage anyway, no version change.
2010-03-20 07:49:48 +00:00
Tom Lane f784f05e95 Clear error_context_stack and debug_query_string at the beginning of proc_exit,
so that we won't try to attach any context printouts to messages that get
emitted while exiting.  Per report from Dennis Koegel, the context functions
won't necessarily work after we've started shutting down the backend, and it
seems possible that debug_query_string could be pointing at freed storage
as well.  The context information doesn't seem particularly relevant to
such messages anyway, so there's little lost by suppressing it.

Back-patch to all supported branches.  I can only demonstrate a crash with
log_disconnections messages back to 8.1, but the risk seems real in 8.0 and
before anyway.
2010-03-20 00:58:09 +00:00
Robert Haas acdd6ea5ab Forbid renaming columns of objects whose column names are system-generated.
KaiGai Kohei, with adjustments to the comments.
2010-03-20 00:43:42 +00:00
Tom Lane a836abe9f6 Modify error context callback functions to not assume that they can fetch
catalog entries via SearchSysCache and related operations.  Although, at the
time that these callbacks are called by elog.c, we have not officially aborted
the current transaction, it still seems rather risky to initiate any new
catalog fetches.  In all these cases the needed information is readily
available in the caller and so it's just a matter of a bit of extra notation
to pass it to the callback.

Per crash report from Dennis Koegel.  I've concluded that the real fix for
his problem is to clear the error context stack at entry to proc_exit, but
it still seems like a good idea to make the callbacks a bit less fragile
for other cases.

Backpatch to 8.4.  We could go further back, but the patch doesn't apply
cleanly.  In the absence of proof that this fixes something and isn't just
paranoia, I'm not going to expend the effort.
2010-03-19 22:54:41 +00:00
Tom Lane 865b29540e Fix oversight in btpo.xact patch; it was in fact installing garbage
in the xact field on replay, due to not writing out all the data in
the wal log struct.
2010-03-19 20:51:30 +00:00
Simon Riggs 6a771d1d36 Add connection messages for streaming replication. log_connections
was broken for a replication connection and no messages were
displayed on either standby or primary, at any debug level.
Connection messages needed to diagnose session drop/reconnect
events. Use LOG mode for now, discuss lowering in later releases.
2010-03-19 19:19:38 +00:00
Simon Riggs 75867c528d Minor tweaks on libpqrcv_connect(): ensure conninfo_repl[] is
correctly sized and expand comment to explain otherwise
undocumented use of replication connection parameter.
2010-03-19 17:51:42 +00:00
Simon Riggs aa36bd2039 Update XLOG_PAGE_MAGIC to recognise WAL format changes. 2010-03-19 17:42:10 +00:00
Simon Riggs 3cdafe40e7 Adjust comment in .history file to match recovery target specified. Comment
present since 8.0 was never fully meaningful, since two recovery targets
cannot be specified. Refactor recovery target type to make this change
and associated code easier to understand. No change in function.

Bug report arising from internal support question.
2010-03-19 11:05:15 +00:00
Simon Riggs 5c73ae17d1 Reset btpo.xact following recovery of btree delete page. Add btpo_xact
field into WAL record and reset it from there, rather than using
FrozenTransactionId which can lead to some corner case bugs.

Problem report and suggested route to a fix from Heikki, details by me.
2010-03-19 10:41:22 +00:00
Peter Eisentraut 2827516394 Also print the libpq error message when lo_create or lo_open fails 2010-03-18 20:00:51 +00:00
Peter Eisentraut a401226bd8 Prevent the injection of invalidly encoded strings by PL/Python into PostgreSQL
with a few strategically placed pg_verifymbstr calls.
2010-03-18 19:43:03 +00:00
Peter Eisentraut ab5694e80d Message style tuning 2010-03-18 19:02:46 +00:00
Bruce Momjian d154a857ba Mention way to get commit details for release notes. 2010-03-18 16:31:12 +00:00
Peter Eisentraut 12c2f2f66c Use data-type specific conversion functions also in plpy.execute
In PLy_spi_execute_plan, use the data-type specific Python-to-PostgreSQL
conversion function instead of passing everything through InputFunctionCall
as a string.  The equivalent fix was already done months ago for function
parameters and return values, but this other gateway between Python and
PostgreSQL was apparently forgotten.  As a result, data types that need
special treatment, such as bytea, would misbehave when used with
plpy.execute.
2010-03-18 13:23:57 +00:00
Heikki Linnakangas c21ac0b58e Add restartpoint_command option to recovery.conf. Fix bug in %r handling
in recovery_end_command, it always came out as 0 because InRedo was
cleared before recovery_end_command was executed. Also, always take
ControlFileLock when reading checkpoint location for %r.

The recovery_end_command bug and the missing locking was present in 8.4
as well, that part of this patch will be backported separately.
2010-03-18 09:17:18 +00:00
Simon Riggs 6407fa996a Add vacuum_defer_cleanup_age to postgresql.conf.sample. 2010-03-18 07:01:01 +00:00
Peter Eisentraut c92e2702f1 Message style tuning 2010-03-17 21:31:17 +00:00
Peter Eisentraut 2fb605ec76 Fix peculiar, untranslatable message concatenation attempt 2010-03-17 20:58:38 +00:00
Tom Lane 93324355eb Pass incompletely-transformed aggregate argument lists as separate parameters
to transformAggregateCall, instead of abusing fields in Aggref to carry them
temporarily.  No change in functionality but hopefully the code is a bit
clearer now.  Per gripe from Gokulakannan Somasundaram.
2010-03-17 16:52:38 +00:00
Heikki Linnakangas a383c55a1d Throw a nicer error message if a standby server attempts to connect while
the master is still in recovery. We don't support cascading slaves yet.

Patch by Fujii Masao, with slightly changed wording.
2010-03-16 09:09:55 +00:00
Simon Riggs 1a163a0c68 Remove incorrect comment from GetWriteRecPtr(): the return value is always
correct, as described in comments at start of xlog.c
2010-03-15 18:49:17 +00:00
Tom Lane 324505af01 Update oidjoins regression test for 9.0. 2010-03-14 04:17:54 +00:00
Bruce Momjian 54aaef8642 Revert all keepalive moves, reevaluate. 2010-03-13 16:56:37 +00:00
Bruce Momjian 3f10d21ecd Move more tcp keepalive macros to be consistent. 2010-03-13 16:40:38 +00:00
Bruce Momjian 45d9d90c83 Move TCP keepalive macro definition
Jaime Casanova
2010-03-13 15:35:46 +00:00
Bruce Momjian a6c1cea2b7 Add libpq warning message if the .pgpass-retrieved password fails.
Add ERRCODE_INVALID_PASSWORD sqlstate error code.
2010-03-13 14:55:57 +00:00
Bruce Momjian 89b0095ebd Allow underscores in tsearch email addressses, per RFC 5322 and report
by Dan O'Hara.

Patch by Teodor Sigaev
2010-03-13 00:41:58 +00:00
Bruce Momjian 66b82c20d9 Small adjustment by pgindent. 2010-03-13 00:40:43 +00:00
Tom Lane 52e2b33a55 Add some logging code for unexpected cases in pgstat.c, particularly being
unable to read a stats file for reasons other than ENOENT, and having to reset
last_statrequest because it's later than current time in the collector.
Not clear if this will shed any light on the "pgstat wait timeout" business,
but it seems like a good idea in general.

In passing, do some message-style-police work on recently-added
pgstat_reset_shared_counters code.
2010-03-12 22:19:19 +00:00
Tom Lane d75f7a01bf Fix a commented-out block of code that pgindent didn't understand
properly; it's been making that comment uglier with each run.
2010-03-12 21:40:36 +00:00
Tom Lane 1f44a313bd Add missing reset of need_initialization in reloptions code.
This resulted in useless extra work during every call of parseRelOptions,
but no bad effects other than that.  Noted by Alvaro.
2010-03-11 21:47:19 +00:00
Tom Lane 924d6ed437 Modify psql's \d printout to fold exclusion constraints in with regular
indexes, rather than printing them twice.  Per my gripe when the exclusion
constraint feature was committed.
2010-03-11 21:29:32 +00:00
Tom Lane f4898c945f Sync timezone code with tzcode 2010c from the Olson group. This fixes some
corner cases that come up in certain timezones (apparently, only those with
lots and lots of distinct TZ transition rules, as far as I can gather from
a quick scan of their archives).  Per suggestion from Jeevan Chalke.

Back-patch to 8.4.  Possibly we need to push this into earlier releases
as well, but I'm hesitant to update them to the 64-bit tzcode without
more thought and testing.
2010-03-11 18:43:24 +00:00