Dear Xuneng, > This may not be ideal. It decrements on every lookup of an existing > entry, not just when consuming an invalidation, which could make the > counter go > negative. Do we need decrementing logic? Not perfect 1:1 tracking > seems ok in here; though it might make the clean-up a bit more > aggressive.
Yeah it was not needed. I posted new approach [1] and even this has a possibility that some of listed entries are revived. At that time they won't be removed immediately, they can be skipped while cleaning up. [1]: https://www.postgresql.org/message-id/OSCPR01MB14966E0225BC4AA1BC956E1E3F532A%40OSCPR01MB14966.jpnprd01.prod.outlook.com Best regards, Hayato Kuroda FUJITSU LIMITED