Re: Speedup of relation deletes during recovery - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: Speedup of relation deletes during recovery
Date
Msg-id CAHGQGwFA0PLgH73RiNL+4T=eXKgxj3gFmBsNLuKP7CEZA2LMKQ@mail.gmail.com
Whole thread Raw
In response to Re: Speedup of relation deletes during recovery  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Speedup of relation deletes during recovery  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Tue, Jul 3, 2018 at 11:28 AM, Michael Paquier <michael@paquier.xyz> wrote:
> On Tue, Jul 03, 2018 at 04:13:15AM +0900, Fujii Masao wrote:
>> OK, so what about the attached patch?
>
> I have been looking at this patch, and this looks in good shape to me

Thanks for the review! So, committed.

> (please indent!).

Hmm.. I failed to find indent issue in my patch... But anyway
future execution of pgindent will fix that even if it exists.

> +    * Call smgrclose() in reverse order as when smgropen() is called.
> +    * This trick enables remove_from_unowned_list() in smgrclose()
> +    * to search the SMgrRelation from the unowned list,
> +    * in O(1) performance.
>
> A nit here: with O(1) performance.

I changed the patch accordingly.

> Could it be possible to add an assertion so as isRedo is never enabled
> out of recovery?

I'm not sure if adding such assertion into only the function that
the patch added is helpful. There are many functions having something
like isRedo as an argument.

Regards,

-- 
Fujii Masao


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: "Access privileges" is missing after pg_dumpall
Next
From: Alvaro Herrera
Date:
Subject: Re: Legacy GiST invalid tuples