Skip to content

Conversation

@N6REJ
Copy link
Contributor

@N6REJ N6REJ commented Sep 18, 2024

PR Type

enhancement, configuration changes


Description

  • Added initialization scripts for PostgreSQL 16.4 and 17.0-RC1, configuring databases with UTF-8 encoding and trust authentication.
  • Added configuration files for PostgreSQL 16.4 and 17.0-RC1, specifying executables, configuration files, and default port.
  • Updated build.properties to reflect the new bundle release version.
  • Added release URLs for PostgreSQL 16.4 and 17.0-RC1 in releases.properties.

Changes walkthrough 📝

Relevant files
Configuration changes
10 files
init.bat
Add initialization script for PostgreSQL 16.4                       

bin/postgresql16.4/init.bat

  • Added initialization script for PostgreSQL 16.4.
  • Configures database with UTF-8 encoding and trust authentication.
  • +5/-0     
    init.bat
    Add initialization script for PostgreSQL 17.0-RC1               

    bin/postgresql17.0-RC1/init.bat

  • Added initialization script for PostgreSQL 17.0-RC1.
  • Configures database with UTF-8 encoding and trust authentication.
  • +5/-0     
    bearsampp.conf
    Add configuration file for PostgreSQL 16.4                             

    bin/postgresql16.4/bearsampp.conf

  • Added configuration file for PostgreSQL 16.4.
  • Specifies executables, configuration files, and default port.
  • +14/-0   
    pg_hba.conf.ber
    Add host-based authentication for PostgreSQL 16.4               

    bin/postgresql16.4/pg_hba.conf.ber

  • Added host-based authentication configuration for PostgreSQL 16.4.
  • Allows trust authentication for local connections.
  • +3/-0     
    postgresql.conf.ber
    Add main configuration file for PostgreSQL 16.4                   

    bin/postgresql16.4/postgresql.conf.ber

  • Added main configuration file for PostgreSQL 16.4.
  • Configures file locations, connections, logging, and resource usage.
  • +35/-0   
    bearsampp.conf
    Add configuration file for PostgreSQL 17.0-RC1                     

    bin/postgresql17.0-RC1/bearsampp.conf

  • Added configuration file for PostgreSQL 17.0-RC1.
  • Specifies executables, configuration files, and default port.
  • +14/-0   
    pg_hba.conf.ber
    Add host-based authentication for PostgreSQL 17.0-RC1       

    bin/postgresql17.0-RC1/pg_hba.conf.ber

  • Added host-based authentication configuration for PostgreSQL 17.0-RC1.
  • Allows trust authentication for local connections.
  • +3/-0     
    postgresql.conf.ber
    Add main configuration file for PostgreSQL 17.0-RC1           

    bin/postgresql17.0-RC1/postgresql.conf.ber

  • Added main configuration file for PostgreSQL 17.0-RC1.
  • Configures file locations, connections, logging, and resource usage.
  • +35/-0   
    build.properties
    Update bundle release version                                                       

    build.properties

    • Updated bundle release version to 2024.9.18.
    +1/-2     
    releases.properties
    Add release URLs for PostgreSQL versions                                 

    releases.properties

    • Added release URLs for PostgreSQL 16.4 and 17.0-RC1.
    +2/-0     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @qodo-merge-pro
    Copy link

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 Security concerns

    Trust Authentication:
    The pg_hba.conf files for both PostgreSQL 16.4 and 17.0-RC1 use trust authentication for all local connections. This allows any local user to connect as any PostgreSQL user without a password, which could be a security risk if not properly managed.

    ⚡ Key issues to review

    Incorrect Path
    The data_directory, hba_file, and ident_file paths are set to PostgreSQL 15.6 instead of 16.4

    Incorrect Path
    The data_directory, hba_file, and ident_file paths are set to PostgreSQL 15.6 instead of 17.0-RC1

    @qodo-merge-pro
    Copy link

    qodo-merge-pro bot commented Sep 18, 2024

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Configuration error
    ✅ Update file paths to use the correct PostgreSQL version
    Suggestion Impact:The suggestion was implemented by updating the file paths to reference PostgreSQL version 16.4 instead of 15.6.

    code diff:

    -data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql15.6/data'
    -hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql15.6/data/pg_hba.conf'
    -ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql15.6/data/pg_ident.conf'
    +data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql16.4/data'
    +hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql16.4/data/pg_hba.conf'
    +ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql16.4/data/pg_ident.conf'

    Update the file paths in the configuration to use the correct PostgreSQL version
    (16.4) instead of 15.6.

    bin/postgresql16.4/postgresql.conf.ber [4-6]

    -data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql15.6/data'
    -hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql15.6/data/pg_hba.conf'
    -ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql15.6/data/pg_ident.conf'
    +data_directory = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql16.4/data'
    +hba_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql16.4/data/pg_hba.conf'
    +ident_file = '~BEARSAMPP_LIN_PATH~/bin/postgresql/postgresql16.4/data/pg_ident.conf'
     
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: The suggestion correctly identifies a configuration error where the file paths reference the wrong PostgreSQL version, which could lead to runtime issues. Updating the paths to the correct version is crucial for proper functionality.

    9
    Formatting
    Align indentation for consistent formatting

    Align the indentation of the second 'host' line to match the first one for better
    readability.

    bin/postgresql16.4/pg_hba.conf.ber [1-3]

     # TYPE      DATABASE        USER            ADDRESS                 METHOD
       host        all           all             127.0.0.1/32            trust
    -  host 		    all           all              ::1/128	      				trust
    +  host        all           all             ::1/128                 trust
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion improves code readability by aligning indentation, which is important for maintaining consistent formatting, although it does not affect functionality.

    7

    💡 Need additional feedback ? start a PR chat

    @jwaisner
    Copy link
    Contributor

    @N6REJ , neither version is starting after you switch. The log also is not showing anything.

    @jwaisner jwaisner merged commit 27b09e8 into main Sep 20, 2024
    @jwaisner jwaisner deleted the 16.4 branch September 20, 2024 15:48
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    3 participants