Re: Faster "SET search_path"

2023-07-29 Thread Nathan Bossart
On Sat, Jul 29, 2023 at 08:59:01AM -0700, Jeff Davis wrote: > 0001: Transform the settings in proconfig into a List for faster > processing. This is simple and speeds up any proconfig setting. This looks straightforward. It might be worth combining the common parts of ProcessGUCArray() and

Re: buildfarm instance bichir stuck

2023-07-29 Thread Thomas Munro
On Fri, Apr 9, 2021 at 6:11 PM Thomas Munro wrote: > On Wed, Apr 7, 2021 at 7:31 PM Robins Tharakan wrote: > > Correct. This is easily reproducible on this test-instance, so let me know > > if you want me to test a patch. > > From your description it sounds like signals are not arriving at all,

Postmaster doesn't correctly handle crashes in PM_STARTUP state

2023-07-29 Thread Andres Freund
Hi, While testing something I made the checkpointer process intentionally crash as soon as it started up. The odd thing I observed on macOS is that we start a *new* checkpointer before shutting down: 2023-07-29 14:32:39.241 PDT [65031] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"

Re: should frontend tools use syncfs() ?

2023-07-29 Thread Nathan Bossart
On Wed, Apr 13, 2022 at 06:54:12AM -0500, Justin Pryzby wrote: > I didn't pursue this patch, as it's easier for me to use /bin/sync -f. > Someone > should adopt it if interested. I was about to start a new thread, but I found this one with some good preliminary discussion. I came to the same

Re: add timing information to pg_upgrade

2023-07-29 Thread Nathan Bossart
On Sat, Jul 29, 2023 at 12:17:40PM +0530, Bharath Rupireddy wrote: > While on this, I noticed a thing unrelated to your patch that there's > no space between the longest status message of size 60 bytes and ok - > 'Checking for incompatible "aclitem" data type in user tablesok > 23.932 ms'. I think

Re: Faster "SET search_path"

2023-07-29 Thread Isaac Morland
On Sat, 29 Jul 2023 at 11:59, Jeff Davis wrote: Unfortunately, adding a "SET search_path" clause to functions slows > them down. The attached patches close the performance gap > substantially. > > Changes: > > 0001: Transform the settings in proconfig into a List for faster > processing. This is

Re: brininsert optimization opportunity

2023-07-29 Thread Soumyadeep Chakraborty
Attached v4 of the patch, rebased against latest HEAD. Regards, Soumyadeep (VMware) From b5fb12fbb8b0c1b2963a05a2877b5063bbc75f58 Mon Sep 17 00:00:00 2001 From: Soumyadeep Chakraborty Date: Sat, 29 Jul 2023 09:17:49 -0700 Subject: [PATCH v4 1/1] Reuse revmap and brin desc in brininsert

Re: POC, WIP: OR-clause support for indexes

2023-07-29 Thread Peter Geoghegan
On Wed, Jul 26, 2023 at 6:30 PM Alena Rybakina wrote: > > I didn't intend to imply that you might have the same problem here. I > > just meant that OR optimizations can have problems with duplicate > > elimination, in general. I suspect that your patch doesn't have that > > problem, because you

Faster "SET search_path"

2023-07-29 Thread Jeff Davis
Improve performance of "SET search_path". Motivation: Creating functions with a "SET search_path" clause is safer and more secure because the function behavior doesn't change based on the caller's search_path setting. Setting search_path in the function declaration is especially important for

Re: logical decoding and replication of sequences, take 2

2023-07-29 Thread Tomas Vondra
On 7/29/23 06:54, Amit Kapila wrote: > On Fri, Jul 28, 2023 at 6:12 PM Tomas Vondra > wrote: >> >> On 7/28/23 11:42, Amit Kapila wrote: >>> On Wed, Jul 26, 2023 at 8:48 PM Tomas Vondra >>> wrote: On 7/26/23 09:27, Amit Kapila wrote: > On Wed, Jul 26, 2023 at 9:37 AM Amit Kapila

Avoid undefined behavior with msvc compiler (src/include/port/pg_bitutils.h)

2023-07-29 Thread Ranier Vilela
Hi, The pg_leftmost_one_pos32 function with msvc compiler, relies on Assert to guarantee the correct result. But msvc documentation [1] says clearly that undefined behavior can occur. Fix by checking the result of the function to avoid a possible undefined behavior. patch attached. best

Re: logical decoding and replication of sequences, take 2

2023-07-29 Thread Tomas Vondra
On 7/28/23 14:44, Ashutosh Bapat wrote: > On Wed, Jul 26, 2023 at 8:48 PM Tomas Vondra > wrote: >> >> Anyway, I was thinking about this a bit more, and it seems it's not as >> difficult to use the page LSN to ensure sequences don't go backwards. >> The 0005 change does that, by: >> >> 1)

Re: Postgres v15 windows bincheck regression test failures

2023-07-29 Thread Noah Misch
On Fri, Jul 28, 2023 at 04:00:00PM +0300, Alexander Lakhin wrote: > 28.07.2023 14:42, Noah Misch wrpte: > >That was about a bug that appears when using TCP sockets. ... > > Yes, and according to the failed test output, TCP sockets were used: > > #   'pg_amcheck: error: connection

Re: add timing information to pg_upgrade

2023-07-29 Thread Bharath Rupireddy
On Sat, Jul 29, 2023 at 12:17 AM Nathan Bossart wrote: > > On Fri, Jul 28, 2023 at 10:38:14AM -0700, Nathan Bossart wrote: > > I'm okay with simply adding the time. However, I wonder if we want to > > switch to seconds, minutes, hours, etc. if the step takes longer. This > > would add a bit of