anchor.diff:          slot = replicationSlot;
           directory = walBackupDir;
         };
  +      # This is only to speedup test, it isn't time racing. Service is set to autorestart always,
  +      # default 60sec is fine for real system, but is too much for a test
  +      systemd.services.postgresql-wal-receiver-main.serviceConfig.RestartSec = mkForce 5;
       };
   
       testScript = ''
  
positive.code: with pkgs.lib;
  
  let
    postgresqlDataDir = "/var/db/postgresql/test";
    replicationUser = "wal_receiver_user";
    replicationSlot = "wal_receiver_slot";
    replicationConn = "postgresql://${replicationUser}@localhost";
    baseBackupDir = "/tmp/pg_basebackup";
    walBackupDir = "/tmp/pg_wal";
    recoveryConf = pkgs.writeText "recovery.conf" ''
      restore_command = 'cp ${walBackupDir}/%f %p'
    '';
  
    makePostgresqlWalReceiverTest = subTestName: postgresqlPackage: makeTest {
      name = "postgresql-wal-receiver-${subTestName}";
      meta.maintainers = with maintainers; [ pacien ];
  
  
negative.code:           wal_level = archive # alias for replica on pg >= 9.6
            max_wal_senders = 10
            max_replication_slots = 10
          '' + optionalString atLeast12 ''
            ${restoreCommand}
            recovery_end_command = 'touch recovery.done'
          '';
          authentication = ''
            host replication ${replicationUser} all trust
  