Re: [PoC] Improve dead tuple storage for lazy vacuum

2023-07-03 Thread Masahiko Sawada
On Tue, Jun 27, 2023 at 5:20 PM Masahiko Sawada wrote: > > On Fri, Jun 23, 2023 at 6:54 PM John Naylor > wrote: > > > > > > I wrote: > > > I cleaned up a few things and attached v34 so you can do that if you like. > > > > Of course, "clean" is a relative term. While making a small bit of

Re: pgsql: Fix search_path to a safe value during maintenance operations.

2023-07-03 Thread Noah Misch
On Mon, Jul 03, 2023 at 11:19:14AM -0700, Nathan Bossart wrote: > On Sun, Jul 02, 2023 at 08:57:31PM -0700, Noah Misch wrote: > > Another dimension of compromise could be to make MAINTAIN affect fewer > > commands in v16. Un-revert the part of commit 05e1737 affecting just the > > commands it

Re: pg_stat_statements and "IN" conditions

2023-07-03 Thread Nathan Bossart
On Sun, Mar 19, 2023 at 01:27:34PM +0100, Dmitry Dolgov wrote: > +If this parameter is on, two queries with an array will get the same > +query identifier if the only difference between them is the number of > +constants, both numbers is of the same order of magnitude and

Re: DSA failed to allocate memory

2023-07-03 Thread Thomas Munro
Pushed. I wasn't sure it was worth keeping the test in the tree. It's here in the mailing list archives for future reference.

Re: [PATCH] Extend the length of BackgroundWorker.bgw_library_name

