Skip to content

May 14.23 15.18 16.14 17.10 18.4#30

Merged
jwaisner merged 3 commits into
mainfrom
may
Jun 8, 2026
Merged

May 14.23 15.18 16.14 17.10 18.4#30
jwaisner merged 3 commits into
mainfrom
may

Conversation

@N6REJ

@N6REJ N6REJ commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

PR Type

Enhancement


Description

  • Add PostgreSQL versions 14.23, 15.18, 16.14, 17.10, 18.4 with configuration files

  • Create initialization scripts and configuration templates for each PostgreSQL version

  • Move bundle configuration from gradle.properties to separate build.properties file

  • Update bundle release version to 2025.6.2


Diagram Walkthrough

flowchart LR
  A["PostgreSQL Versions<br/>14.23, 15.18, 16.14,<br/>17.10, 18.4"] --> B["Configuration Files<br/>bearsampp.conf<br/>postgresql.conf.ber<br/>pg_hba.conf.ber"]
  A --> C["Init Scripts<br/>init.bat"]
  D["gradle.properties"] --> E["build.properties<br/>2025.6.2"]
  E --> F["Bundle Configuration<br/>Centralized"]
Loading

File Walkthrough

Relevant files
Configuration changes
22 files
init.bat
Windows initialization script for PostgreSQL 14.23             
+5/-0     
bearsampp.conf
Bearsampp configuration for PostgreSQL 14.23                         
+14/-0   
postgresql.conf.ber
PostgreSQL server configuration template 14.23                     
+35/-0   
pg_hba.conf.ber
PostgreSQL host-based authentication template 14.23           
+3/-0     
init.bat
Windows initialization script for PostgreSQL 15.18             
+5/-0     
bearsampp.conf
Bearsampp configuration for PostgreSQL 15.18                         
+14/-0   
postgresql.conf.ber
PostgreSQL server configuration template 15.18                     
+35/-0   
pg_hba.conf.ber
PostgreSQL host-based authentication template 15.18           
+3/-0     
init.bat
Windows initialization script for PostgreSQL 16.14             
+5/-0     
bearsampp.conf
Bearsampp configuration for PostgreSQL 16.14                         
+14/-0   
postgresql.conf.ber
PostgreSQL server configuration template 16.14                     
+35/-0   
pg_hba.conf.ber
PostgreSQL host-based authentication template 16.14           
+3/-0     
init.bat
Windows initialization script for PostgreSQL 17.10             
+5/-0     
bearsampp.conf
Bearsampp configuration for PostgreSQL 17.10                         
+14/-0   
postgresql.conf.ber
PostgreSQL server configuration template 17.10                     
+35/-0   
pg_hba.conf.ber
PostgreSQL host-based authentication template 17.10           
+3/-0     
init.bat
Windows initialization script for PostgreSQL 18.4               
+5/-0     
bearsampp.conf
Bearsampp configuration for PostgreSQL 18.4                           
+14/-0   
postgresql.conf.ber
PostgreSQL server configuration template 18.4                       
+35/-0   
pg_hba.conf.ber
PostgreSQL host-based authentication template 18.4             
+3/-0     
build.properties
New build properties file with bundle configuration           
+6/-0     
gradle.properties
Remove bundle configuration moved to build.properties       
+0/-6     

@qodo-code-review

Copy link
Copy Markdown

Review Summary by Qodo

Add PostgreSQL 14.23, 15.18, 16.14, 17.10, 18.4 with configuration files

✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add PostgreSQL versions 14.23, 15.18, 16.14, 17.10, 18.4 with configuration files
• Create initialization scripts, configuration files, and version-specific settings for each
  PostgreSQL version
• Move bundle configuration from gradle.properties to separate build.properties file
• Fix Gradle build by separating build properties from Gradle configuration
Diagram
flowchart LR
  A["PostgreSQL Versions<br/>14.23, 15.18, 16.14,<br/>17.10, 18.4"] --> B["Configuration Files<br/>bearsampp.conf<br/>postgresql.conf.ber<br/>pg_hba.conf.ber"]
  A --> C["Init Scripts<br/>init.bat"]
  D["gradle.properties"] -- "Move bundle config" --> E["build.properties"]

Loading

Grey Divider

File Changes

1. bin/postgresql14.23/init.bat ⚙️ Configuration changes +5/-0

PostgreSQL 14.23 initialization script

bin/postgresql14.23/init.bat


2. bin/postgresql14.23/bearsampp.conf ⚙️ Configuration changes +14/-0

PostgreSQL 14.23 configuration settings

