Re: macos ventura SDK spews warnings

2022-10-15 Thread Andres Freund
Hi, On 2022-10-15 21:00:00 -0400, Tom Lane wrote: > I wrote: > > snprintf is required by POSIX going back to SUSv2, so it's pretty darn > > hard to imagine any currently-used platform that hasn't got it. Even > > my now-extinct dinosaur gaur had it (per digging in backup files). > > I think we co

Re: Use -fvisibility=hidden for shared libraries

2022-10-15 Thread Andres Freund
Hi, On 2022-10-15 22:50:07 -0400, Tom Lane wrote: > Andres Freund writes: > > I guess we should report the CFLAGS_SL_MODULE etc via pg_config? > > Dunno ... where do you stop? I'm not really convinced that extensions > that don't want to use PGXS have any claim on our buildsystem to provide > pl

Re: Suppressing useless wakeups in walreceiver

2022-10-15 Thread Nathan Bossart
On Thu, Oct 13, 2022 at 12:09:54PM -0700, Nathan Bossart wrote: > On Thu, Oct 13, 2022 at 12:37:39PM +0200, Alvaro Herrera wrote: >> The main reason is that it seems odd to have startpointTLI in the struct >> used in some places together with a file-global recvFileTLI which isn't. >> The way one is

Re: Use -fvisibility=hidden for shared libraries

2022-10-15 Thread Tom Lane
Andres Freund writes: > I guess we should report the CFLAGS_SL_MODULE etc via pg_config? Dunno ... where do you stop? I'm not really convinced that extensions that don't want to use PGXS have any claim on our buildsystem to provide platform-specific configuration details for them.

Re: Use -fvisibility=hidden for shared libraries

2022-10-15 Thread Andres Freund
Hi, On 2022-09-01 14:19:35 -0700, Andres Freund wrote: > Here's an updated patch for this (also shared recently on another thread). I've since then committed this. I was reminded of this when thinking about https://postgr.es/m/1595488.1665869988%40sss.pgh.pa.us Thinking about this made me reali

Re: PATCH: Using BRIN indexes for sorted output

2022-10-15 Thread Zhihong Yu
On Sat, Oct 15, 2022 at 8:23 AM Tomas Vondra wrote: > On 10/15/22 15:46, Zhihong Yu wrote: > >... > > 8) Parallel version is not supported, but I think it shouldn't be > > possible. Just make the leader build the range info, and then let the > > workers to acquire/sort ranges and merg

Re: New docs chapter on Transaction Management and related changes

2022-10-15 Thread Bruce Momjian
On Fri, Oct 14, 2022 at 05:46:55PM -0400, Robert Treat wrote: > On Fri, Oct 14, 2022 at 3:51 PM Bruce Momjian wrote: > > Attached is the merged patch from all the great comments I received. I > > have also rebuilt the docs with the updated patch: > > > > https://momjian.us/tmp/pgsql/ > >

Re: macos ventura SDK spews warnings

2022-10-15 Thread Tom Lane
I wrote: > snprintf is required by POSIX going back to SUSv2, so it's pretty darn > hard to imagine any currently-used platform that hasn't got it. Even > my now-extinct dinosaur gaur had it (per digging in backup files). > I think we could certainly assume its presence in the branches that > requ

Re: macos ventura SDK spews warnings

2022-10-15 Thread Andres Freund
On 2022-10-15 14:19:55 -0700, Andres Freund wrote: > The meson specific warning is > [972/1027] Linking target > src/backend/replication/libpqwalreceiver/libpqwalreceiver.dylib > ld: warning: -undefined dynamic_lookup may not work with chained fixups > > Which is caused by meson defaulting to -Wl

Re: macos ventura SDK spews warnings

2022-10-15 Thread Tom Lane
Andres Freund writes: > On 2022-10-15 18:47:16 -0400, Tom Lane wrote: >>> Originally we used the platform's sprintf there because we couldn't >>> rely on platforms having functional snprintf. That's no longer the case, >>> I imagine, so we could just switch these calls over to snprintf. > Is the

Re: macos ventura SDK spews warnings

2022-10-15 Thread Andres Freund
Hi, On 2022-10-15 18:47:16 -0400, Tom Lane wrote: > I wrote: > > Andres Freund writes: > >> [24/2258] Compiling C object src/port/libpgport_srv.a.p/snprintf.c.o > >> ../../../src/postgres/src/port/snprintf.c:1002:11: warning: 'sprintf' is > >> deprecated: This function is provided for compatibil

Re: macos ventura SDK spews warnings

2022-10-15 Thread Tom Lane
I wrote: > Andres Freund writes: >> [24/2258] Compiling C object src/port/libpgport_srv.a.p/snprintf.c.o >> ../../../src/postgres/src/port/snprintf.c:1002:11: warning: 'sprintf' is >> deprecated: This function is provided for compatibility reasons only. Due >> to security concerns inherent in t

