Re: [RFC] Should smgrtruncate() avoid sending sinval message for temp relations

From: "MauMau" <maumau307(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [RFC] Should smgrtruncate() avoid sending sinval message for temp relations
Date: 2014-07-23 16:17:54
Message-ID: 4985ECDB74BE44588CF9BDFBFD2696DE@maumau
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
> This seems like a pretty unsafe suggestion, because the smgr level doesn't
> know or care whether relations are temp; files are files. In any case it
> would only paper over one specific instance of whatever problem you're
> worried about, because sinval messages definitely do need to be sent in
> general.

I'm sorry I don't show the exact problem yet. Apart from that, I understood
that you insist it's not appropriate for smgr to be aware of whether the
file is a temporary relation, in terms of module layering. However, it
doesn't seem so in the current implementation. md.c, which is a layer under
or part of smgr, uses SmgrIsTemp(). In addition, as the name suggests,
SmgrIsTemp() is a function of smgr, which is defined in smgr.h. So, it's
not inappropriate for smgr to use it.

What I wanted to ask is whether and why sinval messages are really necessary
for session-private objects like temp relations. I thought shared inval is,
as the name indicates, for objects "shared" among sessions. If so, sinval
for session-private objects doesn't seem to match the concept.

Regards
MauMau

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2014-07-23 16:39:34 Re: gaussian distribution pgbench -- splits v4
Previous Message Tom Lane 2014-07-23 16:09:11 Re: Doing better at HINTing an appropriate column within errorMissingColumn()