Cannot start PostgreSQL due to exception 0xC0000005
Problem
Issue starting PostgreSQL from scripts (both one-deps
and start_postgres.sql
) that occurs with some Windows installations, in which the following error will appear:
running bootstrap script ... child process was terminated by exception 0xC0000005 initdb: removing data directory
Solution
Applies for PostgreSQL in the all-build for version 12.7.0 and older.
You can replace the database in the all build or run the database from the replacement folder.
Prerequisites:
- Download the replacement PostgreSQL https://ataccama.s3.us-east-1.amazonaws.com/tmp/tapeer/pgsql13_allbuild_replacement.zip
- Read and Execute permissions on both
.bat
scripts. - Read and Execute permissions on and inside pgsql folder.
- Read, Write and Execute permissions on data folder.
- Availability of port 5432
To extract and use PostgreSQL in the all build:
- Go to one-deps directory in the all build.
- Delete pgsql folder from one-deps directory.
- Delete scripts
start_postgres.bat
andstop_postgres.bat
from one-deps directory Verify if data folder has postgres_data folder, if yes back it up and remove it from one-deps directory.
This step deletes all data in database, but since this package is intended to deal with specific PostgreSQL v11.2 issue there should be no actual data (user probably could not run this database before).
- Extract the archive
pgsql13_allbuild_replacement.zip
in one-deps directory (one-deps/data directory will contain postgres_data, in one-deps there will be pgsql and two scriptsstart_postgres.bat
andstop_postgres.bat
)
In case of issues, please ensure that you have followed the prerequisites.
To run PostgreSQL from a different directory:
- Extract the archive to ataccama directory.
- Go to the build installation directory and copy pginit directory from one-deps.
- Paste the pgint directory that you copied in previous step in ataccama directory.
- Start PostgreSQL with the script
start_postgres.bat
.
In case of issues, please ensure that you have followed prerequisites.