bin/postgresql14.23/bearsampp.conf


3. bin/postgresql14.23/postgresql.conf.ber ⚙️ Configuration changes +35/-0

PostgreSQL 14.23 server configuration template

bin/postgresql14.23/postgresql.conf.ber


View more (19)
4. bin/postgresql14.23/pg_hba.conf.ber ⚙️ Configuration changes +3/-0

PostgreSQL 14.23 authentication configuration template

bin/postgresql14.23/pg_hba.conf.ber


5. bin/postgresql15.18/init.bat ⚙️ Configuration changes +5/-0

PostgreSQL 15.18 initialization script

bin/postgresql15.18/init.bat


6. bin/postgresql15.18/bearsampp.conf ⚙️ Configuration changes +14/-0

PostgreSQL 15.18 configuration settings

bin/postgresql15.18/bearsampp.conf


7. bin/postgresql15.18/postgresql.conf.ber ⚙️ Configuration changes +35/-0

PostgreSQL 15.18 server configuration template

bin/postgresql15.18/postgresql.conf.ber


8. bin/postgresql15.18/pg_hba.conf.ber ⚙️ Configuration changes +3/-0

PostgreSQL 15.18 authentication configuration template

bin/postgresql15.18/pg_hba.conf.ber


9. bin/postgresql16.14/init.bat ⚙️ Configuration changes +5/-0

PostgreSQL 16.14 initialization script

bin/postgresql16.14/init.bat


10. bin/postgresql16.14/bearsampp.conf ⚙️ Configuration changes +14/-0

PostgreSQL 16.14 configuration settings

bin/postgresql16.14/bearsampp.conf


11. bin/postgresql16.14/postgresql.conf.ber ⚙️ Configuration changes +35/-0

PostgreSQL 16.14 server configuration template

bin/postgresql16.14/postgresql.conf.ber


12. bin/postgresql16.14/pg_hba.conf.ber ⚙️ Configuration changes +3/-0

PostgreSQL 16.14 authentication configuration template

bin/postgresql16.14/pg_hba.conf.ber


13. bin/postgresql17.10/init.bat ⚙️ Configuration changes +5/-0

PostgreSQL 17.10 initialization script

bin/postgresql17.10/init.bat


14. bin/postgresql17.10/bearsampp.conf ⚙️ Configuration changes +14/-0

PostgreSQL 17.10 configuration settings

bin/postgresql17.10/bearsampp.conf


15. bin/postgresql17.10/postgresql.conf.ber ⚙️ Configuration changes +35/-0

PostgreSQL 17.10 server configuration template

bin/postgresql17.10/postgresql.conf.ber


16. bin/postgresql17.10/pg_hba.conf.ber ⚙️ Configuration changes +3/-0

PostgreSQL 17.10 authentication configuration template

bin/postgresql17.10/pg_hba.conf.ber


17. bin/postgresql18.4/init.bat ⚙️ Configuration changes +5/-0

PostgreSQL 18.4 initialization script

bin/postgresql18.4/init.bat


18. bin/postgresql18.4/bearsampp.conf ⚙️ Configuration changes +14/-0

PostgreSQL 18.4 configuration settings

bin/postgresql18.4/bearsampp.conf


19. bin/postgresql18.4/postgresql.conf.ber ⚙️ Configuration changes +35/-0

PostgreSQL 18.4 server configuration template

bin/postgresql18.4/postgresql.conf.ber


20. bin/postgresql18.4/pg_hba.conf.ber ⚙️ Configuration changes +3/-0

PostgreSQL 18.4 authentication configuration template

bin/postgresql18.4/pg_hba.conf.ber


21. build.properties ⚙️ Configuration changes +6/-0

New build properties configuration file

build.properties


22. gradle.properties ⚙️ Configuration changes +0/-6

Remove bundle configuration from Gradle properties

gradle.properties


Grey Divider

Qodo Logo

@qodo-code-review

qodo-code-review Bot commented Jun 3, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0)

Grey Divider


Action required

1. Initdb path unquoted 🐞 Bug ☼ Reliability
Description
The new init.bat scripts invoke %~dp0bin\initdb.exe without quoting the executable path, which will
fail when the module path contains spaces. This breaks database initialization and leaves the
PostgreSQL bundle unusable.
Code

bin/postgresql18.4/init.bat[3]

+%~dp0bin\initdb.exe -U postgres -A trust -E utf8 -D "%~dp0data" > "~BEARSAMPP_WIN_PATH~\logs\postgresql-install.log" 2>&1
Evidence
The init script calls an unquoted executable path derived from %~dp0, which breaks on paths with
spaces, and the Gradle build packages these scripts as-is into the release bundle.

