mirror of
https://github.com/postgres/postgres.git
synced 2025-05-29 16:21:20 +03:00
pg_upgrade: Clean up some redundant code
No need to call exit() after pg_fatal(). Clean up a few stragglers for consistency.
This commit is contained in:
parent
93765bd956
commit
3b5d3721c2
@ -169,18 +169,12 @@ parseCommandLine(int argc, char *argv[])
|
|||||||
*/
|
*/
|
||||||
case 'p':
|
case 'p':
|
||||||
if ((old_cluster.port = atoi(optarg)) <= 0)
|
if ((old_cluster.port = atoi(optarg)) <= 0)
|
||||||
{
|
|
||||||
pg_fatal("invalid old port number\n");
|
pg_fatal("invalid old port number\n");
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'P':
|
case 'P':
|
||||||
if ((new_cluster.port = atoi(optarg)) <= 0)
|
if ((new_cluster.port = atoi(optarg)) <= 0)
|
||||||
{
|
|
||||||
pg_fatal("invalid new port number\n");
|
pg_fatal("invalid new port number\n");
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'r':
|
case 'r':
|
||||||
|
@ -105,11 +105,8 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
/* Set mask based on PGDATA permissions */
|
/* Set mask based on PGDATA permissions */
|
||||||
if (!GetDataDirectoryCreatePerm(new_cluster.pgdata))
|
if (!GetDataDirectoryCreatePerm(new_cluster.pgdata))
|
||||||
{
|
pg_fatal("could not read permissions of directory \"%s\": %s\n",
|
||||||
pg_log(PG_FATAL, "could not read permissions of directory \"%s\": %s\n",
|
new_cluster.pgdata, strerror(errno));
|
||||||
new_cluster.pgdata, strerror(errno));
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
umask(pg_mode_mask);
|
umask(pg_mode_mask);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user