From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Simon Riggs <simon(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: drop/truncate table sucks for large values of shared buffers |
Date: | 2015-06-30 06:40:04 |
Message-ID: | CANP8+j+rS1k=NTBbpScNyo=VVWwGgb_n7ro9qv=O5nSn6azzJw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 30 June 2015 at 07:34, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> On Tue, Jun 30, 2015 at 11:00 AM, Simon Riggs <simon(at)2ndquadrant(dot)com>
> wrote:
> >
> > On 30 June 2015 at 05:02, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> >>
> >> On Mon, Jun 29, 2015 at 7:18 PM, Simon Riggs <simon(at)2ndquadrant(dot)com>
> wrote:
> >> >
> >> > On 28 June 2015 at 17:17, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> >>
> >> > If lseek fails badly then SeqScans would give *silent* data loss,
> which in my view is worse. Just added pages aren't the only thing we might
> miss if lseek is badly wrong.
> >> >
> >>
> >> So for the purpose of this patch, do we need to assume that
> >> lseek can give us wrong size of file and we should add preventive
> >> checks and other handling for the same?
> >> I am okay to change that way, if we are going to have that as assumption
> >> in out code wherever we are using it or will use it in-future, otherwise
> >> we will end with some preventive checks which are actually not required.
> >
> >
> > They're preventative checks. You always hope it is wasted effort.
> >
>
> I am not sure if Preventative checks (without the real need) are okay if
> they
> are not-cheap which could happen in this case. I think Validating
> buffer-tag
> would require rel or sys cache lookup.
>
True, so don't do that.
Keep a list of dropped relations and have the checkpoint process scan the
buffer pool every 64 tables, kinda like AbsorbFsync
All the heavy lifting gets done in a background process and we know we're
safe.
--
Simon Riggs http://www.2ndQuadrant.com/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2015-06-30 07:02:25 | Reducing ClogControlLock contention |
Previous Message | Simon Riggs | 2015-06-30 06:36:55 | Re: Reduce ProcArrayLock contention |