Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-11-06 Thread Amit Kapila
On Tue, Nov 7, 2023 at 10:01 AM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, November 7, 2023 12:14 PM Kuroda, Hayato/黒田 隼人 > wrote: > > > > Dear hackers, > > > > PSA the patch to solve the issue [1]. > > > > Kindly Peter E. and Andrew raised an issue that delete_old_cluster.sh is > > generated

Re: Support run-time partition pruning for hash join

2023-11-06 Thread Richard Guo
On Mon, Nov 6, 2023 at 11:00 PM Alexander Lakhin wrote: > Please look at a warning and an assertion failure triggered by the > following script: > set parallel_setup_cost = 0; > set parallel_tuple_cost = 0; > set min_parallel_table_scan_size = '1kB'; > > create table t1 (i int) partition by

Re: Remove distprep

2023-11-06 Thread Michael Paquier
On Mon, Nov 06, 2023 at 04:21:40PM +0100, Peter Eisentraut wrote: > done Nice to see 721856ff24b3 in, thanks! -- Michael signature.asc Description: PGP signature

Re: SQL:2011 application time

2023-11-06 Thread jian he
hi. based on v17. I found several doc related issues. previously I didn't look closely + + In a temporal foreign key, the delete/update will use + FOR PORTION OF semantics to constrain the + effect to the bounds being deleted/updated in the referenced row.

Re: Where can I find the doxyfile?

2023-11-06 Thread John Morris
Another update, this time with an abbreviated Doxyfile. Rather than including the full Doxyfile, this updated version only includes modified settings. It is more compact and more likely to survive across future doxygen versions. * John Morris doxygen_v2.patch Description:

Re: Popcount optimization using AVX512

2023-11-06 Thread Noah Misch
On Mon, Nov 06, 2023 at 09:59:26PM -0600, Nathan Bossart wrote: > On Mon, Nov 06, 2023 at 07:15:01PM -0800, Noah Misch wrote: > > On Mon, Nov 06, 2023 at 09:52:58PM -0500, Tom Lane wrote: > >> Nathan Bossart writes: > >> > Like I said, I don't have any proposals yet, but assuming we do want to >

Re: Intermittent failure with t/003_logical_slots.pl test on windows

2023-11-06 Thread Kyotaro Horiguchi
At Mon, 6 Nov 2023 19:42:21 +0530, Nisha Moond wrote in > > Appending '2>&1 test: > > The command still results in NULL and ends up failing as no data is > > returned. Which means even no error message is returned. The error log Thanks for confirmation. So, at least the child process was

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-11-06 Thread Zhijie Hou (Fujitsu)
On Tuesday, November 7, 2023 12:14 PM Kuroda, Hayato/黒田 隼人 wrote: > > Dear hackers, > > PSA the patch to solve the issue [1]. > > Kindly Peter E. and Andrew raised an issue that delete_old_cluster.sh is > generated in the source directory, even when the VPATH/meson build. > This can avoid by

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-11-06 Thread Peter Smith
On Tue, Nov 7, 2023 at 3:14 PM Hayato Kuroda (Fujitsu) wrote: > > Dear hackers, > > PSA the patch to solve the issue [1]. > > Kindly Peter E. and Andrew raised an issue that delete_old_cluster.sh is > generated in the source directory, even when the VPATH/meson build. > This can avoid by changing

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-11-06 Thread Hayato Kuroda (Fujitsu)
Dear hackers, PSA the patch to solve the issue [1]. Kindly Peter E. and Andrew raised an issue that delete_old_cluster.sh is generated in the source directory, even when the VPATH/meson build. This can avoid by changing the directory explicitly. [1]:

Re: Popcount optimization using AVX512

2023-11-06 Thread Nathan Bossart
On Mon, Nov 06, 2023 at 07:15:01PM -0800, Noah Misch wrote: > On Mon, Nov 06, 2023 at 09:52:58PM -0500, Tom Lane wrote: >> Nathan Bossart writes: >> > Like I said, I don't have any proposals yet, but assuming we do want to >> > support newer intrinsics, either open-coded or via

Re: UniqueKey v2

2023-11-06 Thread zhihuifan1213
jian he writes: > On Fri, Oct 20, 2023 at 4:33 PM wrote: >> >> >> > i did some simple tests using text data type. >> > >> > it works with the primary key, not with unique indexes. >> > it does not work when the column is unique, not null. >> > >> > The following is my test. >> >> Can you

Re: Atomic ops for unlogged LSN

2023-11-06 Thread Nathan Bossart
On Tue, Nov 07, 2023 at 12:57:32AM +, John Morris wrote: > I incorporated your suggestions and added a few more. The changes are > mainly related to catching potential errors if some basic assumptions > aren’t met. Hm. Could we move that to a separate patch? We've lived without these extra

Re: Show WAL write and fsync stats in pg_stat_io

