BUG #16881: error log:Npgsql.PostgresException (0x80004005): XX001: 无法读取文件"base/16394/25021"的块157:只读取了8192字节的0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

BUG #16881: error log:Npgsql.PostgresException (0x80004005): XX001: 无法读取文件"base/16394/25021"的块157:只读取了8192字节的0

PG Bug reporting form
The following bug has been logged on the website:

Bug reference:      16881
Logged by:          宇森 孙
Email address:      [hidden email]
PostgreSQL version: 9.6.0
Operating system:   Windows Server 2016 64bit Datacenter
Description:        

error log:
Npgsql.PostgresException (0x80004005): XX001:
无法读取文件"base/16394/25021"的块157:只读取了8192字节的0

How should I do?
It's so important for me.
 Thank you!

Reply | Threaded
Open this post in threaded view
|

Re: BUG #16881: error log:Npgsql.PostgresException (0x80004005): XX001: 无法读取文件"base/16394/25021"的块157:只读取了8192字节的0

Julien Rouhaud
On Mon, Feb 22, 2021 at 4:32 PM PG Bug reporting form
<[hidden email]> wrote:

>
> The following bug has been logged on the website:
>
> Bug reference:      16881
> Logged by:          宇森 孙
> Email address:      [hidden email]
> PostgreSQL version: 9.6.0
> Operating system:   Windows Server 2016 64bit Datacenter
> Description:
>
> error log:
> Npgsql.PostgresException (0x80004005): XX001:
> 无法读取文件"base/16394/25021"的块157:只读取了8192字节的0

The error (which is "could not read block %u in file \"%s\": read only
%d of %d bytes") should have more details in the postgres logs,
including the reason for that error.  Can you show the full error
message from the postgres logs?  This could be the side effect or an
antivirus software, or some disk error or many other things.


Reply | Threaded
Open this post in threaded view
|

Re: BUG #16881: error log:Npgsql.PostgresException (0x80004005): XX001: 无法读取文件"base/16394/25021"的块157:只读取了8192字节的0

Julien Rouhaud
Hi,

Please keep the mailing list in Cc, and please don't top post.

On Wed, Feb 24, 2021 at 5:34 PM 孙宇森 <[hidden email]> wrote:
>
> Only this error log.

Really, there wasn't any additional line with "STATEMENT:" or "HINT:" nearby?

> I tried to scan the disk and found no bad path; I tried
> to query for deadlock, the sentence is as follows: select * from PG_ stat_
> Activity where datname ='cms'; as a result, there is no deadlock process.
> "wait_event_type"and"wait_event" is null.

You likely won't see any sign of that problem in pg_stat_activity.
Can you connect to the target database (I'm assuming "cms") and run
this query:

SELECT relname FROM pg_class WHERE relfilenode = 25021;

This will give you the name of the affected relation.  If that's a
table you can check doing a "SELECT * FROM the_table" to see if the
problem is still there or not.  Otherwise just rebuild the index or
recreate the materialized view.  Be careful, the above query will only
give you an unqualified relation name, if you have multiple schema
containing the same object names, check in the catalogs to see which
schema should be used.