Re: brininsert optimization opportunity

2024-04-18 Thread Tomas Vondra
Hi, Here's two patched to deal with this open item. 0001 is a trivial fix of typos and wording, I moved it into a separate commit for clarity. 0002 does the actual fix - adding the index_insert_cleanup(). It's 99% the patch Alvaro shared some time ago, with only some minor formatting tweaks by me.

Re: Popcount optimization using AVX512

2024-04-18 Thread Nathan Bossart
On Thu, Apr 18, 2024 at 10:11:08PM +, Devulapalli, Raghuveer wrote: >> On that note, is it necessary to also check for avx512f? At the moment, >> we are assuming that's supported if the other AVX-512 instructions are >> available. > > No, it's not needed. There are no CPU's with avx512bw/avx5

Re: Solaris tar issues, or other reason why margay fails 010_pg_basebackup?

2024-04-18 Thread Thomas Munro
On Fri, Apr 19, 2024 at 12:57 AM Marcel Hofstetter wrote: > SKIP_READLINE_TESTS works. margay is now green again. Great! FTR there was a third thing revealed by margay since you enabled the TAP tests: commit e2a23576. I would guess that the best chance of getting the readline stuff to actually

Re: cfbot is failing all tests on FreeBSD/Meson builds

2024-04-18 Thread Thomas Munro
On Thu, Feb 8, 2024 at 3:53 PM Tom Lane wrote: > Thomas Munro writes: > > On Tue, Jan 30, 2024 at 5:06 PM Tom Lane wrote: > >> Thomas Munro writes: > >>> Ahh, there is one: https://github.com/cpan-authors/IO-Tty/issues/38 > > >> Just for the archives' sake: I hit this today on a fresh install >

Re: plenty code is confused about function level static

2024-04-18 Thread Michael Paquier
On Thu, Apr 18, 2024 at 07:56:35PM +0200, Peter Eisentraut wrote: > On 18.04.24 19:11, Andres Freund wrote: >> Thoughts about when to apply these? Arguably they're fixing mildly broken >> code, making it appropriate to fix in 17, but it's also something that we >> could end up fixing for a while...

Re: pg_combinebackup fails on file named INCREMENTAL.*

2024-04-18 Thread David Steele
On 4/19/24 01:10, Robert Haas wrote: On Wed, Apr 17, 2024 at 7:56 PM David Steele wrote: Thanks! I've tested this and it works as advertised. Ideally I'd want an error on backup if there is a similar file in any data directories that would cause an error on combine, but I admit that it is vani

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2024-04-18 Thread Dmitry Koval
Hi! 18.04.2024 19:00, Alexander Lakhin wrote: leaves a strange constraint: \d+ t*   Table "public.tp_0" ... Not-null constraints:     "merge-16385-26BCB0-tmp_i_not_null" NOT NULL "i" Thanks! Attached fix (with test) for this case. The patch should be a

Re: Support a wildcard in backtrace_functions

2024-04-18 Thread Michael Paquier
On Thu, Apr 18, 2024 at 12:21:56PM +0200, Jelte Fennema-Nio wrote: > On Thu, 18 Apr 2024 at 09:02, Michael Paquier wrote: >> On Fri, Apr 12, 2024 at 09:36:36AM +0900, Michael Paquier wrote: >> log_backtrace speaks a bit more to me as a name for this stuff because >> it logs a backtrace. Now, ther

Re: Disallow changing slot's failover option in transaction block

2024-04-18 Thread Michael Paquier
On Thu, Apr 18, 2024 at 11:22:24AM +0530, Amit Kapila wrote: > +1 for option 2 as it sounds logical to me and consistent with ALTER > SUBSCRIPTION. BTW, IIUC, you are referring to: "When altering the > slot_name, the failover and two_phase property values of the named > slot may differ from the cou

Re: pg_combinebackup does not detect missing files

2024-04-18 Thread David Steele
On 4/19/24 00:50, Robert Haas wrote: On Wed, Apr 17, 2024 at 7:09 PM David Steele wrote: Fair enough. I accept that your reasoning is not random, but I'm still not very satisfied that the user needs to run a separate and rather expensive process to do the verification when pg_combinebackup alr

RE: Disallow changing slot's failover option in transaction block

2024-04-18 Thread Zhijie Hou (Fujitsu)
On Thursday, April 18, 2024 1:52 PM Amit Kapila wrote: > > On Tue, Apr 16, 2024 at 5:06 PM shveta malik > wrote: > > > > On Tue, Apr 16, 2024 at 1:45 PM Hayato Kuroda (Fujitsu) > > wrote: > > > > > > Dear Hou, > > > > > > > Kuroda-San reported an issue off-list that: > > > > > > > > If user exe

