Re: State of pg_createsubscriber

2024-06-18 Thread Euler Taveira
On Tue, Jun 18, 2024, at 12:59 AM, Amit Kapila wrote: > On Mon, May 20, 2024 at 12:12 PM Amit Kapila wrote: > > > > On Sun, May 19, 2024 at 11:20 PM Euler Taveira wrote: > > > > > > On Sun, May 19, 2024, at 2:30 PM, Tom Lane wrote: > > > > > > I'm fairly disturbed about the readiness of pg_create

replace strtok()

2024-06-18 Thread Peter Eisentraut
Under the topic of getting rid of thread-unsafe functions in the backend [0], here is a patch series to deal with strtok(). Of course, strtok() is famously not thread-safe and can be replaced by strtok_r(). But it also has the wrong semantics in some cases, because it considers adjacent delim

Re: speed up a logical replica setup

2024-06-18 Thread Euler Taveira
On Mon, Jun 17, 2024, at 8:04 AM, Peter Eisentraut wrote: > On 07.06.24 05:49, Euler Taveira wrote: > > Here it is a patch series to fix the issues reported in recent > > discussions. The > > patches 0001 and 0003 aim to fix the buildfarm issues. The patch 0002 > > removes > > synchronized failov

CompilerWarnings task does not catch C++ warnings

2024-06-18 Thread Peter Eisentraut
The CompilerWarnings task on Cirrus CI does not catch warnings in C++ code. It tries to make warnings fatal by passing COPT='-Werror', but that does not apply to C++ compilations. I suggest that we just add COPT to CXXFLAGS as well. I think passing -Werror is just about the only reasonable u

Re: [PATCH] Improve error message when trying to lock virtual tuple.

2024-06-18 Thread Sven Klemm
On Mon, Jun 17, 2024 at 10:25 PM Matthias van de Meent wrote: > I think you're solving the wrong problem here, as I can't think of a > place where both virtual tuple slots and tuple locking are allowed at > the same time in core code. > > I mean, in which kind of situation could we get a Relation

Re: consider -Wmissing-variable-declarations

2024-06-18 Thread Peter Eisentraut
Here is an updated patch set. I have implemented proper solutions for the various hacks in the previous patch set. So this patch set should now be ready for proper consideration. The way I have organized it here is that patches 0002 through 0008 should be improvements in their own right. T

Re: Conflict Detection and Resolution

2024-06-18 Thread Dilip Kumar
On Tue, Jun 18, 2024 at 12:11 PM Amit Kapila wrote: > > On Tue, Jun 18, 2024 at 11:54 AM Dilip Kumar wrote: > > > > On Mon, Jun 17, 2024 at 8:51 PM Robert Haas wrote: > > > > > > On Mon, Jun 17, 2024 at 1:42 AM Amit Kapila > > > wrote: > > > > The difference w.r.t the existing mechanisms for h

Re: Proposal for Updating CRC32C with AVX-512 Algorithm.

