Re: FSM corruption leading to errors

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: FSM corruption leading to errors
Date: 2016-10-21 22:31:41
Message-ID: CAB7nPqTx5oNpmh2fgS8iuVY7JyWtLZvSUiC0AXa_tk3g+BFFpQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Oct 22, 2016 at 5:17 AM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
> On 10/20/16 10:15 PM, Michael Paquier wrote:
>>
>> 2) If anything is found, stop the server and delete the files manually.
>> 3) Re-start the server.
>> OK, that's troublesome and costly for large relations, but we know
>> that's the safest way to go for any versions, and there is no need to
>> complicate the code with any one-time repairing extensions.
>
> Wouldn't you need to run around to all your replicas and do that as well?

Yeah...

>> Speaking of which, I implemented a small extension able to truncate
>> the FSM up to the size of the relation as attached, but as I looked at
>> it SMGR_TRUNCATE_FSM has been introduced in 9.6 so its range of action
>> is rather limited... And I pushed as well a version on github:
>> https://github.com/michaelpq/pg_plugins/tree/master/pg_fix_truncation
>> The limitation range of such an extension is a argument good enough to
>> just rely on the stop/delete-FSM/start method to fix an instance and
>> let VACUUM do the rest of the work. That looks to work but use it at
>> your own risk.
>
>
> Shouldn't the truncation be logged before it's performed?

Doh. Yes, thanks for the reminder. And I commented on that upthread..
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-10-21 22:33:56 Re: Renaming of pg_xlog and pg_clog
Previous Message Jim Nasby 2016-10-21 21:08:40 Re: Indirect indexes