Amit Kapila <amit.kapil...@gmail.com> writes: > On Sat, Jun 27, 2015 at 7:40 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> I don't like this too much because it will fail badly if the caller >> is wrong about the maximum possible page number for the table, which >> seems not exactly far-fetched. (For instance, remember those kernel bugs >> we've seen that cause lseek to lie about the EOF position?)
> Considering we already have exclusive lock while doing this operation > and nobody else can perform write on this file, won't closing and > opening it again would avoid such problems. On what grounds do you base that touching faith? Quite aside from outright bugs, having lock on a table has nothing to do with whether low-level processes such as the checkpointer can touch it. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers