Skip to content
Snippets Groups Projects
  1. Feb 09, 2014
  2. Jul 15, 2013
    • Stephen Frost's avatar
      Correct off-by-one when reading from pipe · a3957ac1
      Stephen Frost authored
      In pg_basebackup.c:reached_end_position(), we're reading from an
      internal pipe with our own background process but we're possibly
      reading more bytes than will actually fit into our buffer due to
      an off-by-one error.  As we're reading from an internal pipe
      there's no real risk here, but it's good form to not depend on
      such convenient arrangements.
      
      Bug spotted by the Coverity scanner.
      
      Back-patch to 9.2 where this showed up.
      a3957ac1
  3. Mar 25, 2013
    • Heikki Linnakangas's avatar
      Add a server version check to pg_basebackup and pg_receivexlog. · 6980497f
      Heikki Linnakangas authored
      These programs don't work against 9.0 or earlier servers, so check that when
      the connection is made. That's better than a cryptic error message you got
      before.
      
      Also, these programs won't work with a 9.3 server, because the WAL streaming
      protocol was changed in a non-backwards-compatible way. As a general rule,
      we don't make any guarantee that an old client will work with a new server,
      so check that. However, allow a 9.1 client to connect to a 9.2 server, to
      avoid breaking environments that currently work; a 9.1 client happens to
      work with a 9.2 server, even though we didn't make any great effort to
      ensure that.
      
      This patch is for the 9.1 and 9.2 branches, I'll commit a similar patch to
      master later. Although this isn't a critical bug fix, it seems safe enough
      to back-patch. The error message you got when connecting to a 9.3devel
      server without this patch was cryptic enough to warrant backpatching.
      6980497f
  4. Aug 27, 2012
  5. Aug 24, 2012
  6. Jul 31, 2012
    • Alvaro Herrera's avatar
      pg_basebackup: stylistic adjustments · 65f33352
      Alvaro Herrera authored
      The most user-visible part of this is to change the long options
      --statusint and --noloop to --status-interval and --no-loop,
      respectively, per discussion.
      
      Also, consistently enclose file names in double quotes, per our
      conventions; and consistently use the term "transaction log file" to
      talk about WAL segments.  (Someday we may need to go over this
      terminology and make it consistent across the whole source code.)
      
      Finally, reflow the code to better fit in 80 columns, and have pgindent
      fix it up some more.
      65f33352
  7. Jun 18, 2012
  8. Jun 11, 2012
  9. Jun 10, 2012
  10. May 27, 2012
  11. May 25, 2012
    • Magnus Hagander's avatar
      Fix base backup streaming xlog from standby · 31d96581
      Magnus Hagander authored
      When backing up from a standby server, the backup process
      will not automatically switch xlog segment. So we must
      accept a partially transferred xlog file in this case, but
      rename it into position anyway.
      
      In passing, merge the two callbacks for segment end and
      stop stream into a single callback, since their implementations
      were close to identical, and rename this callback to
      reflect that it stops streaming rather than continues it.
      
      Patch by Magnus Hagander, review by Fujii Masao
      31d96581
  12. Mar 30, 2012
  13. Mar 29, 2012
  14. Mar 28, 2012
  15. Mar 24, 2012
  16. Mar 02, 2012
    • Peter Eisentraut's avatar
      Fix incorrect uses of gzFile · d923125b
      Peter Eisentraut authored
      gzFile is already a pointer, so code like
      
      gzFile *handle = gzopen(...)
      
      is wrong.
      
      This used to pass silently because gzFile used to be defined as void*,
      and you can assign a void* to a void**.  But somewhere between zlib
      versions 1.2.3.4 and 1.2.6, the definition of gzFile was changed to
      struct gzFile_s *, and with that new definition this usage causes
      compiler warnings.
      
      So remove all those extra pointer decorations.
      
      There is a related issue in pg_backup_archiver.h, where
      
      FILE       *FH;             /* General purpose file handle */
      
      is used throughout pg_dump as sometimes a real FILE* and sometimes a
      gzFile handle, which also causes warnings now.  This is not yet fixed
      here, because it might need more code restructuring.
      d923125b
  17. Feb 24, 2012
  18. Jan 20, 2012
  19. Jan 02, 2012
  20. Dec 28, 2011
  21. Dec 11, 2011
  22. Oct 26, 2011
    • Bruce Momjian's avatar
      Fix pg_bsd_indent bug where newlines were not being trimmed from typedef · 360429e1
      Bruce Momjian authored
      lines.  Update pg_bsd_indent required version to 1.1 (and update ftp
      site).
      
      Problem reported by Magnus.
      360429e1
    • Magnus Hagander's avatar
      Implement streaming xlog for backup tools · d9bae531
      Magnus Hagander authored
      Add option for parallel streaming of the transaction log while a
      base backup is running, to get the logfiles before the server has
      removed them.
      
      Also add a tool called pg_receivexlog, which streams the transaction
      log into files, creating a log archive without having to wait for
      segments to complete, thus decreasing the window of data loss without
      having to waste space using archive_timeout. This works best in
      combination with archive_command - suggested usage docs etc coming later.
      d9bae531
  23. Aug 17, 2011
  24. Aug 16, 2011
  25. Jul 26, 2011
  26. Jun 15, 2011
    • Tom Lane's avatar
      Fix oversights in pg_basebackup's -z (compression) option. · 31156ce8
      Tom Lane authored
      The short-form -z switch didn't work, for lack of telling getopt_long
      about it; and even if specified long-form, it failed to do anything,
      because the various tests elsewhere in the file would take
      Z_DEFAULT_COMPRESSION (which is -1) as meaning "don't compress".
      
      Per bug #6060 from Shigehiro Honda, though I editorialized on his patch
      a bit.
      31156ce8
  27. Jun 09, 2011
  28. May 30, 2011
  29. May 29, 2011
  30. May 24, 2011
  31. May 04, 2011
  32. Apr 27, 2011
    • Magnus Hagander's avatar
      timeline is not needed in BaseBackup() · 6693eb72
      Magnus Hagander authored
      This code was accidentally part of the patch, it's only
      needed for the code that's for 9.2. Not needing the timeline
      also removes the need to call IDENTIFY_SYSTEM.
      
      Noted by Peter E.
      6693eb72
  33. Apr 10, 2011
Loading