Re: Wrong security context for deferred triggers?

2024-06-08 Thread Isaac Morland
On Sat, 8 Jun 2024 at 17:37, Joseph Koshakow wrote: > However, I do worry that this is too much of a breaking change and > fundamentally changes how triggers work. Another draw back is that if > the trigger owner loses the required privileges, then no one can modify > to the table. > I worry

Re: Wrong security context for deferred triggers?

2024-06-08 Thread Joseph Koshakow
On Sat, Jun 8, 2024 at 5:36 PM Joseph Koshakow wrote: >Additionally, I applied your patch to master and re-ran the example and >didn't notice any behavior change. > >test=# CREATE TABLE tab (i integer); >CREATE TABLE >test=# CREATE FUNCTION trig() RETURNS trigger

Shouldn't jsonpath .string() Unwrap?

2024-06-08 Thread David E. Wheeler
Hackers, Most of the jsonpath methods auto-unwrap in lax mode: david=# select jsonb_path_query('[-2,5]', '$.abs()'); jsonb_path_query -- 2 5 (2 rows) The obvious exceptions are size() and type(), which apply directly to arrays, so no need to unwrap: david=# select

Re: Windows: openssl & gssapi dislike each other

2024-06-08 Thread Tom Lane
Andrew Dunstan writes: > On 2024-06-08 Sa 06:22, Imran Zaheer wrote: >> Now this can either be solved by just just undefine the macro defined >> by wincrypt.h as done here [3] >> Or we should rearrange our headers. Openssl header should be at the >> bottom (after the gssapi includes). > Let's be

Re: Assert in heapgettup_pagemode() fails due to underlying buffer change

2024-06-08 Thread Thomas Munro
On Fri, Jun 7, 2024 at 8:05 PM Alvaro Herrera wrote: > In passing, I noticed that WaitReadBuffers has zero comments, which > seems an insufficient number of them. Ack. Here is a patch for that. I guess I hadn't put a comment there because it's hard to write anything without sort of duplicating

Re: Assert in heapgettup_pagemode() fails due to underlying buffer change

2024-06-08 Thread Thomas Munro
New version. Same code as v2, but comments improved to explain the reasoning, with reference to README's buffer access rules. I'm planning to push this soon if there are no objections. From 1fa26f407622cd69d82f3b4ea68fddf2c357cf06 Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Fri, 7 Jun

Re: Wrong security context for deferred triggers?

2024-06-08 Thread Joseph Koshakow
Hi, I see that this patch is marked as ready for review, so I thought I would attempt to review it. This is my first review, so please take it with a grain of salt. > So a deferred constraint trigger does not run with the same security context > as an immediate trigger. It sounds like the crux

Re: Windows: openssl & gssapi dislike each other

2024-06-08 Thread Andrew Dunstan
On 2024-06-08 Sa 06:22, Imran Zaheer wrote: I was able to reproduce the gssapi & openssl error on windows. I tried on PG16 with msvc build system and on PG17 with meson build system. The error was reproducible when enabling both openssl and gssapi from the configurations. Turns out that it was

Re: The xversion-upgrade test fails to stop server

2024-06-08 Thread Andrew Dunstan
On 2024-06-08 Sa 10:00, Alexander Lakhin wrote: Hello, 30.05.2024 18:00, Alexander Lakhin wrote: While reviewing recent buildfarm failures, I came across this one: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake=2024-05-23%2004%3A11%3A03

Re: cannot drop intarray extension

2024-06-08 Thread Tom Lane
Michael Paquier writes: > On Fri, Jun 07, 2024 at 11:32:14AM +0800, jian he wrote: >> in deleteObjectsInList, under certain conditions trying to sort the to >> be deleted object list >> by just using sort_object_addresses seems to work, >> but it looks like a hack. >> maybe the proper fix would

Re: Proposal to include --exclude-extension Flag in pg_dump

2024-06-08 Thread Ayush Vatsa
> Attached is a patch for the --filter docs, covering the omissions I can see. Thanks Dean for working on this. I have reviewed the changes and they look good to me. Regards, Ayush Vatsa Amazon Web services (AWS) On Fri, 7 Jun 2024 at 15:50, Dean Rasheed wrote: > On Tue, 19 Mar 2024 at 11:53,

Re: Things I don't like about \du's "Attributes" column

2024-06-08 Thread Robert Haas
On Sat, Jun 8, 2024 at 10:02 AM Pavel Luzanov wrote: > Therefore, I think the current patch offers a better version of the \du > command. > However, I admit that these improvements are not enough to accept the patch. > I would like to hear other opinions. Hmm, I don't think I quite agree with

Re: Things I don't like about \du's "Attributes" column

2024-06-08 Thread Pavel Luzanov
On 07.06.2024 15:35, Robert Haas wrote: This seems unobjectionable to me. I am not sure whether it is better than the current verison, or whether it is what we want. But it seems reasonable. I consider this patch as a continuation of the work on \drg command, when it was decided to remove the

Re: The xversion-upgrade test fails to stop server

2024-06-08 Thread Alexander Lakhin
Hello, 30.05.2024 18:00, Alexander Lakhin wrote: While reviewing recent buildfarm failures, I came across this one: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=crake=2024-05-23%2004%3A11%3A03 upgrade.crake/REL_16_STABLE/REL9_5_STABLE-ctl4.log waiting for server to shut

Re: Use WALReadFromBuffers in more places

2024-06-08 Thread Nitin Jadhav
Hi Bharath, I spent some time examining the patch. Here are my observations from the review. - I believe there’s no need for an extra variable ‘nbytes’ in this context. We can repurpose the ‘count’ variable for the same function. If necessary, we might think about renaming ‘count’ to ‘nbytes’.

Re: Injection points: preloading and runtime arguments

2024-06-08 Thread Andrey M. Borodin
> On 7 Jun 2024, at 04:38, Michael Paquier wrote: Thanks Michael! Tests of injection points with injection points are neat :) Alvaro, here’s the test for multixact CV sleep that I was talking about on PGConf. It is needed to test [0]. It is based on loaded injection points. This technique

Re: Windows: openssl & gssapi dislike each other

2024-06-08 Thread Imran Zaheer
I was able to reproduce the gssapi & openssl error on windows. I tried on PG16 with msvc build system and on PG17 with meson build system. The error was reproducible when enabling both openssl and gssapi from the configurations. Turns out that it was due to the conflicting macros.

Re: Conflict Detection and Resolution

2024-06-08 Thread Amit Kapila
On Fri, Jun 7, 2024 at 5:39 PM Ashutosh Bapat wrote: > > On Thu, Jun 6, 2024 at 5:16 PM Nisha Moond wrote: >> >> > >> >> Here are more use cases of the "earliest_timestamp_wins" resolution method: >> 1) Applications where the record of first occurrence of an event is >> important. For example,

New function normal_rand_array function to contrib/tablefunc.

2024-06-08 Thread Andy Fan
Here is a new function which could produce an array of numbers with a controllable array length and duplicated elements in these arrays. I used it when working with gin index, and I think it would be helpful for others as well, so here it is. select * from normal_rand_array(5, 10, 1.8::numeric,