Re: drop/truncate table sucks for large values of shared buffers - Mailing list pgsql-hackers

From Tom Lane
Subject Re: drop/truncate table sucks for large values of shared buffers
Date
Msg-id 19465.1435505734@sss.pgh.pa.us
Whole thread Raw
In response to Re: drop/truncate table sucks for large values of shared buffers  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: drop/truncate table sucks for large values of shared buffers  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
Amit Kapila <amit.kapila16@gmail.com> writes:
> On Sat, Jun 27, 2015 at 7:40 PM, Tom Lane <tgl@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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Solaris testers wanted for strxfrm() behavior
Next
From: Sawada Masahiko
Date:
Subject: Re: Semantics of pg_file_settings view