Re: No warning/error trying to vacuum other session's temp table - Mailing list pgsql-general

From Tom Lane
Subject Re: No warning/error trying to vacuum other session's temp table
Date
Msg-id 9768.1566931899@sss.pgh.pa.us
Whole thread Raw
In response to No warning/error trying to vacuum other session's temp table  (Jerry Sievers <gsievers19@comcast.net>)
List pgsql-general
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



pgsql-general by date:

Previous
From: Bikram Majumdar
Date:
Subject: Re: Question on pgwatch
Next
From: stan
Date:
Subject: Work hours?