2023-11-06 Thread Michael Paquier
On Mon, Nov 06, 2023 at 03:35:01PM +0300, Nazir Bilal Yavuz wrote: > Results are: > > ╔═╦═══╦╗ > ║ ║ track_wal_io_timing ║║ > ╠═╬═══╦═══╬╣ > ║ clock ║ on ║ off ║

Re: Popcount optimization using AVX512

2023-11-06 Thread Noah Misch
On Mon, Nov 06, 2023 at 09:52:58PM -0500, Tom Lane wrote: > Nathan Bossart writes: > > Like I said, I don't have any proposals yet, but assuming we do want to > > support newer intrinsics, either open-coded or via auto-vectorization, I > > suspect we'll need to gather consensus for a new

Re: [PATCH] Small refactoring of inval.c and inval.h

2023-11-06 Thread Michael Paquier
On Mon, Nov 06, 2023 at 01:17:12PM +0300, Aleksander Alekseev wrote: > Fair enough, here is the corrected patch. Okay for me, so applied. Thanks! -- Michael signature.asc Description: PGP signature

Re: Popcount optimization using AVX512

2023-11-06 Thread Tom Lane
Nathan Bossart writes: > Like I said, I don't have any proposals yet, but assuming we do want to > support newer intrinsics, either open-coded or via auto-vectorization, I > suspect we'll need to gather consensus for a new policy/strategy. Yeah. The function-pointer solution kind of sucks,

Re: 2023-11-09 release announcement draft

2023-11-06 Thread Noah Misch
On Mon, Nov 06, 2023 at 05:04:25PM -0500, Jonathan S. Katz wrote: > The PostgreSQL Global Development Group has released an update to all > supported > versions of PostgreSQL, including 16.1, 15.5, 14.10, 13.13, 12.17, and 11.22 > This release fixes over 55 bugs reported over the last several

autovectorize page checksum code included elsewhere

2023-11-06 Thread Nathan Bossart
(Unfortunately, I'm posting this too late for the November commitfest, but I'm hoping this will be the first in a series of proposed improvements involving SIMD instructions for v17.) Presently, we ask compilers to autovectorize checksum.c and numeric.c. The page checksum code actually lives in

Re: A recent message added to pg_upgade

2023-11-06 Thread Michael Paquier
On Tue, Nov 07, 2023 at 07:59:46AM +0530, Amit Kapila wrote: > Do you mean to say that if 'IsBinaryUpgrade' is true then let's not > allow to launch launcher or apply worker? If so, I guess this won't be > any better than prohibiting at an early stage or explicitly overriding > those with internal

Re: A recent message added to pg_upgade

2023-11-06 Thread Amit Kapila
On Sun, Nov 5, 2023 at 5:33 AM Michael Paquier wrote: > > On Fri, Nov 03, 2023 at 01:33:26PM +1100, Peter Smith wrote: > > On Fri, Nov 3, 2023 at 1:11 PM Amit Kapila wrote: > >> Now, that Michael also committed another similar change in commit > >> 7021d3b176, it is better to be consistent in

Re: Popcount optimization using AVX512

2023-11-06 Thread Nathan Bossart
On Fri, Nov 03, 2023 at 12:16:05PM +0100, Matthias van de Meent wrote: > On Thu, 2 Nov 2023 at 15:22, Amonson, Paul D wrote: >> This proposal showcases the speed-up provided to popcount feature when >> using AVX512 registers. The intent is to share the preliminary results >> with the community

Re: Making aggregate deserialization (and WAL receive) functions slightly faster

2023-11-06 Thread Amit Kapila
On Tue, Nov 7, 2023 at 3:56 AM David Rowley wrote: > > On Thu, 2 Nov 2023 at 22:42, Amit Kapila wrote: > > The other two look good to me. > > Thanks for looking. > > I spent some time trying to see if the performance changes much with > either of these cases. For the XLogWalRcvProcessMsg() I was

Re: Atomic ops for unlogged LSN

2023-11-06 Thread John Morris
I incorporated your suggestions and added a few more. The changes are mainly related to catching potential errors if some basic assumptions aren’t met. There are basically 3 assumptions. Stating them as conditions we want to avoid. * We should not get an unlogged LSN before reading the

Re: 2023-11-09 release announcement draft

2023-11-06 Thread Jesper Pedersen
Hi, On 11/6/23 17:04, Jonathan S. Katz wrote: Attached is the release announcement draft for the 2023-11-09 release (16.1 et al.). Please review for accuracy and notable omissions. Please have all feedback in by 2023-11-09 08:00 UTC at the latest (albeit the sooner the better).

Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan

2023-11-06 Thread Peter Geoghegan
On Mon, Nov 6, 2023 at 1:28 PM Matthias van de Meent wrote: > I'm planning on reviewing this patch tomorrow, but in an initial scan > through the patch I noticed there's little information about how the > array keys state machine works in this new design. Do you have a more > toplevel description

Re: Fix search_path for all maintenance commands

