- 20 Apr, 2010 4 commits
-
-
Tom Lane authored
must use memcpy here rather than struct assignment. In passing, rearrange some randomly-ordered declarations to be a tad less random.
-
Robert Haas authored
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.
-
Tom Lane authored
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.
-
Robert Haas authored
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
-
- 19 Apr, 2010 5 commits
-
-
Simon Riggs authored
rejection retains same message as before.
-
Simon Riggs authored
This prevents a rare, yet possible race condition at the exact moment of transition from recovery to normal running.
-
Tom Lane authored
these --- maybe because they're effectively unused? MSVC does complain though, per buildfarm.
-
Magnus Hagander authored
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
-
Robert Haas authored
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.
-
- 18 Apr, 2010 4 commits
-
-
Tom Lane authored
Per Alex Hunsaker
-
Simon Riggs authored
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.
-
Simon Riggs authored
-
Simon Riggs authored
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.
-
- 16 Apr, 2010 4 commits
-
-
Robert Haas authored
-
Heikki Linnakangas authored
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.
-
Heikki Linnakangas authored
which just indicates that we've reached the end of valid WAL found in the standby.
-
Bruce Momjian authored
-
- 15 Apr, 2010 7 commits
-
-
Peter Eisentraut authored
-
Peter Eisentraut authored
backpatched to 8.1, where this first appeared
-
Tom Lane authored
identify the system time zone setting. Per recent discussion.
-
Heikki Linnakangas authored
-
Magnus Hagander authored
it with the list we have in pgtz.c, showing any differences.
-
Peter Eisentraut authored
-
Bruce Momjian authored
-
- 14 Apr, 2010 5 commits
-
-
Tom Lane authored
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.
-
Tom Lane authored
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.
-
Robert Haas authored
-
Simon Riggs authored
-
Bruce Momjian authored
-
- 13 Apr, 2010 4 commits
-
-
Heikki Linnakangas authored
Patch by Simon Riggs & me
-
Bruce Momjian authored
-
Magnus Hagander authored
Fujii Masao
-
Magnus Hagander authored
shared library with the disconnect function in it. Fixes segmentation fault reported by Jeff Davis. Fujii Masao
-
- 12 Apr, 2010 6 commits
-
-
Bruce Momjian authored
users look at the referenced section for examples, per idea from Greg Smith.
-
Bruce Momjian authored
archiving example, per suggestion from Greg Smith.
-
Heikki Linnakangas authored
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.
-
Heikki Linnakangas authored
the calculation, not the end pointer, as pointed out by Fujii Masao.
-
Heikki Linnakangas authored
standby_keep_segments.
-
Heikki Linnakangas authored
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.
-
- 09 Apr, 2010 1 commit
-
-
Magnus Hagander authored
and indentation styles.
-