2024-06-18 Thread Alvaro Herrera
On 2024-Jun-12, Amonson, Paul D wrote: > +/*- > + * > + * pg_crc32c_avx512.c > + * Compute CRC-32C checksum using Intel AVX-512 instructions. > + * > + * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Grou

Re: 001_rep_changes.pl fails due to publisher stuck on shutdown

2024-06-18 Thread Kyotaro Horiguchi
At Thu, 13 Jun 2024 09:29:03 +0530, Amit Kapila wrote in > Yeah, but the commit you quoted later reverted by commit 703f148e98 > and committed again as c6c3334364. Yeah, right.. > > aiming to prevent walsenders from > > generating competing WAL (by, for example, CREATE_REPLICATION_SLOT) > > re

Re: Conflict Detection and Resolution

2024-06-18 Thread Amit Kapila
On Tue, Jun 18, 2024 at 1:18 PM Dilip Kumar wrote: > > On Tue, Jun 18, 2024 at 12:11 PM Amit Kapila wrote: > > > > On Tue, Jun 18, 2024 at 11:54 AM Dilip Kumar wrote: > > > > > > On Mon, Jun 17, 2024 at 8:51 PM Robert Haas wrote: > > > > > > > > On Mon, Jun 17, 2024 at 1:42 AM Amit Kapila > >

Re: altering a column's collation leaves an invalid foreign key

2024-06-18 Thread Peter Eisentraut
On 08.06.24 06:14, jian he wrote: if FK is nondeterministic, then it looks PK more like FK. the following example, one FK row is referenced by two PK rows. DROP TABLE IF EXISTS fktable, pktable; CREATE TABLE pktable (x text COLLATE "C" PRIMARY KEY); CREATE TABLE fktable (x text COLLATE ignore_ac

Re: Backup and Restore of Partitioned Table in PG-15

2024-06-18 Thread Ashutosh Bapat
Hi Gayatri, On Sun, Jun 16, 2024 at 4:39 AM Gayatri Singh wrote: > Hi Team, > > Greetings of the day!! > > We are planning to partition tables using pg_partman. Like we are planning > for their backup and restoration process. > > Got a few URLs where pg_dump had issues while restoring some data

Re: pgsql: Add more SQL/JSON constructor functions

2024-06-18 Thread Amit Langote
On Tue, Jun 4, 2024 at 7:03 PM Amit Langote wrote: > On Tue, Jun 4, 2024 at 2:20 AM Tom Lane wrote: > > Peter Eisentraut writes: > > > On 02.06.24 21:46, Tom Lane wrote: > > >> If you don't > > >> like our current behavior, then either you have to say that RETURNING > > >> with a length-limited

Re: [PATCH] Improve error message when trying to lock virtual tuple.

2024-06-18 Thread Matthias van de Meent
On Tue, 18 Jun 2024 at 09:32, Sven Klemm wrote: > > On Mon, Jun 17, 2024 at 10:25 PM Matthias van de Meent > wrote: > > > I think you're solving the wrong problem here, as I can't think of a > > place where both virtual tuple slots and tuple locking are allowed at > > the same time in core code.

Re: Should consider materializing the cheapest inner path in consider_parallel_nestloop()

2024-06-18 Thread Richard Guo
On Tue, Jun 4, 2024 at 6:51 PM Tender Wang wrote: > Yeah, Richard commented the v1 patch about JOIN_UNIQUE_INNER in [1] > > * I think we should not consider materializing the cheapest inner path > if we're doing JOIN_UNIQUE_INNER, because in this case we have to > unique-ify the inner path. > > We

Re: Is creating logical replication slots in template databases useful at all?

2024-06-18 Thread Ashutosh Bapat
On Mon, Jun 17, 2024 at 5:50 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > Hi, > > While looking at the commit > > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=29d0a77fa6606f9c01ba17311fc452dabd3f793d > , > I noticed that get_old_cluster_logical_slot

Re: Conflict Detection and Resolution

2024-06-18 Thread shveta malik
On Tue, Jun 18, 2024 at 11:34 AM Dilip Kumar wrote: > > On Tue, Jun 18, 2024 at 10:17 AM Dilip Kumar wrote: > > > > On Mon, Jun 17, 2024 at 3:23 PM Amit Kapila wrote: > > > > > > On Wed, Jun 12, 2024 at 10:03 AM Dilip Kumar > > > wrote: > > > > > > > > On Tue, Jun 11, 2024 at 7:44 PM Tomas Von

Re: post-freeze damage control

2024-06-18 Thread Alena Rybakina
Hi! Unfortunately,Iwas notableto fullyunderstandyourmessage.Couldyou explainit to meplease? On 09.04.2024 16:20, Andrei Lepikhov wrote: Moreover, it helps even SeqScan: attempting to find a value in the hashed array is much faster than cycling a long-expression on each incoming tuple. AsIu

Re: New GUC autovacuum_max_threshold ?

2024-06-18 Thread Frédéric Yhuel
Le 18/06/2024 à 05:06, Nathan Bossart a écrit : I didn't see a commitfest entry for this, so I created one to make sure we don't lose track of this: https://commitfest.postgresql.org/48/5046/ OK thanks! By the way, I wonder if there were any off-list discussions after Robert's co

Re: Logical Replication of sequences

2024-06-18 Thread Amit Kapila
On Tue, Jun 18, 2024 at 7:30 AM Masahiko Sawada wrote: > > On Fri, Jun 14, 2024 at 4:04 PM Amit Kapila wrote: > > > > On Thu, Jun 13, 2024 at 6:14 PM Masahiko Sawada > > wrote: > > > > > > > > > > > > > Now, say we don't want to maintain the state of sequences for initial > > > > sync at all th

Re: DOCS: Generated table columns are skipped by logical replication

2024-06-18 Thread Amit Kapila
On Tue, Jun 18, 2024 at 12:11 PM Peter Smith wrote: > > While reviewing another thread that proposes to include "generated > columns" support for logical replication [1] I was looking for any > existing PostgreSQL documentation on this topic. > > But, I found almost nothing about it at all -- I on

Re: replace strtok()

2024-06-18 Thread Ranier Vilela
Em ter., 18 de jun. de 2024 às 04:18, Peter Eisentraut escreveu: > Under the topic of getting rid of thread-unsafe functions in the backend > [0], here is a patch series to deal with strtok(). > > Of course, strtok() is famously not thread-safe and can be replaced by > strtok_r(). But it also ha

jsonapi type fixups

2024-06-18 Thread Peter Eisentraut
I have this patch series that fixes up the types of the new incremental JSON API a bit. Specifically, it uses "const" throughout so that the top-level entry points such as pg_parse_json_incremental() can declare their arguments as const char * instead of just char *. This just works, it doesn

Re: post-freeze damage control

2024-06-18 Thread Alena Rybakina
Sorry, I've just noticed that the letter is shown incorrectly. I rewrote it below. As I understand it, you talked about speeding up SeqScan by faster re-searching through the use of a hash table. At the same time, we have to build it before that, when there was the initial lookup tuples, right

Truncation of mapped catalogs (whether local or shared) leads to server crash

2024-06-18 Thread Ashutosh Sharma
Hi everyone, I've noticed that truncating mapped catalogs causes the server to crash due to an assertion failure. Here are the details: Executing below commands: -- set allow_system_table_mods TO on; -- truncate table pg_type; Results into a server crash with below backtrace: ... #2 0x557

Re: Missing docs for new enable_group_by_reordering GUC

2024-06-18 Thread Alexander Korotkov
On Tue, Jun 18, 2024 at 9:14 AM Andrei Lepikhov wrote: > On 6/18/24 09:32, Bruce Momjian wrote: > > This commit added enable_group_by_reordering: > > > > commit 0452b461bc4 > > Author: Alexander Korotkov > > Date: Sun Jan 21 22:21:36 2024 +0200 > > It mentions it was added as

Re: jsonpath: Missing regex_like && starts with Errors?

2024-06-18 Thread Peter Eisentraut
On 18.06.24 04:17, Chapman Flack wrote: On 06/17/24 19:17, David E. Wheeler wrote: [1]: https://github.com/postgres/postgres/blob/82ed67a/src/backend/utils/adt/jsonpath_exec.c#L2058-L2059 Huh, I just saw something peculiar, skimming through the code: https://github.com/postgres/postgres/blob

Re: Separate HEAP WAL replay logic into its own file

2024-06-18 Thread Melanie Plageman
On Mon, Jun 17, 2024 at 9:12 PM Li, Yong wrote: > > As a newcomer, when I was walking through the code looking for WAL replay > related code, it was relatively easy for me to find them for the B-Tree > access method because of the “xlog” hint in the file names. It took me a > while to find the

Re: Missing docs for new enable_group_by_reordering GUC

2024-06-18 Thread Pavel Borisov
Hi, Alexander! On Tue, 18 Jun 2024 at 16:13, Alexander Korotkov wrote: > On Tue, Jun 18, 2024 at 9:14 AM Andrei Lepikhov wrote: > > On 6/18/24 09:32, Bruce Momjian wrote: > > > This commit added enable_group_by_reordering: > > > > > > commit 0452b461bc4 > > > Author: Alexander Korot

Re: tls 1.3: sending multiple tickets

2024-06-18 Thread Daniel Gustafsson
> On 17 Jun 2024, at 19:38, Andres Freund wrote: > Note the second to last paragraph: Because we use SSL_OP_NO_TICKET we trigger > use of stateful tickets. Which afaict are never going to be useful, because we > don't share the necessary state. Nice catch, I learned something new today. I was u

Re: Missing docs for new enable_group_by_reordering GUC

2024-06-18 Thread Pavel Borisov
> > Controls if the query planner will produce a plan which will provide > GROUP BY keys presorted in the order of keys of a child > node of the plan, such as an index scan. When disabled, the query planner > will produce a plan with GROUP BY keys only reordered to > match > the ORDER BY clause, if

Re: CI and test improvements

2024-06-18 Thread Justin Pryzby
On Fri, Jun 14, 2024 at 08:34:37AM -0700, Andres Freund wrote: > Hm. There actually already is the mingw ccache installed. The images for > mingw and msvc used to be separate (for startup performance when using > containers), but we just merged them. So it might be easiest to just > explicitly

Re: jsonpath: Missing regex_like && starts with Errors?

2024-06-18 Thread Chapman Flack
On 06/18/24 08:30, Peter Eisentraut wrote: > Are you saying we shouldn't allow .boolean() to be called on a JSON number? > > I would concur that that's what the spec says. Or, if we want to extend the spec and allow .boolean() on a JSON number, should it just check that the number is nonzero or z

Meson far from ready on Windows

2024-06-18 Thread Dave Page
Hi Further to my previous report [1] about zlib detection not working with Meson on Windows, I found it's similarly or entirely broken for the majority of other dependencies, none of which are tested on the buildfarm as far as I can see. For convenience, I've put together a number of Github actio

Re: CompilerWarnings task does not catch C++ warnings

2024-06-18 Thread Tom Lane
Peter Eisentraut writes: > The CompilerWarnings task on Cirrus CI does not catch warnings in C++ > code. It tries to make warnings fatal by passing COPT='-Werror', but > that does not apply to C++ compilations. > I suggest that we just add COPT to CXXFLAGS as well. I think passing > -Werror i

Re: may be a buffer overflow problem

2024-06-18 Thread Andres Freund
Hi, On 2024-06-17 22:42:41 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2024-06-17 23:52:54 +0200, Daniel Gustafsson wrote: > >> Since sqlca is, according to our docs, present in other database systems we > >> should probably keep it a 5-char array for portability reasons. Adding a > >>

Re: Truncation of mapped catalogs (whether local or shared) leads to server crash

2024-06-18 Thread Robert Haas
On Tue, Jun 18, 2024 at 8:10 AM Ashutosh Sharma wrote: > I've noticed that truncating mapped catalogs causes the server to > crash due to an assertion failure. Here are the details: > > Executing below commands: > > -- set allow_system_table_mods TO on; > -- truncate table pg_type; If the operati

Re: Truncation of mapped catalogs (whether local or shared) leads to server crash

2024-06-18 Thread Tom Lane
Robert Haas writes: > On Tue, Jun 18, 2024 at 8:10 AM Ashutosh Sharma wrote: >> Executing below commands: >> -- set allow_system_table_mods TO on; >> -- truncate table pg_type; > If the operation isn't allowed without turning on > allow_system_table_mods, that means that doing it is probably a b

Re: may be a buffer overflow problem

2024-06-18 Thread Peter Eisentraut
On 18.06.24 04:35, Andres Freund wrote: On 2024-06-17 23:52:54 +0200, Daniel Gustafsson wrote: Since sqlca is, according to our docs, present in other database systems we should probably keep it a 5-char array for portability reasons. Adding a padding character should be fine though. How abou

Re: CompilerWarnings task does not catch C++ warnings

2024-06-18 Thread Peter Eisentraut
On 18.06.24 16:08, Tom Lane wrote: Peter Eisentraut writes: The CompilerWarnings task on Cirrus CI does not catch warnings in C++ code. It tries to make warnings fatal by passing COPT='-Werror', but that does not apply to C++ compilations. I suggest that we just add COPT to CXXFLAGS as well.

Re: Truncation of mapped catalogs (whether local or shared) leads to server crash

2024-06-18 Thread Ashutosh Sharma
Hi, On Tue, Jun 18, 2024 at 7:50 PM Tom Lane wrote: > > Robert Haas writes: > > On Tue, Jun 18, 2024 at 8:10 AM Ashutosh Sharma > > wrote: > >> Executing below commands: > >> -- set allow_system_table_mods TO on; > >> -- truncate table pg_type; > > > If the operation isn't allowed without turn

Re: Maybe don't process multi xmax in FreezeMultiXactId() if it is already marked as invalid?

2024-06-18 Thread Maxim Orlov
Hi! Maybe, I'm too bold, but looks like a kinda bug to me. At least, I don't understand why we do not check the HEAP_XMAX_INVALID flag. My guess is nobody noticed, that MultiXactIdIsValid call does not check the mentioned flag in the "first" condition, but it's all my speculation. Does anyone kno

Re: CompilerWarnings task does not catch C++ warnings

2024-06-18 Thread Andres Freund
Hi, On 2024-06-18 09:27:02 +0200, Peter Eisentraut wrote: > The CompilerWarnings task on Cirrus CI does not catch warnings in C++ code. > It tries to make warnings fatal by passing COPT='-Werror', but that does not > apply to C++ compilations. > > I suggest that we just add COPT to CXXFLAGS as we

Re: Suggest two small improvements for PITR.

2024-06-18 Thread Yura Sokolov
11.01.2024 19:58, Yura Sokolov пишет: Good day, hackers. Here I am to suggest two small improvements to Point In Time Recovery. First is ability to recover recovery-target-time with timestamp stored in XLOG_RESTORE_POINT. Looks like historically this ability did exist and were removed uninten

Re: Truncation of mapped catalogs (whether local or shared) leads to server crash

2024-06-18 Thread Andres Freund
Hi, On 2024-06-18 19:58:26 +0530, Ashutosh Sharma wrote: > On Tue, Jun 18, 2024 at 7:50 PM Tom Lane wrote: > > > > Robert Haas writes: > > > On Tue, Jun 18, 2024 at 8:10 AM Ashutosh Sharma > > > wrote: > > >> Executing below commands: > > >> -- set allow_system_table_mods TO on; > > >> -- trun

Re: RFC: adding pytest as a supported test framework

2024-06-18 Thread Jacob Champion
(slowly catching up from the weekend email backlog) On Fri, Jun 14, 2024 at 5:10 AM Robert Haas wrote: > I mean, both Perl and Python are Turing-complete. Tom responded to this better than I could have, but I don't think this is a helpful statement. In fact I opened the unconference session with

Re: RFC: adding pytest as a supported test framework

2024-06-18 Thread Jacob Champion
On Fri, Jun 14, 2024 at 8:49 AM Tom Lane wrote: > I think that's an oversimplified analysis. Sure, the languages are > both Turing-complete, but for our purposes here they are both simply > glue languages around some set of testing facilities. Some of those > facilities will be provided by the b

Re: Meson far from ready on Windows

2024-06-18 Thread Andres Freund
Hi, On 2024-06-18 14:53:53 +0100, Dave Page wrote: > My next task was to extend that to support PostgreSQL 17 and beyond, which > is where I started to run into problems. I've attempted builds using Meson > with each of the dependencies defined in the old-style config.pl, both with > and without m

Re: Meson far from ready on Windows

2024-06-18 Thread Dave Page
Hi On Tue, 18 Jun 2024 at 15:38, Andres Freund wrote: > Hi, > > On 2024-06-18 14:53:53 +0100, Dave Page wrote: > > My next task was to extend that to support PostgreSQL 17 and beyond, > which > > is where I started to run into problems. I've attempted builds using > Meson > > with each of the de

Re: Truncation of mapped catalogs (whether local or shared) leads to server crash

2024-06-18 Thread Tom Lane
Ashutosh Sharma writes: > On Tue, Jun 18, 2024 at 7:50 PM Tom Lane wrote: >> I think the assertion you noticed is there because the code path gets >> traversed during REINDEX, which is an operation we do support on >> system catalogs. I have zero interest in making truncate work >> on them. > I

Re: consider -Wmissing-variable-declarations

2024-06-18 Thread Andres Freund
Hi, +many for doing this in principle > -const char *EAN13_range[][2] = { > +static const char *EAN13_range[][2] = { > {"000", "019"}, /* GS1 US */ > {"020", "029"}, /* Restricted distribution (MO > defined) */ > {"030", "039"},