2023-11-06 Thread Isaac Morland
On Mon, 6 Nov 2023 at 15:54, Tom Lane wrote: > Isaac Morland writes: > > I still think the right default is that CREATE FUNCTION stores the > > search_path in effect when it runs with the function, and that is the > > search_path used to run the function (and don't "BEGIN ATOMIC" functions > >

Re: Making aggregate deserialization (and WAL receive) functions slightly faster

2023-11-06 Thread David Rowley
On Thu, 2 Nov 2023 at 22:42, Amit Kapila wrote: > The other two look good to me. Thanks for looking. I spent some time trying to see if the performance changes much with either of these cases. For the XLogWalRcvProcessMsg() I was unable to measure any difference even when replaying inserts into

2023-11-09 release announcement draft

2023-11-06 Thread Jonathan S. Katz
Hi, Attached is the release announcement draft for the 2023-11-09 release (16.1 et al.). Please review for accuracy and notable omissions. Please have all feedback in by 2023-11-09 08:00 UTC at the latest (albeit the sooner the better). Thanks, Jonathan The PostgreSQL Global Development

Re: Explicitly skip TAP tests under Meson if disabled

2023-11-06 Thread Andres Freund
Hi, On 2023-11-06 17:46:23 +0100, Peter Eisentraut wrote: > On 04.11.23 01:51, Andres Freund wrote: > > I'd just use a single test() invocation here, and add an argument to > > testwrap > > indicating that it should print out the skipped message. That way we a) > > don't > > need two test()

Re: Add recovery to pg_control and remove backup_label

2023-11-06 Thread David Steele
On 11/6/23 02:35, Michael Paquier wrote: On Sun, Nov 05, 2023 at 01:45:39PM -0400, David Steele wrote: Rebased on 151ffcf6. I like this patch a lot. Even if the backup_label file is removed, we still have all the debug information from the backup history file, thanks to its LABEL, BACKUP

Re: Optimizing nbtree ScalarArrayOp execution, allowing multi-column ordered scans, skip scan

2023-11-06 Thread Matthias van de Meent
On Sat, 21 Oct 2023 at 00:40, Peter Geoghegan wrote: > > On Sun, Oct 15, 2023 at 1:50 PM Peter Geoghegan wrote: > > Attached is v4, which applies cleanly on top of HEAD. This was needed > > due to Alexandar Korotkov's commit e0b1ee17, "Skip checking of scan > > keys required for directional scan

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-11-06 Thread Alexander Korotkov
On Mon, Nov 6, 2023 at 4:38 PM Aleksander Alekseev wrote: > > > PFE the corrected patchset v58. > > > > I'd like to revive this thread. > > Many thanks for your comments and suggestions. > > > I think it worth adding asserts here to verify there is no overflow making us mapping different segments

Re: Fix search_path for all maintenance commands

2023-11-06 Thread Tom Lane
Isaac Morland writes: > I still think the right default is that CREATE FUNCTION stores the > search_path in effect when it runs with the function, and that is the > search_path used to run the function (and don't "BEGIN ATOMIC" functions > partially work this way already?). I don't see how that

Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-11-06 Thread Laurenz Albe
On Mon, 2023-11-06 at 10:55 -0500, Bruce Momjian wrote: > Okay, I think I have good wording for this. I didn't like the wording > of other roles, so I restructured that in the attached patch too. > > !Default privileges apply only to the active role; the default > !privileges of

Re: Atomic ops for unlogged LSN

2023-11-06 Thread Nathan Bossart
On Wed, Nov 01, 2023 at 10:40:06PM -0500, Nathan Bossart wrote: > Since this isn't a tremendously performance-sensitive area, IMHO we should > code defensively to eliminate any doubts about correctness and to make it > easier to reason about. Concretely, like this. -- Nathan Bossart Amazon Web

Re: Fix search_path for all maintenance commands

2023-11-06 Thread Isaac Morland
On Thu, 2 Nov 2023 at 14:22, Jeff Davis wrote: > On Tue, 2023-10-31 at 13:16 -0400, Isaac Morland wrote: > > > Perhaps the search_path for running a maintenance command should be > > the search_path set for the table owner (ALTER ROLE … SET search_path > > …)? > > That's an interesting idea; I

Re: Wrong security context for deferred triggers?

2023-11-06 Thread Laurenz Albe
On Mon, 2023-11-06 at 18:29 +0100, Tomas Vondra wrote: > On 11/6/23 14:23, Laurenz Albe wrote: > > This behavior looks buggy to me. What do you think? > > I cannot imagine that it is a security problem, though. > > How could code getting executed under the wrong role not be a security > issue?

Re: Adding facility for injection points (or probe points?) for more advanced tests

2023-11-06 Thread Nazir Bilal Yavuz
Hi, On Wed, 25 Oct 2023 at 07:13, Michael Paquier wrote: > > Hi all, > > I don't remember how many times in the last few years when I've had to > hack the backend to produce a test case that involves a weird race > condition across multiple processes running in the backend, to be able > to prove

Re: CRC32C Parallel Computation Optimization on ARM

2023-11-06 Thread Nathan Bossart
On Fri, Nov 03, 2023 at 10:46:57AM +, Xiang Gao wrote: > On Date: Thu, 2 Nov 2023 09:35:50AM -0500, Nathan Bossart wrote: >> The idea is that we don't want to start forcing runtime checks on builds >> where we aren't already doing runtime checks. IOW if the compiler can use >> the ARMv8 CRC

Re: Add bump memory context type and use it for tuplesorts

2023-11-06 Thread Matthias van de Meent
On Tue, 11 Jul 2023 at 01:51, David Rowley wrote: > > On Tue, 27 Jun 2023 at 21:19, David Rowley wrote: > > I've attached the bump allocator patch and also the script I used to > > gather the performance results in the first 2 tabs in the attached > > spreadsheet. > > I've attached a v2 patch

Re: pgsql: jit: Support opaque pointers in LLVM 16.

2023-11-06 Thread Alvaro Herrera
On 2023-Oct-18, Thomas Munro wrote: > jit: Support opaque pointers in LLVM 16. > > Remove use of LLVMGetElementType() and provide the type of all pointers > to LLVMBuildXXX() functions when emitting IR, as required by modern LLVM > versions[1]. > > * For LLVM <= 14, we'll still use the old

Re: Add the ability to limit the amount of memory that can be allocated to backends.

2023-11-06 Thread Stephen Frost
Greetings, * Andres Freund (and...@anarazel.de) wrote: > On 2023-10-31 17:11:26 +, John Morris wrote: > > Postgres memory reservations come from multiple sources. > > > > * Malloc calls made by the Postgres memory allocators. > > * Static shared memory created by the postmaster at

Re: Wrong security context for deferred triggers?

2023-11-06 Thread Tomas Vondra
On 11/6/23 14:23, Laurenz Albe wrote: > ... > > This behavior looks buggy to me. What do you think? > I cannot imagine that it is a security problem, though. > How could code getting executed under the wrong role not be a security issue? Also, does this affect just the role, or are there some

Re: Wrong security context for deferred triggers?

2023-11-06 Thread Isaac Morland
On Mon, 6 Nov 2023 at 11:58, Laurenz Albe wrote: > Become a superuser again and commit: > > > > RESET ROLE; > > > > COMMIT; > > NOTICE: current_user = postgres > > > > > > So a deferred constraint trigger does not run with the same security > context > > as an immediate trigger. This is

Re: psql not responding to SIGINT upon db reconnection

2023-11-06 Thread Tristan Partin
On Thu Nov 2, 2023 at 4:03 AM CDT, Shlok Kyal wrote: Hi, > That sounds like a much better solution. Attached you will find a v4 > that implements your suggestion. Please let me know if there is > something that I missed. I can confirm that the patch works. > > $

Re: PoC: prefetching index leaf pages (for inserts)

2023-11-06 Thread Tomas Vondra
Seems cfbot was not entirely happy about the patch, for two reasons: 1) enable_insert_prefetching definition was inconsistent (different boot/default values, missing in .conf and so on) 2) stupid bug in execReplication, inserting index entries twice The attached v3 should fix all of that, I

