| From: | Давыдов Виталий <v(dot)davydov(at)postgrespro(dot)ru> |
|---|---|
| To: | "Vitaly Davydov" <v(dot)davydov(at)postgrespro(dot)ru> |
| Cc: | "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly |
| Date: | 2024-11-21 16:13:23 |
| Message-ID: | 100d39-673f5c00-35-5ccfd100@179797392 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thursday, November 21, 2024 17:56 MSK, "Vitaly Davydov" <v(dot)davydov(at)postgrespro(dot)ru> wrote:
> I'm trying to create a perl test to reproduce it. Please, give me some time to create the test script.
Attached is the test script which reproduces my problem. It should be run on a patched postgresql with the following changes (see below). It is the easiest way to emulate long checkpoint during high load.
CheckPointBuffers(int flags)
{
BufferSync(flags);
+ pg_usleep(10000000);
}
I used the following command line to run the script, where <postgresqldir> - the directory with postgresql sources. The module IPC::Run should be installed as well. PATH and LD_LIBRARY_PATH should be set to a proper postgresql binary and libraries as well.
perl -I <postgresqldir>/src/test/perl/ restartlsn.pl
Finally, it should produce the following error into the log:
error running SQL: 'psql:<stdin>:1: ERROR: requested WAL segment pg_wal/000000010000000000000001 has already been removed'
With best regards,
Vitaly
| Attachment | Content-Type | Size |
|---|---|---|
| restartlsn.pl | application/x-perl | 2.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David G. Johnston | 2024-11-21 16:26:31 | Re: Document NULL |
| Previous Message | Erik Nordström | 2024-11-21 16:08:49 | Changed behavior in rewriteheap |