Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fdr/repmgr
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: fdr/repmgr
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: hack
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 15 commits
  • 13 files changed
  • 1 contributor

Commits on Dec 21, 2010

  1. Attack of whitespace pedantry

    pgsql conventions (tabs, four-spaces-wide, etc) applied all around.
    
    Also tried to fix some very tiny capitalization errors, auto-fill
    problems, and some inter-block vertical whitespacing issues.
    
    Long strings in repmgr.c were left intact, though. They are rather
    numerous and are less of a problem than tiny bits of function calls
    and comments wrapping over a line; the latter kind of problem has been
    mostly fixed.
    
    Signed-off-by: Dan Farina <drfarina@acm.org>
    Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
    Dan Farina authored and Peter van Hardenberg committed Dec 21, 2010
    Configuration menu
    Copy the full SHA
    af2edf1 View commit details
    Browse the repository at this point in the history
  2. Split up install/uninstall actions more like a standard contrib

    Signed-off-by: Dan Farina <drfarina@acm.org>
    Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
    Dan Farina authored and Peter van Hardenberg committed Dec 21, 2010
    Configuration menu
    Copy the full SHA
    778303b View commit details
    Browse the repository at this point in the history
  3. Install install/uninstall SQL also.

    Signed-off-by: Dan Farina <drfarina@acm.org>
    Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
    Dan Farina authored and Peter van Hardenberg committed Dec 21, 2010
    Configuration menu
    Copy the full SHA
    846c0b9 View commit details
    Browse the repository at this point in the history
  4. sprintf to snprintf conversion

    Move out string operations to another file, and introduce a frontend
    to snprintf for various situations.  This change is important for
    catching and eliminating sprintf overflows, which are as of now many
    times silently corrupting memory.
    
    Signed-off-by: Dan Farina <drfarina@acm.org>
    Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
    Dan Farina authored and Peter van Hardenberg committed Dec 21, 2010
    Configuration menu
    Copy the full SHA
    916c049 View commit details
    Browse the repository at this point in the history
  5. Whitespace to adjust for longer snprintf identifier

    This is done in a separate patch to try and reduce the sound and fury
    of the patch that actually did the conversion from sprintf to
    snprintf-alikes.
    
    Signed-off-by: Dan Farina <drfarina@acm.org>
    Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
    Dan Farina authored and Peter van Hardenberg committed Dec 21, 2010
    Configuration menu
    Copy the full SHA
    84b69b3 View commit details
    Browse the repository at this point in the history
  6. Initialize connection pointers to NULL

    This makes some bugs easier to find.
    
    Signed-off-by: Dan Farina <drfarina@acm.org>
    Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
    Dan Farina authored and Peter van Hardenberg committed Dec 21, 2010
    Configuration menu
    Copy the full SHA
    3f2094a View commit details
    Browse the repository at this point in the history
  7. Fix a use-after-free

    A result is being cleared while there are still pointers that
    refer to datums in it.
    
    Signed-off-by: Dan Farina <drfarina@acm.org>
    Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
    Dan Farina authored and Peter van Hardenberg committed Dec 21, 2010
    Configuration menu
    Copy the full SHA
    6cea339 View commit details
    Browse the repository at this point in the history
  8. Prevent a double-free

    This can occur because prior to this, there is a code path that looks
    like this:
    
        primaryConn = myLocalConn
    
    CloseConnections will subsequently try to free both with PQFinish.
    I'm not sure if this is the right fix -- it's more of hack -- without
    more information about design intention.
    
    One reasonable alternative would be to have CloseConnections perform
    this check itself. As-is I am pretty sure that this fix leaves a
    signal-race (when CloseConnections is called, without the check, in
    the interrupt handler) unfixed.
    
    Signed-off-by: Dan Farina <drfarina@acm.org>
    Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
    Dan Farina authored and Peter van Hardenberg committed Dec 21, 2010
    Configuration menu
    Copy the full SHA
    309bb92 View commit details
    Browse the repository at this point in the history
  9. Canonicalize whitespace

    Signed-off-by: Dan Farina <drfarina@acm.org>
    Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
    Dan Farina authored and Peter van Hardenberg committed Dec 21, 2010
    Configuration menu
    Copy the full SHA
    fc13d50 View commit details
    Browse the repository at this point in the history
  10. Make various buffers larger

    MAXLEN definitely needed to be bigger to properly format fairly common
    connection strings.  In addition, the reliance on xsnprintf helps
    detect cases where even this buffer is not long enough.
    
    the buffer in parse_config has been made bigger in a bit of sloppy
    programming, but what really needs to happen is reporting when a line
    cannot be properly parsed/is too big for the buffer.  That is just a
    kludge.
    
    Signed-off-by: Dan Farina <drfarina@acm.org>
    Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
    Dan Farina authored and Peter van Hardenberg committed Dec 21, 2010
    Configuration menu
    Copy the full SHA
    ec73a07 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2010

  1. Merge remote branch 'gbartolini/gabriele-2010-12' into heroku

    Conflicts:
    	config.c
    	dbutils.c
    	dbutils.h
    	repmgrd.c
    
    Signed-off-by: Dan Farina <drfarina@acm.org>
    Dan Farina committed Dec 22, 2010
    Configuration menu
    Copy the full SHA
    7b0a142 View commit details
    Browse the repository at this point in the history
  2. Avoid a use-after-free in verbose logging

    Previously, this print would use memory freed by PQClear previously.
    
    Signed-off-by: Dan Farina <drfarina@acm.org>
    Dan Farina committed Dec 22, 2010
    Configuration menu
    Copy the full SHA
    faddaed View commit details
    Browse the repository at this point in the history

Commits on Dec 23, 2010

  1. Fix unsafe string handling

    It looks like the old code would overflow in some cases.
    
    Signed-off-by: Dan Farina <drfarina@acm.org>
    Dan Farina committed Dec 23, 2010
    Configuration menu
    Copy the full SHA
    620974b View commit details
    Browse the repository at this point in the history
  2. Avoid a use-after-free in verbose logging (again)

    Previously, this print would use memory freed by PQClear previously.
    
    Also allocate/free memory to prevent this tiny memory leak.
    
    Signed-off-by: Dan Farina <drfarina@acm.org>
    Dan Farina committed Dec 23, 2010
    Configuration menu
    Copy the full SHA
    29c39c2 View commit details
    Browse the repository at this point in the history
  3. Hack to get passwords in recovery.conf

    Signed-off-by: Dan Farina <drfarina@acm.org>
    Dan Farina committed Dec 23, 2010
    Configuration menu
    Copy the full SHA
    f969dca View commit details
    Browse the repository at this point in the history
Loading