Re: What is a typical precision of gettimeofday()?

2024-06-18 Thread Hannu Krosing
I plan to send patch to pg_test_timing in a day or two the underlying time precision on modern linux seems to be 2 ns for some Intel CPUs 10 ns for Zen4 40 ns for ARM (Ampere) --- Hannu | On Tue, Jun 18, 2024 at 7:48 AM Andrey M. Borodin wrote: > > > > On 19 Mar 2024, at 13:28, Peter Ei

Re: Truncation of mapped catalogs (whether local or shared) leads to server crash

2024-06-18 Thread Ashutosh Sharma
Hi Robert, Andres, Tom, Thank you for sharing your thoughts. On Tue, Jun 18, 2024 at 8:02 PM Andres Freund wrote: > > Hi, > > On 2024-06-18 19:58:26 +0530, Ashutosh Sharma wrote: > > On Tue, Jun 18, 2024 at 7:50 PM Tom Lane wrote: > > > > > > Robert Haas writes: > > > > On Tue, Jun 18, 2024 at

Re: Inval reliability, especially for inplace updates

2024-06-18 Thread Noah Misch
On Mon, Jun 17, 2024 at 06:57:30PM -0700, Andres Freund wrote: > On 2024-06-17 16:58:54 -0700, Noah Misch wrote: > > On Sat, Jun 15, 2024 at 03:37:18PM -0700, Noah Misch wrote: > > > On Wed, May 22, 2024 at 05:05:48PM -0700, Noah Misch wrote: > > > > https://postgr.es/m/20240512232923.aa.nmi...@goo

