Re: Small refactoring around vacuum_open_relation

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: Kirill Reshke <reshkekirill(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Small refactoring around vacuum_open_relation
Date: 2025-01-09 10:45:57
Message-ID: 202501091045.pzuv3plvqcr4@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2025-Jan-09, Ashutosh Bapat wrote:

> Sorry for reviewing late. The patch looks ok.

Dunno what others think, this seems useless churn to me.

> I found some more
> static const struct
> {
> LOCKMODE hwlock;
> int lockstatus;
> int updstatus;
> }
>
> tupleLockExtraInfo[MaxLockTupleMode + 1] =
>
> hwlock should be hwlockmode?
>
> In vacuum_rel(), get_relation_info(), LOCK_PRINT(), pg_lock_status(),
> toast_close_indexes(), toast_get_valid_index(),
> toast_open_indexestoast_open_indexes().

Eh, and right here it is when things snowball and now the whole tree is
under duress because of a consistency argument of dubious value.

Heck, I see even fixing typos as problematic, because there comes the
time when somebody needs to make a backpatch and they find there's a
conflict to fix because of a typo fix. IMO if you really want to fix
typos, then the committer should apply such fixes to all live branches
where they apply, so that any later backpatching is not bothered by it.

If you're patching the source code for other reasons, then by all means
fix inconsistencies, typos, etc all you want. Otherwise, please leave
things alone _or_ backpatch such fixes.

--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"El que vive para el futuro es un iluso, y el que vive para el pasado,
un imbécil" (Luis Adler, "Los tripulantes de la noche")

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vladlen Popolitov 2025-01-09 11:03:56 Re: Windows meson build
Previous Message Ashutosh Bapat 2025-01-09 10:30:25 Re: Small refactoring around vacuum_open_relation