Обсуждение: Cluster is not being created

Поиск
Список
Период
Сортировка

Cluster is not being created

От
T iv
Дата:
Hello. I have Windows 10. At the end of the PostgreSQL 18.1 installation, the cluster is not initialized, I tried LOCALE = DEFAULT, LOCALE = C. If you complete the installation and manually run INITDB with the following parameters: "INITDB -D "d:\PostgreSQL\DB\"", then writes that INITDB found the POSTGRES program, but the versions do not match. No other versions of PostgreSQL are installed anymore. Below is the result of checking the INITDB and POSTGRES versions. Please help me solve the problem with creating a cluster.

c:\Program Files\PostgreSQL\18\bin>initdb --version
initdb (PostgreSQL) 18.1

c:\Program Files\PostgreSQL\18\bin>postgres --version
postgres (PostgreSQL) 18.1

Thank you in advance.
Igor.

Re: Cluster is not being created

От
Robert Haas
Дата:
On Sat, Dec 13, 2025 at 2:34 PM T iv <tiv060370@gmail.com> wrote:
> Hello. I have Windows 10. At the end of the PostgreSQL 18.1 installation, the cluster is not initialized, I tried
LOCALE= DEFAULT, LOCALE = C. If you complete the installation and manually run INITDB with the following parameters:
"INITDB-D "d:\PostgreSQL\DB\"", then writes that INITDB found the POSTGRES program, but the versions do not match. No
otherversions of PostgreSQL are installed anymore. Below is the result of checking the INITDB and POSTGRES versions.
Pleasehelp me solve the problem with creating a cluster. 
>
> c:\Program Files\PostgreSQL\18\bin>initdb --version
> initdb (PostgreSQL) 18.1
>
> c:\Program Files\PostgreSQL\18\bin>postgres --version
> postgres (PostgreSQL) 18.1

I am not sure that anyone will be able to help you given this amount
of information. You say that "the versions do not match," but you
don't tell us what the error message was, or the other version number.
If you're seeing two actually different version numbers, like 18.1 in
one place and something else in another places, then almost certainly
that other version is still installed someplace. If both version
numbers are 18.1 but there's an error message claiming that 18.1 is
not the same as 18.1, then you should show us the specific error
message and the command that provoked it (plus your PATH).

--
Robert Haas
EDB: http://www.enterprisedb.com



Re: Cluster is not being created

От
VASUKI M
Дата:

Hi Igor,

As Robert mentioned,the information so far isn't enough to diagnose the problem.

The "versions do not match" error usually means that initdb is finding a different postgres.exe than the one you expect,even if --version prints the same number.On Windows this often happens due to a leftover PostgreSQL installation or an unexpected entry in PATH.

Could you please share:

1.The exact error message printed by initdb
2.Exact command you used to run initdb
3.The output of
 where initdb
 where postgres
 echo %PATH%
4.Confirmation that there are no remaining PostgreSQL directories (eg. C:\program Files\PostgreSQL\*) or PostgreSQL services from older versions

with those details,it should be possible to see whether this is a PATH or installation issue ,or something else.

Thanks,
Vasuki M
CDAC,Chennai.