anchor.diff:          requires = [ "time-sync.target" ];
           wantedBy = [ "multi-user.target" ];
   
  -        unitConfig.RequiresMountsFor = "${cfg.dataDir}";
  -
  -        preStart = ''
  -          if ! test -e ${cfg.dataDir}; then
  -            mkdir -m 0700 -p ${cfg.dataDir}
  -            chown -R ${cfg.user} ${cfg.dataDir}
  -          fi
  -        '';
  +        unitConfig.RequiresMountsFor = "/var/lib/cockroachdb";
   
           serviceConfig =
             { ExecStart = startupCommand;
               Type = "notify";
               User = cfg.user;
  -            PermissionsStartOnly = true;
  +            StateDirectory = "cockroachdb";
  +            StateDirectoryMode = "0700";
   
               Restart = "always";
  -            TimeoutStopSec="60";
  -            RestartSec="10";
  -            StandardOutput="syslog";
  -            StandardError="syslog";
  -            SyslogIdentifier="cockroach";
  +
  +            # A conservative-ish timeout is alright here, because for Type=notify
  +            # cockroach will send systemd pings during startup to keep it alive
  +            TimeoutStopSec = 60;
  +            RestartSec = 10;
             };
         };
     };
  
positive.code:           The total size for caches.
  
            This can be a percentage, expressed with a fraction sign or as a
            decimal-point number, or any bytes-based unit. For example, "25%",
            "0.25" both represent 25% of the available system memory. The values
            "1000000000" and "1GB" both represent 1 gigabyte of memory.
          '';
        };
  
  
negative.code:           data for SQL queries.
  
            This can be a percentage, expressed with a fraction sign or as a
            decimal-point number, or any bytes-based unit. For example,
            <literal>"25%"</literal>, <literal>"0.25"</literal> both represent
            25% of the available system memory. The values
            <literal>"1000000000"</literal> and <literal>"1GB"</literal> both
            represent 1 gigabyte of memory.
          '';
        };
  
  