Postgres perf, path migration, and shutdown race fixes
- Major query performance boost: replaced correlated subqueries with DistinctBy() in BaseItemRepository, added episode deduplication index, and increased default command timeout to 120s. - Fixed LibraryMonitor shutdown race: added disposal checks and exception handling in FileRefresher to prevent ObjectDisposedException. - Added PowerShell and SQL utilities for fixing Linux paths in config files and database; new scripts for WebDir and path migration. - Auto-fix for WebDir in startup.json on load; new helper scripts and docs. - Added automated weekly DB performance monitoring scripts and reporting. - Expanded documentation and README for all fixes, scripts, and migration steps. - Updated SQL scripts for index creation and diagnostics; improved output handling. - Updated db-config defaults and added new diagnostic/report files.
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
# README.md Update Summary
|
||||
|
||||
## Updated: docs\README.md
|
||||
|
||||
### New Sections Added
|
||||
|
||||
#### 🛠️ Path Configuration & Fixes
|
||||
Added a new dedicated section for path-related configuration and troubleshooting:
|
||||
|
||||
- **WEBDIR_ISSUE_COMPLETE_FIX.md** - Complete guide to fixing WebDir path issues
|
||||
- **STARTUP_JSON_WEBDIR_FIX.md** - Fix startup.json WebDir configuration
|
||||
- **PATH_FIX_GUIDE.md** - Comprehensive path fix guide
|
||||
- **LINUX_PATH_ISSUE_SUMMARY.md** - Linux paths on Windows issue summary
|
||||
- **FIX_SYSTEM_XML_PATHS.md** - Fix Linux paths in system.xml
|
||||
- **POWERSHELL_SCRIPT_FIXED.md** - PowerShell utility script fixes
|
||||
|
||||
#### 🔧 Utility Scripts
|
||||
Added a new section documenting utility scripts for maintenance and fixes:
|
||||
|
||||
**PowerShell Scripts:**
|
||||
- **FixJellyfinPaths.ps1** - Fix Linux paths in configuration files (system.xml, encoding.xml, database.xml)
|
||||
- **FixStartupJsonWebDir.ps1** - Fix WebDir paths in startup.json files
|
||||
|
||||
**SQL Scripts:**
|
||||
- **add_presentationuniquekey_index.sql** - Add performance index for episode deduplication queries (fixes 180+ second timeouts)
|
||||
- **fix_windows_paths.sql** - Convert Linux paths to Windows paths in database (reference script)
|
||||
|
||||
### Documentation Organization
|
||||
|
||||
All new documentation has been:
|
||||
1. ✅ Properly categorized under relevant sections
|
||||
2. ✅ Marked with **(NEW)** tags for easy identification
|
||||
3. ✅ Formatted consistently with existing documentation
|
||||
4. ✅ Linked with correct relative paths
|
||||
|
||||
### Quick Access
|
||||
|
||||
All new files can be found under:
|
||||
- Documentation: `docs/*.md`
|
||||
- PowerShell Scripts: `*.ps1` (root directory)
|
||||
- SQL Scripts: `*.sql` (root directory)
|
||||
|
||||
### Related Issues Fixed
|
||||
|
||||
These documentation files and scripts address:
|
||||
1. **WebDir Path Issue** - startup.json created with absolute paths instead of relative "wwwroot"
|
||||
2. **Linux Paths on Windows** - Configuration files (system.xml) containing Linux paths on Windows installations
|
||||
3. **PostgreSQL Query Timeouts** - Missing performance index causing 180+ second query times
|
||||
4. **PowerShell Script Errors** - Syntax issues in path fix utilities
|
||||
|
||||
### Usage
|
||||
|
||||
For path issues:
|
||||
```powershell
|
||||
# Fix system.xml paths
|
||||
.\FixJellyfinPaths.ps1
|
||||
|
||||
# Fix startup.json WebDir
|
||||
.\FixStartupJsonWebDir.ps1
|
||||
```
|
||||
|
||||
For PostgreSQL performance:
|
||||
```sql
|
||||
-- Run as database user
|
||||
psql -U jellyfin -d jellyfin -f add_presentationuniquekey_index.sql
|
||||
```
|
||||
|
||||
### Notes
|
||||
|
||||
- All scripts include safety features (backups, dry-run mode)
|
||||
- Documentation includes step-by-step instructions
|
||||
- Code changes were already implemented in the source code
|
||||
- Scripts are for fixing existing installations
|
||||
Reference in New Issue
Block a user