bin/postgresql18.4/init.bat[1-5]
bin/postgresql14.23/init.bat[1-5]
build.gradle[548-572]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
Windows batch parsing splits on spaces; calling `%~dp0bin\initdb.exe` without quotes fails when `%~dp0` contains spaces.

### Issue Context
This pattern exists in all newly added PostgreSQL version folders’ `init.bat`.

### Fix Focus Areas
- bin/postgresql14.23/init.bat[1-5]
- bin/postgresql15.18/init.bat[1-5]
- bin/postgresql16.14/init.bat[1-5]
- bin/postgresql17.10/init.bat[1-5]
- bin/postgresql18.4/init.bat[1-5]

### What to change
- Update the invocation to quote the executable path, e.g.:
 - `"%~dp0bin\initdb.exe" -U postgres ...`
- Keep the existing quoting for `-D "%~dp0data"` as-is.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Trust auth enabled 🐞 Bug ⛨ Security
Description
The new PostgreSQL bundles initialize and configure authentication as trust, allowing any local OS
user to connect as any database role (including postgres) without a password. This enables
unauthorized database access on shared/multi-user machines.
Code

bin/postgresql18.4/pg_hba.conf.ber[R2-3]

+  host        all           all             127.0.0.1/32            trust
+  host 		    all           all              ::1/128	      				trust
Evidence
The init scripts explicitly initialize the cluster with trust auth, and the bundled pg_hba templates
permit trust connections for all users on localhost; the build system packages these files into the
distributable bundle.

bin/postgresql18.4/init.bat[1-5]
bin/postgresql18.4/pg_hba.conf.ber[1-3]
bin/postgresql14.23/init.bat[1-5]
bin/postgresql14.23/pg_hba.conf.ber[1-3]
build.gradle[567-572]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The bundle uses `trust` authentication in both cluster initialization (`initdb -A trust`) and runtime access rules (`pg_hba.conf`), allowing passwordless access.

### Issue Context
Even though `pg_hba.conf` is limited to localhost, `trust` still permits any local user to authenticate as any DB role.

### Fix Focus Areas
- bin/postgresql14.23/init.bat[1-5]
- bin/postgresql14.23/pg_hba.conf.ber[1-3]
- bin/postgresql15.18/init.bat[1-5]
- bin/postgresql15.18/pg_hba.conf.ber[1-3]
- bin/postgresql16.14/init.bat[1-5]
- bin/postgresql16.14/pg_hba.conf.ber[1-3]
- bin/postgresql17.10/init.bat[1-5]
- bin/postgresql17.10/pg_hba.conf.ber[1-3]
- bin/postgresql18.4/init.bat[1-5]
- bin/postgresql18.4/pg_hba.conf.ber[1-3]

### What to change
- Change `initdb` auth to a password-based method (e.g., `-A scram-sha-256` or `-A md5`) and ensure an initial superuser password is set/managed.
- Update `pg_hba.conf.ber` entries to match (e.g., `scram-sha-256` instead of `trust`) for localhost rules.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Writable log files 🐞 Bug ⛨ Security
Description
The bundled postgresql.conf.ber sets log_file_mode = 0777, making PostgreSQL log files writable by
all local users where file modes are enforced. This allows log tampering and undermines
auditing/forensics.
Code

bin/postgresql18.4/postgresql.conf.ber[27]

+log_file_mode = 0777
Evidence
The configuration explicitly enables the logging collector and sets a permissive log file mode,
which will be applied when logs are created; these templates are shipped in the built bundle.

bin/postgresql18.4/postgresql.conf.ber[23-30]
bin/postgresql14.23/postgresql.conf.ber[23-30]
build.gradle[567-572]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`log_file_mode = 0777` produces world-writable log files (where honored), enabling tampering.

### Issue Context
`logging_collector = on` is enabled, so PostgreSQL will create log files using this mode.

### Fix Focus Areas
- bin/postgresql14.23/postgresql.conf.ber[23-30]
- bin/postgresql15.18/postgresql.conf.ber[23-30]
- bin/postgresql16.14/postgresql.conf.ber[23-30]
- bin/postgresql17.10/postgresql.conf.ber[23-30]
- bin/postgresql18.4/postgresql.conf.ber[23-30]

### What to change
- Set `log_file_mode` to a more restrictive value (commonly `0600` or `0640`, depending on operational needs).
- Ensure `log_directory` permissions align with the chosen mode.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Previous review results

Review updated until commit 6f12581

