How to use wal_level in Postgres to set the recovery mode to simple for a database like how Microsoft SQL Server does it?
PostgreSQL works quite differently. Transaction log files will be removed with all wal_levels (as soon as the file is full and archived and a checkpoint has completed).
If you want to live without WAL archives, and all you need is crash recovery, you can set wal_level to minimal.