1 comment

[ 5.1 ms ] story [ 15.6 ms ] thread
Another fairly easy one (which doesn't strictly corrupt the running database, but does stop all replication and needs a follow-up checkpoint to be crash-safe) is running

    select pg_logical_emit_message(false,v,v) from (select repeat(' '::text,1024*1024*1023)) v(v);
This generates and writes a WAL record that cannot be read by PostgreSQL, thus breaking all processes that want to read that record (replication and crash recovery). But, as mentioned before, it doesn't corrupt the data in the databases.