Results up to commit 6f71da2


🐞 Bugs (3) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0)


Action required
1. Initdb path unquoted 🐞 Bug ☼ Reliability
Description
The new init.bat scripts invoke %~dp0bin\initdb.exe without quoting the executable path, which will
fail when the module path contains spaces. This breaks database initialization and leaves the
PostgreSQL bundle unusable.
Code

bin/postgresql18.4/init.bat[3]

+%~dp0bin\initdb.exe -U postgres -A trust -E utf8 -D "%~dp0data" > "~BEARSAMPP_WIN_PATH~\logs\postgresql-install.log" 2>&1
Evidence
The init script calls an unquoted executable path derived from %~dp0, which breaks on paths with
spaces, and the Gradle build packages these scripts as-is into the release bundle.

bin/postgresql18.4/init.bat[1-5]
bin/postgresql14.23/init.bat[1-5]
build.gradle[548-572]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
Windows batch parsing splits on spaces; calling `%~dp0bin\initdb.exe` without quotes fails when `%~dp0` contains spaces.

### Issue Context
This pattern exists in all newly added PostgreSQL version folders’ `init.bat`.

### Fix Focus Areas
- bin/postgresql14.23/init.bat[1-5]
- bin/postgresql15.18/init.bat[1-5]
- bin/postgresql16.14/init.bat[1-5]
- bin/postgresql17.10/init.bat[1-5]
- bin/postgresql18.4/init.bat[1-5]

### What to change
- Update the invocation to quote the executable path, e.g.:
 - `"%~dp0bin\initdb.exe" -U postgres ...`
- Keep the existing quoting for `-D "%~dp0data"` as-is.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Trust auth enabled 🐞 Bug ⛨ Security
Description
The new PostgreSQL bundles initialize and configure authentication as trust, allowing any local OS
user to connect as any database role (including postgres) without a password. This enables
unauthorized database access on shared/multi-user machines.
Code

bin/postgresql18.4/pg_hba.conf.ber[R2-3]

+  host        all           all             127.0.0.1/32            trust
+  host 		    all           all              ::1/128	      				trust
Evidence
The init scripts explicitly initialize the cluster with trust auth, and the bundled pg_hba templates
permit trust connections for all users on localhost; the build system packages these files into the
distributable bundle.

bin/postgresql18.4/init.bat[1-5]
bin/postgresql18.4/pg_hba.conf.ber[1-3]
bin/postgresql14.23/init.bat[1-5]
bin/postgresql14.23/pg_hba.conf.ber[1-3]
build.gradle[567-572]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The bundle uses `trust` authentication in both cluster initialization (`initdb -A trust`) and runtime access rules (`pg_hba.conf`), allowing passwordless access.

### Issue Context
Even though `pg_hba.conf` is limited to localhost, `trust` still permits any local user to authenticate as any DB role.

### Fix Focus Areas
- bin/postgresql14.23/init.bat[1-5]
- bin/postgresql14.23/pg_hba.conf.ber[1-3]
- bin/postgresql15.18/init.bat[1-5]
- bin/postgresql15.18/pg_hba.conf.ber[1-3]
- bin/postgresql16.14/init.bat[1-5]
- bin/postgresql16.14/pg_hba.conf.ber[1-3]
- bin/postgresql17.10/init.bat[1-5]
- bin/postgresql17.10/pg_hba.conf.ber[1-3]
- bin/postgresql18.4/init.bat[1-5]
- bin/postgresql18.4/pg_hba.conf.ber[1-3]

### What to change
- Change `initdb` auth to a password-based method (e.g., `-A scram-sha-256` or `-A md5`) and ensure an initial superuser password is set/managed.
- Update `pg_hba.conf.ber` entries to match (e.g., `scram-sha-256` instead of `trust`) for localhost rules.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended
3. Writable log files 🐞 Bug ⛨ Security
Description
The bundled postgresql.conf.ber sets log_file_mode = 0777, making PostgreSQL log files writable by
all local users where file modes are enforced. This allows log tampering and undermines
auditing/forensics.
Code

bin/postgresql18.4/postgresql.conf.ber[27]

+log_file_mode = 0777
Evidence
The configuration explicitly enables the logging collector and sets a permissive log file mode,
which will be applied when logs are created; these templates are shipped in the built bundle.

bin/postgresql18.4/postgresql.conf.ber[23-30]
bin/postgresql14.23/postgresql.conf.ber[23-30]
build.gradle[567-572]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`log_file_mode = 0777` produces world-writable log files (where honored), enabling tampering.

