Re: Forbid to DROP temp tables of other sessions

Steven Niu <niushiji@gmail.com>

From: Steven Niu <niushiji@gmail.com>
To: Daniil Davydov <3danissimo@gmail.com>, "David G. Johnston" <david.g.johnston@gmail.com>
Cc: "Andrey M. Borodin" <x4mmm@yandex-team.ru>, Andres Freund <andres@anarazel.de>, Thomas Munro <thomas.munro@gmail.com>, Rafia Sabih <rafia.pghackers@gmail.com>, Michael Paquier <michael@paquier.xyz>, Tom Lane <tgl@sss.pgh.pa.us>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Date: 2025-03-17T09:48:06Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. pg_basebackup: Add missing PQclear in error path

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