pgsql: Don't trust unvalidated xl_tot_len.

2023-09-22 Thread Thomas Munro
Don't trust unvalidated xl_tot_len. xl_tot_len comes first in a WAL record. Usually we don't trust it to be the true length until we've validated the record header. If the record header was split across two pages, previously we wouldn't do the validation until after we'd already tried to allocat

pgsql: Don't trust unvalidated xl_tot_len.

2023-09-22 Thread Thomas Munro
Don't trust unvalidated xl_tot_len. xl_tot_len comes first in a WAL record. Usually we don't trust it to be the true length until we've validated the record header. If the record header was split across two pages, previously we wouldn't do the validation until after we'd already tried to allocat

pgsql: Don't trust unvalidated xl_tot_len.

2023-09-22 Thread Thomas Munro
Don't trust unvalidated xl_tot_len. xl_tot_len comes first in a WAL record. Usually we don't trust it to be the true length until we've validated the record header. If the record header was split across two pages, previously we wouldn't do the validation until after we'd already tried to allocat

pgsql: Don't trust unvalidated xl_tot_len.

2023-09-22 Thread Thomas Munro
Don't trust unvalidated xl_tot_len. xl_tot_len comes first in a WAL record. Usually we don't trust it to be the true length until we've validated the record header. If the record header was split across two pages, previously we wouldn't do the validation until after we'd already tried to allocat

pgsql: Don't trust unvalidated xl_tot_len.

2023-09-22 Thread Thomas Munro
Don't trust unvalidated xl_tot_len. xl_tot_len comes first in a WAL record. Usually we don't trust it to be the true length until we've validated the record header. If the record header was split across two pages, previously we wouldn't do the validation until after we'd already tried to allocat

pgsql: Don't trust unvalidated xl_tot_len.

2023-09-22 Thread Thomas Munro
Don't trust unvalidated xl_tot_len. xl_tot_len comes first in a WAL record. Usually we don't trust it to be the true length until we've validated the record header. If the record header was split across two pages, previously we wouldn't do the validation until after we'd already tried to allocat