2023-07-03 Thread Nathan Bossart
On Mon, Jul 03, 2023 at 06:00:12PM -0700, Yurii Rashkovskii wrote: > Great, thank you! The reason I was leaving the other constant in place to > make upgrading extensions trivial (so that they don't need to adjust for > this), but if you think this is a better way, I am fine with it. Sorry, I'm

Re: Is a pg_stat_force_next_flush() call sufficient for regression tests?

2023-07-03 Thread Kyotaro Horiguchi
At Mon, 3 Jul 2023 15:45:52 +0200, Tomas Vondra wrote in > So I'm wondering if pg_stat_force_next_flush() is enough - AFAICS this > only sets some flag for the *next* pgstat_report_stat() call, but how do > we know that happens before the query execution? > > Shouldn't there be something like

Re: Commitfest manager for July

2023-07-03 Thread Ibrar Ahmed
On Tue, Jul 4, 2023 at 5:03 AM Michael Paquier wrote: > On Mon, Jul 03, 2023 at 12:26:44PM +0200, Daniel Gustafsson wrote: > > Since this didn't get any takers, and we are in July AoE since a few > days ago, > > I guess I'll assume the role this time in the interest of moving things > along. > >

Re: pgindent (probably my missing something obvious)

2023-07-03 Thread Tom Lane
James Coleman writes: > My heuristic for what pgindent changes must be wrong. The long > function calls (and 'if' conditions) seem obviously out of place to my > eyes with the surrounding code. Does that mean the surrounding code > was just hand-prettified? pgindent won't usually editorialize on

Re: pgindent (probably my missing something obvious)

2023-07-03 Thread James Coleman
On Mon, Jul 3, 2023 at 9:20 PM Tom Lane wrote: > > James Coleman writes: > > This is the first time I've run pgindent on my current machine, and it > > doesn't seem to be making any modifications to source files. For > > example this command: > > > ./src/tools/pgindent/pgindent

RE: [PGdocs] fix description for handling pf non-ASCII characters

2023-07-03 Thread Hayato Kuroda (Fujitsu)
Dear Jian, > On Thu, Jun 29, 2023 at 3:51 PM Hayato Kuroda (Fujitsu) > wrote: > > > > Dear Jian, > > > > Thank you for checking my patch! > > > > > > > > in your patch: > > > > printable ASCII characters will be replaced with a hex escape. > > > > > > My wording is not good. I think the result

Re: Parallelize correlated subqueries that execute within each worker

2023-07-03 Thread James Coleman
On Sun, Jun 11, 2023 at 10:23 PM James Coleman wrote: > > ... > > And while trying the v9 patch I came across a crash with the query > > below. > > > > set min_parallel_table_scan_size to 0; > > set parallel_setup_cost to 0; > > set parallel_tuple_cost to 0; > > > > explain (costs off) > > select

Re: pgindent (probably my missing something obvious)

2023-07-03 Thread Tom Lane
James Coleman writes: > This is the first time I've run pgindent on my current machine, and it > doesn't seem to be making any modifications to source files. For > example this command: > ./src/tools/pgindent/pgindent src/backend/optimizer/path/allpaths.c > leaves the allpaths.c file unchanged

pgindent (probably my missing something obvious)

2023-07-03 Thread James Coleman
Hello, This is the first time I've run pgindent on my current machine, and it doesn't seem to be making any modifications to source files. For example this command: ./src/tools/pgindent/pgindent src/backend/optimizer/path/allpaths.c leaves the allpaths.c file unchanged despite my having some

Re: [PATCH] Extend the length of BackgroundWorker.bgw_library_name

2023-07-03 Thread Yurii Rashkovskii
Nathan, On Mon, Jul 3, 2023 at 3:08 PM Nathan Bossart wrote: > On Sun, Jul 02, 2023 at 04:37:52PM -0700, Yurii Rashkovskii wrote: > > Thank you for revising the patch. While this is relatively minor, I think > > it should be set to MAXPGPATH directly to clarify their relationship. > >

Re: Improve list manipulation in several places

2023-07-03 Thread Richard Guo
On Mon, Jul 3, 2023 at 5:41 PM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 09.05.23 05:13, Richard Guo wrote: > > Yeah, maybe this is the reason I failed to devise a query that shows any > > performance gain. I tried with a query which makes the 'all_pathkeys' > > in

Re: Making empty Bitmapsets always be NULL

2023-07-03 Thread David Rowley
On Mon, 3 Jul 2023 at 18:10, Yuya Watari wrote: > Thank you for your reply. I am +1 to your change. I think these > assertions will help someone who changes the Bitmapset implementations > in the future. I've now pushed the patch. Thanks for all your reviews and detailed benchmarks. David

Re: Consider \v to the list of whitespace characters in the parser

2023-07-03 Thread Michael Paquier
On Mon, Jul 03, 2023 at 08:15:03PM -0400, Tom Lane wrote: > Assuming we don't want to change either of these distinctions, > the v2 patch looks about right to me. Yeah, thanks. Peter, what's your take? -- Michael signature.asc Description: PGP signature

Re: Consider \v to the list of whitespace characters in the parser

2023-07-03 Thread Tom Lane
Michael Paquier writes: > On Mon, Jul 03, 2023 at 12:17:10PM +0200, Peter Eisentraut wrote: >> In scan.l, you might want to ponder horiz_space: Even though \v is clearly >> not "horizontal space", horiz_space already includes \f, which is also not >> horizontal IMO. I think horiz_space is really

Re: Commitfest manager for July

2023-07-03 Thread Michael Paquier
On Mon, Jul 03, 2023 at 12:26:44PM +0200, Daniel Gustafsson wrote: > Since this didn't get any takers, and we are in July AoE since a few days ago, > I guess I'll assume the role this time in the interest of moving things along. > I've switched the 2023-07 CF to in-progress and 2023-09 to open,

Re: Consider \v to the list of whitespace characters in the parser

2023-07-03 Thread Michael Paquier
On Mon, Jul 03, 2023 at 12:17:10PM +0200, Peter Eisentraut wrote: > SQL has "whitespace", which includes any Unicode character with the > White_Space property (which includes \v), and , which is > implementation-defined. > > So nothing there speaks against treating \v as a (white)space character

Re: Deleting prepared statements from libpq.

2023-07-03 Thread Michael Paquier
On Mon, Jul 03, 2023 at 02:33:55PM +0200, Jelte Fennema wrote: > @Michael is anything else needed from my side? If not, I'll mark the > commitfest entry as "Ready For Committer". Sure, feel free. I was planning to look at and play more with it. -- Michael signature.asc Description: PGP

Re: Does a cancelled REINDEX CONCURRENTLY need to be messy?

2023-07-03 Thread Michael Paquier
On Mon, Jul 03, 2023 at 07:46:27PM +0200, Alvaro Herrera wrote: > On 2023-Jul-01, Thom Brown wrote: >> On Thu, 29 Jun 2023, 14:45 Álvaro Herrera, wrote: >>> ALTER TABLE DETACH CONCURRENTLY had to deal with this also, and it did it >>> by having a COMPLETE option you can run later in case things

Re: Large files for relations

2023-07-03 Thread Thomas Munro
On Mon, Jun 12, 2023 at 8:53 PM David Steele wrote: > + if (strcmp(endptr, "kB") == 0) > > Why kB here instead of KB to match MB, GB, TB below? Those are SI prefixes[1], and we use kB elsewhere too. ("K" was used for kelvins, so they went with "k" for kilo. Obviously these aren't

Re: ProcessStartupPacket(): database_name and user_name truncation

2023-07-03 Thread Tom Lane
Nathan Bossart writes: > Thanks, Bertrand. I chickened out and ended up committing v1 for now > (i.e., simply removing the truncation code). WFM. > If anyone disagrees and wants to see the FATALs emitted from > ProcessStartupPacket() directly, please let me know and we can work on > adding

Re: Add information about command path and version of flex in meson output

2023-07-03 Thread Michael Paquier
On Mon, Jul 03, 2023 at 10:17:40AM +0200, Peter Eisentraut wrote: > Yes, if you want two separate lines, then doing it like bison makes sense. Okay, I have applied v2 that uses two separate lines and two separate variables, then, to be like bison. -- Michael signature.asc Description: PGP

brininsert optimization opportunity

2023-07-03 Thread Soumyadeep Chakraborty
Hello hackers, My colleague, Ashwin, pointed out to me that brininsert's per-tuple init of the revmap access struct can have non-trivial overhead. Turns out he is right. We are saving 24 bytes of memory per-call for the access struct, and a bit on buffer/locking overhead, with the attached

Re: Size vs size_t or, um, PgSize?

2023-07-03 Thread Tom Lane
Daniel Gustafsson writes: > On 3 Jul 2023, at 20:32, Yurii Rashkovskii wrote: >> I couldn't find any rationale as to why we might want to have this alias and >> not use size_t. Any insight on this would be appreciated. > This used to be a typedef for unsigned int a very long time ago. I'm

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

2023-07-03 Thread Michael Paquier
On Tue, Jul 04, 2023 at 06:40:49AM +1200, Thomas Munro wrote: > curculio (OpenBSD 5.9) is failing with "undefined reference to > `X509_get_signature_nid'", but that's OK, Mikael already supplied a > modern OpenBSD system to replace it (schnauzer, which is green) and he > was planning to shut

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

2023-07-03 Thread Michael Paquier
On Mon, Jul 03, 2023 at 10:23:02PM +0200, Mikael Kjellström wrote: > On 2023-07-03 20:53, Daniel Gustafsson wrote: >>> curculio (OpenBSD 5.9) is failing with "undefined reference to >>> `X509_get_signature_nid'", but that's OK, Mikael already supplied a >>> modern OpenBSD system to replace it >>

Re: [PATCH] Extend the length of BackgroundWorker.bgw_library_name

2023-07-03 Thread Nathan Bossart
On Sun, Jul 02, 2023 at 04:37:52PM -0700, Yurii Rashkovskii wrote: > Thank you for revising the patch. While this is relatively minor, I think > it should be set to MAXPGPATH directly to clarify their relationship. Committed. I set the size to MAXPGPATH directly instead of inventing a new macro

Re: Why is DATESTYLE, ordering ignored for output but used for input ?

2023-07-03 Thread Matthias van de Meent
On Mon, 3 Jul 2023 at 20:06, Dave Cramer wrote: > > Greetings, > > For ISO and German dates the order DMY is completely ignored on output but > used for input. > > test=# set datestyle to 'ISO,DMY'; > SET > select '7-8-2023'::date > test-# ; > date > > 2023-08-07 > (1 row) > >

Re: ProcessStartupPacket(): database_name and user_name truncation

2023-07-03 Thread Nathan Bossart
On Sat, Jul 01, 2023 at 04:02:06PM +0200, Drouvot, Bertrand wrote: > Please find V2 attached where it's failing as soon as the database name or > user name are detected as overlength. Thanks, Bertrand. I chickened out and ended up committing v1 for now (i.e., simply removing the truncation

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

2023-07-03 Thread Mikael Kjellström
On 2023-07-03 20:53, Daniel Gustafsson wrote: curculio (OpenBSD 5.9) is failing with "undefined reference to `X509_get_signature_nid'", but that's OK, Mikael already supplied a modern OpenBSD system to replace it Thanks for the report! OpenBSD 5.9 was released in 2016 and is thus well

Re: Size vs size_t or, um, PgSize?

2023-07-03 Thread Yurii Rashkovskii
Daniel, On Mon, Jul 3, 2023 at 12:20 PM Daniel Gustafsson wrote: > > On 3 Jul 2023, at 21:14, Yurii Rashkovskii wrote: > > > That being said, going ahead with the global renaming of Size to size_t > will mostly eliminate this clash in, say, five years when old versions will > be gone. At least

Re: Size vs size_t or, um, PgSize?

2023-07-03 Thread Daniel Gustafsson
> On 3 Jul 2023, at 21:14, Yurii Rashkovskii wrote: > That being said, going ahead with the global renaming of Size to size_t will > mostly eliminate this clash in, say, five years when old versions will be > gone. At least it'll be fixed then. Otherwise, it'll never be fixed at all. > To me,

Re: Size vs size_t or, um, PgSize?

2023-07-03 Thread Yurii Rashkovskii
Hi Thomas, On Mon, Jul 3, 2023 at 12:03 PM Thomas Munro wrote: > On Tue, Jul 4, 2023 at 6:46 AM Daniel Gustafsson wrote: > > > On 3 Jul 2023, at 20:32, Yurii Rashkovskii wrote: > > > If there's a willingness to try this out, I am happy to prepare a > patch. > > > > This has been discussed a

Re: Size vs size_t or, um, PgSize?

2023-07-03 Thread Thomas Munro
On Tue, Jul 4, 2023 at 6:46 AM Daniel Gustafsson wrote: > > On 3 Jul 2023, at 20:32, Yurii Rashkovskii wrote: > > If there's a willingness to try this out, I am happy to prepare a patch. > > This has been discussed a number of times in the past, and the conclusion from > last time IIRC was to

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

2023-07-03 Thread Daniel Gustafsson
> On 3 Jul 2023, at 20:40, Thomas Munro wrote: > > On Mon, Jul 3, 2023 at 4:26 PM Michael Paquier wrote: >> I have not gone back to this part yet, though I plan to do so. As we >> are at the beginning of the development cycle, I have applied the >> patch to remove support for 1.0.1 for now on

Re: Size vs size_t or, um, PgSize?

2023-07-03 Thread Daniel Gustafsson
> On 3 Jul 2023, at 20:32, Yurii Rashkovskii wrote: > I couldn't find any rationale as to why we might want to have this alias and > not use size_t. Any insight on this would be appreciated. This used to be a typedef for unsigned int a very long time ago. > Would there be any sense in

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

2023-07-03 Thread Thomas Munro
On Mon, Jul 3, 2023 at 4:26 PM Michael Paquier wrote: > I have not gone back to this part yet, though I plan to do so. As we > are at the beginning of the development cycle, I have applied the > patch to remove support for 1.0.1 for now on HEAD. Let's see what the > buildfarm tells. curculio

Re: pgbnech: allow to cancel queries during benchmark

2023-07-03 Thread Fabien COELHO
Yugo-san, Some feedback about v1 of this patch. Patch applies cleanly, compiles. There are no tests, could there be one? ISTM that one could be done with a "SELECT pg_sleep(...)" script?? The global name "all_state" is quite ambiguous, what about "client_states" instead? Or maybe it

Including a sample Table Access Method with core code

2023-07-03 Thread Hannu Krosing
At PgCon 2023 in Ottawa we had an Unconference session on Table Access Methods [1] One thing that was briefly mentioned (but is missing from the notes) is need to have a sample API client in contrib/ , both for having a 2nd user for API to make it more likely that non-heap AMs are doable and also

Size vs size_t or, um, PgSize?

2023-07-03 Thread Yurii Rashkovskii
Hi, I've run into an issue of a name clash with system libraries. Specifically, the `Size` type seems to be just an alias for `size_t` and, at least on macOS, it clashes with the core SDK, as it is also defined by MacTypes.h, which is used by some of the libraries one may want to use from within

Re: pgsql: Fix search_path to a safe value during maintenance operations.

2023-07-03 Thread Nathan Bossart
On Sun, Jul 02, 2023 at 08:57:31PM -0700, Noah Misch wrote: > Another dimension of compromise could be to make MAINTAIN affect fewer > commands in v16. Un-revert the part of commit 05e1737 affecting just the > commands it still affects. For example, limit MAINTAIN and the 05e1737 > behavior

Why is DATESTYLE, ordering ignored for output but used for input ?

2023-07-03 Thread Dave Cramer
Greetings, For ISO and German dates the order DMY is completely ignored on output but used for input. test=# set datestyle to 'ISO,DMY'; SET select '7-8-2023'::date test-# ; date 2023-08-07 (1 row) test=# set datestyle to 'ISO,MDY'; SET test=# select '7-8-2023'::date ;

Re: Optionally using a better backtrace library?

2023-07-03 Thread Tristan Partin
On Mon Jul 3, 2023 at 12:43 PM CDT, Andres Freund wrote: > On 2023-07-03 11:58:25 +0200, Alvaro Herrera wrote: > > On 2023-Jul-02, Andres Freund wrote: > > > Nice things about libbacktrace are that the generation of stack traces is > > > documented to be async signal safe on most platforms (with a

Re: Should heapam_estimate_rel_size consider fillfactor?

2023-07-03 Thread Tomas Vondra
On 7/3/23 11:40, Tomas Vondra wrote: > ... > > FWIW the reason why the integer division is intentional is most likely > that we want "floor" semantics - if there's 10.23 rows per page, that > really means 10 rows per page. > > I doubt it makes a huge difference in this particular place,

Re: Does a cancelled REINDEX CONCURRENTLY need to be messy?

2023-07-03 Thread Álvaro Herrera
On 2023-Jul-01, Thom Brown wrote: > On Thu, 29 Jun 2023, 14:45 Álvaro Herrera, wrote: > > > ALTER TABLE DETACH CONCURRENTLY had to deal with this also, and it did it > > by having a COMPLETE option you can run later in case things got stuck the > > first time around. I suppose we could do

Re: Optionally using a better backtrace library?

2023-07-03 Thread Andres Freund
Hi, On 2023-07-03 11:58:25 +0200, Alvaro Herrera wrote: > On 2023-Jul-02, Andres Freund wrote: > > I like that we now have a builtin backtrace ability. Unfortunately I think > > the > > backtraces are often not very useful, because only externally visible > > functions are symbolized. > >

Re: Fdw batch insert error out when set batch_size > 65535

2023-07-03 Thread Tomas Vondra
On 7/2/23 15:50, Tomas Vondra wrote: > On 7/2/23 15:23, Tom Lane wrote: >> Andres Freund writes: >>> On 2021-06-11 18:44:28 -0400, Tom Lane wrote: I suggest what we do is leave it in place for long enough to get a round of reports from those slow animals, and then (assuming those

Re: [PATCH] Add <> support to sepgsql_restorecon

2023-07-03 Thread Daniel Gustafsson
> On 20 Mar 2023, at 21:17, Ted Toth wrote: > > Not this month unfortunately other work has taken precedence. I'll need to > look at what it's going to take to create a test. Hopefully I can piggyback > on an existing test. This patch has been marked Waiting on Author since January, I'm

Re: Inconsistent results with libc sorting on Windows

2023-07-03 Thread Juan José Santamaría Flecha
El lun, 3 jul 2023, 17:42, Alvaro Herrera escribió: > On 2023-Jun-19, Juan José Santamaría Flecha wrote: > > > Ok, let's see where the report goes: > > > > > https://developercommunity.visualstudio.com/t/CompareStringEx-non-transitive/10393003?q=comparestringex > > Hm, so this appears to have

Re: explain analyze rows=%.0f

2023-07-03 Thread Daniel Gustafsson
> On 8 Jun 2023, at 19:49, Ibrar Ahmed wrote: > On Mon, Mar 20, 2023 at 7:56 PM Gregory Stark (as CFM) > wrote: > This patch was marked Returned with Feedback and then later Waiting on > Author. And it hasn't had any updates since January. What is the state > on this

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-07-03 Thread Joe Conway
On 7/3/23 12:25, Tristan Partin wrote: On Sat Jun 24, 2023 at 8:09 AM CDT, Joe Conway wrote: Although I have not looked yet, presumably we could have similar problems with plpython. I would like to get agreement on this approach against plperl before diving into that though. Thoughts? I

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-07-03 Thread Joe Conway
On 7/3/23 12:17, Tristan Partin wrote: The Reply-To header in your email is pointing at joe@cd, fyi. Pretty strange. I noticed that -- it happened only the one time, and I am not sure why. Seems fine now though. -- Joe Conway PostgreSQL Contributors Team RDS Open Source Databases Amazon

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-07-03 Thread Tristan Partin
On Sat Jun 24, 2023 at 8:09 AM CDT, Joe Conway wrote: > Although I have not looked yet, presumably we could have similar > problems with plpython. I would like to get agreement on this approach > against plperl before diving into that though. > > Thoughts? I don't see anything immediately wrong

Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)

2023-07-03 Thread Daniel Gustafsson
> On 1 Mar 2023, at 10:29, Jim Jones wrote: > > On 01.03.23 01:47, Kirk Wolak wrote: >> Patch Posted with one edit, for line editings (Thanks Jim!) > The patch didn't pass the SanityCheck: > > https://cirrus-ci.com/task/5445242183221248?logs=build#L1337 > > missing a header perhaps? > >

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-07-03 Thread Tristan Partin
Joe, The Reply-To header in your email is pointing at joe@cd, fyi. Pretty strange. -- Tristan Partin Neon (https://neon.tech)

Re: Sampling-based timing for EXPLAIN ANALYZE

2023-07-03 Thread Daniel Gustafsson
This thread has been stale since January with no movement at all during the March CF, and according to the CFBot it stopped building at all ~ 14 weeks ago. I'm marking this returned with feedback, it can be resubmitted for a future CF if someone decides to pick it up. -- Daniel Gustafsson

Re: Extension Enhancement: Buffer Invalidation in pg_buffercache

2023-07-03 Thread jian he
On Mon, Jul 3, 2023 at 4:26 PM Palak Chaturvedi wrote: > > Hi Thomas, > Thank you for your suggestions. I have added the sql in the meson > build as well. > > On Sat, 1 Jul 2023 at 03:39, Thomas Munro wrote: > > > > On Fri, Jun 30, 2023 at 10:47 PM Palak Chaturvedi > > wrote: > > > pgbench=#

Re: Inconsistent results with libc sorting on Windows

2023-07-03 Thread Alvaro Herrera
On 2023-Jun-19, Juan José Santamaría Flecha wrote: > Ok, let's see where the report goes: > > https://developercommunity.visualstudio.com/t/CompareStringEx-non-transitive/10393003?q=comparestringex Hm, so this appears to have been marked as solved by Microsoft. Can you recheck? Also, what

Re: pg_basebackup check vs Windows file path limits

2023-07-03 Thread Daniel Gustafsson
> On 3 Jul 2023, at 17:18, Andrew Dunstan wrote: > On 2023-07-03 Mo 10:16, Daniel Gustafsson wrote: >>> On 3 Jul 2023, at 16:12, Andrew Dunstan >>> wrote: >>> >>> I've pushed a better solution, which creates the file via a short symlink. >>> Experimentation on fairywren showed this working.

Re: pg_basebackup check vs Windows file path limits

2023-07-03 Thread Andrew Dunstan
On 2023-07-03 Mo 10:16, Daniel Gustafsson wrote: On 3 Jul 2023, at 16:12, Andrew Dunstan wrote: I've pushed a better solution, which creates the file via a short symlink. Experimentation on fairywren showed this working. The buildfarm seems a tad upset after this? Yeah :-( I think it

Re: check_strxfrm_bug()

2023-07-03 Thread Tristan Partin
On Sun Jul 2, 2023 at 8:49 PM CDT, Thomas Munro wrote: > On Sun, Jul 2, 2023 at 4:25 AM Noah Misch wrote: > > On Wed, Jun 28, 2023 at 01:02:21PM +1200, Thomas Munro wrote: > > > On Wed, Jun 28, 2023 at 11:03 AM Thomas Munro > > > wrote: > > > > The GCC build farm has just received some SPARC

Re: Make uselocale protection more consistent

2023-07-03 Thread Tristan Partin
On Mon Jul 3, 2023 at 9:21 AM CDT, Peter Eisentraut wrote: > On 03.07.23 15:21, Tristan Partin wrote: > >>> I think it would be better to keep HAVE_LOCALE_T as encompassing any of > >>> the various locale_t-using functions, rather than using HAVE_USELOCALE > >>> as a proxy for them. Otherwise you

Re: BUG #17946: LC_MONETARY & DO LANGUAGE plperl - BUG

2023-07-03 Thread Tristan Partin
On Fri Jun 30, 2023 at 7:13 AM CDT, Joe Conway wrote: > On 6/29/23 22:13, Tristan Partin wrote: > > On Mon Jun 5, 2023 at 11:00 AM CDT, Heikki Linnakangas wrote: > >> I think the uselocale() call renders ineffective the setlocale() calls > >> that we make later. Maybe we should replace our

Re: Optionally using a better backtrace library?

2023-07-03 Thread Peter Eisentraut
On 02.07.23 20:31, Andres Freund wrote: A lot of platforms have "libbacktrace" available, e.g. as part of gcc. I think we should consider using it, when available, to produce more useful backtraces. I hacked it up for ereport() to debug something, and the backtraces are considerably better:

Re: Add support for AT LOCAL

2023-07-03 Thread Vik Fearing
On 7/3/23 15:42, Daniel Gustafsson wrote: On 6 Jun 2023, at 05:13, Vik Fearing wrote: Patch against 3f1180 attached. This patch fails to compile, the declaration of variables in the switch block needs to be scoped within a { } block. Interesting. It compiles for me. I've fixed

Re: Make uselocale protection more consistent

2023-07-03 Thread Peter Eisentraut
On 03.07.23 15:21, Tristan Partin wrote: I think it would be better to keep HAVE_LOCALE_T as encompassing any of the various locale_t-using functions, rather than using HAVE_USELOCALE as a proxy for them. Otherwise you create weird situations like having #ifdef HAVE_WCSTOMBS_L inside #ifdef

Re: logicalrep_message_type throws an error

2023-07-03 Thread Euler Taveira
On Mon, Jul 3, 2023, at 10:57 AM, Ashutosh Bapat wrote: > On Mon, Jul 3, 2023 at 6:52 PM Ashutosh Bapat > wrote: > > > > The switch is on action which is an enum. So without default it will > > provide a compilation warning for missing enums. Adding "default" case > > defeats that purpose. I

Re: pg_basebackup check vs Windows file path limits

2023-07-03 Thread Daniel Gustafsson
> On 3 Jul 2023, at 16:12, Andrew Dunstan wrote: > I've pushed a better solution, which creates the file via a short symlink. > Experimentation on fairywren showed this working. The buildfarm seems a tad upset after this? -- Daniel Gustafsson

Re: Make uselocale protection more consistent

2023-07-03 Thread Peter Eisentraut
On 03.07.23 08:24, Thomas Munro wrote: I propose[1] that we get rid of HAVE_LOCALE_T completely and make "libc" provider support unconditional. It's standardised, and every target system has it, even Windows. But Windows doesn't have uselocale(). [1]

Re: pg_basebackup check vs Windows file path limits

2023-07-03 Thread Andrew Dunstan
On 2023-07-02 Su 09:15, Andrew Dunstan wrote: The buildfarm animal fairywren has been failing the tests for pg_basebackup because it can't create a file with a path longer than 255 chars. This has just been tripped because for release 16 it's running TAP tests, and the branch name is part

Re: Mark a transaction uncommittable

2023-07-03 Thread Daniel Gustafsson
> On 5 Jun 2023, at 09:22, Gurjeet Singh wrote: > Please see attached the patch that introduces this new feature. This patch fails the guc_check test due to something missing in the sample configuration. Please send a rebased version with this test fixed. [08:31:26.680] --- stdout ---

Re: cataloguing NOT NULL constraints

2023-07-03 Thread Peter Eisentraut
On 30.06.23 13:44, Alvaro Herrera wrote: OK, so here's a new attempt to get this working correctly. Attached is a small fixup patch for the documentation. Furthermore, there are a few outdated comments that are probably left over from previous versions of this patch set. *

Re: logicalrep_message_type throws an error

2023-07-03 Thread Ashutosh Bapat
On Mon, Jul 3, 2023 at 6:52 PM Ashutosh Bapat wrote: > > Thanks Euler for the patch. > > On Mon, Jul 3, 2023 at 6:32 PM Euler Taveira wrote: > > > > Masahiko, since abc0910e2e0 is your patch maybe you want to take a look at > > it. > > > > A couple of comments. > > -char * > +const char * > >

Re: Introduce "log_connection_stages" setting.

2023-07-03 Thread Daniel Gustafsson
> On 16 May 2023, at 20:51, Sergey Dudoladov wrote: > I have attached the fourth version of the patch. This version fails the ldap_password test on all platforms on pg_ctl failing to start: [14:48:10.544] --- stdout --- [14:48:10.544] # executing test in

Is a pg_stat_force_next_flush() call sufficient for regression tests?

2023-07-03 Thread Tomas Vondra
Hi, I noticed eelpout failed with this in stats.sql, in the pg_stat_io tests added a couple months ago [1]: @@ -1415,7 +1415,7 @@ :io_sum_vac_strategy_after_reuses > :io_sum_vac_strategy_before_reuses; ?column? | ?column? --+-- - t| t + t| f (1 row)

Re: Add support for AT LOCAL

2023-07-03 Thread Daniel Gustafsson
> On 6 Jun 2023, at 05:13, Vik Fearing wrote: > Patch against 3f1180 attached. This patch fails to compile, the declaration of variables in the switch block needs to be scoped within a { } block. I've fixed this trivial error in the attached v2 and also reflowed the comments which now no

Re: Track Oldest Initialized WAL Buffer Page

2023-07-03 Thread Heikki Linnakangas
On 07/02/2023 16:00, Bharath Rupireddy wrote: Hi, While working on [1], I was looking for a quick way to tell if a WAL record is present in the WAL buffers array without scanning but I couldn't find one. /* The end-ptr of the page that contains the record */ expectedEndPtr += XLOG_BLCKSZ -

Re: generic plans and "initial" pruning

2023-07-03 Thread Daniel Gustafsson
> On 8 Jun 2023, at 16:23, Amit Langote wrote: > > Here is a new version. The local planstate variable in the hunk below is shadowing the function parameter planstate which cause a compiler warning: @@ -1495,18 +1556,15 @@ ExecEndPlan(PlanState *planstate, EState *estate) ListCell

Re: logicalrep_message_type throws an error

2023-07-03 Thread Ashutosh Bapat
Thanks Euler for the patch. On Mon, Jul 3, 2023 at 6:32 PM Euler Taveira wrote: > > Masahiko, since abc0910e2e0 is your patch maybe you want to take a look at it. > A couple of comments. -char * +const char * Nice improvement. logicalrep_message_type(LogicalRepMsgType action) { switch

Re: Incremental sort for access method with ordered scan support (amcanorderbyop)

2023-07-03 Thread Miroslav Bendik
Thanks, for suggestions. On Sun 02. 07. 2023 at 10:18 Richard Guo wrote: > 1. For comment "On success, the result list is ordered by pathkeys.", I > think it'd be more accurate if we say something like "On success, the > result list is ordered by pathkeys or a prefix list of pathkeys." >

Re: Make uselocale protection more consistent

2023-07-03 Thread Tristan Partin
On Mon Jul 3, 2023 at 1:24 AM CDT, Thomas Munro wrote: > On Mon, Jul 3, 2023 at 6:13 PM Peter Eisentraut wrote: > > On 27.06.23 17:02, Tristan Partin wrote: > > > This is a patch which implements an issue discussed in bug #17946[0]. It > > > doesn't fix the overarching issue of the bug, but

Re: Flush SLRU counters in checkpointer process

2023-07-03 Thread Daniel Gustafsson
> On 3 Mar 2023, at 09:06, Anthonin Bonnefoy > wrote: > > Here's the patch rebased with Andres' suggestions. > Happy to update it if there's any additionalj change required. This patch crashes 031_recovery_conflict with a SIGInvalid on Windows, can you please investigate and see what might be

Re: cataloguing NOT NULL constraints

2023-07-03 Thread Alvaro Herrera
On 2023-Jun-30, Andres Freund wrote: > On 2023-06-30 13:44:03 +0200, Alvaro Herrera wrote: > > > The main novelty in this version of the patch, is that we now emit > > "throwaway" NOT NULL constraints when a column is part of the primary > > key. Then, after the PK is created, we run a DROP for

Re: logicalrep_message_type throws an error

2023-07-03 Thread Euler Taveira
On Mon, Jul 3, 2023, at 7:30 AM, Ashutosh Bapat wrote: > logicalrep_message_type() is used to convert logical message type code > into name while prepared error context or details. Thus when this > function is called probably an ERROR is already raised. If > logicalrep_message_type() gets an

Re: Creation of an empty table is not fsync'd at checkpoint

2023-07-03 Thread Daniel Gustafsson
This patch required a trivial rebase after conflicting with bfcf1b3480 so I've attached a v2 to get the CFBot to run this. -- Daniel Gustafsson v2-0001-Ensure-that-creation-of-an-empty-relfile-is-fsync.patch Description: Binary data

Re: Deleting prepared statements from libpq.

2023-07-03 Thread Jelte Fennema
@Michael is anything else needed from my side? If not, I'll mark the commitfest entry as "Ready For Committer".

Allow specifying a dbname in pg_basebackup connection string

2023-07-03 Thread Jelte Fennema
Normally it doesn't really matter which dbname is used in the connection string that pg_basebackup and other physical replication CLI tools use. The reason being, that physical replication does not work at the database level, but instead at the server level. So you will always get the data for all

Re: [PGdocs] fix description for handling pf non-ASCII characters

2023-07-03 Thread jian he
On Thu, Jun 29, 2023 at 3:51 PM Hayato Kuroda (Fujitsu) wrote: > > Dear Jian, > > Thank you for checking my patch! > > > > > in your patch: > > > printable ASCII characters will be replaced with a hex escape. > > > > My wording is not good. I think the result will be: ASCII characters > > will be

Re: pgbnech: allow to cancel queries during benchmark

2023-07-03 Thread Fabien COELHO
Hello Yugo-san, In thread #0, setup_cancel_handler is called before the loop, the CancelRequested flag is set when Ctrl+C is issued. In the loop, cancel requests are sent when the flag is set only in thread #0. SIGINT is blocked in other threads, but the threads will exit after their query

Re: Cleaning up array_in()

2023-07-03 Thread jian he
based on Nikhil Benesch idea. The attached diff is based on v1-0002-Rewrite-ArrayCount-to-make-dimensionality-checks.patch. diff compare v1-0002: select '{{1,{2}},{2,3}}'::text[]; ERROR: malformed array literal: "{{1,{2}},{2,3}}" LINE 1: select '{{1,{2}},{2,3}}'::text[]; ^

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-07-03 Thread vignesh C
On Wed, 28 Jun 2023 at 12:02, Hayato Kuroda (Fujitsu) wrote: > > Dear Amit, > > > > > This actually makes sense. I quickly try to do that without adding any > > > > new replication message. As you would expect, it did not work. > > > > I don't really know what's needed to make a connection to

Re: Refactor ssl tests to avoid using internal PostgreSQL::Test::Cluster methods

2023-07-03 Thread Heikki Linnakangas
On 31/05/2023 15:47, Daniel Gustafsson wrote: The SSL tests for pg_ctl restarts with an incorrect key passphrase run pg_ctl manually and use the internal method _update_pid to set the server PID file accordingly. This is needed since $node->restart will BAIL in case the restart fails, which

Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)

2023-07-03 Thread Ranier Vilela
Em sex., 30 de jun. de 2023 às 15:48, Karina Litskevich < litskevichkar...@gmail.com> escreveu: > Hi, > > Good catch. Indeed, eb.rel shouldn't be NULL there and the tests should be > unnecessary. > Thanks for the confirmation. > However, it doesn't follow from the code of these functions. >

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-07-03 Thread vignesh C
On Fri, 30 Jun 2023 at 09:55, Amit Kapila wrote: > > On Thu, Jun 29, 2023 at 9:40 PM vignesh C wrote: > > > > On Thu, 29 Jun 2023 at 09:58, Zhijie Hou (Fujitsu) > > wrote: > > > > > > On Thursday, June 29, 2023 12:06 PM vignesh C wrote: > > > > > > > > > > Thanks for the patches. > > > > > > I

logicalrep_message_type throws an error

2023-07-03 Thread Ashutosh Bapat
Hi All, logicalrep_message_type() is used to convert logical message type code into name while prepared error context or details. Thus when this function is called probably an ERROR is already raised. If logicalrep_message_type() gets an unknown message type, it will throw an error, which will

Re: Commitfest manager for July

2023-07-03 Thread Daniel Gustafsson
> On 28 Jun 2023, at 09:45, Daniel Gustafsson wrote: > > A quick scan of the archives doesn't turn up anyone who has volunteered in > advance to run the upcoming commitfest. Is anyone keen at trying their hand > at > this very important community work? The July CF is good for anyone doing

Re: Optionally using a better backtrace library?

2023-07-03 Thread David Steele
On 7/3/23 11:58, Alvaro Herrera wrote: Nice things about libbacktrace are that the generation of stack traces is documented to be async signal safe on most platforms (with a #define to figure that out, and a more minimal safe version always available) and that it supports a wide range of

  1   2   >