Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (77.05%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #640 +/- ##
==========================================
+ Coverage 56.69% 56.96% +0.27%
==========================================
Files 71 71
Lines 11275 11282 +7
Branches 2786 2787 +1
==========================================
+ Hits 6392 6427 +35
+ Misses 3517 3487 -30
- Partials 1366 1368 +2
🚀 New features to boost your workflow:
|
jeltz
left a comment
There was a problem hiding this comment.
I think we should add some tests.
| } | ||
|
|
||
| /* Initialize pg_tde resource manager */ | ||
| Assert(RmgrIdIsValid(RM_TDERMGR_ID)); |
There was a problem hiding this comment.
Not sure I get why you have this assert.
There was a problem hiding this comment.
This constant comes from the TDE code and used later in array indexing. So I'm just being precocious in case it was accidentally changed etc. I wasn't 100% sure about it, so if you deem it redundant I ok with removing it.
|
This should also add a changelog file since we dicided to introduce those. |
6b10390 to
4180f37
Compare
|
Tests added, changelog changed. |
This commit makes pg_tde_waldump print the proper name and description for pg_tde rmgr records. Instead of just generic "desc: UNKNOWN (%d) rmid: %d" pg_tde_waldump output before: ``` rmgr: custom140 len (rec/tot): 30/ 30, tx: 753, lsn: 0/01BB65E8, prev 0/01BB6598, desc: UNKNOWN (40) rmid: 140 rmgr: custom140 len (rec/tot): 1205/ 1205, tx: 0, lsn: 0/01BBB3B0, prev 0/01BBB378, desc: UNKNOWN (30) rmid: 140 rmgr: custom140 len (rec/tot): 341/ 341, tx: 0, lsn: 0/01BBB8E8, prev 0/01BBB8B0, desc: UNKNOWN (10) rmid: 140 rmgr: custom140 len (rec/tot): 1205/ 1205, tx: 0, lsn: 0/01BBBA80, prev 0/01BBBA40, desc: UNKNOWN (30) rmid: 140 rmgr: custom140 len (rec/tot): 341/ 341, tx: 0, lsn: 0/01BBBF38, prev 0/01BBBA80, desc: UNKNOWN (10) rmid: 140 ``` and after the commit: ``` rmgr: pg_tde len (rec/tot): 30/ 30, tx: 753, lsn: 0/01BB65E8, prev 0/01BB6598, desc: INSTALL_EXTENSION db: 16384 rmgr: pg_tde len (rec/tot): 1205/ 1205, tx: 0, lsn: 0/01BBB3B0, prev 0/01BBB378, desc: WRITE_KEY_PROVIDER db: 1664, provider id: -1 rmgr: pg_tde len (rec/tot): 341/ 341, tx: 0, lsn: 0/01BBB8E8, prev 0/01BBB8B0, desc: ADD_PRINCIPAL_KEY db: 1664 rmgr: pg_tde len (rec/tot): 1205/ 1205, tx: 0, lsn: 0/01BBBA80, prev 0/01BBBA40, desc: WRITE_KEY_PROVIDER db: 16384, provider id: 1 rmgr: pg_tde len (rec/tot): 341/ 341, tx: 0, lsn: 0/01BBBF38, prev 0/01BBBA80, desc: ADD_PRINCIPAL_KEY db: 16384 ```
After the previous commit, pg_tde_waldump recognises pg_tde rmgr in output. But to filter out such records, the user would still have to set the value of the --rmgr flag in the format "custom140". This commit makes --rmgr flag recognise "pg_tde" rmgr. So instead of: ``` pg_tde_waldump --rmgr=custom140 ... ``` the user can specify: ``` pg_tde_waldump --rmgr=pg_tde ... ``` `--rmgr=custom140` keeps working as well.
4180f37 to
6c4d5c6
Compare
Sometimes, during the debug of pg_tde-related issues, it is really helpful to see what exactly pg_tde rmgr added to WAL. But pg_tde_waldump doesn't have insights into custom rmgr, and all it displays is generic
desc: UNKNOWN (50) rmid: 140.This PR makes it aware of pg_tde rmgr so that now:
instead of:
All changes currently are only for pg18. I'll add pg17 and pg16 after approval.
PG-2754