Re: Truncation of mapped catalogs (whether local or shared) leads to server crash

2024-06-18 Thread Ashutosh Sharma
Hi, On Tue, Jun 18, 2024 at 8:25 PM Tom Lane wrote: > > Ashutosh Sharma writes: > > On Tue, Jun 18, 2024 at 7:50 PM Tom Lane wrote: > >> I think the assertion you noticed is there because the code path gets > >> traversed during REINDEX, which is an operation we do support on > >> system catalo

Re: Maybe don't process multi xmax in FreezeMultiXactId() if it is already marked as invalid?

2024-06-18 Thread Peter Geoghegan
On Tue, Jun 18, 2024 at 10:29 AM Maxim Orlov wrote: > Maybe, I'm too bold, but looks like a kinda bug to me. At least, I don't > understand why we do not check the HEAP_XMAX_INVALID flag. > My guess is nobody noticed, that MultiXactIdIsValid call does not check the > mentioned flag in the "firs

Re: Meson far from ready on Windows

2024-06-18 Thread Andres Freund
Hi, On 2024-06-18 15:54:27 +0100, Dave Page wrote: > On Tue, 18 Jun 2024 at 15:38, Andres Freund wrote: > > Do you have logs for those failures? > > > > Sure - https://developer.pgadmin.org/~dpage/build-logs.zip. Those are all > without any modifications to %LIB% or %INCLUDE%. Thanks. > > I t

