Re: Improving the latch handling between logical replication launcher and worker processes.

2024-05-29 Thread vignesh C
On Thu, 30 May 2024 at 08:46, Peter Smith wrote: > > On Wed, May 29, 2024 at 7:53 PM vignesh C wrote: > > > > On Wed, 29 May 2024 at 10:41, Peter Smith wrote: > > > > > > On Thu, Apr 25, 2024 at 6:59 PM vignesh C wrote: > > > > > > > > > > > c) Don't reset the latch at worker attach and allow l

Re: 001_rep_changes.pl fails due to publisher stuck on shutdown

2024-05-29 Thread Peter Smith
On Thu, May 30, 2024 at 2:09 AM vignesh C wrote: > > On Wed, 29 May 2024 at 16:30, Alexander Lakhin wrote: > > > > Hello hackers, > > > > As a recent buildfarm test failure [1] shows: > > [14:33:02.374](0.333s) ok 23 - update works with dropped subscriber column > > ### Stopping node "publisher"

Re: POC: GROUP BY optimization

2024-05-29 Thread Andrei Lepikhov
On 5/29/24 19:53, Alexander Korotkov wrote: Hi, Andrei! Thank you for your feedback. On Wed, May 29, 2024 at 11:08 AM Andrei Lepikhov wrote: On 5/27/24 19:41, Alexander Korotkov wrote: Any thoughts? About 0001: Having overviewed it, I don't see any issues (but I'm the author), except gramma

Re: Avoid an odd undefined behavior with memcmp (src/bin/pg_rewind/pg_rewind.c)

2024-05-29 Thread David Rowley
On Wed, 29 May 2024 at 07:02, Ranier Vilela wrote: > The function *perform_rewind* has an odd undefined behavior. > The function memcmp/, compares bytes to bytes. > > IMO, I think that pg_rewind can have a security issue, > if two files are exactly the same, they are considered different. > Becaus

Implementing CustomScan over an index

2024-05-29 Thread Chris Cleveland
I've built a custom type of index. I implemented an index access method, but have run into roadblocks. I need to: 1. See the other quals in the where clause. 2. Extract some things from the projection. 3. Insert some things in the projection. 4. Push some aggregations down into the index. So I st

Re: Improving the latch handling between logical replication launcher and worker processes.

2024-05-29 Thread Peter Smith
On Wed, May 29, 2024 at 7:53 PM vignesh C wrote: > > On Wed, 29 May 2024 at 10:41, Peter Smith wrote: > > > > On Thu, Apr 25, 2024 at 6:59 PM vignesh C wrote: > > > > > > > > c) Don't reset the latch at worker attach and allow launcher main to > > > identify and handle it. For this there is a pa

Re:Avoid an odd undefined behavior with memcmp (src/bin/pg_rewind/pg_rewind.c)

2024-05-29 Thread Long Song
Hi Ranier, > IMO, I think that pg_rewind can have a security issue, > if two files are exactly the same, they are considered different. > Because use of structs with padding values is unspecified. Logically you are right. But I don't understand what scenario would require memcmp to compare Cont

Re: Remove last traces of HPPA support

2024-05-29 Thread Noah Misch
On Sat, Oct 21, 2023 at 02:18:19AM -0400, Tom Lane wrote: > Andres Freund writes: > > It'd be one thing to continue supporting an almost-guaranteed-to-be-unused > > platform, if we expected it to become more popular or complete enough to be > > usable like e.g. risc-v a few years ago. But I doubt

Re: pgsql: Add more SQL/JSON constructor functions

