Dmitry Kovalenko <d(dot)kovalenko(at)postgrespro(dot)ru> writes:
> For my point of view, if you can't provider a valid path in PGDATA, do
> not do it at all.
I'm not sure which part of "don't rely on PGDATA" you didn't get.
Under normal circumstances, Postgres itself doesn't set that at all.
If you want to establish a site convention that PGDATA is valid,
fine, but then it's on you to set it correctly.
regards, tom lane