On Thu, Jul 11, 2019 at 06:45:36AM -0600, Ryan Lambert wrote: > > >>Uh, what if a transaction modifies page 0 and page 1 of the same table > > > >>--- don't those pages have the same LSN. > > > > > >No, because WAL being a physical change log, each page gets its own > > >WAL record with its own LSN. > > > > > > > What if you have wal_log_hints=off? AFAIK that won't change the page LSN. > > > > > > Alvaro suggested elsewhere that we require checksums for these, which > > would also force wal_log_hints to be on, and therefore the LSN would > > change. > > Yes, it sounds like the agreement was LSN is unique when wal_log_hints is on. > I don't know enough about the internals to know if pg_class.oid is also needed > or not.
Well, so, as far as we know now, every change to a heap/index page advances the LSN, except for hint bits, which we can force to advance LSN via wal_log_hints. We automatically enable wal_log_hints for checksums, so we can easily enable it automatically for encrypted clusters. I assume the LSN used for 8k pages and the segment numbers (for WAL) do not overlap in numbering, for our nonce. I think we will eventually have to have this setup verified by security experts but I think we need to work through what is possible using existing Postgres facilities before we present a possible solution. -- 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 +