From: | Tomas Vondra <tomas(at)vondra(dot)me> |
---|---|
To: | Yugo Nagata <nagata(at)sraoss(dot)co(dot)jp> |
Cc: | Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Drop database command will raise "wrong tuple length" if pg_database tuple contains toast attribute. |
Date: | 2024-08-19 10:16:16 |
Message-ID: | 9315eecd-2a5e-4f4a-ac0a-c1faecde77ca@vondra.me |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 8/19/24 11:01, Yugo Nagata wrote:
> On Mon, 19 Aug 2024 00:35:39 +0200
> Tomas Vondra <tomas(at)vondra(dot)me> wrote:
>
>> On 8/16/24 13:26, Tomas Vondra wrote:
>>> Hi Ayush,
>>>
>>> ...
>>>
>>> So this fix seems reasonable.
>>>
>>
>> I've pushed this to all affected branches, except for 11 which is EOL.
>>
>> I thought about adding a test, but I couldn't think of a TAP test where
>> this would really fit, and it didn't seem very practical to have a test
>> creating hundreds of roles. So I abandoned the idea.
>
> I tried to add Assert in heap_inplace_update to prevent possible similar
> failures, but I gave up because I could not find a good way to determine if
> a tuple is detoasted of not.
>
Right, not sure there's a good way to check for that.
> By the way, I found a comment in vac_update_datfrozenxid() and EventTriggerOnLogin()
> that explains why we could not use tuples from the syscache for heap_inplace_update.
> I think it is better ad d the same comment in dropdb(). I attached a trivial patch for it.
>
Agreed. That seems like a nice improvement to the comment.
regards
--
Tomas Vondra
From | Date | Subject | |
---|---|---|---|
Next Message | Ashutosh Bapat | 2024-08-19 10:41:31 | Re: define PG_REPLSLOT_DIR |
Previous Message | David Rowley | 2024-08-19 10:01:22 | Re: Optimize WindowAgg's use of tuplestores |