Re: Forbid to DROP temp tables of other sessions

From: Steven Niu <niushiji(at)gmail(dot)com>
To: Daniil Davydov <3danissimo(at)gmail(dot)com>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Andres Freund <andres(at)anarazel(dot)de>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Rafia Sabih <rafia(dot)pghackers(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Forbid to DROP temp tables of other sessions
Date: 2025-03-17 09:48:06
Message-ID: adf9704b-44de-4f1d-bd3d-506a33abdab9@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I have some comments:

1. namespace.c, if relation->schemaname is pg_temp but myTempNamespace
isn't set, the error information might be misleading. Consider checking
OidIsValid(myTempNamespace) first.

2."you have not any temporary relations" --> "you have no any temporary
relations"

3. Regarding to the code "strncmp(nspname, "pg_temp", 7)", is it ok when
the nspname contains something like "pg_temp_1234"? I think we should
use strcmp instead of strncmp for exact matching.

Thanks,
Steven

在 2025/3/17 17:03, Daniil Davydov 写道:
> Hi,
> I see that the presence of isolation tests in the patch is
> controversial. First things first, let's concentrate on fixing the
> bug.
> I attach a new version of patch (for `master` branch) to this letter.
> It contains better comments and a few small improvements.
>
> P.S.
> Sorry for bad formatting in previous letter (idk how to fix it in gmail client)
>
> --
> Best regards,
> Daniil Davydov

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2025-03-17 09:49:50 Re: Conflict detection for multiple_unique_conflicts in logical replication
Previous Message John Naylor 2025-03-17 09:44:21 Re: Not-terribly-safe checks for CRC intrinsic support