1. 20 Apr, 2010 4 commits
    • Tom Lane's avatar
      Fix code that doesn't work on machines with strict alignment requirements: · 7de2dfcc
      Tom Lane authored
      must use memcpy here rather than struct assignment.
      
      In passing, rearrange some randomly-ordered declarations to be a tad less
      random.
      7de2dfcc
    • Robert Haas's avatar
      Rename standby_keep_segments to wal_keep_segments. · 481cb5d9
      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.
      481cb5d9
    • Tom Lane's avatar
      Move the responsibility for calling StartupXLOG into InitPostgres, for · c670410e
      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.
      c670410e
    • Robert Haas's avatar
      Update docs as to when WAL logging can be skipped. · ee7769bb
      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
      ee7769bb
  2. 19 Apr, 2010 5 commits
  3. 18 Apr, 2010 4 commits
  4. 16 Apr, 2010 4 commits
  5. 15 Apr, 2010 7 commits
  6. 14 Apr, 2010 5 commits
    • Tom Lane's avatar
      Fix plpgsql's exec_eval_expr() to ensure it returns a sane type OID · f7c5ff3d
      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.
      f7c5ff3d
    • Tom Lane's avatar
      Fix a problem introduced by my patch of 2010-01-12 that revised the way · 73981cb4
      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.
      73981cb4
    • Robert Haas's avatar
      Typo fix. Kevin Grittner. · 9d137a75
      Robert Haas authored
      9d137a75
    • Simon Riggs's avatar
      Fix minor typo in comment in xlog.c · 55d7556a
      Simon Riggs authored
      55d7556a
    • Bruce Momjian's avatar
      0993d294
  7. 13 Apr, 2010 4 commits
  8. 12 Apr, 2010 6 commits
  9. 09 Apr, 2010 1 commit