Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-38508

datestyle is changed after PostgreSQL upgrade, causing date filtering in content views to fail.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • None
    • Upgrades
    • False
    • Moderate
    • sat-rocket
    • None
    • None
    • None
    • None

      Description of problem:

      After a Satellite server upgrade, the PostgreSQL datestyle setting is unexpectedly changed. When attempting to search for errata by date using the content view filtering function, a PG::DatetimeFieldOverflow error occurs, and the search results are not displayed correctly.

       How reproducible:

      Reproducible when performing a PostgreSQL upgrade in a specific locale environment, such as ja_JP.UTF-8.

      Is this issue a regression from an earlier version:

      Yes, this issue did not occur before the upgrade (6.15).

      Steps to Reproduce:

      1. Confirm that the locale for the Satellite server and PostgreSQL is ja_JP.UTF-8.
      2. Upgrade Satellite to 6.16.
      3. After the upgrade, check the /var/lib/pgsql/data/postgresql.conf file and confirm that the datestyle is changed to 'iso, ymd'.
      4. Specify a date in the content view filter on the Web UI and search for errata.
         

      Actual behavior:

      When date filtering is performed, the relevant errata are not displayed. Additionally, the following error is logged in production.log:

       

      sosreport-vps-zmg-rhns4-2025-09-08-dbhdjjj]$ less var/log/foreman/production.log|grep 1b8e9678
      2025-09-08T13:41:31 [I|app|1b8e9678] Started GET "/katello/api/v2/errata?show_all_for=content_view_filter&filter_id=83&include_filter_ids=true&per_page=100&page=1&search=&types[]=enhancement&types[]=security&types[]=bugfix&date_type=issued&start_date=08%2F13%2F2025" for 10.16.104.229 at 2025-09-08 13:41:31 +0900
      2025-09-08T13:41:31 [I|app|1b8e9678] Processing by Katello::Api::V2::ErrataController#index as JSON
      2025-09-08T13:41:31 [I|app|1b8e9678]   Parameters: {"show_all_for"=>"content_view_filter", "filter_id"=>"83", "include_filter_ids"=>"true", "per_page"=>"100", "page"=>"1", "search"=>"", "types"=>["enhancement", "security", "bugfix"], "date_type"=>"issued", "start_date"=>"08/13/2025", "api_version"=>"v2"}
      2025-09-08T13:41:31 [E|app|1b8e9678] Invalid search: PG::DatetimeFieldOverflow: ERROR:  日付時刻のフィールドが範囲外です: "08/13/2025"
       1b8e9678 | LINE 1: ...1, $11122, $11123, $11124, $11125) AND (issued >= '08/13/202...
       1b8e9678 |                                                              ^
       1b8e9678 | HINT: 他の"datestyle"設定が必要かもしれません。
       1b8e9678 | 
      2025-09-08T13:41:31 [I|app|1b8e9678]   Rendered /usr/share/gems/gems/katello-4.14.0.13/app/views/katello/api/v2/errata/index.json.rabl within katello/api/v2/layouts/collection (Duration: 1.1ms | Allocations: 861)
      2025-09-08T13:41:31 [I|app|1b8e9678]   Rendered layout /usr/share/gems/gems/katello-4.14.0.13/app/views/katello/api/v2/layouts/collection.json.erb (Duration: 1.2ms | Allocations: 952)
      2025-09-08T13:41:31 [I|app|1b8e9678] Completed 200 OK in 143ms (Views: 1.9ms | ActiveRecord: 20.8ms | Allocations: 95979)
       
      

       

      Expected behavior:

      When searching for errata by date, the relevant errata should be displayed correctly.

       

      Business Impact / Additional info:

      Customers cannot search for errata by date after the upgrade, which disrupts their content management. As a temporary workaround, the issue can be resolved by changing the datestyle setting in the postgresql.conf file to 'iso, mdy' and restarting the services.

      Workaround:

      1. Edit /var/lib/pgsql/data/postgresql.conf.
      1. Change datestyle = "iso, ymd" to datestyle = 'iso, mdy'.
      1. Run foreman-maintain service restart to restart the services.

              Unassigned Unassigned
              rhn-support-mshimura Miwa Shimura
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: