Michael Paquier <michael@xxxxxxxxxxx> writes: > On Wed, Mar 14, 2018 at 04:17:54PM +0100, Hans Schou wrote: >> I got the message >> ERROR: could not open relation with OID 0 >> when running the "General Table Size Information" from >> https://wiki.postgresql.org/wiki/Disk_Usage >> I'm running version 9.1.9 so it should be working according to the >> wiki. > You should update and upgrade. 9.1 has fallen out of community support > 1 year and a half ago, and 9.1.9 is utterly outdated. The query does fail on < 9.2, because on rows with no reltoastrelid it will call pg_total_relation_size(0), and we didn't make those functions forgiving of bogus OIDs until 9.2. Given that pre-9.2 is well out of support I didn't feel like complicating the query to handle that; what I did do was change the labeling to say "works with >= 9.2" instead of "works with >= 9.0". But hey, it's a wiki; if you feel more ambitious, edit away. regards, tom lane