user507779
user507779

Reputation: 511

Postgresql cluster initialization

SQL distributes pre-initialized catalog cluster but for postgresql we need initialize cluster using initdb and a network service account. It fails in few cases and causing bit of misery!

Can initialize cluster ourselves and distribute pre-initialized cluster?

Thanks

Upvotes: 0

Views: 1554

Answers (2)

user330315
user330315

Reputation:

The "cluster" (or data directory) depends on the operating system and the architecture. So a data directory that was initialized with initdb on a 32bit Linux will not work on a 64bit Windows.

But you don't need to do that. A service account is only necessary if you want to run PostgreSQL as a service.

You can easily use the ZIP distribution to install and start Postgres without the need for a full-fledge installation or a service account.

The steps to do so are:

  1. Unzip the binaries
  2. Run initdb pointing it to the directory where the database cluster should be created.
  3. Run pg_ctl to start the server.

Note that the steps 2) and 3) must be run using the same user, otherwise the server will have no priviliges to write to the data directory.

These steps can easily be put into a batch file or shell script.

Upvotes: 1

Frank Heikens
Frank Heikens

Reputation: 127486

Hard to understand your question, but I think you are talking about the Windows installer for PostgreSQL. Right? What version, what installer, what about error messages, loggings, etc. ?

The installer can be found here.

SQL = database language, SQL Server = Microsoft database product

Upvotes: 0

Related Questions