Thread

Commits

  1. Improve some error message strings and errcodes

  1. Incorrect use of errcode_for_file_access in backend code

    Michael Paquier <michael@paquier.xyz> — 2018-09-02T20:07:47Z

    Hi all,
    
    While looking at another patch for slot.c, I have noticed what looks
    like incorrect use of errcode_for_file_access:
    - errcode_for_file_access() is used with rmtree(), which makes no sense
    as this comes from common/rmtree.c, and a warning already shows up using
    %m.
    - ERRCODE_DATA_CORRUPTED is not used to mention corrupted data, and
    instead errcode_for_file_access() gets called.
    
    Wouldn't something like the attached provide more adapted error
    handling?  That's mostly error handling beautification, so I would be
    incline to just fix HEAD.
    
    (I have noticed some inconsistent error string format in autoprewarm.c
    on the way.)
    
    Thoughts?
    --
    Michael
    
  2. Re: Incorrect use of errcode_for_file_access in backend code

    Michael Paquier <michael@paquier.xyz> — 2018-09-04T18:14:17Z

    On Sun, Sep 02, 2018 at 01:07:47PM -0700, Michael Paquier wrote:
    > Wouldn't something like the attached provide more adapted error
    > handling?  That's mostly error handling beautification, so I would be
    > incline to just fix HEAD.
    > 
    > (I have noticed some inconsistent error string format in autoprewarm.c
    > on the way.)
    
    Pushed as d6e98eb as that will reduce a bit more translator's work,
    after noticing one error string in basebackup.c which could be unified
    with the rest.
    --
    Michael