On Mon, Jul 29, 2019 at 04:09:52PM -0400, Alvaro Herrera wrote: > On 2019-Jul-27, Bruce Momjian wrote: > > > I think using LSN and page number, we will _never_ reuse the IV, except > > for cases like promoting two standbys, which I think we have to document > > as an insecure practice. > > Actually, why is it an insecure practice? If you promote two standbys, > then the encrypted pages are the same pages, so it's not two different > messages with the same key/IV -- they're still *one* message. And as > soon as they start getting queries, they will most likely diverge > because the LSNs of records after the promotion will (most likely) no > longer match. It takes one different WAL record length for the > "encryption histories" to diverge completely ...
That is a very good point, but if the LSN was reused in _any_ table with the same page number, it would be insecure, and it would be easy to scan for such cases. However, you are right that it is more rare than I thought. -- Bruce Momjian <br...@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +