Limit postgres database concurrency (#17246)

This commit is contained in:
Pieter-Jan Briers
2023-06-10 13:52:08 +02:00
committed by GitHub
parent f055faeebd
commit 50257c3bd7
5 changed files with 30 additions and 14 deletions

View File

@@ -479,11 +479,16 @@ namespace Content.Shared.CCVar
public static readonly CVarDef<string> DatabasePgPassword =
CVarDef.Create("database.pg_password", "", CVar.SERVERONLY | CVar.CONFIDENTIAL);
/// <summary>
/// Max amount of concurrent Postgres database operations.
/// </summary>
public static readonly CVarDef<int> DatabasePgConcurrency =
CVarDef.Create("database.pg_concurrency", 8, CVar.SERVERONLY);
// Basically only exists for integration tests to avoid race conditions.
public static readonly CVarDef<bool> DatabaseSynchronous =
CVarDef.Create("database.sync", false, CVar.SERVERONLY);
/*
* Outline
*/