Re: pgsql-server: Use canonicalize_path for -D, GUC paths, and paths coming - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql-server: Use canonicalize_path for -D, GUC paths, and paths coming
Date
Msg-id 1985.1089588577@sss.pgh.pa.us
Whole thread Raw
In response to pgsql-server: Use canonicalize_path for -D, GUC paths, and paths coming  (momjian@svr1.postgresql.org (Bruce Momjian))
Responses Re: pgsql-server: Use canonicalize_path for -D, GUC paths,
List pgsql-committers
momjian@svr1.postgresql.org (Bruce Momjian) writes:
>     pgsql-server/src/backend/postmaster:
>         postmaster.c (r1.407 -> r1.408)
>
(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/postmaster/postmaster.c.diff?r1=1.407&r2=1.408)

You can't do that.  In the first place it will dump core if PGDATA isn't
set, and in the second place it is not kosher to scribble on environment
values.

This is the wrong place to do it anyway.  It is necessary, sufficient,
and already done to do it in SetDataDir.

>     pgsql-server/src/backend/utils/misc:
>         guc.c (r1.214 -> r1.215)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/misc/guc.c.diff?r1=1.214&r2=1.215)

Could we not have FATAL here, please?

>     pgsql-server/src/bin/psql:
>         command.c (r1.119 -> r1.120)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/bin/psql/command.c.diff?r1=1.119&r2=1.120)

None of these are correct.  canonicalize_path is only intended for
directory names not file names.  (I think the same problem applies
to several of your GUC variable changes, too.)

>         copy.c (r1.49 -> r1.50)
>         (http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/bin/psql/copy.c.diff?r1=1.49&r2=1.50)

As above.

            regards, tom lane

pgsql-committers by date:

Previous
From: momjian@svr1.postgresql.org (Bruce Momjian)
Date:
Subject: pgsql-server: This patch fixes a small error in the Porting PL/SQL to
Next
From: momjian@svr1.postgresql.org (Bruce Momjian)
Date:
Subject: pgsql-server: Add: > * Allow moving sequences and toast tables to other