Thread

Commits

  1. Simplify do_pg_start_backup's API by opening pg_tblspc internally.

  1. Silly API for do_pg_start_backup()

    Tom Lane <tgl@sss.pgh.pa.us> — 2017-12-04T18:58:07Z

    Why is it that do_pg_start_backup() expects its callers to pass in
    an open DIR pointer for the pg_tblspc directory, rather than doing
    the AllocateDir call for itself?  This complicates the callers, provides
    no flexibility (since do_pg_start_backup() is hardwired to know that
    pg_tblspc is what it was passed), and it doesn't seem to me to offer any
    robustness either.  There are a couple of comments suggesting that
    somebody thought that opening the directory early might be good, but
    there's no defense of why, and I can't see that holding the directory open
    across a checkpoint request is adding robustness; if anything more the
    reverse, since it's a kernel resource we don't need during that phase.
    
    Barring objection I'll remove the tblspcdir parameter and have
    do_pg_start_backup() open and close the directory immediately
    around the loop where it's read, like every other case in the
    backend.
    
    			regards, tom lane
    
    
    
  2. Re: Silly API for do_pg_start_backup()

    Michael Paquier <michael.paquier@gmail.com> — 2017-12-05T02:05:41Z

    On Tue, Dec 5, 2017 at 3:58 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
    > Barring objection I'll remove the tblspcdir parameter and have
    > do_pg_start_backup() open and close the directory immediately
    > around the loop where it's read, like every other case in the
    > backend.
    
    +1. Thanks for the change. What has been committed in 066bc21 looks good to me..
    -- 
    Michael