Re: Regression on pg_restore to 16.0: DOMAIN not available to SQL function

2023-11-06 Thread Tom Lane
Mark Hills writes: > On Fri, 3 Nov 2023, Tom Lane wrote: >> Right, so the 910eb61b2 fix explains it. I guess I'd better >> expand the release note entry, because we'd not foreseen this >> particular failure mode. > Indeed, and curiosity got the better of me so I constructed a minimal test >

Re: Wrong security context for deferred triggers?

2023-11-06 Thread Laurenz Albe
On Mon, 2023-11-06 at 14:23 +0100, Laurenz Albe wrote: > CREATE FUNCTION trig() RETURNS trigger > LANGUAGE plpgsql AS > $$BEGIN > RAISE NOTICE 'current_user = %', current_user; > RETURN NEW; > END;$$; > > CREATE CONSTRAINT TRIGGER trig AFTER INSERT ON tab > DEFERRABLE

Re: Explicitly skip TAP tests under Meson if disabled

2023-11-06 Thread Peter Eisentraut
On 04.11.23 01:51, Andres Freund wrote: I'd just use a single test() invocation here, and add an argument to testwrap indicating that it should print out the skipped message. That way we a) don't need two test() invocations, b) could still see the test name etc in the test invocation. Is

Re: Regression on pg_restore to 16.0: DOMAIN not available to SQL function

2023-11-06 Thread Mark Hills
On Fri, 3 Nov 2023, Tom Lane wrote: > Mark Hills writes: > > On Fri, 3 Nov 2023, Tom Lane wrote: > >> However, then it's not clear why it would've worked > >> in 15.4 which does the same thing. I wonder whether you are > >> using this function in a column default for the troublesome > >> table.

