mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
pg_upgrade: remove pre-8.4 code and >= 8.4 check
We only support upgrading from >= 8.4 so no need for this code or tests. Reported-by: Magnus Hagander Discussion: https://postgr.es/m/CABUevEx-D0PNVe00tkeQRGennZQwDtBJn=493MJt-x6sppbUxA@mail.gmail.com Backpatch-through: 9.5
This commit is contained in:
parent
f09e2a8c63
commit
957a782220
@ -202,18 +202,10 @@ void
|
||||
output_completion_banner(char *analyze_script_file_name,
|
||||
char *deletion_script_file_name)
|
||||
{
|
||||
/* Did we copy the free space files? */
|
||||
if (GET_MAJOR_VERSION(old_cluster.major_version) >= 804)
|
||||
pg_log(PG_REPORT,
|
||||
"Optimizer statistics are not transferred by pg_upgrade so,\n"
|
||||
"once you start the new server, consider running:\n"
|
||||
" %s\n\n", analyze_script_file_name);
|
||||
else
|
||||
pg_log(PG_REPORT,
|
||||
"Optimizer statistics and free space information are not transferred\n"
|
||||
"by pg_upgrade so, once you start the new server, consider running:\n"
|
||||
" %s\n\n", analyze_script_file_name);
|
||||
|
||||
|
||||
if (deletion_script_file_name)
|
||||
pg_log(PG_REPORT,
|
||||
@ -243,7 +235,7 @@ check_cluster_versions(void)
|
||||
* upgrades
|
||||
*/
|
||||
|
||||
if (GET_MAJOR_VERSION(old_cluster.major_version) <= 803)
|
||||
if (GET_MAJOR_VERSION(old_cluster.major_version) < 804)
|
||||
pg_fatal("This utility can only upgrade from PostgreSQL version 8.4 and later.\n");
|
||||
|
||||
/* Only current PG version is supported as a target */
|
||||
@ -476,19 +468,12 @@ create_script_for_cluster_analyze(char **analyze_script_file_name)
|
||||
ECHO_QUOTE, ECHO_QUOTE);
|
||||
fprintf(script, "echo %sthis script and run:%s\n",
|
||||
ECHO_QUOTE, ECHO_QUOTE);
|
||||
fprintf(script, "echo %s \"%s/vacuumdb\" %s--all %s%s\n", ECHO_QUOTE,
|
||||
new_cluster.bindir, user_specification.data,
|
||||
/* Did we copy the free space files? */
|
||||
(GET_MAJOR_VERSION(old_cluster.major_version) >= 804) ?
|
||||
"--analyze-only" : "--analyze", ECHO_QUOTE);
|
||||
fprintf(script, "echo %s \"%s/vacuumdb\" %s--all --analyze-only%s\n", ECHO_QUOTE,
|
||||
new_cluster.bindir, user_specification.data, ECHO_QUOTE);
|
||||
fprintf(script, "echo%s\n\n", ECHO_BLANK);
|
||||
|
||||
fprintf(script, "\"%s/vacuumdb\" %s--all --analyze-in-stages\n",
|
||||
new_cluster.bindir, user_specification.data);
|
||||
/* Did we copy the free space files? */
|
||||
if (GET_MAJOR_VERSION(old_cluster.major_version) <= 803)
|
||||
fprintf(script, "\"%s/vacuumdb\" %s--all\n", new_cluster.bindir,
|
||||
user_specification.data);
|
||||
|
||||
fprintf(script, "echo%s\n\n", ECHO_BLANK);
|
||||
fprintf(script, "echo %sDone%s\n",
|
||||
|
@ -160,9 +160,6 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
|
||||
/* transfer primary file */
|
||||
transfer_relfile(&maps[mapnum], "", vm_must_add_frozenbit);
|
||||
|
||||
/* fsm/vm files added in PG 8.4 */
|
||||
if (GET_MAJOR_VERSION(old_cluster.major_version) >= 804)
|
||||
{
|
||||
/*
|
||||
* Copy/link any fsm and vm files, if they exist
|
||||
*/
|
||||
@ -171,7 +168,6 @@ transfer_single_new_db(FileNameMap *maps, int size, char *old_tablespace)
|
||||
transfer_relfile(&maps[mapnum], "_vm", vm_must_add_frozenbit);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user