pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Thanks to pg_upgrade,. we'll reclaim 1.4T of total disk !!
2+ messages / 2 participants
[nested] [flat]

* Thanks to pg_upgrade,. we'll reclaim 1.4T of total disk !!
@ 2016-08-15 17:36  Jerry Sievers <gsievers19@comcast.net>
  0 siblings, 1 reply; 2+ messages in thread

From: Jerry Sievers @ 2016-08-15 17:36 UTC (permalink / raw)
  To: pgsql-admin

Seriously...

But I had to postpone the scheduled upgrade to investigate first.

Our big warehouse ~5TB system was trial upgraded several time using
snapshots and not till the last trial did I happen to notice that we
were about 700G short after the upgrade.

Yay!  Or huh?

Same warehouse had apparently crashed hard and left behind those 700G of
orphaned data files unbeknownst to us.

Pg_Upgrade never sees them since there is no catalog entry with a
relfilenode pointing to them and thus leaves all this junk behind during
the upgrade.

Exactly as we would like it to.

Still, the discovery was rather shocking and a couple hours of
investigation ensude to explain the matter.

Oh, and those 700G of space was actual logged table data, not temp or
UNlogged, ergo our standby system is likewise bloated by this amount.

When we do the rescheduled upgrade thus we'll be saving 1.4T. OH yeah
baby!!

FWIW

-- 
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 312.241.7800


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Thanks to pg_upgrade,. we'll reclaim 1.4T of total disk !!
@ 2016-08-15 19:52  Bruce Momjian <bruce@momjian.us>
  parent: Jerry Sievers <gsievers19@comcast.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruce Momjian @ 2016-08-15 19:52 UTC (permalink / raw)
  To: Jerry Sievers <gsievers19@comcast.net>; +Cc: pgsql-admin

On Mon, Aug 15, 2016 at 12:36:46PM -0500, Jerry Sievers wrote:
> Still, the discovery was rather shocking and a couple hours of
> investigation ensude to explain the matter.
> 
> Oh, and those 700G of space was actual logged table data, not temp or
> UNlogged, ergo our standby system is likewise bloated by this amount.
> 
> When we do the rescheduled upgrade thus we'll be saving 1.4T. OH yeah
> baby!!

This is on our TODO list since at least 2006:

	https://wiki.postgresql.org/wiki/Todo

	Check for unreferenced table files created by transactions that were
	in-progress when the server terminated abruptly 
	https://www.postgresql.org/message-id/200606081508.k58F85m29270@candle.pha.pa.us

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I. As I am, so you will be. +
+                     Ancient Roman grave inscription +


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-08-15 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-08-15 17:36 Thanks to pg_upgrade,. we'll reclaim 1.4T of total disk !! Jerry Sievers <gsievers19@comcast.net>
2016-08-15 19:52 ` Bruce Momjian <bruce@momjian.us>

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