PostgreSQL 17 Beta 2 release date & commit freeze

2024-06-18 Thread Jonathan S. Katz
Hi, PostgreSQL 17 Beta 2 is planned to be release on June 27, 2024. Please continue your hard work on closing out open items[1] ahead of the release and have the fixes targeted for the release committed by June 22, 2024. Thanks! Jonathan [1] https://wiki.postgresql.org/wiki/PostgreSQL_17_

Re: PostgreSQL 17 Beta 2 release date & commit freeze

2024-06-18 Thread Bruce Momjian
On Tue, Jun 18, 2024 at 12:10:50PM -0400, Jonathan Katz wrote: > > Hi, > > PostgreSQL 17 Beta 2 is planned to be release on June 27, 2024. Please > continue your hard work on closing out open items[1] ahead of the release > and have the fixes targeted for the release committed by June 22, 2024.

MergeAppend could consider sorting cheapest child path

2024-06-18 Thread Alexander Pyhalov
Hi. Now when planner finds suitable pathkeys in generate_orderedappend_paths(), it uses them, even if explicit sort of the cheapest child path could be more efficient. We encountered this issue on partitioned table with two indexes, where one is suitable for sorting, and another is good for

Re: Reducing the log spam

2024-06-18 Thread Laurenz Albe
On Mon, 2024-06-17 at 16:40 -0500, Justin Pryzby wrote: > > The feature will become much less useful if unique voilations keep getting > > logged. > > Uh, to be clear, your patch is changing the *defaults*, which I found > surprising, even after reaading the thread. Evidently, the current > beha

Re: improve predefined roles documentation

2024-06-18 Thread Nathan Bossart
On Mon, Jun 17, 2024 at 02:10:22PM -0400, Robert Haas wrote: > On Thu, Jun 13, 2024 at 3:48 PM Nathan Bossart > wrote: >> I think we could improve matters by abandoning the table and instead >> documenting these roles more like we document GUCs, i.e., each one has a >> section below it where we

Re: IPC::Run accepts bug reports

2024-06-18 Thread Noah Misch
On Mon, Jun 17, 2024 at 11:11:17AM -0700, Andres Freund wrote: > On 2024-06-15 16:48:24 -0700, Noah Misch wrote: > > On Sat, Jun 15, 2024 at 01:26:57PM -0400, Robert Haas wrote: > > > The one > > > thing I know about that *I* think is a pretty big problem about Perl > > > is that IPC::Run is not re

