summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2010-04-19Check RecoveryInProgress() while holding ProcArrayLock during snapshots.Simon Riggs
This prevents a rare, yet possible race condition at the exact moment of transition from recovery to normal running.
2010-04-19Fix uninitialized local variables. Not sure why gcc doesn't complain aboutTom Lane
these --- maybe because they're effectively unused? MSVC does complain though, per buildfarm.
2010-04-19Add wrapper function libpqrcv_PQexec() in the walreceiver that uses asyncMagnus Hagander
libpq to send queries, making the waiting for responses interruptible on platforms where PQexec() can't normally be interrupted by signals, such as win32. Fujii Masao and Magnus Hagander
2010-04-19Add an 'enable_material' GUC.Robert Haas
The logic for determining whether to materialize has been significantly overhauled for 9.0. In case there should be any doubt about whether materialization is a win in any particular case, this should provide a convenient way of seeing what happens without it; but even with enable_material turned off, we still materialize in cases where it is required for correctness. Thanks to Tom Lane for the review.
2010-04-18Fix bogus order of cleanup steps in plperl_inline_handler.Tom Lane
Per Alex Hunsaker
2010-04-18Improve sequence and sense of messages from pg_stop_backup().Simon Riggs
Now doesn't report it is waiting until it actually is waiting, plus message doesn't appear until at least 5 seconds wait, so we avoid reporting the wait before we've given the archiver a reasonable time to wake up and archive the file we just created earlier in the function. Also add new unconditional message to confirm safe completion. Now a normal, healthy execution does not report waiting at all, just safe completion.
2010-04-18Remove some additional changes in previous commit that belong elsewhere.Simon Riggs
2010-04-18Tune GetSnapshotData() during Hot Standby by avoiding loopSimon Riggs
through normal backends. Makes code clearer also, since we avoid various Assert()s. Performance of snapshots taken during recovery no longer depends upon number of read-only backends.
2010-04-16On Windows, syslogger runs in two threads. The main thread processes configHeikki Linnakangas
reload and rotation signals, and a helper thread reads messages from the pipe and writes them to the log file. However, server code isn't generally thread-safe, so if both try to do e.g palloc()/pfree() at the same time, bad things will happen. To fix that, use a critical section (which is like a mutex) to enforce that only one the threads are active at a time.
2010-04-16In standby mode, suppress repeated LOG messages about a corrupt record,Heikki Linnakangas
which just indicates that we've reached the end of valid WAL found in the standby.
2010-04-15Improve message style for messages associated with not being able toTom Lane
identify the system time zone setting. Per recent discussion.
2010-04-15Add script to enumerate the timezones in the Windows registry and compareMagnus Hagander
it with the list we have in pgtz.c, showing any differences.
2010-04-15Update XML features listPeter Eisentraut
2010-04-15Doc change: effect -> affect, per Robert HaasBruce Momjian
2010-04-14Fix plpgsql's exec_eval_expr() to ensure it returns a sane type OIDTom Lane
even when the expression is a query that returns no rows. So far as I can tell, the only caller that actually fails when a garbage OID is returned is exec_stmt_case(), which is new in 8.4 --- in all other cases, we might make a useless trip through casting logic, but we won't fail since the isnull flag will be set. Hence, backpatch only to 8.4, just in case there are apps out there that aren't expecting an error to be thrown if the query returns more or less than one column. (Which seems unlikely, since the error would be thrown if the query ever did return a row; but it's possible there's some never-exercised code out there.) Per report from Mario Splivalo.
2010-04-14Fix a problem introduced by my patch of 2010-01-12 that revised the wayTom Lane
relcache reload works. In the patched code, a relcache entry in process of being rebuilt doesn't get unhooked from the relcache hash table; which means that if a cache flush occurs due to sinval queue overrun while we're rebuilding it, the entry could get blown away by RelationCacheInvalidate, resulting in crash or misbehavior. Fix by ensuring that an entry being rebuilt has positive refcount, so it won't be seen as a target for removal if a cache flush occurs. (This will mean that the entry gets rebuilt twice in such a scenario, but that's okay.) It appears that the problem can only arise within a transaction that has previously reassigned the relfilenode of a pre-existing table, via TRUNCATE or a similar operation. Per bug #5412 from Rusty Conover. Back-patch to 8.2, same as the patch that introduced the problem. I think that the failure can't actually occur in 8.2, since it lacks the rd_newRelfilenodeSubid optimization, but let's make it work like the later branches anyway. Patch by Heikki, slightly editorialized on by me.
2010-04-14Typo fix. Kevin Grittner.Robert Haas
2010-04-14Fix minor typo in comment in xlog.cSimon Riggs
2010-04-13Allow Hot Standby to begin from a shutdown checkpoint.Heikki Linnakangas
Patch by Simon Riggs & me
2010-04-13Only try to do a graceful disconnect if we've successfully loaded theMagnus Hagander
shared library with the disconnect function in it. Fixes segmentation fault reported by Jeff Davis. Fujii Masao
2010-04-12Update the location of last removed WAL segment in shared memory onlyHeikki Linnakangas
after actually removing one, so that if we can't remove segments because WAL archiving is lagging behind, we don't unnecessarily forbid streaming the old not-yet-archived segments that are still perfectly valid. Per suggestion from Fujii Masao.
2010-04-12Need to use the start pointer of a block we read from WAL segment inHeikki Linnakangas
the calculation, not the end pointer, as pointed out by Fujii Masao.
2010-04-12Change the logic to decide when to delete old WAL segments, so that itHeikki Linnakangas
doesn't take into account how far the WAL senders are. This way a hung WAL sender doesn't prevent old WAL segments from being recycled/removed in the primary, ultimately causing the disk to fill up. Instead add standby_keep_segments setting to control how many old WAL segments are kept in the primary. This also makes it more reliable to use streaming replication without WAL archiving, assuming that you set standby_keep_segments high enough.
2010-04-09Perltidy run over the MSVC build system files, to clean up code formattingMagnus Hagander
and indentation styles.
2010-04-09Clean up inconsistent commasMagnus Hagander
2010-04-09Update list of Windows timezones we try to match localized names againstMagnus Hagander
to one that's up to date with Windows 2003R2.
2010-04-08Proceed to look for the next timezone when matching a localizedMagnus Hagander
Windows timezone name where the information in the registry is incomplete, instead of aborting. This fixes cases when the registry information is incomplete for a timezone that is alphabetically before the one that is in use. Per report from Alexander Forschner
2010-04-08Make smart shutdown work in combination with Hot Standby/Streaming Replication.Robert Haas
At present, killing the startup process does not release any locks it holds, so we must wait to stop the startup and walreceiver processes until all read-only backends have exited. Without this patch, the startup and walreceiver processes never exit, so the server gets permanently stuck in a half-shutdown state. Fujii Masao, with review, docs, and comment adjustments by me.
2010-04-07Fix to_char YYY, YY, Y format codes so that FM zero-suppression really works,Tom Lane
rather than only sort-of working as the previous attempt had left it. Clean up some unnecessary differences between the way these were coded and the way the YYYY case was coded. Update the regression test cases that proved that it wasn't working.
2010-04-07Allow quotes to be escaped in recovery.conf, by doubling them. This patchHeikki Linnakangas
also makes the parsing a little bit stricter, rejecting garbage after the parameter value and values with missing ending quotes, for example.
2010-04-07Forbid using pg_xlogfile_name() and pg_xlogfile_name_offset() duringHeikki Linnakangas
recovery. We might want to relax this in the future, but ThisTimeLineID isn't currently correct in backends during recovery, so the filename returned was wrong.
2010-04-07psql tab completion for ALTER DEFAULT PRIVILEGES and USER MAPPING FOR PUBLIC.Itagaki Takahiro
2010-04-07Add cygwin version check before using cygwin_conv_path(),Itagaki Takahiro
and use cygwin_conv_to_full_win32_path() in older versions.
2010-04-06Log the actual timezone name that we fail to look up the values for inMagnus Hagander
case the registry data doesn't follow the format we expect, to facilitate debugging.
2010-04-06Further message changes when recovery.conf parameters missing.Simon Riggs
2010-04-06Rename "Log-streaming replication parameters" header to "Standby serverHeikki Linnakangas
parameters" in recovery.conf, to match the grouping in the documentation. Fujii Masao
2010-04-06Change some debug ereports to elogs, as requested by translation team.Simon Riggs
2010-04-05Assorted tab-completion improvements in psql.Itagaki Takahiro
Add missing completions for: - ALTER SEQUENCE name OWNER TO - ALTER TYPE name RENAME TO - ALTER VIEW name ALTER COLUMN - ALTER VIEW name OWNER TO - ALTER VIEW name SET SCHEMA Fix wrong completions for: - ALTER FUNCTION/AGGREGATE name (arguments) ... "(arguments)" has been ignored. - ALTER ... SET SCHEMA "SCHEMA" has been considered as a variable name.
2010-04-05Exclude unwanted typedef symbols in pgindent, including FD_SET which is ↵Andrew Dunstan
found on some Windows platforms. Also, silence unnecessary messages and make awk happier about literal '*' on some platforms.
2010-04-05Use a new API rather than a deprecated one in in cygwin.Itagaki Takahiro
cygwin_conv_to_full_win32_path should be replaced with cygwin_conv_path.
2010-04-05Arrange to remove pg_default_acl entries completely if their ACL settingTom Lane
is changed to match the hard-wired default. This avoids accumulating useless catalog entries, and also provides a path for dropping the owning role without using DROP OWNED BY. Per yesterday's complaint from Jaime Casanova, the need to use DROP OWNED BY for that is less than obvious, so providing this alternative method might save some user frustration.
2010-04-05Fix updateAclDependencies() to not assume that ACL role dependencies can onlyTom Lane
be added during GRANT and can only be removed during REVOKE; and fix its callers to not lie to it about the existing set of dependencies when instantiating a formerly-default ACL. The previous coding accidentally failed to malfunction so long as default ACLs contain only references to the object's owning role, because that role is ignored by updateAclDependencies. However this is obviously pretty fragile, as well as being an undocumented assumption. The new coding is a few lines longer but IMO much clearer.
2010-04-05Improve phrasing of warning message for NOTIFY queue getting too full.Tom Lane
Per gripe from Peter.
2010-04-03\ddp should be recognized as such even if user appends S or + to it.Tom Lane
Those options do nothing right now, but might be wanted later, and in any case it's confusing for the command to be interpreted as \dd if anything is appended. Per Jaime Casanova.
2010-04-03Make ecpg in line with other compilers in that it deletes its output if ↵Michael Meskes
there was an error processing the input file. Work done by Zoltan.
2010-04-03Message quoting style tuningPeter Eisentraut
2010-04-02Check compulsory parameters in recovery.conf in standby_mode, per docs.Simon Riggs
2010-04-02Update a number of broken links in comments.Magnus Hagander
Josh Kupershmidt
2010-04-02Move system startup message prior to any calls out of data directory.Simon Riggs
This allows us to see what mode the server is in before it starts to perform actions that can block or hang. Otherwise server messages may not appear until after messages that say FATAL the database server is starting up.
2010-04-02FATAL errors are meant to stop ecpg immediately, e.g. because the syntax isMichael Meskes
corrupted. This error, however, does is not a compilation problem but a runtime one, so we can keep compiling but still have to declare ERROR.