| From: | PG Bug reporting form <noreply(at)postgresql(dot)org> | 
|---|---|
| To: | pgsql-bugs(at)lists(dot)postgresql(dot)org | 
| Cc: | abhishekzararia(at)gmail(dot)com | 
| Subject: | BUG #18827: PostgreSQL 17.4-1 Installation – Database Cluster Initialization Failed Due to Execution Policy | 
| Date: | 2025-02-27 19:08:18 | 
| Message-ID: | 18827-321d50a337732028@postgresql.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-bugs | 
The following bug has been logged on the website:
Bug reference:      18827
Logged by:          Abhishek Zararia
Email address:      abhishekzararia(at)gmail(dot)com
PostgreSQL version: 17.4
Operating system:   Microsoft Windows 10
Description:        
Dear Support Team,
While installing PostgreSQL 17.4-1, I encountered the following error during
database cluster initialization:
***************************************
Error running C:\windows\System32\cmd.exe /c
"C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy
Bypass -File "C:\Program
Files\PostgreSQL\17/installer/server/initcluster.ps1" "NT
AUTHORITY\NetworkService" "postgres" "****"
"C:\Users\<User>\AppData\Local\Temp/postgresql_installer_f3480bc391"
"C:\Program Files\PostgreSQL\17" "C:\Program Files\PostgreSQL\17\data" 5432
"DEFAULT" 0: File C:\Program
Files\PostgreSQL\17\installer\server\initcluster.ps1 cannot be loaded. The
file C:\Program 
Files\PostgreSQL\17\installer\server\initcluster.ps1 is not digitally
signed. You cannot run this script on the 
current system. For more information about running scripts and setting
execution policy, see about_Execution_Policies 
at https:/go.microsoft.com/fwlink/?LinkID=135170.
    + CategoryInfo          : SecurityError: (:) [],
ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnauthorizedAccess
Problem running post-install step. Installation may not complete correctly
 The database cluster initialisation failed.
***************************************
Upon investigation, I found that my System Execution Policy
(Get-ExecutionPolicy -List) had "MachinePolicy" set to "AllSigned", which
caused the installation to fail due to script signature enforcement.
When I changed "MachinePolicy" to "Undefined", the installation proceeded
successfully, and the PostgreSQL service started without issues.
Could you confirm if this is the expected behavior in PostgreSQL 17.4-1? I
did not encounter this issue in previous PostgreSQL versions. Was this
change intentional, or is it an overlooked error?
Awaiting your response.
Best regards,
Abhishek Zararia
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Guo | 2025-02-28 08:47:09 | Re: Query result differences between PostgreSQL 17 vs 16 | 
| Previous Message | Matthias Apitz | 2025-02-27 06:36:00 | Re: BUG #18822: mailing lists reject mails due to DKIM-signature |