From: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrey Borodin <amborodin86(at)gmail(dot)com>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Michael Paquier <michael(at)paquier(dot)xyz> |
Subject: | Re: Something is wrong with wal_compression |
Date: | 2023-01-26 22:50:10 |
Message-ID: | CA+hUKGK=m2_jj5UK=MSaSUACSLA_4cZ6N96L5E2UaOm9iBooNQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Jan 27, 2023 at 11:14 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Andrey Borodin <amborodin86(at)gmail(dot)com> writes:
> > On Thu, Jan 26, 2023 at 12:12 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> >> That test case is demonstrating fundamental
> >> database corruption after a crash.
>
> > Not exactly corruption. XID was not persisted and buffer data did not
> > hit a disk. Database is in the correct state.
>
> Really? I don't see how this part is even a little bit okay:
>
> [00:40:50.744](0.046s) not ok 3 - xid is aborted after crash
> [00:40:50.745](0.001s)
> [00:40:50.745](0.000s) # Failed test 'xid is aborted after crash'
> # at t/011_crash_recovery.pl line 57.
> [00:40:50.746](0.001s) # got: 'committed'
> # expected: 'aborted'
>
> If any tuples made by that transaction had reached disk,
> we'd have a problem.
The problem is that the WAL wasn't flushed, allowing the same xid to
be allocated again after crash recovery. But for any data pages to
hit the disk, we'd have to flush WAL first, so then it couldn't
happen, no? FWIW I also re-complained about the dangers of anyone
relying on pg_xact_status() for its stated purpose after seeing
tanager's failure[1].
From | Date | Subject | |
---|---|---|---|
Next Message | Jelte Fennema | 2023-01-26 22:54:41 | Re: run pgindent on a regular basis / scripted manner |
Previous Message | Tom Lane | 2023-01-26 22:41:32 | Re: improving user.c error messages |