aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* Only send cleanup_info messages if VACUUM removes any tuples.Simon Riggs2010-04-21
| | | | | | | There is no other purpose for this message type than to report the latestRemovedXid of removed tuples, prior to index scans. Removes overlooked path for sending invalid latestRemovedXid. Fixes buildfarm failure on centaur.
* Relax locking during GetCurrentVirtualXIDs(). Earlier improvementsSimon Riggs2010-04-21
| | | | | | | | | | to handling of btree delete records mean that all snapshot conflicts on standby now have a valid, useful latestRemovedXid. Our earlier approach using LW_EXCLUSIVE was useful when we didnt always have a valid value, though is no longer useful or necessary. Asserts added to code path to prove and ensure this is the case. This will reduce contention and improve performance of larger Hot Standby servers.
* Fix oversight in collecting values for cleanup_info records.Simon Riggs2010-04-21
| | | | | | | vacuum_log_cleanup_info() now generates log records with a valid latestRemovedXid set in all cases. Also be careful not to zero the value when we do a round of vacuuming part-way through lazy_scan_heap(). Incidentally, this reduces frequency of conflicts in Hot Standby.
* Fix pg_hba.conf matching so that replication connections only match recordsTom Lane2010-04-21
| | | | | | | | | with database = replication. The previous coding would allow them to match ordinary records too, but that seems like a recipe for security breaches. Improve the messages associated with no-such-pg_hba.conf entry to report replication connections as such, since that's now a critical aspect of whether the connection matches. Make some cursory improvements in the related documentation, too.
* Move the check for whether walreceiver has authenticated as a superuserTom Lane2010-04-21
| | | | | from walsender.c, where it didn't really belong, to postinit.c where it does belong (and is essentially free, too).
* Arrange for client authentication to occur before we select a specificTom Lane2010-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | database to connect to. This is necessary for the walsender code to work properly (it was previously using an untenable assumption that template1 would always be available to connect to). This also gets rid of a small security shortcoming that was introduced in the original patch to eliminate the flat authentication files: before, you could find out whether or not the requested database existed even if you couldn't pass the authentication checks. The changes needed to support this are mainly just to treat pg_authid and pg_auth_members as nailed relations, so that we can read them without having to be able to locate real pg_class entries for them. This mechanism was already debugged for pg_database, but we hadn't recognized the value of applying it to those catalogs too. Since the current code doesn't have support for accessing toast tables before we've brought up all of the relcache, remove pg_authid's toast table to ensure that no one can store an out-of-line toasted value of rolpassword. The case seems quite unlikely to occur in practice, and was effectively unsupported anyway in the old "flatfiles" implementation. Update genbki.pl to actually implement the same rules as bootstrap.c does for not-nullability of catalog columns. The previous coding was a bit cheesy but worked all right for the previous set of bootstrap catalogs. It does not work for pg_authid, where rolvaliduntil needs to be nullable. Initdb forced due to minor catalog changes (mainly the toast table removal).
* Fix code that doesn't work on machines with strict alignment requirements:Tom Lane2010-04-20
| | | | | | | must use memcpy here rather than struct assignment. In passing, rearrange some randomly-ordered declarations to be a tad less random.
* Rename standby_keep_segments to wal_keep_segments.Robert Haas2010-04-20
| | | | | | Also, make the name of the GUC and the name of the backing variable match. Alnong the way, clean up a couple of slight typographical errors in the related docs.
* Move the responsibility for calling StartupXLOG into InitPostgres, forTom Lane2010-04-20
| | | | | | | | | | | | | those process types that go through InitPostgres; in particular, bootstrap and standalone-backend cases. This ensures that we have set up a PGPROC and done some other basic initialization steps (corresponding to the if (IsUnderPostmaster) block in AuxiliaryProcessMain) before we attempt to run WAL recovery in a standalone backend. As was discovered last September, this is necessary for some corner-case code paths during WAL recovery, particularly end-of-WAL cleanup. Moving the bootstrap case here too is not necessary for correctness, but it seems like a good idea since it reduces the number of distinct code paths.
* Update docs as to when WAL logging can be skipped.Robert Haas2010-04-20
| | | | | | | | In 8.4 and prior, WAL-logging could potentially be skipped whenever archive_mode=off. With streaming replication, this is now true only if max_wal_senders=0. Fujii Masao, with light copyediting by me
* Add new message for explicit rejection by pg_hba.conf. ImplicitSimon Riggs2010-04-19
| | | | rejection retains same message as before.
* Check RecoveryInProgress() while holding ProcArrayLock during snapshots.Simon Riggs2010-04-19
| | | | | This prevents a rare, yet possible race condition at the exact moment of transition from recovery to normal running.
* Fix uninitialized local variables. Not sure why gcc doesn't complain aboutTom Lane2010-04-19
| | | | | these --- maybe because they're effectively unused? MSVC does complain though, per buildfarm.
* Add wrapper function libpqrcv_PQexec() in the walreceiver that uses asyncMagnus Hagander2010-04-19
| | | | | | | | 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
* Add an 'enable_material' GUC.Robert Haas2010-04-19
| | | | | | | | | | | 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.
* Fix bogus order of cleanup steps in plperl_inline_handler.Tom Lane2010-04-18
| | | | Per Alex Hunsaker
* Improve sequence and sense of messages from pg_stop_backup().Simon Riggs2010-04-18
| | | | | | | | | | | 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.
* Remove some additional changes in previous commit that belong elsewhere.Simon Riggs2010-04-18
|
* Tune GetSnapshotData() during Hot Standby by avoiding loopSimon Riggs2010-04-18
| | | | | | | 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.
* Provide better guidance for adjusting shared_buffers.Robert Haas2010-04-16
|
* On Windows, syslogger runs in two threads. The main thread processes configHeikki Linnakangas2010-04-16
| | | | | | | | 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.
* In standby mode, suppress repeated LOG messages about a corrupt record,Heikki Linnakangas2010-04-16
| | | | | which just indicates that we've reached the end of valid WAL found in the standby.
* Document that autovacuum cannot vacuum or analyze temporary tables.Bruce Momjian2010-04-16
|
* Improve punctuationPeter Eisentraut2010-04-15
|
* IP port -> TCP portPeter Eisentraut2010-04-15
| | | | backpatched to 8.1, where this first appeared
* Improve message style for messages associated with not being able toTom Lane2010-04-15
| | | | identify the system time zone setting. Per recent discussion.
* Fix typo, spotted by Erik Rijkers.Heikki Linnakangas2010-04-15
|
* Add script to enumerate the timezones in the Windows registry and compareMagnus Hagander2010-04-15
| | | | it with the list we have in pgtz.c, showing any differences.
* Update XML features listPeter Eisentraut2010-04-15
|
* Doc change: effect -> affect, per Robert HaasBruce Momjian2010-04-15
|
* Fix plpgsql's exec_eval_expr() to ensure it returns a sane type OIDTom Lane2010-04-14
| | | | | | | | | | | | | | | 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.
* Fix a problem introduced by my patch of 2010-01-12 that revised the wayTom Lane2010-04-14
| | | | | | | | | | | | | | | | | | | | | 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.
* Typo fix. Kevin Grittner.Robert Haas2010-04-14
|
* Fix minor typo in comment in xlog.cSimon Riggs2010-04-14
|
* Doc change: anyways -> anyway; Erik RijkersBruce Momjian2010-04-14
|
* Allow Hot Standby to begin from a shutdown checkpoint.Heikki Linnakangas2010-04-13
| | | | Patch by Simon Riggs & me
* Add "SSD" acronym mention for solid state drive mention.Bruce Momjian2010-04-13
|
* Fix typo.Magnus Hagander2010-04-13
| | | | Fujii Masao
* Only try to do a graceful disconnect if we've successfully loaded theMagnus Hagander2010-04-13
| | | | | | | shared library with the disconnect function in it. Fixes segmentation fault reported by Jeff Davis. Fujii Masao
* Remove example of archive_command from configure section; instead haveBruce Momjian2010-04-12
| | | | | users look at the referenced section for examples, per idea from Greg Smith.
* Spell out full archive directory specification in 'test -f' continuousBruce Momjian2010-04-12
| | | | archiving example, per suggestion from Greg Smith.
* Update the location of last removed WAL segment in shared memory onlyHeikki Linnakangas2010-04-12
| | | | | | | 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.
* Need to use the start pointer of a block we read from WAL segment inHeikki Linnakangas2010-04-12
| | | | the calculation, not the end pointer, as pointed out by Fujii Masao.
* Adjust paragraph about monitoring streaming replication, now that we haveHeikki Linnakangas2010-04-12
| | | | standby_keep_segments.
* Change the logic to decide when to delete old WAL segments, so that itHeikki Linnakangas2010-04-12
| | | | | | | | | | 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.
* Perltidy run over the MSVC build system files, to clean up code formattingMagnus Hagander2010-04-09
| | | | and indentation styles.
* Clean up inconsistent commasMagnus Hagander2010-04-09
|
* Update list of Windows timezones we try to match localized names againstMagnus Hagander2010-04-09
| | | | to one that's up to date with Windows 2003R2.
* Proceed to look for the next timezone when matching a localizedMagnus Hagander2010-04-08
| | | | | | | | | | 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
* Make smart shutdown work in combination with Hot Standby/Streaming Replication.Robert Haas2010-04-08
| | | | | | | | | | 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.