Bug 2250344

Summary: Long running postgres threads during content-export
Product: Red Hat Satellite Reporter: Odilon Sousa <osousa>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: sganar
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.11.5CC: ahumbe, dalley, dkliban, ggainey, hyu, iballou, jpasqual, juqiao, osousa, rchan, rlavi, sganar, shwsingh
Target Milestone: 6.14.1Keywords: Performance, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pulp_rpm-3.19.11 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2238906 Environment:
Last Closed: 2023-12-14 16:26:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 2 sganar 2023-12-05 10:57:01 UTC
Verified.

Tested on Satellite 6.14.1 Snap 1.0
python39-pulp-rpm-3.19.11-2.el8pc.noarch

Steps followed: 
1. Enable and sync some repos with immediate download policy(~ 208 GB)
    a. Red Hat Enterprise Linux 6 Server Kickstart x86_64 6.10 
    b. Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server 
    c. Red Hat Enterprise Linux 8 for x86_64 - AppStream Kickstart 8.8 
    d. Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8 
    e. Red Hat Enterprise Linux 8 for x86_64 - BaseOS Kickstart 8.8 
    f. Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8
2. Create a content view and publish it
3. Perform the content export looking at the time: `time hammer content-export complete library --organization-id 1`

Observation:
The content export time has been significantly reduced. 

# time hammer content-export complete library --organization-id 1
[..............................................................................................................................................................................................................................] [100%]
Generated /var/lib/pulp/exports/Default_Organization/Export-Library/1.0/2023-12-05T02-27-09-05-00/metadata.json

real	33m0.075s <===
user	0m6.626s
sys	0m0.925s

Size before export:
# du -sh /var/lib/pulp/
208G	/var/lib/pulp/

Size after export:
du -sh /var/lib/pulp/
417G	/var/lib/pulp/

Comment 7 errata-xmlrpc 2023-12-14 16:26:49 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 (Moderate: Satellite 6.14.1 Async Security Update), 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-2023:7851