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:
- Confirm that the locale for the Satellite server and PostgreSQL is ja_JP.UTF-8.
- Upgrade Satellite to 6.16.
- After the upgrade, check the /var/lib/pgsql/data/postgresql.conf file and confirm that the datestyle is changed to 'iso, ymd'.
- 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:
- Edit /var/lib/pgsql/data/postgresql.conf.
- Change datestyle = "iso, ymd" to datestyle = 'iso, mdy'.
- Run foreman-maintain service restart to restart the services.
- is related to
-
RHEL-58410 postgresql-setup --upgrade does not create the new cluster with the right collate/locale settings
-
- New
-