Re: Moving forward with TDE [PATCH v3]

2023-11-06 Thread David Christensen
On Fri, Nov 3, 2023 at 9:53 PM Andres Freund wrote: > On 2023-11-02 19:32:28 -0700, Andres Freund wrote: > > > From 327e86d52be1df8de9c3a324cb06b85ba5db9604 Mon Sep 17 00:00:00 2001 > > > From: David Christensen > > > Date: Fri, 29 Sep 2023 15:16:00 -0400 > > > Subject: [PATCH v3 5/5] Add

Re: Moving forward with TDE [PATCH v3]

2023-11-06 Thread David Christensen
Hi, thanks for the detailed feedback here. I do think it's worth addressing the question Stephen raised as far as what we use for the IV[1]; whether LSN or something else entirely, and if so what. The choice of LSN here is fairly fundamental to the existing implementation, so if we decide to do

Re: Moving forward with TDE [PATCH v3]

2023-11-06 Thread Bruce Momjian
On Mon, Nov 6, 2023 at 09:56:37AM -0500, Stephen Frost wrote: > The gist is, without a suggestion of things to try, we're left > to our own devices to try and figure out things which might be > successful, only to have those turned down too when we come back with > them, see [1] for what feels

Re: apply pragma system_header to python headers

2023-11-06 Thread Tom Lane
Andrew Dunstan writes: > On 2023-11-06 Mo 09:57, Tom Lane wrote: >> +1 for the concept --- I was just noticing yesterday that my buildfarm >> warning scraping script is turning up some of these. However, we ought >> to try to minimize the amount of our own code that is subject to the >> pragma.

Re: Moving forward with TDE [PATCH v3]

2023-11-06 Thread Bruce Momjian
On Thu, Nov 2, 2023 at 07:32:28PM -0700, Andres Freund wrote: > On 2023-10-31 16:23:17 -0500, David Christensen wrote: > > +Implementation > > +-- > > + > > +To enable cluster file encryption, the initdb option > > +--cluster-key-command must be used, which specifies a command to > >

Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-11-06 Thread Bruce Momjian
On Mon, Nov 6, 2023 at 09:44:14AM +0100, Laurenz Albe wrote: > On Sat, 2023-11-04 at 21:14 -0400, Bruce Momjian wrote: > > > It is not the role that is modified.  Perhaps: > > > > > >    [...]; if omitted, the current role is used. > > > > Sure, attached.  Here is the issue I have though, we

Re: apply pragma system_header to python headers

2023-11-06 Thread Andrew Dunstan
On 2023-11-06 Mo 09:57, Tom Lane wrote: Peter Eisentraut writes: Analogous to 388e80132c (which was for Perl) but for Python, I propose adding #pragma GCC system_header to plpython.h. Without it, you get tons of warnings about -Wdeclaration-after-statement, starting with Python 3.12. (In

Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-11-06 Thread Bruce Momjian
On Mon, Nov 6, 2023 at 09:32:27AM +0100, Michael Banck wrote: > Hi, > > On Sat, Nov 04, 2023 at 09:14:01PM -0400, Bruce Momjian wrote: > > + There is no way to change the default privileges for objects created by > > + any role. You have run ALTER DEFAULT PRIVILEGES for > > all > > +

Re: Remove distprep

2023-11-06 Thread Peter Eisentraut
On 02.11.23 23:34, Andres Freund wrote: On 2023-11-01 16:39:24 -0400, Peter Eisentraut wrote: OTOH, it seems somewhat unlikely that maintainer-clean is utilized much in extensions. I see it in things like postgis, but that has it's own configure etc, even though it also invokes pgxs. I

Re: Support run-time partition pruning for hash join

2023-11-06 Thread Alexander Lakhin
Hello Richard, 06.11.2023 06:05, Richard Guo wrote: Fixed this issue in v4. Please look at a warning and an assertion failure triggered by the following script: set parallel_setup_cost = 0; set parallel_tuple_cost = 0; set min_parallel_table_scan_size = '1kB'; create table t1 (i int)

Re: pg_rewind WAL segments deletion pitfall

2023-11-06 Thread Alexander Kukushkin
Hi Torikoshia, On Thu, 2 Nov 2023 at 04:24, torikoshia wrote: > > > > +extern void preserve_file(char *filepath); > > Is this necessary? > This function was defined in older version patch, but no longer seems to > exist. > > +# We use "perl -e 'exit(1)'" as a alternative to "false", because

Re: apply pragma system_header to python headers

2023-11-06 Thread Tom Lane
Peter Eisentraut writes: > Analogous to 388e80132c (which was for Perl) but for Python, I propose > adding #pragma GCC system_header to plpython.h. Without it, you get > tons of warnings about -Wdeclaration-after-statement, starting with > Python 3.12. (In the past, I have regularly sent

Re: Moving forward with TDE [PATCH v3]