fix archive module shutdown callback

2022-10-15 Thread Nathan Bossart
Hi hackers, Presently, when an archive module sets up a shutdown callback, it will be called upon ERROR/FATAL (via PG_ENSURE_ERROR_CLEANUP), when the archive library changes (via HandlePgArchInterrupts()), and upon normal shutdown. There are a couple of problems with this: * HandlePgArchInterrupt

Re: macos ventura SDK spews warnings

2022-10-15 Thread Tom Lane
Andres Freund writes: > One class of warnings is specific to meson (see further down), but the other > is common between autoconf and meson: > [24/2258] Compiling C object src/port/libpgport_srv.a.p/snprintf.c.o > ../../../src/postgres/src/port/snprintf.c:1002:11: warning: 'sprintf' is > depreca

Re: [RFC] building postgres with meson - v13

2022-10-15 Thread Tom Lane
Andres Freund writes: > Seems like we should have a different pg_config flag for meson options than > for configure, and perhaps separately an option to show the buildsystem? Yeah, probably a good idea, given that shoving the options for one buildsystem into the other isn't likely to work.

macos ventura SDK spews warnings

2022-10-15 Thread Andres Freund
Hi I had recently updated the M1 mini that I use to test macOS stuff on. Just tried to test a change on it and was greeted with a lot of warnings. Apparently the update brought in a newer SDK (MacOSX13.0.sdk), even though the OS is still Monterey. One class of warnings is specific to meson (see f

Re: thinko in basic_archive.c

2022-10-15 Thread Nathan Bossart
On Sat, Oct 15, 2022 at 10:19:05AM +0530, Bharath Rupireddy wrote: > Can you please help me understand how name collisions can happen with > temp file names including WAL file name, timestamp to millisecond > scale, and PID? Having the timestamp is enough to provide a non-unique > temp file name wh

Re: [meson] add missing pg_attribute_aligned for MSVC in meson build

2022-10-15 Thread Andres Freund
Hi, On 2022-10-15 12:02:14 -0700, Andres Freund wrote: > See the attached patch fixing those omissions. I'll push it to HEAD once it > has the CI stamp of approval. Done. Thanks for the report!

Re: [RFC] building postgres with meson - v13

2022-10-15 Thread Andres Freund
Hi, On 2022-10-13 23:35:14 -0400, Tom Lane wrote: > "shiy.f...@fujitsu.com" writes: > > On Fri, Oct 14, 2022 12:40 AM Andres Freund wrote: > >> It'd be a fair amount of work, both initially and to maintain it, to > >> generate > >> something compatible. I can see some benefit in showing some fe

Re: [meson] add missing pg_attribute_aligned for MSVC in meson build

2022-10-15 Thread Andres Freund
Hi, On 2022-10-14 10:59:28 +0800, Junwang Zhao wrote: > Commit ec3c9cc add pg_attribute_aligned in MSVC[1], > which was pushed one day before the meson commits, > so meson build missed this feature. Good catch. It shouldn't have practical consequences for the moment, given that msvc doesn't suppo

Re: PATCH: Using BRIN indexes for sorted output

2022-10-15 Thread Tomas Vondra
On 10/15/22 15:46, Zhihong Yu wrote: >... > 8) Parallel version is not supported, but I think it shouldn't be > possible. Just make the leader build the range info, and then let the > workers to acquire/sort ranges and merge them by Gather Merge. > ... > Hi, > I am still going over the

Re: PATCH: Using BRIN indexes for sorted output

2022-10-15 Thread Zhihong Yu
On Sat, Oct 15, 2022 at 5:34 AM Tomas Vondra wrote: > Hi, > > There have been a couple discussions about using BRIN indexes for > sorting - in fact this was mentioned even in the "Improving Indexing > Performance" unconference session this year (don't remember by whom). > But I haven't seen any p

Re: create subscription - improved warning message

2022-10-15 Thread Amit Kapila
On Fri, Oct 14, 2022 at 8:22 AM Peter Smith wrote: > > On Thu, Oct 13, 2022 at 9:07 AM Peter Smith wrote: > > > > On Thu, Oct 13, 2022 at 2:01 AM Tom Lane wrote: > > > > > > Alvaro Herrera writes: > > > > On 2022-Oct-12, Amit Kapila wrote: > > > >> Okay, then I think we can commit the last erro

Re: Improve description of XLOG_RUNNING_XACTS

2022-10-15 Thread Amit Kapila
On Fri, Oct 14, 2022 at 3:38 PM Bharath Rupireddy wrote: > > On Mon, Oct 3, 2022 at 1:46 PM Michael Paquier wrote: > > > > On Fri, Sep 16, 2022 at 10:55:53AM +0900, Kyotaro Horiguchi wrote: > > > Putting an arbitrary upper-bound on the number of subxids to print > > > might work? I'm not sure how