Re: AIX support

2024-04-18 Thread Thomas Munro
On Fri, Apr 19, 2024 at 6:01 AM Andres Freund wrote: > On 2024-04-18 11:15:43 +, Sriram RK wrote: > > We (IBM-AIX team) looked into this issue > > > > https://www.postgresql.org/message-id/20240225194322...@rfd.leadboat.com > > > > This is related to the compiler issue. The compilers xlc(13.1)

Re: documentation structure

2024-04-18 Thread Corey Huinker
> > Yeah, we can't expect everyone wanting to call a built-in function to > know how they would define an equivalent one themselves. In that case I > propos marking it up like this: > > format ( > formatstr text > , formatarg "any" > , ... ) > text > Looks good, but I guess I

Re: ALTER TABLE SET ACCESS METHOD on partitioned tables

2024-04-18 Thread Michael Paquier
On Thu, Apr 18, 2024 at 06:17:56PM +0200, Alvaro Herrera wrote: > On 2024-Apr-18, Michael Paquier wrote: >> I was also worrying about a need to dump the protocol version to be >> able to track the relkind in the toc entries, but a45c78e3284b has >> already done one. The difference in AM handling b

RE: Disallow changing slot's failover option in transaction block

2024-04-18 Thread Hayato Kuroda (Fujitsu)
Dear Shveta, > When I said that option 2 aligns with ALTER-SUB documented behaviour, > I meant the doc described in [1] stating "When altering the slot_name, > the failover and two_phase property values of the named slot may > differ from the counterpart failover and two_phase parameters > specifi

Re: Speed up clean meson builds by ~25%

2024-04-18 Thread Tom Lane
Andres Freund writes: > On 2024-04-17 23:10:53 -0400, Tom Lane wrote: >> I think we should hold off on this. I found a simpler way to address >> ecpg's problem than what I sketched upthread. I have a not-ready-to- >> show-yet patch that allows the vast majority of ecpg's grammar >> productions t

RE: Disallow changing slot's failover option in transaction block

2024-04-18 Thread Hayato Kuroda (Fujitsu)
Dear Hou, Thanks for updating the patch! Let me confirm the content. In your patch, the pg_dump.c was updated. IIUC the main reason was that pg_restore executes some queries as single transactions so that ALTER SUBSCRIPTION cannot be done, right? Also, failover was synchronized only when we were

Re: ECPG cleanup and fix for clang compile-time problem

2024-04-18 Thread Andres Freund
Hi, On 2024-04-18 22:18:34 -0400, Tom Lane wrote: > Here is a patch series that aims to clean up ecpg's preprocessor > code a little and fix the compile time problems we're seeing with > late-model clang [1]. I guess whether it's a cleanup is in the eye of > the beholder, but it definitely succee

Re: ECPG cleanup and fix for clang compile-time problem

2024-04-18 Thread Tom Lane
Andres Freund writes: > On 2024-04-18 22:18:34 -0400, Tom Lane wrote: >> (If our code coverage tools worked on bison/flex stuff, >> maybe this'd be less scary ... but they don't.) > For bison coverage seems to work, see e.g.: Yeah, I'd just noticed that --- I had it in my head that we'd put LCOV

Re: ECPG cleanup and fix for clang compile-time problem

2024-04-18 Thread Andres Freund
On 2024-04-18 23:11:52 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2024-04-18 22:18:34 -0400, Tom Lane wrote: > >> (If our code coverage tools worked on bison/flex stuff, > >> maybe this'd be less scary ... but they don't.) > > > For bison coverage seems to work, see e.g.: > > Yeah, I'd

Use XLOG_CONTROL_FILE macro everywhere?

2024-04-18 Thread Anton A. Melnikov
Hello! There is a macro XLOG_CONTROL_FILE for control file name defined in access/xlog_internal.h And there are some places in code where this macro is used like here https://github.com/postgres/postgres/blob/84db9a0eb10dd1dbee6db509c0e427fa237177dc/src/bin/pg_resetwal/pg_resetwal.c#L588 or here

Re: Allow tests to pass in OpenSSL FIPS mode

2024-04-18 Thread Thomas Munro
On Sat, Nov 18, 2023 at 7:46 AM Peter Eisentraut wrote: > All done, thanks. Probably not this thread's fault, but following the breadcrumbs to the last thread to touch the relevant test lines in authentication/001_password, is it expected that we have these warnings? psql::1: WARNING: roles cre

Re: ECPG cleanup and fix for clang compile-time problem

2024-04-18 Thread Tom Lane
Andres Freund writes: > On 2024-04-18 23:11:52 -0400, Tom Lane wrote: >> I was just looking locally at what I got by removing that, and sadly >> I don't think I believe it: there are a lot of places where it claims >> we hit lines we don't, and vice versa. That might be partially >> blamable on o

