Thread

Commits

  1. Fix incorrect ordering of operations in pg_resetwal and pg_rewind.

  1. -D option of pg_resetwal is only works with absolute path

    tushar <tushar.ahuja@enterprisedb.com> — 2018-05-23T06:04:19Z

    Hi,
    
    In the  latest PG v11,  found that  -D option of pg_resetwal is only 
    works with absolute path .. not with relative path
    
    e.g
    
    Not Working -
    
    [centos@localhost bin]$ ./pg_resetwal -D data
    pg_resetwal: could not read permissions of directory "data": No such 
    file or directory
    
    Working -
    
    [centos@localhost bin]$ ./pg_resetwal -D 
    /home/centos/pg11_22may/postgresql/edbpsql/bin/data
    Write-ahead log reset
    
    Is this something expected  in v11 ?
    
    -- 
    regards,tushar
    EnterpriseDB  https://www.enterprisedb.com/
    The Enterprise PostgreSQL Company
    
    
    
    
  2. Re: -D option of pg_resetwal is only works with absolute path

    Tom Lane <tgl@sss.pgh.pa.us> — 2018-05-23T14:08:33Z

    tushar <tushar.ahuja@enterprisedb.com> writes:
    > In the  latest PG v11,  found that  -D option of pg_resetwal is only 
    > works with absolute path .. not with relative path
    
    Confirmed here.  This did work in previous releases, so I'd say it's
    unquestionably a bug.
    
    [ diffs v10 against head... ]
    
    Seems to be caused by careless placement of new umask-changing code.
    I wonder how many other places that patch broke similarly.
    
    			regards, tom lane
    
    
    
  3. Re: -D option of pg_resetwal is only works with absolute path

    David Steele <david@pgmasters.net> — 2018-05-23T15:34:19Z

    On 5/23/18 10:08 AM, Tom Lane wrote:
    > tushar <tushar.ahuja@enterprisedb.com> writes:
    >> In the  latest PG v11,  found that  -D option of pg_resetwal is only
    >> works with absolute path .. not with relative path
    > 
    > Confirmed here.  This did work in previous releases, so I'd say it's
    > unquestionably a bug.
    > 
    > [ diffs v10 against head... ]
    > 
    > Seems to be caused by careless placement of new umask-changing code.
    > I wonder how many other places that patch broke similarly.
    
    I'll look into this today.
    
    -- 
    -David
    david@pgmasters.net
    
    
    
  4. Re: -D option of pg_resetwal is only works with absolute path

    Tom Lane <tgl@sss.pgh.pa.us> — 2018-05-23T15:35:29Z

    David Steele <david@pgmasters.net> writes:
    > On 5/23/18 10:08 AM, Tom Lane wrote:
    >> Seems to be caused by careless placement of new umask-changing code.
    >> I wonder how many other places that patch broke similarly.
    
    > I'll look into this today.
    
    I pushed a patch already, although certainly an additional pair of eyes
    on the issue would be good.
    
    			regards, tom lane
    
    
    
  5. Re: -D option of pg_resetwal is only works with absolute path

    David Steele <david@pgmasters.net> — 2018-05-23T15:40:48Z

    On 5/23/18 11:35 AM, Tom Lane wrote:
    > David Steele <david@pgmasters.net> writes:
    >> On 5/23/18 10:08 AM, Tom Lane wrote:
    >>> Seems to be caused by careless placement of new umask-changing code.
    >>> I wonder how many other places that patch broke similarly.
    > 
    >> I'll look into this today.
    > 
    > I pushed a patch already, although certainly an additional pair of eyes
    > on the issue would be good.
    
    Looks good to me.  Thanks!
    
    -- 
    -David
    david@pgmasters.net
    
    
    
  6. Re: -D option of pg_resetwal is only works with absolute path

    Michael Paquier <michael@paquier.xyz> — 2018-05-23T23:45:03Z

    On Wed, May 23, 2018 at 11:40:48AM -0400, David Steele wrote:
    > On 5/23/18 11:35 AM, Tom Lane wrote:
    >> I pushed a patch already, although certainly an additional pair of eyes
    >> on the issue would be good.
    > 
    > Looks good to me.  Thanks!
    
    The TAP tests cannot catch that as all paths are absolute in
    PostgresNode.pm.  We could easily have tests using chdir though.
    Thoughts?
    --
    Michael