【问题标题】:Npgsql & Postgresql : ERROR: XX001: could not read block 2354 of relationNpgsql & Postgresql:错误:XX001:无法读取关系的块 2354
【发布时间】:2009-03-31 15:49:48
【问题描述】:

我有一个服务正在运行并插入数据(大量数据)。有时,这只是大约几周,我收到此错误:

ERROR: XX001: could not read block 2354 of relation 1663/17633/17925: read only 0 of 8192 bytes.

这个错误来自 PostGresql 的 Npgsql 连接器:

Exception trace:    at Npgsql.NpgsqlConnector.CheckErrors()
at Npgsql.NpgsqlConnector.CheckErrorsAndNotifications()
at Npgsql.NpgsqlCommand.ExecuteCommand()
at Npgsql.NpgsqlCommand.ExecuteNonQuery()

如果我在 PGAdmin 中执行创建该错误的查询,我也会遇到此错误。任何人都知道为什么这个没有什么特别的插入查询有这个错误?这个表有主键但没有外键,我手动验证过,这个表不包含主键。

我该如何解决这个错误?

【问题讨论】:

    标签: sql postgresql npgsql


    【解决方案1】:

    鉴于错误“XX001”是 listed 为“DATA CORRUPTED”,您可能需要进行备份。

    【讨论】:

    • 什么意思?硬盘上的数据库已损坏?
    • 最有可能,但请在适当的 pgsql 列表中询问。
    猜你喜欢
    • 2016-01-24
    • 2020-06-11
    • 2011-06-06
    • 2018-06-07
    • 1970-01-01
    • 1970-01-01
    • 2015-09-13
    • 2023-02-14
    相关资源
    最近更新 更多