fous velkej <honza801@gmail.com> writes:
> i got following error while selecting from my db
> ERROR: invalid page header in block 502758 of relation base/16388/16403
> i've found some solution in this thread
> http://www.mail-archive.com/pgsql-general@postgresql.org/msg101644.html
> but my problem is, that there are multiple files with similar name in
> the base/16388 directory.
> 16403 (1Gb)
> 16403.1 (1Gb)
> 16403.2 (1Gb)
> 16403.3 (almost 1 Gb)
> so the question is, where can i find the right 502758 position (i
> assume that this is the number of 8k block position).
> each file with size 1Gb has 131072 of 8k blocks.
Right, so it would be in the .3 file at block number 109542.
regression=# select 502758 / 131072;
?column?
----------
3
(1 row)
regression=# select 502758 % 131072;
?column?
----------
109542
(1 row)
regards, tom lane