RE: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly
Date
Msg-id OSCPR01MB149665B3F0629D10731B18E5AF570A@OSCPR01MB14966.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly  (Alexander Korotkov <aekorotkov@gmail.com>)
List pgsql-hackers
Dear Alexander,

> Thank you!  All of these totally make sense.  The updated patch is attached.

Thanks for the update. I found another point.

```
-# Another 2M rows; that's about 260MB (~20 segments) worth of WAL.
+# Another 50K rows; that's about 86MB (~5 segments) worth of WAL.
 $node->safe_psql('postgres',
-    q{insert into t (b) select md5(i::text) from generate_series(1,1000000) s(i)}
+    q{insert into t (b) select repeat(md5(i::text),50) from generate_series(1,50000) s(i)}
 );
```

I think a perl function advance_wal() can be used instead of doing actual INSERT
command because no one refers the replicated result. Same thing can be said in
046/047.

Best regards,
Hayato Kuroda
FUJITSU LIMITED


pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Conflict detection for update_deleted in logical replication
Next
From: Daniel Gustafsson
Date:
Subject: Re: pg_upgrade fails with an error "object doesn't exist"