deleting the old postgres 9.2 cluster after successful pg_upgrade to 9.4

From: Mark Steben <mark(dot)steben(at)drivedominion(dot)com>
To: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: deleting the old postgres 9.2 cluster after successful pg_upgrade to 9.4
Date: 2016-09-12 18:12:38
Message-ID: CADyzmyx9Ne3cYycHXLfPSL=PCjK2aniquY0auoNoDbMBmMR3RQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Good afternoon,

We are currently running postgres 9.4.8 after a successful upgrade from 9.2
using pg_upgrade with the link option. The OS we are running is GNU/linux
2.6.32

As you know the link option 'hard links' the data from the old 9.2 cluster
with the data in the new 9.4 cluster. The pg_upgrade documentation states
that
*Once you are satisfied with the upgrade, you can delete the old cluster's
data directories *

I wish to do this but would like a little more info on 'hard links' before
I take this plunge as management would not be too happy with me if I
brought down the production db inadvertantly by deleting a cluster.

Here are some checks I ran:
1. ps -ef | grep PSQL_92 (the name of the old cluster) - NOTHING running
bearing that literal
2. ls -la /PSQL_92/base/2333 (2333 being the internal name of our major
database) - here I see timestamps indicating continual updates of these
files (or links):
* total 450170748*
*-rw------- 2 pguser domain^users 438697984 Sep 12 14:05 3908812127*
*-rw------- 2 pguser domain^users 386875392 Sep 12 14:05 3908824045*
*-rw------- 2 pguser domain^users 1073741824 Sep 12 14:05 3902046423.1*
*-rw------- 2 pguser domain^users 503169024 Sep 12 14:05 3902046423.2*
*-rw------- 2 pguser domain^users 389545984 Sep 12 14:05 3908826153*
*-rw------- 2 pguser domain^users 1073741824 Sep 12 14:05 797397598.5*
*-rw------- 2 pguser domain^users 716791808 Sep 12 14:05 3908829834*
*-rw------- 2 pguser domain^users 716570624 Sep 12 14:05 3908829432*
*-rw------- 2 pguser domain^users 553828352 Sep 12 14:05 3908828838.3*
*-rw------- 2 pguser domain^users 210337792 Sep 12 14:05 3908805062*
*-rw------- 2 pguser domain^users 416833536 Sep 12 14:05 3592193706.2*
*-rw------- 2 pguser domain^users 1073741824 Sep 12 14:04 8162449.43*

This gives me pause. This statement was run on Sept 12 at 14:06. How do I
know that if I delete these files that I won't bring down the db?

Another thing I want to share: We were using user-defined tablespaces that
were pointing to the 9.2 cluster during the upgrade. I needed to move the
objects in that tablespace to the new 9.4 cluster which I have since done.

Any insight appreciated. Thank you,

--
*Mark Steben*
Database Administrator
@utoRevenue <http://www.autorevenue.com/> | Autobase
<http://www.autobase.net/>
CRM division of Dominion Dealer Solutions
95D Ashley Ave.
West Springfield, MA 01089
t: 413.327-3045
f: 413.383-9567

www.fb.com/DominionDealerSolutions
www.twitter.com/DominionDealer
www.drivedominion.com <http://www.autorevenue.com/>

<http://autobasedigital.net/marketing/DD12_sig.jpg>

Browse pgsql-admin by date

  From Date Subject
Next Message Gaetano Mendola 2016-09-12 22:39:34 Re: Autovacuum Running Timeframe
Previous Message Poul Kristensen 2016-09-12 18:00:55 Re: How to list ALL PostgreSQL functions?