Skip to content
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Version>8.0.0-beta-6</Version>
<Version>7.14.2</Version>
<LangVersion>12.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,13 @@ public async Task InitializeAsync(PostgresqlDatabase database, CancellationToken
public async Task InitializeAsync(NpgsqlConnection conn, CancellationToken token)
{
if (_hasInitialized) return;

await _semaphoreSlim.WaitAsync(token).ConfigureAwait(false);
if (_hasInitialized) return;

_partitions.Clear();

try
{
if (_hasInitialized) return;

_partitions.Clear();

await using var reader = await conn
.CreateCommand($"select partition_value, partition_suffix from {_table.Identifier.QualifiedName}")
.ExecuteReaderAsync(token).ConfigureAwait(false);
Expand Down