Re: Allow tests to pass in OpenSSL FIPS mode

2024-04-18 Thread Tom Lane
Thomas Munro writes: > Probably not this thread's fault, but following the breadcrumbs to the > last thread to touch the relevant test lines in > authentication/001_password, is it expected that we have these > warnings? > psql::1: WARNING: roles created by regression test cases > should have na

Re: Allow tests to pass in OpenSSL FIPS mode

2024-04-18 Thread Thomas Munro
On Fri, Apr 19, 2024 at 4:00 PM Tom Lane wrote: > Thomas Munro writes: > > Probably not this thread's fault, but following the breadcrumbs to the > > last thread to touch the relevant test lines in > > authentication/001_password, is it expected that we have these > > warnings? > > > psql::1: WAR

Re: cfbot is failing all tests on FreeBSD/Meson builds

2024-04-18 Thread Thomas Munro
On Fri, Apr 19, 2024 at 10:36 AM Thomas Munro wrote: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276535 > > So perhaps it's time for me to undo what I did before... looking now. It turned out that I still needed the previous work-around, but I was too clever for my own boots last time.

Direct SSL connection with ALPN and HBA rules

2024-04-18 Thread Michael Paquier
Hi all, (Heikki in CC.) Since 91044ae4baea (require ALPN for direct SSL connections) and d39a49c1e459 (direct hanshake), direct SSL connections are supported (yeah!), still the thread where this has been discussed does not cover the potential impact on HBA rules: https://www.postgresql.org/message

Re: promotion related handling in pg_sync_replication_slots()

2024-04-18 Thread Bertrand Drouvot
Hi, On Thu, Apr 18, 2024 at 05:36:05PM +0530, shveta malik wrote: > Please find v8 attached. Changes are: Thanks! A few comments: 1 === @@ -1440,7 +1461,7 @@ ReplSlotSyncWorkerMain(char *startup_data, size_t startup_data_len) * slotsync_worker_onexit() but that will need the connecti

Re: Cannot find a working 64-bit integer type on Illumos

2024-04-18 Thread Japin Li
On Fri, 19 Apr 2024 at 05:22, Thomas Munro wrote: > On Thu, Apr 18, 2024 at 6:09 PM Japin Li wrote: >> /home/japin/postgres/build/../src/include/lib/simplehash.h:1138:9: error: >> format '%llu' expects argument of type 'long long unsigned int', but >> argument 4 has type 'uint64' {aka 'long u

Re: WIP Incremental JSON Parser

2024-04-18 Thread Michael Paquier
On Thu, Apr 18, 2024 at 06:03:45AM -0400, Andrew Dunstan wrote: > On 2024-04-18 Th 02:04, Michael Paquier wrote: >> Why usingFile::Temp::tempfile here? Couldn't you just use a >> file in a PostgreSQL::Test::Utils::tempdir() that would be cleaned up >> once the test finishes? > > That's another

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-18 Thread Michael Paquier
On Thu, Apr 18, 2024 at 12:53:43PM +0200, Peter Eisentraut wrote: > If everything is addressed, I agree that 0001, 0003, and 0004 can go into > PG17, the rest later. About the PG17 bits, would you agree about a backpatch? Or perhaps you disagree? -- Michael signature.asc Description: PGP signat

Re: promotion related handling in pg_sync_replication_slots()

2024-04-18 Thread shveta malik
On Fri, Apr 19, 2024 at 10:53 AM Bertrand Drouvot wrote: > > Hi, > > On Thu, Apr 18, 2024 at 05:36:05PM +0530, shveta malik wrote: > > Please find v8 attached. Changes are: > > Thanks! > > A few comments: Thanks for reviewing. > 1 === > > @@ -1440,7 +1461,7 @@ ReplSlotSyncWorkerMain(char *startu

Re: Can't find not null constraint, but \d+ shows that

2024-04-18 Thread Tender Wang
Alvaro Herrera 于2024年4月19日周五 02:49写道: > On 2024-Apr-13, jian he wrote: > > > I wonder is there any incompatibility issue, or do we need to say > something > > about the new behavior when dropping a key column? > > Umm, yeah, maybe we should document it in ALTER TABLE DROP PRIMARY KEY > and in the

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-18 Thread Daniel Gustafsson
> On 19 Apr 2024, at 07:37, Michael Paquier wrote: > > On Thu, Apr 18, 2024 at 12:53:43PM +0200, Peter Eisentraut wrote: >> If everything is addressed, I agree that 0001, 0003, and 0004 can go into >> PG17, the rest later. > > About the PG17 bits, would you agree about a backpatch? Or perhaps >

<    1   2