Re: Urgent !!!! Tables inaccessible postgres v17.6

From: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>
To: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
Cc: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: Urgent !!!! Tables inaccessible postgres v17.6
Date: 2026-08-06 15:40:12
Message-ID: CABOikdMGJdGfFfUsXadsfvEkNoFJ1g-hiuu4wH_Dz74s1AMP=Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Thu, Aug 6, 2026 at 8:41 PM Ron Johnson <ronljohnsonjr(at)gmail(dot)com> wrote:

>
>
> On Thu, Aug 6, 2026 at 10:57 AM mahamood hussain <hussain(dot)ieg(at)gmail(dot)com>
> wrote:
>
>> Thanks for the suggestion. I confirmed that base/16388/447758 is the
>> heap file for table, so unfortunately it isn't an index that can simply
>> be rebuilt.
>>
>> heap_size | index_size | total_size
>> -----------+------------+------------
>> 11 GB | 5694 MB | 17 GB
>>
>> I'm fairly new to PostgreSQL, so could you provide a bit more context on
>> the binary search approach you mentioned? I'd appreciate it if you could
>> explain the steps involved and how it helps identify the records on the
>> corrupted page.
>>
>
You can try a TID scan to skip the corrupted page. Something like this:

SET max_parallel_workers_per_gather = 0; -- avoid parallel worker

SELECT count(*) FROM schema.tablename WHERE ctid < '(696770,0)'::tid;
SELECT count(*) FROM schema.tablename WHERE ctid >= '(696771,0)'::tid;

If this works, you can at least make a copy of all rows except the bad ones.

Thanks,
Pavan

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message mahamood hussain 2026-08-06 15:42:24 Re: Urgent !!!! Tables inaccessible postgres v17.6
Previous Message Ron Johnson 2026-08-06 15:11:40 Re: Urgent !!!! Tables inaccessible postgres v17.6