On Thu, Mar 7, 2019 at 9:40 AM Tom Lane <t...@sss.pgh.pa.us> wrote: > I wonder if a better response would be, in single-user mode, to allow temp > tables to be processed as local temp tables regardless of their backend > number. (Everywhere, not just in VACUUM.)
Since commit debcec7dc31a992703911a9953e299c8d730c778 there is nothing to prevent two different backends from using the same relfilenode number, so I don't think this will work. > Also, if what someone actually wants is to drop such a temp table from > single-user mode, we should make sure that they are allowed to do so. > But the command for doing that should be "DROP TABLE", not "VACUUM". In a way I agree, but I think the reality is that some very large percentage of people who enter single user mode do so because of a wraparound-induced shutdown, and what they need is an easy way to get the system back on line. Running a catalog query to look for undropped temp tables and then dropping them one by one using DROP TABLE is not what they want. They want to be able to run one or two commands and get their database back on line. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company