pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jerry Sievers <gsievers19@comcast.net>
Cc: pgsql-general@postgresql.org
Subject: Re: No warning/error trying to vacuum other session's temp table
Date: Tue, 27 Aug 2019 14:51:39 -0400
Message-ID: <9768.1566931899@sss.pgh.pa.us> (raw)
In-Reply-To: <87zhju7ar0.fsf@jsievers.enova.com>
References: <87zhju7ar0.fsf@jsievers.enova.com>

Jerry Sievers <gsievers19@comcast.net> writes:
> As seen below, the command response VACUUM is output , but adding the
> VERBOSe keyword results in no additional output.

Yeah, per the code:

    /*
     * Silently ignore tables that are temp tables of other backends ---
     * trying to vacuum these will lead to great unhappiness, since their
     * contents are probably not up-to-date on disk.  (We don't throw a
     * warning here; it would just lead to chatter during a database-wide
     * VACUUM.)
     */
    if (RELATION_IS_OTHER_TEMP(onerel))
    {
        relation_close(onerel, lmode);
        PopActiveSnapshot();
        CommitTransactionCommand();
        return false;
    }

At the point where this is being done, we don't know whether the table was
explicitly named or not, so we really can't issue a message.  Perhaps it'd
make sense to add an additional test earlier, where we do know that.
On the other hand, nobody has ever complained about this before.

			regards, tom lane





view thread (2+ messages)

Message-ID: <9768.1566931899@sss.pgh.pa.us>
Permalink:  ../9768.1566931899@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9768.1566931899@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, gsievers19@comcast.net
  Subject: Re: No warning/error trying to vacuum other session's temp table
  In-Reply-To: <9768.1566931899@sss.pgh.pa.us>
  References: <87zhju7ar0.fsf@jsievers.enova.com> <9768.1566931899@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox