Recommended procedure to remove old files after major version PostgreSQL database cluster upgradeHow do I...
Why is Shelob considered evil?
In a post apocalypse world, with no power and few survivors, would Satnav still work?
How to wrap a figure in exam document?
Is it possible to methodically find the total of ways to read a given phrase making a stack?
Are all power cords made equal?
Is practicing on a digital piano harmful to an experienced piano player?
Crack the bank account's password!
What is wrong with my use of "find -print0"?
How can guns be countered by melee combat without raw-ability or exceptional explanations?
In the Lost in Space intro why was Dr. Smith actor listed as a special guest star?
Is it possible to have the same planeswalker from different editions in a Commander deck?
What could cause an entire planet of humans to become aphasic?
filecontents: select rows of group to display
Can you prevent a man in the middle from reading the message?
Why is Acetic acid (pKa = 4.76) stronger than carbonic acid (pKa = 6.36)?
How unreachable are Jupiter's moons from Mars with the technology developed for going to Mars?
Is it possible to narrate a novel in a faux-historical style without alienating the reader?
Expression for "unconsciously using words (or accents) used by a person you often talk with or listen to"?
Is the Maximum Use License for Everybody (MULE) a FOSS license?
How can I keep my gold safe from other PCs?
Disk space full during insert, what happens?
Is it possible to detect 100% of SQLi with a simple regex?
Limits of Rolle theorem
Is there a way to pause a running process on Linux systems and resume later?
Recommended procedure to remove old files after major version PostgreSQL database cluster upgrade
How do I uninstall the old version of Postgres on CentOS 7?PostgreSQL pg_upgrade --link mode performance issue after upgradePoint PostgreSQL on Ubuntu to a new datadircannot find -lpq after upgrading PostgreSQL 8 to 9 on CentOS 5Will PostgreSQL server work if I install the service in mounted partitionUpgrade from Postgres 9.3 to 9.5PostgreSQL migrating from 9.2 to 9.5 with data dir on different volumeWhat is the recommended way to autostart a Postgres cluster using a nonstandard data directory?How to uninstall PostgreSQL (and pgAdmin3) from OSX Sierra?pg_ctl won't start postgresUnable to Restart PostgreSQL after attempting to move pg_xlog to different partition
I (successfully) followed the upgrade procedure in §18.6.1 of the PostgreSQL Manual to upgrade a PostgreSQL database cluster from 10.7 to 11.2 (running Fedora 29). I would like to remove the old tablepaces (some of which are user-defined tablespaces) and other legacy files to reclaim space not needed from the old cluster.
There are two approaches I’ve considered:
- Connect to the old database cluster as
postgres
and run queries against the pg_catalog system table to DROP tables, tablespaces, databases, etc. - Run
find -L /path/to/tablespace/root -type d -user postgres -iname “PG_10_*” exec rm -rf {} ;
to remove directories in the tablespace locations (note the new tablespaces share the same root directory as the old ones)
After either (1) or (2), I’d remove the old PGDATA
directory.
Is there a preferred approach (including any methods not mentioned)?
Note, this is distinct from the following post: How do I uninstall the old version of Postgres on CentOS 7
postgresql postgresql-10 postgresql-11
add a comment |
I (successfully) followed the upgrade procedure in §18.6.1 of the PostgreSQL Manual to upgrade a PostgreSQL database cluster from 10.7 to 11.2 (running Fedora 29). I would like to remove the old tablepaces (some of which are user-defined tablespaces) and other legacy files to reclaim space not needed from the old cluster.
There are two approaches I’ve considered:
- Connect to the old database cluster as
postgres
and run queries against the pg_catalog system table to DROP tables, tablespaces, databases, etc. - Run
find -L /path/to/tablespace/root -type d -user postgres -iname “PG_10_*” exec rm -rf {} ;
to remove directories in the tablespace locations (note the new tablespaces share the same root directory as the old ones)
After either (1) or (2), I’d remove the old PGDATA
directory.
Is there a preferred approach (including any methods not mentioned)?
Note, this is distinct from the following post: How do I uninstall the old version of Postgres on CentOS 7
postgresql postgresql-10 postgresql-11
add a comment |
I (successfully) followed the upgrade procedure in §18.6.1 of the PostgreSQL Manual to upgrade a PostgreSQL database cluster from 10.7 to 11.2 (running Fedora 29). I would like to remove the old tablepaces (some of which are user-defined tablespaces) and other legacy files to reclaim space not needed from the old cluster.
There are two approaches I’ve considered:
- Connect to the old database cluster as
postgres
and run queries against the pg_catalog system table to DROP tables, tablespaces, databases, etc. - Run
find -L /path/to/tablespace/root -type d -user postgres -iname “PG_10_*” exec rm -rf {} ;
to remove directories in the tablespace locations (note the new tablespaces share the same root directory as the old ones)
After either (1) or (2), I’d remove the old PGDATA
directory.
Is there a preferred approach (including any methods not mentioned)?
Note, this is distinct from the following post: How do I uninstall the old version of Postgres on CentOS 7
postgresql postgresql-10 postgresql-11
I (successfully) followed the upgrade procedure in §18.6.1 of the PostgreSQL Manual to upgrade a PostgreSQL database cluster from 10.7 to 11.2 (running Fedora 29). I would like to remove the old tablepaces (some of which are user-defined tablespaces) and other legacy files to reclaim space not needed from the old cluster.
There are two approaches I’ve considered:
- Connect to the old database cluster as
postgres
and run queries against the pg_catalog system table to DROP tables, tablespaces, databases, etc. - Run
find -L /path/to/tablespace/root -type d -user postgres -iname “PG_10_*” exec rm -rf {} ;
to remove directories in the tablespace locations (note the new tablespaces share the same root directory as the old ones)
After either (1) or (2), I’d remove the old PGDATA
directory.
Is there a preferred approach (including any methods not mentioned)?
Note, this is distinct from the following post: How do I uninstall the old version of Postgres on CentOS 7
postgresql postgresql-10 postgresql-11
postgresql postgresql-10 postgresql-11
asked 1 min ago
WheeWhee
557
557
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230574%2frecommended-procedure-to-remove-old-files-after-major-version-postgresql-databas%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230574%2frecommended-procedure-to-remove-old-files-after-major-version-postgresql-databas%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown