summaryrefslogtreecommitdiff
path: root/contrib/pg_upgrade/check.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2010-10-19 15:52:44 +0000
committerBruce Momjian <bruce@momjian.us>2010-10-19 15:52:44 +0000
commit80a65c05777ef2b05dfe3a276568cad438fb804d (patch)
tree9f25480cd3e334798c804069bdf75de258b784a6 /contrib/pg_upgrade/check.c
parent6f609199df2c8d38ed0391180a2ff467333ae57c (diff)
Add removal of PG_VERSION to optional old cluster deletion script.
Backpatch to 9.0.X.
Diffstat (limited to 'contrib/pg_upgrade/check.c')
-rw-r--r--contrib/pg_upgrade/check.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/pg_upgrade/check.c b/contrib/pg_upgrade/check.c
index fb35507af10..3a2922681c7 100644
--- a/contrib/pg_upgrade/check.c
+++ b/contrib/pg_upgrade/check.c
@@ -416,6 +416,11 @@ create_script_for_old_cluster_deletion(migratorContext *ctx,
int dbnum;
fprintf(script, "\n");
+ /* remove PG_VERSION? */
+ if (GET_MAJOR_VERSION(ctx->old.major_version) <= 804)
+ fprintf(script, RM_CMD " %s%s/PG_VERSION\n",
+ ctx->tablespaces[tblnum], ctx->old.tablespace_suffix);
+
for (dbnum = 0; dbnum < ctx->new.dbarr.ndbs; dbnum++)
{
fprintf(script, RMDIR_CMD " %s%s/%d\n",