2024-05-29 Thread Tom Lane
Amit Langote writes: > On Mon, May 27, 2024 at 7:10 PM Alvaro Herrera > wrote: >> On 2024-May-27, Alvaro Herrera wrote: >> I just noticed this behavior, which looks like a bug to me: >> >> select json_serialize('{"a":1, "a":2}' returning varchar(5)); >> json_serialize >> >> {"a

Re: 001_rep_changes.pl fails due to publisher stuck on shutdown

2024-05-29 Thread vignesh C
On Wed, 29 May 2024 at 16:30, Alexander Lakhin wrote: > > Hello hackers, > > As a recent buildfarm test failure [1] shows: > [14:33:02.374](0.333s) ok 23 - update works with dropped subscriber column > ### Stopping node "publisher" using mode fast > # Running: pg_ctl -D > /home/bf/bf-build/adder/H

Re: Volatile write caches on macOS and Windows, redux

2024-05-29 Thread Peter Eisentraut
On 25.05.24 04:01, Jelte Fennema-Nio wrote: Is this the only reason why you're suggesting adding fsync=full, instead of simply always setting F_FULLFSYNC when fsync=true on MacOS. If so, I'm not sure we really gain anything by this tri-state. I think people either care about data loss on power lo

Re: About 0001:,Having overviewed it, I don't see any issues (but I'm the author), except grammatical ones - but I'm not a native to judge it.,Also, the sentence 'turning GROUP BY clauses into pathkey

2024-05-29 Thread Alexander Korotkov
Hi, Andrei! Thank you for your feedback. On Wed, May 29, 2024 at 11:08 AM Andrei Lepikhov wrote: > On 5/27/24 19:41, Alexander Korotkov wrote: > > On Tue, Apr 23, 2024 at 1:19 AM Alexander Korotkov > > wrote: > >> While there are some particular use-cases by Jian He, I hope that > >> above cou

RE: Psql meta-command conninfo+

2024-05-29 Thread Maiquel Grassi
Hi, Is there someone willing to help me with this development and guide the patch so that it can be committed one day? Regards, Maiquel.

001_rep_changes.pl fails due to publisher stuck on shutdown

2024-05-29 Thread Alexander Lakhin
Hello hackers, As a recent buildfarm test failure [1] shows: [14:33:02.374](0.333s) ok 23 - update works with dropped subscriber column ### Stopping node "publisher" using mode fast # Running: pg_ctl -D /home/bf/bf-build/adder/HEAD/pgsql.build/testrun/subscription/001_rep_changes/data/t_001_rep_

Timeout gets unset on a syntax error.

2024-05-29 Thread ISHAN CHHANGANI .
On a particular query, I start an alarm (say for 5 sec) using RegisterTimeout , and when the alarm rings, I log something. This works fine. But if I run a query with a syntax error between the time duration, then the alarm never rings. Is there some code within Postgres that resets/removes the si

Re: Improving the latch handling between logical replication launcher and worker processes.

2024-05-29 Thread vignesh C
On Wed, 29 May 2024 at 10:41, Peter Smith wrote: > > On Thu, Apr 25, 2024 at 6:59 PM vignesh C wrote: > > > > > c) Don't reset the latch at worker attach and allow launcher main to > > identify and handle it. For this there is a patch v6-0002 available at > > [2]. > > This option c seems the easi

Re: Improving the latch handling between logical replication launcher and worker processes.

2024-05-29 Thread vignesh C
On Fri, 10 May 2024 at 07:39, Hayato Kuroda (Fujitsu) wrote: > > Dear Vignesh, > > Thanks for raising idea! > > > a) Introduce a new latch to handle worker attach and exit. > > Just to confirm - there are three wait events for launchers, so I feel we may > be > able to create latches per wait eve

About 0001:,Having overviewed it, I don't see any issues (but I'm the author), except grammatical ones - but I'm not a native to judge it.,Also, the sentence 'turning GROUP BY clauses into pathkeys' i

2024-05-29 Thread Andrei Lepikhov
On 5/27/24 19:41, Alexander Korotkov wrote: On Tue, Apr 23, 2024 at 1:19 AM Alexander Korotkov wrote: While there are some particular use-cases by Jian He, I hope that above could give some rationale. I've assembled patches in this thread into one patchset. 0001 The patch fixing asymmetry in