Issue ID:
Type
Bug
Title:
Error Performing npm Feed Reindex
Created:
7/9/2025 6:57:38 PM by Steve Dennis
Status:
Open
Last pulled:
7/30/2025 1:52:52 PM
Description:
To reproduce, simply add a cached copy of JSONStream (https://www.npmjs.com/package/JSONStream) to a feed and run integrity check. Then try to reindex. On PostgreSQL, an error occurs ``` Unhandled exception: Npgsql.PostgresException (0x80004005): 42P01: relation "fpvs_target" does not exist at Npgsql.Internal.NpgsqlConnector.ReadMessageLong(Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken) at Npgsql.NpgsqlDataReader.NextResult() at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(Boolean async, CommandBehavior behavior, CancellationToken cancellationToken) at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior) at Inedo.ProGet.Data.PostgresDatabaseContext.PostgresCommand.ExecuteReader() in C:\Projects\ProGet\src\ProGet\Data\PostgresDatabaseContext.cs:line 362 at Inedo.Data.DatabaseContext.ExecuteInternal(String storedProcName, GenericDbParameter[] parameters, DatabaseCommandReturnType returnType) at Inedo.Data.DatabaseContext.ExecuteNonQuery(String storedProcName, GenericDbParameter[] parameters) at Inedo.Data.DatabaseContext.ExecuteScalar[TResult](String storedProcName, GenericDbParameter[] parameters, Int32 outParameterIndex) at Inedo.ProGet.Data.DB.Context.FeedPackageVersions_MergePackageVersion(Nullable`1 Feed_Id, Nullable`1 Source_PackageVersion_Id, Nullable`1 Target_PackageVersion_Id, String SourceAction_Code) in C:\Projects\ProGet\src\ProGet\obj\Debug\net8.0\InedoLib.Analyzers\InedoLib.Analyzers.DatabaseContextGenerator\DB.g.cs:line 2892 at Inedo.ProGet.Data.DB.FeedPackageVersions_MergePackageVersion(Nullable`1 Feed_Id, Nullable`1 Source_PackageVersion_Id, Nullable`1 Target_PackageVersion_Id, String SourceAction_Code) in C:\Projects\ProGet\src\ProGet\obj\Debug\net8.0\InedoLib.Analyzers\InedoLib.Analyzers.DatabaseContextGenerator\DB.g.cs:line 820 at Inedo.ProGet.Feeds.PackageFeed`5.ReindexFeedAsync(IReindexFeedExecutionContext context, CancellationToken cancellationToken) in C:\Projects\ProGet\src\ProGet\Feeds\PackageFeed.Health.cs:line 289 at Inedo.ProGet.Executions.ReindexFeedExecution.ExecuteAsync(IManualExecutionContext context) in C:\Projects\ProGet\src\ProGet\Executions\ReindexFeedExecution.cs:line 48 at Inedo.ProGet.Executions.ReindexFeedExecution.ExecuteAsync(IManualExecutionContext context) in C:\Projects\ProGet\src\ProGet\Executions\ReindexFeedExecution.cs:line 57 at Inedo.ProGet.Service.Executions.ActiveManualExecution.ExecuteAsync() in C:\Projects\ProGet\src\ProGet\Service\Executions\ActiveManualExecution.cs:line 37 Exception data: Severity: ERROR SqlState: 42P01 MessageText: relation "fpvs_target" does not exist InternalPosition: 8 InternalQuery: UPDATE FPVS_Target SET "Download_Count" = FPVS_Target."Download_Count" + FPVS_Source."Download_Count", "LastDownloaded_Date" = CASE WHEN FPVS_Source."LastDownloaded_Date" > FPVS_Target."LastDownloaded_Date" THEN FPVS_Source."LastDownloaded_Date" ELSE FPVS_Target."LastDownloaded_Date" END FROM "FeedPackageVersionStats" FPVS_Target INNER JOIN "FeedPackageVersionStats" FPVS_Source ON FPVS_Source."Feed_Id" = "@Feed_Id" AND FPVS_Source."PackageVersion_Id" = "@Source_PackageVersion_Id" WHERE FPVS_Target."Feed_Id" = "@Feed_Id" AND FPVS_Target."PackageVersion_Id" = "@Target_PackageVersion_Id" Where: PL/pgSQL function "FeedPackageVersions_MergePackageVersion"(integer,integer,integer,character) line 87 at SQL statement File: parse_relation.c Line: 1452 Routine: parserOpenTable ``` On SQL Server, the name doesn't appear to be fixed (per EDO-12003)