2023-11-06 Thread Stephen Frost
Greetings, Thanks for your feedback on this. * Andres Freund (and...@anarazel.de) wrote: > I still am quite quite unconvinced that using the LSN as a nonce is a good > design decision. This is a really important part of the overall path to moving this forward, so I wanted to jump to it and have

Re: Add recovery to pg_control and remove backup_label

2023-11-06 Thread David Steele
On 11/6/23 01:05, Michael Paquier wrote: On Fri, Oct 27, 2023 at 10:10:42AM -0400, David Steele wrote: We are still planning to address this issue in the back branches. FWIW, redesigning the backend code in charge of doing base backups in the back branches is out of scope. Based on a read of

Re: Compiling warnings on old GCC

2023-11-06 Thread Tom Lane
Richard Guo writes: > On Mon, Nov 6, 2023 at 2:51 PM David Rowley wrote: >> There's some relevant discussion in >> https://postgr.es/m/flat/20220602024243.GJ29853%40telsasoft.com > It seems that the controversial '-Og' coupled with the old GCC version > (4.8) makes it not worth fixing. So

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-11-06 Thread Aleksander Alekseev
Alexander, > > PFE the corrected patchset v58. > > I'd like to revive this thread. Many thanks for your comments and suggestions. > I think it worth adding asserts here to verify there is no overflow making us > mapping different segments into the same files. Sorry, I didn't understand this

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-11-06 Thread Aleksander Alekseev
Hi, > > > If I remember right, the compiler will make equivalent code from > > > inline functions and macros, and functions has an additional benefit: > > > the compiler will report type mismatch if any. That was the only > > > reason. > > > > Then it's OK to leave it as an inline function. +1

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-11-06 Thread Pavel Borisov
On Mon, 6 Nov 2023 at 18:01, Alexander Korotkov wrote: > > On Mon, Nov 6, 2023 at 3:42 PM Pavel Borisov wrote: > > > > On Mon, 6 Nov 2023 at 17:07, Alexander Korotkov > > wrote: > > > On Wed, Jul 5, 2023 at 4:46 PM Aleksander Alekseev > > > wrote: > > > > PFE the corrected patchset v58. > >

Re: Intermittent failure with t/003_logical_slots.pl test on windows

2023-11-06 Thread Nisha Moond
On Fri, Nov 3, 2023 at 5:02 PM Nisha Moond wrote: > > On Thu, Nov 2, 2023 at 11:52 AM Kyotaro Horiguchi > wrote: > > > > At Tue, 31 Oct 2023 18:11:48 +0530, vignesh C wrote in > > > Few others are also facing this problem with similar code like in: > > >

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-11-06 Thread Alexander Korotkov
On Mon, Nov 6, 2023 at 3:42 PM Pavel Borisov wrote: > > On Mon, 6 Nov 2023 at 17:07, Alexander Korotkov wrote: > > On Wed, Jul 5, 2023 at 4:46 PM Aleksander Alekseev > > wrote: > > > PFE the corrected patchset v58. > > > > I'd like to revive this thread. > > > > This patchset is extracted from

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

2023-11-06 Thread Alena Rybakina
On 30.10.2023 17:06, Alexander Korotkov wrote: On Mon, Oct 30, 2023 at 3:40 PM Robert Haas wrote: On Thu, Oct 26, 2023 at 5:05 PM Peter Geoghegan wrote: On Thu, Oct 26, 2023 at 12:59 PM Robert Haas wrote: Alexander's example seems to show that it's not that simple. If I'm reading his

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-11-06 Thread Pavel Borisov
On Mon, 6 Nov 2023 at 17:07, Alexander Korotkov wrote: > > Hi! > > On Wed, Jul 5, 2023 at 4:46 PM Aleksander Alekseev > wrote: > > PFE the corrected patchset v58. > > I'd like to revive this thread. > > This patchset is extracted from a larger patchset implementing 64-bit xids. > It converts

Re: apply pragma system_header to python headers

2023-11-06 Thread Andrew Dunstan
On 2023-11-06 Mo 07:02, Peter Eisentraut wrote: Analogous to 388e80132c (which was for Perl) but for Python, I propose adding #pragma GCC system_header to plpython.h.  Without it, you get tons of warnings about -Wdeclaration-after-statement, starting with Python 3.12.  (In the past, I have

Wrong security context for deferred triggers?

2023-11-06 Thread Laurenz Albe
Create a table and a deferrable constraint trigger: CREATE TABLE tab (i integer); CREATE FUNCTION trig() RETURNS trigger LANGUAGE plpgsql AS $$BEGIN RAISE NOTICE 'current_user = %', current_user; RETURN NEW; END;$$; CREATE CONSTRAINT TRIGGER trig AFTER INSERT ON tab

Re: Optimizing "boundary cases" during backward scan B-Tree index descents