RE: Proposal for Updating CRC32C with AVX-512 Algorithm.

2024-06-18 Thread Amonson, Paul D
> Hmm, I wonder if the "(c) 2024 Intel" line is going to bring us trouble. > (I bet it's not really necessary anyway.) Our lawyer agrees, copyright is covered by the "PostgreSQL Global Development Group" copyright line as a contributor. > And this bit doesn't look good. The LICENSE file says: .

Re: Proposal for Updating CRC32C with AVX-512 Algorithm.

2024-06-18 Thread Bruce Momjian
On Tue, Jun 18, 2024 at 05:14:08PM +, Amonson, Paul D wrote: > > And this bit doesn't look good. The LICENSE file says: > ... > > > //* Redistributions in binary form must reproduce the above > > > // copyright notice, this list of conditions and the following > > > disclaimer // in the do

Re: Proposal for Updating CRC32C with AVX-512 Algorithm.

2024-06-18 Thread Bruce Momjian
On Tue, Jun 18, 2024 at 01:20:50PM -0400, Bruce Momjian wrote: > On Tue, Jun 18, 2024 at 05:14:08PM +, Amonson, Paul D wrote: > > > And this bit doesn't look good. The LICENSE file says: > > ... > > > > //* Redistributions in binary form must reproduce the above > > > > // copyright notice

Re: Inval reliability, especially for inplace updates

2024-06-18 Thread Noah Misch
On Tue, Jun 18, 2024 at 08:23:49AM -0700, Noah Misch wrote: > On Mon, Jun 17, 2024 at 06:57:30PM -0700, Andres Freund wrote: > > On 2024-06-17 16:58:54 -0700, Noah Misch wrote: > > > On Sat, Jun 15, 2024 at 03:37:18PM -0700, Noah Misch wrote: > > > > On Wed, May 22, 2024 at 05:05:48PM -0700, Noah M

Re: cost delay brainstorming

2024-06-18 Thread Nathan Bossart
On Mon, Jun 17, 2024 at 03:39:27PM -0400, Robert Haas wrote: > I think we might able to get fairly far by observing that if the > number of running autovacuum workers is equal to the maximum allowable > number of running autovacuum workers, that may be a sign of trouble, > and the longer that situa

Re: allow changing autovacuum_max_workers without restarting

2024-06-18 Thread Nathan Bossart
On Mon, Jun 03, 2024 at 04:24:27PM -0700, Andres Freund wrote: > On 2024-06-03 14:28:13 -0500, Nathan Bossart wrote: >> On Mon, Jun 03, 2024 at 12:08:52PM -0700, Andres Freund wrote: >> > Why do we think that increasing the number of PGPROC slots, heavyweight >> > locks >> > etc by 256 isn't going

Re: IPC::Run accepts bug reports

2024-06-18 Thread Andres Freund
Hi, On 2024-06-18 10:10:17 -0700, Noah Misch wrote: > On Mon, Jun 17, 2024 at 11:11:17AM -0700, Andres Freund wrote: > > On 2024-06-15 16:48:24 -0700, Noah Misch wrote: > > > On Sat, Jun 15, 2024 at 01:26:57PM -0400, Robert Haas wrote: > > > > The one > > > > thing I know about that *I* think is a

Re: Xact end leaves CurrentMemoryContext = TopMemoryContext

2024-06-18 Thread Tom Lane
David Rowley writes: > On Tue, 18 Jun 2024 at 16:53, Tom Lane wrote: >> I'll poke at this tomorrow, unless you're hot to try it right now. > Please go ahead. I was just in suggestion mode here. So I tried that, and while it kind of worked, certain parts of the system (notably logical replicatio

fix pg_upgrade comment

2024-06-18 Thread Nathan Bossart
I noticed that the "check" variable, which is used for "pg_upgrade --check", is commented as follows: boolcheck; /* true -> ask user for permission to make * changes */ This comment was first ad

Re: fix pg_upgrade comment

2024-06-18 Thread Daniel Gustafsson
> On 18 Jun 2024, at 21:50, Nathan Bossart wrote: > > I noticed that the "check" variable, which is used for "pg_upgrade > --check", is commented as follows: > > bool check; /* true -> ask user for permission to make > * changes */ > > This comment was first added when pg_upgrade was introduced

Re: Xact end leaves CurrentMemoryContext = TopMemoryContext

2024-06-18 Thread Andres Freund
Hi, On 2024-06-18 15:28:03 -0400, Tom Lane wrote: > After awhile I had an epiphany: what we should do is make > CommitTransactionCommand restore the memory context that was active > before StartTransactionCommand. That's what we want in every place > that was cognizant of this issue, and it seems

Re: cost delay brainstorming

2024-06-18 Thread Andres Freund
Hi, On 2024-06-18 13:50:46 -0500, Nathan Bossart wrote: > Have we ruled out further adjustments to the cost parameters as a first > step? I'm not against that, but I it doesn't address the issue that with the current logic one set of values just isn't going to fit a 60MB that's allowed to burst t

Re: IPC::Run accepts bug reports

2024-06-18 Thread Andrew Dunstan
On 2024-06-18 Tu 3:00 PM, Andres Freund wrote: Hi, On 2024-06-18 10:10:17 -0700, Noah Misch wrote: On Mon, Jun 17, 2024 at 11:11:17AM -0700, Andres Freund wrote: On 2024-06-15 16:48:24 -0700, Noah Misch wrote: On Sat, Jun 15, 2024 at 01:26:57PM -0400, Robert Haas wrote: The one thing I know

Re: allow changing autovacuum_max_workers without restarting

2024-06-18 Thread Andres Freund
Hi, On 2024-06-18 14:00:00 -0500, Nathan Bossart wrote: > On Mon, Jun 03, 2024 at 04:24:27PM -0700, Andres Freund wrote: > > On 2024-06-03 14:28:13 -0500, Nathan Bossart wrote: > >> On Mon, Jun 03, 2024 at 12:08:52PM -0700, Andres Freund wrote: > >> > Why do we think that increasing the number of

Re: Xact end leaves CurrentMemoryContext = TopMemoryContext

2024-06-18 Thread Tom Lane
Andres Freund writes: > I wonder if there's an argument the "persistent" TopTransactionContext should > live under a different name outside of transactions, to avoid references to it > working in a context where it's not valid? It's probably not worth it, but > not sure. Hm. We could stash the

Re: allow changing autovacuum_max_workers without restarting

2024-06-18 Thread Nathan Bossart
On Tue, Jun 18, 2024 at 01:43:34PM -0700, Andres Freund wrote: > I just don't see much point in reserving 256 worker "possibilities", tbh. I > can't think of any practical system where it makes sense to use this much (nor > do I think it's going to be reasonable in the next 10 years) and it's just

Re: cost delay brainstorming

2024-06-18 Thread Nathan Bossart
On Tue, Jun 18, 2024 at 01:32:38PM -0700, Andres Freund wrote: > On 2024-06-18 13:50:46 -0500, Nathan Bossart wrote: >> Have we ruled out further adjustments to the cost parameters as a first >> step? > > I'm not against that, but I it doesn't address the issue that with the current > logic one se

Re: CI and test improvements

2024-06-18 Thread Andres Freund
Hi, On 2024-06-18 08:36:57 -0500, Justin Pryzby wrote: > On Fri, Jun 14, 2024 at 08:34:37AM -0700, Andres Freund wrote: > > Hm. There actually already is the mingw ccache installed. The images for > > mingw and msvc used to be separate (for startup performance when using > > containers), but we

Re: allow changing autovacuum_max_workers without restarting

2024-06-18 Thread Andres Freund
Hi, On 2024-06-18 16:09:09 -0500, Nathan Bossart wrote: > On Tue, Jun 18, 2024 at 01:43:34PM -0700, Andres Freund wrote: > > I just don't see much point in reserving 256 worker "possibilities", tbh. I > > can't think of any practical system where it makes sense to use this much > > (nor > > do I

Re: assertion failure at cost_memoize_rescan()

2024-06-18 Thread David Rowley
On Tue, 18 Jun 2024 at 15:14, Richard Guo wrote: > > On Tue, Jun 18, 2024 at 10:53 AM David Rowley wrote: > > I think the best solution is to apply the attached. I didn't test, > > but it should fix the issue you reported and also ensure that > > MemoizePath.calls is never zero, which would also

Re: Proposal: Document ABI Compatibility

2024-06-18 Thread Andreas 'ads' Scherbaum
On 03/06/2024 21:21, David E. Wheeler wrote: On Jun 3, 2024, at 14:58, Andres Freund wrote: Hi, Hello Andres. Are there notes for the session? Yes, but not posted yet. Here’s what Andreas 'ads' Scherbaum sent me for that bit of the conversation: * Core is focused on core ABI stability

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-18 Thread John H
Hi Ashutosh, Thanks for clarifying. > not standalone functions created independently I'm wondering why we wouldn't want to extend that functionality so that if users (including superusers) do want to automatically configure search_path when they're creating functions it's available. > The diff

Re: allow changing autovacuum_max_workers without restarting

2024-06-18 Thread Nathan Bossart
On Tue, Jun 18, 2024 at 02:33:31PM -0700, Andres Freund wrote: > Another one: > > Have a general cap of 64, but additionally limit it to something like > max(1, min(WORKER_CAP, max_connections / 4)) > > so that cases like tap tests don't end up allocating vastly more worker slots > than actu

Re: Revive num_dead_tuples column of pg_stat_progress_vacuum

2024-06-18 Thread Masahiko Sawada
On Sat, Jun 15, 2024 at 8:47 PM Robert Treat wrote: > > On Thu, Jun 13, 2024 at 9:22 PM Masahiko Sawada wrote: > > On Fri, Jun 14, 2024 at 9:57 AM Masahiko Sawada > > wrote: > > > On Fri, Jun 14, 2024 at 9:41 AM Michael Paquier > > > wrote: > > > > On Thu, Jun 13, 2024 at 08:38:05PM -0400, To

Re: DOCS: Generated table columns are skipped by logical replication

2024-06-18 Thread Peter Smith
On Tue, Jun 18, 2024 at 9:40 PM Amit Kapila wrote: > > On Tue, Jun 18, 2024 at 12:11 PM Peter Smith wrote: > > > > While reviewing another thread that proposes to include "generated > > columns" support for logical replication [1] I was looking for any > > existing PostgreSQL documentation on thi

Re: Revive num_dead_tuples column of pg_stat_progress_vacuum

2024-06-18 Thread Peter Geoghegan
On Tue, Jun 18, 2024 at 8:49 PM Masahiko Sawada wrote: > > At least I couldn't find anywhere in the docs where we have > > described the relationship between these columns before. Thoughts? > > It would be a good idea to improve the documentation, but I think that > we cannot simply compare these

Re: Missing docs for new enable_group_by_reordering GUC

2024-06-18 Thread Alexander Korotkov
On Tue, Jun 18, 2024 at 4:14 PM Pavel Borisov wrote: >> Controls if the query planner will produce a plan which will provide >> GROUP BY keys presorted in the order of keys of a child >> node of the plan, such as an index scan. When disabled, the query planner >> will produce a plan with GROUP

Re: Better error message when --single is not the first arg to postgres executable

2024-06-18 Thread Greg Sabino Mullane
If I am reading your patch correctly, we have lost the behavior of least surprise in which the first "meta" argument overrides all others: $ bin/postgres --version --boot --extrastuff postgres (PostgreSQL) 16.2 What about just inlining --version and --help e.g. else if (strcmp(argv[i], "--versio

Re: Should consider materializing the cheapest inner path in consider_parallel_nestloop()

2024-06-18 Thread Tender Wang
Richard Guo 于2024年6月18日周二 17:24写道: > On Tue, Jun 4, 2024 at 6:51 PM Tender Wang wrote: > > Yeah, Richard commented the v1 patch about JOIN_UNIQUE_INNER in [1] > > > > * I think we should not consider materializing the cheapest inner path > > if we're doing JOIN_UNIQUE_INNER, because in this case

Re: IPC::Run accepts bug reports

2024-06-18 Thread Andres Freund
Hi, On 2024-06-18 12:00:13 -0700, Andres Freund wrote: > On 2024-06-18 10:10:17 -0700, Noah Misch wrote: > > > 1) Sometimes hangs hard on windows if started processes have not been shut > > >down before script exits. I've mostly encountered this via the > > > buildfarm / > > >CI, so I ne

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-18 Thread Ashutosh Sharma
Hi, On Wed, Jun 19, 2024 at 6:06 AM John H wrote: > > Hi Ashutosh, > > Thanks for clarifying. > > > not standalone functions created independently > > I'm wondering why we wouldn't want to extend that functionality so > that if users (including superusers) do want to automatically > configure sea

Re: Document NULL

2024-06-18 Thread Yugo NAGATA
On Sat, 11 May 2024 08:33:27 -0700 "David G. Johnston" wrote: > On Fri, May 3, 2024 at 9:00 AM David G. Johnston > wrote: > > > On Fri, May 3, 2024 at 8:44 AM Tom Lane wrote: > > > >> Having said that, I reiterate my proposal that we make it a new > >> > > under DDL, before 5.2 Default Values

Re: State of pg_createsubscriber

2024-06-18 Thread Amit Kapila
On Tue, Jun 18, 2024 at 12:41 PM Euler Taveira wrote: > > On Tue, Jun 18, 2024, at 12:59 AM, Amit Kapila wrote: > > On Mon, May 20, 2024 at 12:12 PM Amit Kapila wrote: > > > > On Sun, May 19, 2024 at 11:20 PM Euler Taveira wrote: > > > > > > On Sun, May 19, 2024, at 2:30 PM, Tom Lane wrote: > >

Re: State of pg_createsubscriber

2024-06-18 Thread Amit Kapila
On Tue, Jun 18, 2024 at 12:13 PM Peter Eisentraut wrote: > > On 18.06.24 05:59, Amit Kapila wrote: > >> 1. After promotion, the pre-existing replication objects should be > >> removed (either optionally or always), otherwise, it can lead to a new > >> subscriber not being able to restart or gettin

Re: Document NULL

2024-06-18 Thread David G. Johnston
On Tue, Jun 18, 2024 at 8:34 PM Yugo NAGATA wrote: > > It may be a trivial thing but I am not sure we need to mention case > insensitivity > here, because all keywords and unquoted identifiers are case-insensitive in > PostgreSQL and it is not specific to NULL. > But it is neither a keyword nor

Re: Inconsistency between try_mergejoin_path and create_mergejoin_plan

2024-06-18 Thread Richard Guo
On Mon, Jun 17, 2024 at 10:51 PM Alexander Pyhalov wrote: > There's the following inconsistency between try_mergejoin_path() and > create_mergejoin_plan(). > When clause operator has no commutator, we can end up with mergejoin > path. > Later create_mergejoin_plan() will call get_switched_clauses(

Re: DOCS: Generated table columns are skipped by logical replication

2024-06-18 Thread Amit Kapila
On Wed, Jun 19, 2024 at 6:46 AM Peter Smith wrote: > > On Tue, Jun 18, 2024 at 9:40 PM Amit Kapila wrote: > > > > On Tue, Jun 18, 2024 at 12:11 PM Peter Smith wrote: > > > > > > While reviewing another thread that proposes to include "generated > > > columns" support for logical replication [1]

  1   2   >