### Issue Context
`logging_collector = on` is enabled, so PostgreSQL will create log files using this mode.

### Fix Focus Areas
- bin/postgresql14.23/postgresql.conf.ber[23-30]
- bin/postgresql15.18/postgresql.conf.ber[23-30]
- bin/postgresql16.14/postgresql.conf.ber[23-30]
- bin/postgresql17.10/postgresql.conf.ber[23-30]
- bin/postgresql18.4/postgresql.conf.ber[23-30]

### What to change
- Set `log_file_mode` to a more restrictive value (commonly `0600` or `0640`, depending on operational needs).
- Ensure `log_directory` permissions align with the chosen mode.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Qodo Logo

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🐘 PostgreSQL Module Tests - Results

Test Date: 2026-06-05 21:18:24 UTC
Status: ✅ All tests passed

📊 Test Results by Version

PostgreSQL 14.23
PostgreSQL 15.18
PostgreSQL 16.14
PostgreSQL 17.10
PostgreSQL 18.4

Results: 5 of 5 versions tested

All tests passed successfully! ✨


📋 Test Phases

Each version is tested through the following phases:

  • Phase 1: Installation Validation (Download, Extract, Verify Executables)
  • Phase 2: Basic Functionality (Test Executable Versions)

Check artifacts for detailed logs.

@@ -0,0 +1,5 @@
@ECHO OFF

%~dp0bin\initdb.exe -U postgres -A trust -E utf8 -D "%~dp0data" > "~BEARSAMPP_WIN_PATH~\logs\postgresql-install.log" 2>&1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Initdb path unquoted 🐞 Bug ☼ Reliability

The new init.bat scripts invoke %~dp0bin\initdb.exe without quoting the executable path, which will
fail when the module path contains spaces. This breaks database initialization and leaves the
PostgreSQL bundle unusable.
Agent Prompt
### Issue description
Windows batch parsing splits on spaces; calling `%~dp0bin\initdb.exe` without quotes fails when `%~dp0` contains spaces.

### Issue Context
This pattern exists in all newly added PostgreSQL version folders’ `init.bat`.

### Fix Focus Areas
- bin/postgresql14.23/init.bat[1-5]
- bin/postgresql15.18/init.bat[1-5]
- bin/postgresql16.14/init.bat[1-5]
- bin/postgresql17.10/init.bat[1-5]
- bin/postgresql18.4/init.bat[1-5]

### What to change
- Update the invocation to quote the executable path, e.g.:
  - `"%~dp0bin\initdb.exe" -U postgres ...`
- Keep the existing quoting for `-D "%~dp0data"` as-is.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +2 to +3
host all all 127.0.0.1/32 trust
host all all ::1/128 trust

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

2. Trust auth enabled 🐞 Bug ⛨ Security

The new PostgreSQL bundles initialize and configure authentication as trust, allowing any local OS
user to connect as any database role (including postgres) without a password. This enables
unauthorized database access on shared/multi-user machines.
Agent Prompt
### Issue description
The bundle uses `trust` authentication in both cluster initialization (`initdb -A trust`) and runtime access rules (`pg_hba.conf`), allowing passwordless access.

### Issue Context
Even though `pg_hba.conf` is limited to localhost, `trust` still permits any local user to authenticate as any DB role.

### Fix Focus Areas
- bin/postgresql14.23/init.bat[1-5]
- bin/postgresql14.23/pg_hba.conf.ber[1-3]
- bin/postgresql15.18/init.bat[1-5]
- bin/postgresql15.18/pg_hba.conf.ber[1-3]
- bin/postgresql16.14/init.bat[1-5]
- bin/postgresql16.14/pg_hba.conf.ber[1-3]
- bin/postgresql17.10/init.bat[1-5]
- bin/postgresql17.10/pg_hba.conf.ber[1-3]
- bin/postgresql18.4/init.bat[1-5]
- bin/postgresql18.4/pg_hba.conf.ber[1-3]

### What to change
- Change `initdb` auth to a password-based method (e.g., `-A scram-sha-256` or `-A md5`) and ensure an initial superuser password is set/managed.
- Update `pg_hba.conf.ber` entries to match (e.g., `scram-sha-256` instead of `trust`) for localhost rules.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

…tency across build.gradle

Co-authored-by: Junie <junie@jetbrains.com>
@qodo-code-review

qodo-code-review Bot commented Jun 5, 2026

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 6f12581

@jwaisner jwaisner merged commit 3380605 into main Jun 8, 2026
17 checks passed
@jwaisner jwaisner deleted the may branch June 8, 2026 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants