• T
    Add support for doing late row locking in FDWs. · afb9249d
    Tom Lane 提交于
    Previously, FDWs could only do "early row locking", that is lock a row as
    soon as it's fetched, even though local restriction/join conditions might
    discard the row later.  This patch adds callbacks that allow FDWs to do
    late locking in the same way that it's done for regular tables.
    
    To make use of this feature, an FDW must support the "ctid" column as a
    unique row identifier.  Currently, since ctid has to be of type TID,
    the feature is of limited use, though in principle it could be used by
    postgres_fdw.  We may eventually allow FDWs to specify another data type
    for ctid, which would make it possible for more FDWs to use this feature.
    
    This commit does not modify postgres_fdw to use late locking.  We've
    tested some prototype code for that, but it's not in committable shape,
    and besides it's quite unclear whether it actually makes sense to do late
    locking against a remote server.  The extra round trips required are likely
    to outweigh any benefit from improved concurrency.
    
    Etsuro Fujita, reviewed by Ashutosh Bapat, and hacked up a lot by me
    afb9249d
fdwhandler.sgml 55.4 KB