2023-11-06 Thread Matthias van de Meent
On Sun, 15 Oct 2023 at 22:56, Peter Geoghegan wrote: > > On Mon, Sep 18, 2023 at 4:58 PM Peter Geoghegan wrote: > > Attached is v3, which is a straightforward rebase of v2. v3 is needed > > to get the patch to apply cleanly against HEAD - so no real changes > > here. > > Attached is v4. Just to

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-11-06 Thread Alexander Korotkov
Hi! On Wed, Jul 5, 2023 at 4:46 PM Aleksander Alekseev wrote: > PFE the corrected patchset v58. I'd like to revive this thread. This patchset is extracted from a larger patchset implementing 64-bit xids. It converts page numbers in SLRUs into 64 bits. The most SLRUs save the same file naming

Re: Show WAL write and fsync stats in pg_stat_io

2023-11-06 Thread Nazir Bilal Yavuz
Hi, On Tue, 31 Oct 2023 at 16:57, Nazir Bilal Yavuz wrote: > On Thu, 26 Oct 2023 at 09:28, Michael Paquier wrote: > > > > And perhaps just putting that everything that calls > > pgstat_count_io_op_time() under track_io_timing is just natural? > > What's the performance regression you would

Re: Synchronizing slots from primary to standby

2023-11-06 Thread Amit Kapila
On Mon, Nov 6, 2023 at 1:57 PM Amit Kapila wrote: > > On Mon, Nov 6, 2023 at 7:01 AM Zhijie Hou (Fujitsu) > wrote: > > +static void +WalSndGetStandbySlots(List **standby_slots, bool force) +{ + if (!MyReplicationSlot->data.failover) + return; + + if (standby_slot_names_list == NIL &&

apply pragma system_header to python headers

2023-11-06 Thread Peter Eisentraut
Analogous to 388e80132c (which was for Perl) but for Python, I propose adding #pragma GCC system_header to plpython.h. Without it, you get tons of warnings about -Wdeclaration-after-statement, starting with Python 3.12. (In the past, I have regularly sent feedback to Python to fix their

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-11-06 Thread Jim Jones
On 06.11.23 11:49, Daniel Gustafsson wrote: > I took another look at this today, fixes the above mentioned typos and some > tiny cosmetic things and pushed it. > > -- > Daniel Gustafsson > Awesome! Thanks Daniel and Vik for reviewing and pushing this patch :) -- Jim

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-11-06 Thread Andrey M. Borodin
> On 6 Nov 2023, at 14:31, Alvaro Herrera wrote: > > dynahash is notoriously slow, which is why we have simplehash.h since > commit b30d3ea824c5. Maybe we could use that instead. Dynahash has lock partitioning. Simplehash has not, AFAIK. The thing is we do not really need a hash function -

Re: Statistics Import and Export

2023-11-06 Thread Shubham Khanna
On Mon, Nov 6, 2023 at 4:16 PM Corey Huinker wrote: >> >> >> Yeah, that use makes sense as well, and if so then postgres_fdw would likely >> need to be aware of the appropriate query for several versions back - they >> change, not by much, but they do change. So now we'd have each query text in

Re: [PATCH] Add XMLText function (SQL/XML X038)

2023-11-06 Thread Daniel Gustafsson
> On 4 Nov 2023, at 15:01, Vik Fearing wrote: > > On 11/3/23 21:28, Jim Jones wrote: >> On 03.11.23 19:05, Vik Fearing wrote: >>> I was thinking of something much shorter than that. Such as >>> >>> X038XMLText YES supported except for RETURNING >> v6 attached includes this

Re: ResourceOwner refactoring

2023-11-06 Thread Peter Eisentraut
It looks like this patch set needs a bit of surgery to adapt to the LLVM changes in 9dce22033d. The cfbot is reporting compiler warnings about this, and also some crashes, which might also be caused by this. I do like the updated APIs. (Maybe the repeated ".DebugPrint = NULL, /*

Re: Introduction and Inquiry on Beginner-Friendly Issues

2023-11-06 Thread Aleksander Alekseev
Hi, > I'm reaching out to request your guidance in identifying beginner-friendly > issues that I can start working on. I'm eager to become an active contributor > to the PostgreSQL community and help improve the project. Whether it's bug > fixes, documentation updates, or other tasks, I'm open

Re: Moving forward with TDE [PATCH v3]

2023-11-06 Thread Matthias van de Meent
On Sat, 4 Nov 2023 at 03:38, Andres Freund wrote: > > Hi, > > On 2023-11-02 22:09:40 +0100, Matthias van de Meent wrote: > > I'm quite surprised at the significant number of changes being made > > outside the core storage manager files. I thought that changing out > > mdsmgr with an encrypted

Re: [PATCH] Small refactoring of inval.c and inval.h

2023-11-06 Thread Aleksander Alekseev
Hi, > extern void InvalidateSystemCaches(void); > -extern void InvalidateSystemCachesExtended(bool debug_discard); > > Indeed, that looks a bit strange, but is there a strong need in > removing it, as you are proposing? There is always a risk that this > could be called by some out-of-core

Re: Query execution in Perl TAP tests needs work

2023-11-06 Thread Jehan-Guillaume de Rorthais
On Wed, 18 Oct 2023 18:25:01 +0200 Alvaro Herrera wrote: > On 2023-Oct-18, Robert Haas wrote: > > > Without FFI::Platypus, we have to write Perl code that can speak the > > wire protocol directly. Basically, we're writing our own PostgreSQL > > driver for Perl, though we might need only a

Re: meson documentation build open issues

2023-11-06 Thread Christoph Berg
Re: Andres Freund > > > The reason for that is simply that the docs take too long to build. > > > > That why I'd prefer to be able to separate arch:all and arch:any > > builds, yes. > > What's stopping you from doing that? I think the only arch:any content we > have is the docs, and those you

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-11-06 Thread Alvaro Herrera
On 2023-Nov-06, Dilip Kumar wrote: > Yeah so we can see with a small bank size <=16 slots we are seeing > that the fetching page with hash is 30% slower than the sequential > search, but beyond 32 slots sequential search is become slower as you > grow the number of slots whereas with hash it

Re: collect_corrupt_items_vacuum.patch

2023-11-06 Thread Alexander Korotkov
Hi! On Tue, Jul 4, 2023 at 10:21 AM Daniel Gustafsson wrote: > This patch has been waiting on the author for about a year now, so I will > close > it as Returned with Feedback. Plesae feel free to resubmit to a future CF > when > there is renewed interest in working on this. I'd like to

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2023-11-06 Thread Dilip Kumar
On Mon, Nov 6, 2023 at 1:05 PM Andrey M. Borodin wrote: > > On 6 Nov 2023, at 09:09, Dilip Kumar wrote: > > > > > >> Having hashtable to find SLRU page in the buffer IMV is too slow. Some > >> comments on this approach can be found here [0]. > >> I'm OK with having HTAB for that if we are sure

Re: Reuse child_relids in try_partitionwise_join was Re: Assert failure on bms_equal(child_joinrel->relids, child_joinrelids)

2023-11-06 Thread Ashutosh Bapat
explain.out in 0001 needed some adjustments. Without those CIbot shows failures. Fixed in the attached patchset. 0001 is just for diagnosis, not for actual commit. 0002 which is the actual patch has no changes wrt to the previous version. On Tue, Oct 31, 2023 at 11:06 AM Ashutosh Bapat wrote: >

Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-11-06 Thread Laurenz Albe
On Sat, 2023-11-04 at 21:14 -0400, Bruce Momjian wrote: > > It is not the role that is modified.  Perhaps: > > > >    [...]; if omitted, the current role is used. > > Sure, attached.  Here is the issue I have though, we are really not > changing default privileges for objects created in the

Re: pg_resetwal tests, logging, and docs update

2023-11-06 Thread Peter Eisentraut
On 01.11.23 12:12, Aleksander Alekseev wrote: Hi, Hmm. I think maybe we should fix the behavior of GetDataDirectoryCreatePerm() to be more consistent between Windows and non-Windows. This is usually the first function a program uses on the proposed data directory, so it's also responsible

Re: Version 14/15 documentation Section "Alter Default Privileges"

2023-11-06 Thread Michael Banck
Hi, On Sat, Nov 04, 2023 at 09:14:01PM -0400, Bruce Momjian wrote: > + There is no way to change the default privileges for objects created by > + any role. You have run ALTER DEFAULT PRIVILEGES for > all > + roles that can create objects whose default privileges should be modified. That

Re: Add new option 'all' to pg_stat_reset_shared()

2023-11-06 Thread Bharath Rupireddy
On Mon, Nov 6, 2023 at 11:39 AM torikoshia wrote: > > Thanks all for the comments! > > On Fri, Nov 3, 2023 at 5:17 AM Matthias van de Meent > wrote: > > Knowing that your metrics have a shared starting point can be quite > > valuable, as it allows you to do some math that would otherwise be > >

Re: Synchronizing slots from primary to standby

2023-11-06 Thread Amit Kapila
On Mon, Nov 6, 2023 at 7:01 AM Zhijie Hou (Fujitsu) wrote: > > On Friday, November 3, 2023 7:32 PM Amit Kapila > > > > 5. > > @@ -228,6 +230,28 @@ pg_logical_slot_get_changes_guts(FunctionCallInfo > > fcinfo, bool confirm, bool bin > > NameStr(MyReplicationSlot->data.plugin), > >

Re: [ psql - review request ] review request for \d+ tablename, \d+ indexname indenting

2023-11-06 Thread Shlok Kyal
Hi, On Mon, 6 Nov 2023 at 13:47, 쿼리트릭스 wrote: > > The error was corrected and a new diff file was created. > The diff file was created based on 16 RC1. > We confirmed that 5 places where errors occurred when performing make check > were changed to ok. > I went through Cfbot and still see that

  1   2   >