Bug 1572303

Summary: Monitor Event Queue PG::Error
Product: Red Hat Satellite Reporter: pm-sat <pm-sat>
Component: Subscription ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Nikhil Kathole <nkathole>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: andrew.schofield, cwelton, jdickers, mmccune
Target Milestone: 6.4.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1563002 Environment:
Last Closed: 2018-10-16 19:08:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Comment 3 Nikhil Kathole 2018-07-25 12:11:42 UTC
VERIFIED

Version tested:
Satellite 6.4 snap 13

1. Created file sql_logging.rb with below content
→ cat /usr/share/foreman/config/initializers/sql_logging.rb 
 ActiveRecord::Base.logger = Logger.new STDOUT
2. katello-service restart
3. Had manifest having more than 80 consumers pools attached.
4. foreman-rake katello:import_subscriptions

Found optimized sql query.

D, [2018-07-25T07:57:22.953262 #121695] DEBUG -- :    (0.1ms)  SELECT "katello_subscription_facet_pools"."subscription_facet_id" FROM "katello_subscription_facet_pools" WHERE "katello_subscription_facet_pools"."pool_id" = $1  [["pool_id", 85]]
D, [2018-07-25T07:57:23.124577 #121695] DEBUG -- :    (0.2ms)  SELECT "katello_subscription_facet_pools"."subscription_facet_id" FROM "katello_subscription_facet_pools" WHERE "katello_subscription_facet_pools"."pool_id" = $1  [["pool_id", 123]]
D, [2018-07-25T07:57:23.273694 #121695] DEBUG -- :    (0.2ms)  SELECT "katello_subscription_facet_pools"."subscription_facet_id" FROM "katello_subscription_facet_pools" WHERE "katello_subscription_facet_pools"."pool_id" = $1  [["pool_id", 87]]
D, [2018-07-25T07:57:23.390172 #121695] DEBUG -- :    (0.1ms)  SELECT "katello_subscription_facet_pools"."subscription_facet_id" FROM "katello_subscription_facet_pools" WHERE "katello_subscription_facet_pools"."pool_id" = $1  [["pool_id", 100]]
D, [2018-07-25T07:57:23.518491 #121695] DEBUG -- :    (0.2ms)  SELECT "katello_subscription_facet_pools"."subscription_facet_id" FROM "katello_subscription_facet_pools" WHERE "katello_subscription_facet_pools"."pool_id" = $1  [["pool_id", 88]]
D, [2018-07-25T07:57:23.654119 #121695] DEBUG -- :    (0.2ms)  SELECT "katello_subscription_facet_pools"."subscription_facet_id" FROM "katello_subscription_facet_pools" WHERE "katello_subscription_facet_pools"."pool_id" = $1  [["pool_id", 90]]
D, [2018-07-25T07:57:23.795593 #121695] DEBUG -- :    (0.2ms)  SELECT "katello_subscription_facet_pools"."subscription_facet_id" FROM "katello_subscription_facet_pools" WHERE "katello_subscription_facet_pools"."pool_id" = $1  [["pool_id", 91]]

Comment 4 Bryan Kearney 2018-10-16 19:08:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:2927