Re: PATCH: Exclude temp relations from base backup

Stephen Frost <sfrost@snowman.net>

From: Stephen Frost <sfrost@snowman.net>
To: Teodor Sigaev <teodor@sigaev.ru>
Cc: David Steele <david@pgmasters.net>, Pg Hackers <pgsql-hackers@postgresql.org>, Thomas Munro <thomas.munro@enterprisedb.com>, Adam Brightwell <adam.brightwell@crunchydata.com>, Masahiko Sawada <sawada.mshk@gmail.com>
Date: 2018-03-26T17:06:19Z
Lists: pgsql-hackers
Greetings,

* Teodor Sigaev (teodor@sigaev.ru) wrote:
> Will autovacuum (or something else) complain about absense of relfile during
> orphan table deleting? I mean, you get a base backup without temp tables,
> then you try to run postgres on it and will it complain about existing
> record in pg_class and absence of corresponding relfile?

I would certainly hope not considering that's what happens during
regular crash recovery also, so if there's an issue with that, we'd have
a problem in released versions.

There's an independent discussion that was being had recently about how
to make sure those records in pg_class get cleaned up in a reasonable
timeframe and don't lead to problems with wrap-arounds, but that's a
different and pre-existing issue.

Thanks!

Stephen

Commits

  1. Skip temp tables from basebackup.