Propagate sanity checks of ProcessUtility() to standard_ProcessUtility()?

2024-02-28 Thread Michael Paquier
Hi all, It's been brought to me that an extension may finish by breaking the assumptions ProcessUtility() relies on when calling standard_ProcessUtility(), causing breakages when passing down data to cascading utility hooks. Isn't the state of the arguments given something we should check not

Re: Infinite loop in XLogPageRead() on standby

2024-02-28 Thread Kyotaro Horiguchi
At Thu, 29 Feb 2024 14:05:15 +0900, Michael Paquier wrote in > On Wed, Feb 28, 2024 at 11:19:41AM +0100, Alexander Kukushkin wrote: > > I spent some time debugging an issue with standby not being able to > > continue streaming after failover. > > > > The problem happens when standbys received

Re: Synchronizing slots from primary to standby

2024-02-28 Thread Bertrand Drouvot
Hi, On Thu, Feb 29, 2024 at 10:43:07AM +1100, Peter Smith wrote: > - if (logical) > + /* > + * Set always-secure search path for the cases where the connection is > + * used to run SQL queries, so malicious users can't get control. > + */ > + if (logical || !replication) > { > PGresult

Re: Fix for edge case in date_bin() function

2024-02-28 Thread Moaaz Assali
Hello Tom, Thanks for the quick patch! You're right. The stride_usecs calculation, tm_delta += ustride_usecs, and final result calculations can overflow and need a guard. However, I don't see the issue with the INT64 -> UINT64 mapping. The current implementation results in integer overflows

Re: DOCS: Avoid using abbreviation "aka"

2024-02-28 Thread Michael Paquier
On Thu, Feb 29, 2024 at 04:51:50PM +1100, Peter Smith wrote: > HEAD > For the synchronization to work, it is mandatory to have a physical > replication slot between the primary and the standby aka > primary_slot_name should be configured on the standby, and > hot_standby_feedback must be enabled

Re: Injection points: some tools to wait and wake

2024-02-28 Thread Michael Paquier
On Wed, Feb 28, 2024 at 06:20:41AM +, Bertrand Drouvot wrote: > On Wed, Feb 28, 2024 at 01:26:46PM +0900, Michael Paquier wrote: >> On Tue, Feb 27, 2024 at 01:39:59PM +, Bertrand Drouvot wrote: >> > So, I'm ok with the new helper too. >> >> If both of you feel strongly about that, I'm OK

Re: Injection points: some tools to wait and wake

2024-02-28 Thread Michael Paquier
On Wed, Feb 28, 2024 at 10:27:52AM +0500, Andrey M. Borodin wrote: > BTW, if we had an SQL function such as injection_point_await(name), > we could use it in our isolation tests as well as our TAP tests :) I am not quite sure to follow here. The isolation test facility now relies on the in-core

DOCS: Avoid using abbreviation "aka"

2024-02-28 Thread Peter Smith
While checking some recently pushed changes [1] I noticed documentation [2] that includes the abbreviation "aka". IMO it is preferable to avoid informal abbreviations like "aka" in the documents, because not everyone will understand the meaning. Furthermore, I think this is reinforced by the fact

Re: "type with xxxx does not exist" when doing ExecMemoize()

2024-02-28 Thread Tender Wang
I read Memoize code and how other node use ResetExprContext() recently. The comments about per_tuple_memory said that : * ecxt_per_tuple_memory is a short-term context for expression results. * As the name suggests, it will typically be reset once per tuple, * before we begin to evaluate

Re: Infinite loop in XLogPageRead() on standby

2024-02-28 Thread Michael Paquier
On Wed, Feb 28, 2024 at 11:19:41AM +0100, Alexander Kukushkin wrote: > I spent some time debugging an issue with standby not being able to > continue streaming after failover. > > The problem happens when standbys received only the first part of the WAL > record that spans multiple pages. > In

Re: speed up a logical replica setup

2024-02-28 Thread Andrew Dunstan
On 2024-02-27 Tu 05:02, Hayato Kuroda (Fujitsu) wrote: Dear Euler, Sorry, which pg_rewind option did you mention? I cannot find. IIUC, -l is an only option which can accept the path, but it is not related with us. Sorry, I found [1]. I was confused with pg_resetwal. But my opinion was not

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

2024-02-28 Thread Kyotaro Horiguchi
At Tue, 27 Feb 2024 18:33:18 +0100, Alvaro Herrera wrote in > Here's the complete set, with these two names using the singular. The commit by the second patch added several GUC descriptions: > Sets the size of the dedicated buffer pool used for the commit timestamp > cache. Some of them,

Re: Add basic tests for the low-level backup method.

2024-02-28 Thread Michael Paquier
On Thu, Feb 29, 2024 at 10:30:52AM +1300, David Steele wrote: > On 11/12/23 08:21, David Steele wrote: >> As promised in [1], attached are some basic tests for the low-level >> backup method. > > Added to the 2024-03 CF. There is already 040_standby_failover_slots_sync.pl in recovery/ that uses

Re: Synchronizing slots from primary to standby

2024-02-28 Thread Peter Smith
On Tue, Feb 27, 2024 at 11:35 PM Amit Kapila wrote: > > On Tue, Feb 27, 2024 at 12:48 PM Peter Smith wrote: > > > > Here are some review comments for v99-0001 > > > > == > > 0. GENERAL. > > > > +#standby_slot_names = '' # streaming replication standby server slot names > > that > > + #

Re: Add checkpoint/redo LSNs to recovery errors.

2024-02-28 Thread Michael Paquier
On Thu, Feb 29, 2024 at 10:53:15AM +1300, David Steele wrote: > This patch adds checkpoint/redo LSNs to recovery error messages where they > may be useful for debugging. Thanks for following up on that! > When backup_label is not present, the checkpoint LSN is not logged unless > backup recovery

RE: Synchronizing slots from primary to standby

2024-02-28 Thread Zhijie Hou (Fujitsu)
On Wednesday, February 28, 2024 7:36 PM Bertrand Drouvot wrote: > > On Wed, Feb 28, 2024 at 02:23:27AM +, Zhijie Hou (Fujitsu) wrote: > > Attach the V100 patch set which addressed above comments. > > A few random comments: Thanks for the comments! > > 1 === > > + if (!ok) > +

Re: bug report: some issues about pg_15_stable(8fa4a1ac61189efffb8b851ee77e1bc87360c445)

2024-02-28 Thread jian he
On Wed, Feb 28, 2024 at 8:11 PM Dean Rasheed wrote: > > On Wed, 28 Feb 2024 at 09:16, jian he wrote: > > > > + oldcontext = MemoryContextSwitchTo(estate->es_query_cxt); > > + > > + node->as_epq_tupdesc = lookup_rowtype_tupdesc_copy(tupType, tupTypmod); > > + > > + ExecAssignExprContext(estate,

Re: Improve readability by using designated initializers when possible

2024-02-28 Thread Jelte Fennema-Nio
On Thu, 29 Feb 2024 at 01:57, Michael Paquier wrote: > I have doubts about the changes in raw_pg_bind_textdomain_codeset(), > as the encoding could come from the value in the pg_database tuples > themselves. The current coding is slightly safer from the perspective > of bogus input values as we

Re: Synchronizing slots from primary to standby

2024-02-28 Thread Peter Smith
On Wed, Feb 28, 2024 at 1:23 PM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, February 27, 2024 3:18 PM Peter Smith > wrote: ... > > 20. > > +# > > +# | > standby1 (primary_slot_name = sb1_slot) # | > standby2 > > +(primary_slot_name = sb2_slot) # primary - | # | > subscriber1 > >

Re: Making the initial and maximum DSA segment sizes configurable

2024-02-28 Thread Masahiko Sawada
Hi, Thank you for the comments! On Mon, Feb 26, 2024 at 6:58 AM Tomas Vondra wrote: > > Hello Masahiko-san, > > I'm not super-familiar with the DSA/DSM stuff, but I think your proposal > makes sense. > > I agree with your observation that DSA is a bit like AllocSet, so if > that allows

Re: MultiXact\SLRU buffers configuration

2024-02-28 Thread Kyotaro Horiguchi
At Sat, 3 Feb 2024 22:32:45 +0500, "Andrey M. Borodin" wrote in > Here's the test draft. This test reliably reproduces sleep on CV when waiting > next multixact to be filled into "members" SLRU. By the way, I raised a question about using multiple CVs simultaneously [1]. That is, I suspect

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

2024-02-28 Thread Andrei Lepikhov
On 28/2/2024 17:07, jian he wrote: doc/src/sgml/array.sgml corresponds to https://www.postgresql.org/docs/current/arrays.html. this GUC is related to parser|optimzier. adding a GUC to array.sgml seems strange. (I think). Maybe. In that case, I suggest adding extended comments to functions

RE: Synchronizing slots from primary to standby

2024-02-28 Thread Zhijie Hou (Fujitsu)
On Monday, February 26, 2024 7:52 PM Amit Kapila wrote: > > On Mon, Feb 26, 2024 at 7:49 AM Zhijie Hou (Fujitsu) > wrote: > > > > Attach the V98 patch set which addressed above comments. > > > > Few comments: > = > 1. > WalSndWaitForWal(XLogRecPtr loc) > { > int wakeEvents; >

Re: Improve eviction algorithm in ReorderBuffer

2024-02-28 Thread Masahiko Sawada
On Wed, Feb 28, 2024 at 3:10 PM Amit Kapila wrote: > > On Mon, Feb 26, 2024 at 7:54 PM Masahiko Sawada wrote: > > > Thank you for the comments! > A few comments on 0003: > === > 1. > +/* > + * Threshold of the total number of top-level and sub transactions > that controls > + *

Re: Improve readability by using designated initializers when possible

2024-02-28 Thread Michael Paquier
On Wed, Feb 28, 2024 at 05:37:22AM +0100, Jelte Fennema-Nio wrote: > On Wed, 28 Feb 2024 at 04:59, Michael Paquier wrote: >> Cool. I have applied 0004 and most of 0002. Attached is what >> remains, where I am wondering if it would be cleaner to do these bits >> together (did not look at the

Re: Synchronizing slots from primary to standby

2024-02-28 Thread Peter Smith
On Wed, Feb 28, 2024 at 10:21 PM Amit Kapila wrote: > > On Wed, Feb 28, 2024 at 3:26 PM shveta malik wrote: > > > > > > Here is the patch which addresses the above comments. Also optimized > > the test a little bit. Now we use pg_sync_replication_slots() function > > instead of worker to test

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-02-28 Thread Melanie Plageman
On Wed, Feb 28, 2024 at 6:17 PM Tomas Vondra wrote: > > > > On 2/28/24 21:06, Melanie Plageman wrote: > > On Wed, Feb 28, 2024 at 2:23 PM Tomas Vondra > > wrote: > >> > >> On 2/28/24 15:56, Tomas Vondra wrote: > ... > >>> > >>> Sure, I can do that. It'll take a couple hours to get the

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-02-28 Thread Tomas Vondra
On 2/28/24 21:06, Melanie Plageman wrote: > On Wed, Feb 28, 2024 at 2:23 PM Tomas Vondra > wrote: >> >> On 2/28/24 15:56, Tomas Vondra wrote: ... >>> >>> Sure, I can do that. It'll take a couple hours to get the results, I'll >>> share them when I have them. >>> >> >> Here are the results

Re: Refactor SASL exchange in preparation for OAuth Bearer

2024-02-28 Thread Daniel Gustafsson
> On 26 Feb 2024, at 19:56, Jacob Champion > wrote: >> + * SASL_FAILED: The exchance has failed and the connection should be > > s/exchance/exchange/ I rank that as one of my better typos actually. Fixed though. >> - if (final && !done) >> + if (final && !(status == SASL_FAILED || status ==

Re: Relation bulk write facility

2024-02-28 Thread Tom Lane
Heikki Linnakangas writes: > On 28/02/2024 18:04, Tom Lane wrote: >> The commit that added that test added a support function >> "get_columns_length" which is now unused. Should we get rid of that >> as well? > I see you just removed it; thanks! In the no-good-deed-goes-unpunished department:

Add checkpoint/redo LSNs to recovery errors.

2024-02-28 Thread David Steele
Hackers, This patch adds checkpoint/redo LSNs to recovery error messages where they may be useful for debugging. When backup_label is present the LSNs are already output in a log message, but it still seems like a good idea to repeat them. When backup_label is not present, the checkpoint

Re: [PoC] Federated Authn/z with OAUTHBEARER

2024-02-28 Thread Daniel Gustafsson
> On 28 Feb 2024, at 22:50, Andrew Dunstan wrote: > > On 2024-02-28 We 09:05, Jacob Champion wrote: >> >> Daniel and I discussed trying a Python version of the test server, >> since the standard library there should give us more goodies to work >> with. A proof of concept is in 0009. I think

Re: [PoC] Federated Authn/z with OAUTHBEARER

2024-02-28 Thread Andrew Dunstan
On 2024-02-28 We 09:05, Jacob Champion wrote: Daniel and I discussed trying a Python version of the test server, since the standard library there should give us more goodies to work with. A proof of concept is in 0009. I think the big question I have for it is, how would we communicate what

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Andrew Atkinson
Looks good! Presentation of Markdown file as HTML on mirrors I know of: https://github.com/postgres/postgres/blob/master/README.md https://gitlab.com/postgres/postgres/-/blob/master/README.md On Wed, Feb 28, 2024 at 2:59 PM Nathan Bossart wrote: > On Wed, Feb 28, 2024 at 02:21:49PM -0600,

Re: Add basic tests for the low-level backup method.

2024-02-28 Thread David Steele
On 11/12/23 08:21, David Steele wrote: As promised in [1], attached are some basic tests for the low-level backup method. Added to the 2024-03 CF. Regards, -David

Re: Improve the log message output of basic_archive when basic_archive.archive_directory parameter is not set

2024-02-28 Thread Nathan Bossart
On Wed, Feb 28, 2024 at 10:05:26PM +0100, Daniel Gustafsson wrote: >> On 28 Feb 2024, at 19:51, Nathan Bossart wrote: >> Is there any interest in this? If not, I'll withdraw the commitfest entry. > > I'm still interested, please leave it in and I'll circle around to it. Thanks, Daniel. --

Re: Improve the log message output of basic_archive when basic_archive.archive_directory parameter is not set

2024-02-28 Thread Daniel Gustafsson
> On 28 Feb 2024, at 19:51, Nathan Bossart wrote: > > On Fri, Jan 05, 2024 at 05:03:57PM -0600, Nathan Bossart wrote: >> I gave it a try. > > Is there any interest in this? If not, I'll withdraw the commitfest entry. I'm still interested, please leave it in and I'll circle around to it. --

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Nathan Bossart
On Wed, Feb 28, 2024 at 02:21:49PM -0600, Nathan Bossart wrote: > On Wed, Feb 28, 2024 at 02:07:34PM -0600, Andrew Atkinson wrote: >> I agree that starting with the direct conversion is reasonable. Markdown >> "modernizes" the file using a popular plain text file format that's >> renderable. > >

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Nathan Bossart
On Wed, Feb 28, 2024 at 02:07:34PM -0600, Andrew Atkinson wrote: > I've grabbed Nathan's patch, and pushed it to GitHub simply to preview the > rendered Markdown there. This isn't intended to be reviewed, this is just > for anyone else that's interested in easily seeing the HTML version of the >

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Joe Conway
On 2/28/24 14:36, Tom Lane wrote: Nathan Bossart writes: On Wed, Feb 28, 2024 at 01:08:03PM -0600, Nathan Bossart wrote: -PostgreSQL Database Management System -= +# PostgreSQL Database Management System This change can be omitted, which makes the

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Daniel Gustafsson
> On 28 Feb 2024, at 20:36, Tom Lane wrote: > > Nathan Bossart writes: >> On Wed, Feb 28, 2024 at 01:08:03PM -0600, Nathan Bossart wrote: >>> -PostgreSQL Database Management System >>> -= >>> +# PostgreSQL Database Management System > >> This change can be

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Andrew Atkinson
I've grabbed Nathan's patch, and pushed it to GitHub simply to preview the rendered Markdown there. This isn't intended to be reviewed, this is just for anyone else that's interested in easily seeing the HTML version of the Markdown file compared with the earlier one. Nathan's direct conversion:

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-02-28 Thread Melanie Plageman
On Wed, Feb 28, 2024 at 2:23 PM Tomas Vondra wrote: > > On 2/28/24 15:56, Tomas Vondra wrote: > >> ... > > > > Sure, I can do that. It'll take a couple hours to get the results, I'll > > share them when I have them. > > > > Here are the results with only patches 0001 - 0012 applied (i.e. without

Re: Relation bulk write facility

2024-02-28 Thread Heikki Linnakangas
On 28/02/2024 18:04, Tom Lane wrote: Heikki Linnakangas writes: On 28/02/2024 00:30, Thomas Munro wrote: I agree, this should be an error, and we should then remove the test. Done. The commit that added that test added a support function "get_columns_length" which is now unused. Should

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Tom Lane
Nathan Bossart writes: > On Wed, Feb 28, 2024 at 01:08:03PM -0600, Nathan Bossart wrote: >> -PostgreSQL Database Management System >> -= >> +# PostgreSQL Database Management System > This change can be omitted, which makes the conversion even simpler. That's

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Nathan Bossart
On Wed, Feb 28, 2024 at 01:08:03PM -0600, Nathan Bossart wrote: > -PostgreSQL Database Management System > -= > +# PostgreSQL Database Management System This change can be omitted, which makes the conversion even simpler. -- Nathan Bossart Amazon Web

Re: When extended query protocol ends?

2024-02-28 Thread Jelte Fennema-Nio
On Wed, 28 Feb 2024 at 17:51, Vladimir Sitnikov wrote: > > Jelte> If the Execute causes an error, is > Jelte> the Query still executed or not? And what about if the Query fails, is > Jelte> the Execute before committed or rolled back? > > Frankly, if there's a requirement from the backend, I

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Nathan Bossart
On Wed, Feb 28, 2024 at 01:54:59PM -0500, David E. Wheeler wrote: > On Feb 28, 2024, at 1:51 PM, Alvaro Herrera wrote: >> *IF* people don't go overboard, yes. I agree, but let's keep an eye so >> that it doesn't become an unreadable mess. I've seen some really >> horrible markdown files that

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Daniel Gustafsson
> On 28 Feb 2024, at 19:51, Alvaro Herrera wrote: > > On 2024-Feb-28, Joe Conway wrote: > >> Markdown is pretty readable as text, I'm not sure why we need both. > > *IF* people don't go overboard, yes. I agree, but let's keep an eye so > that it doesn't become an unreadable mess. I've seen

Re: Fix for edge case in date_bin() function

2024-02-28 Thread Tom Lane
Moaaz Assali writes: > - I have used INT64 -> UINT64 mapping in order to ensure no integer > overflows are possible. I don't think I trust this idea, and in any case it doesn't remove all the overflow hazards: the reduction of the stride interval to microseconds can overflow, and the final

Re: An improved README experience for PostgreSQL

2024-02-28 Thread David E. Wheeler
On Feb 28, 2024, at 1:51 PM, Alvaro Herrera wrote: > *IF* people don't go overboard, yes. I agree, but let's keep an eye so > that it doesn't become an unreadable mess. I've seen some really > horrible markdown files that I'm sure most of you would object to. Markdown++ IME the keys to

Re: Improve the log message output of basic_archive when basic_archive.archive_directory parameter is not set

2024-02-28 Thread Nathan Bossart
On Fri, Jan 05, 2024 at 05:03:57PM -0600, Nathan Bossart wrote: > I gave it a try. Is there any interest in this? If not, I'll withdraw the commitfest entry. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Alvaro Herrera
On 2024-Feb-28, Joe Conway wrote: > Markdown is pretty readable as text, I'm not sure why we need both. *IF* people don't go overboard, yes. I agree, but let's keep an eye so that it doesn't become an unreadable mess. I've seen some really horrible markdown files that I'm sure most of you

Re: Support a wildcard in backtrace_functions

2024-02-28 Thread Jelte Fennema-Nio
On Wed, 28 Feb 2024 at 19:04, Daniel Gustafsson wrote: > This should be "equal to or higher" right? Correct, nicely spotted. Fixed that. I also updated the docs for the new backtrace_functions_min_level GUC itself too, as well as creating a dedicated options array for the GUC. Because when

Re: Support a wildcard in backtrace_functions

2024-02-28 Thread Daniel Gustafsson
> On 27 Feb 2024, at 18:03, Jelte Fennema-Nio wrote: > > On Mon, 12 Feb 2024 at 14:27, Jelte Fennema-Nio wrote: >> Would a backtrace_functions_level GUC that would default to ERROR be >> acceptable in this case? > > I implemented it this way in the attached patchset. I'm not excited about

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Joe Conway
On 2/28/24 12:25, Daniel Gustafsson wrote: On 28 Feb 2024, at 18:02, Nathan Bossart wrote: On Wed, Feb 28, 2024 at 02:46:11PM +0100, Daniel Gustafsson wrote: On 26 Feb 2024, at 21:30, Tom Lane wrote: Nathan Bossart writes: I think this would be nice. If the Markdown version is reasonably

Re: [PoC] Federated Authn/z with OAUTHBEARER

2024-02-28 Thread Daniel Gustafsson
> On 28 Feb 2024, at 15:05, Jacob Champion > wrote: > > [Trying again, with all patches unzipped and the CC list temporarily > removed to avoid flooding people's inboxes. Original message follows.] > > On Fri, Feb 23, 2024 at 5:01 PM Jacob Champion > wrote: >> The >> patchset is now carrying

Re: Streaming read-ready sequential scan code

2024-02-28 Thread Melanie Plageman
On Mon, Feb 26, 2024 at 03:56:57PM -0500, Melanie Plageman wrote: > On Mon, Feb 19, 2024 at 6:05 PM Melanie Plageman > wrote: > > > > On Mon, Jan 29, 2024 at 4:17 PM Melanie Plageman > > wrote: > > > > > > There is an outstanding question about where to allocate the > > > PgStreamingRead object

Re: MAINTAIN privilege -- what do we need to un-revert it?

2024-02-28 Thread Jeff Davis
On Wed, 2024-02-28 at 10:55 -0600, Nathan Bossart wrote: > I'm afraid I don't have a better idea than adding a short note in > each > affected commands's page. OK, that works for now. Later we should also document that the functions are run as the table owner. > > On Fri, 2024-02-23 at 15:30

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Daniel Gustafsson
> On 28 Feb 2024, at 18:02, Nathan Bossart wrote: > > On Wed, Feb 28, 2024 at 02:46:11PM +0100, Daniel Gustafsson wrote: >>> On 26 Feb 2024, at 21:30, Tom Lane wrote: >>> Nathan Bossart writes: I think this would be nice. If the Markdown version is reasonably readable as plain-text,

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Tom Lane
Nathan Bossart writes: > Sorry, my suggestion wasn't meant to imply that I have any strong concerns > about maintaining two README files. If we can automate generating one or > the other, that'd be great, but I don't see that as a prerequisite to > adding a Markdown version. Agreed, and I'd go

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Nathan Bossart
On Wed, Feb 28, 2024 at 09:56:57AM -0500, Greg Sabino Mullane wrote: > +1 on the general idea. Maybe make that COPYRIGHT link go to an absolute > URI, like all the other links, in case this file gets copied somewhere? > Perhaps point it to https://www.postgresql.org/about/licence/ I suspect there

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Nathan Bossart
On Wed, Feb 28, 2024 at 02:46:11PM +0100, Daniel Gustafsson wrote: >> On 26 Feb 2024, at 21:30, Tom Lane wrote: >> Nathan Bossart writes: >>> I think this would be nice. If the Markdown version is reasonably readable >>> as plain-text, maybe we could avoid maintaining two READMEs files, too.

Re: MAINTAIN privilege -- what do we need to un-revert it?

2024-02-28 Thread Nathan Bossart
On Tue, Feb 27, 2024 at 04:22:34PM -0800, Jeff Davis wrote: > Do we need a documentation update here? If so, where would be a good > place? I'm afraid I don't have a better idea than adding a short note in each affected commands's page. > On Fri, 2024-02-23 at 15:30 -0600, Nathan Bossart wrote:

Re: When extended query protocol ends?

2024-02-28 Thread Vladimir Sitnikov
Jelte> If the Execute causes an error, is Jelte> the Query still executed or not? And what about if the Query fails, is Jelte> the Execute before committed or rolled back? Frankly, if there's a requirement from the backend, I would like it to produce a corresponding error message. What do you

Re: Fix for edge case in date_bin() function

2024-02-28 Thread Moaaz Assali
Yeah you are right about the integer overflow. Consider this query: select date_bin('15 minutes'::interval, timestamp '294276-12-30 10:24:00', timestamp '4000-12-20 23:00:00 BC'); It will return 294276-12-30 10:31:49.551616 when it should be 294276-12-30 10:15:00, which happens because source

Re: Relation bulk write facility

2024-02-28 Thread Tom Lane
Heikki Linnakangas writes: > On 28/02/2024 00:30, Thomas Munro wrote: >> I agree, this should be an error, and we should then remove the test. > Done. The commit that added that test added a support function "get_columns_length" which is now unused. Should we get rid of that as well?

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Greg Sabino Mullane
+1 on the general idea. Maybe make that COPYRIGHT link go to an absolute URI, like all the other links, in case this file gets copied somewhere? Perhaps point it to https://www.postgresql.org/about/licence/ Cheers, Greg

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-02-28 Thread Tomas Vondra
On 2/28/24 15:38, Melanie Plageman wrote: > On Wed, Feb 28, 2024 at 8:22 AM Tomas Vondra > wrote: >> >> Hi, >> >> I haven't looked at the code very closely yet, but I decided to do some >> basic benchmarks to see if/how this refactoring affects behavior. >> >> Attached is a simple .sh script that

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-02-28 Thread Melanie Plageman
On Wed, Feb 28, 2024 at 8:22 AM Tomas Vondra wrote: > > Hi, > > I haven't looked at the code very closely yet, but I decided to do some > basic benchmarks to see if/how this refactoring affects behavior. > > Attached is a simple .sh script that > > 1) creates a table with one of a couple basic

Re: An improved README experience for PostgreSQL

2024-02-28 Thread Daniel Gustafsson
> On 26 Feb 2024, at 21:30, Tom Lane wrote: > > Nathan Bossart writes: >> I think this would be nice. If the Markdown version is reasonably readable >> as plain-text, maybe we could avoid maintaining two READMEs files, too. >> But overall, +1 to modernizing the README a bit. > > Per past

Re: Partial aggregates pushdown

2024-02-28 Thread Alexander Pyhalov
Hi. fujii.y...@df.mitsubishielectric.co.jp писал(а) 2024-02-22 10:20: Hi. Mr.Haas, hackers. I apologize for the significant delay since my last post. I have conducted investigations and considerations regarding the remaining tasks as follows. Would it be possible for you to review them? In

Re: Wrong description in server_ca.config and client_ca.config

2024-02-28 Thread Daniel Gustafsson
> On 27 Feb 2024, at 20:38, David Zhang wrote: > > Hi Hackers, > > The current descriptions for server_ca.config and client_ca.config are not so > accurate. For example, one of the descriptions in server_ca.config states, > "This certificate is used to sign server certificates. It is

Re: bug report: some issues about pg_15_stable(8fa4a1ac61189efffb8b851ee77e1bc87360c445)

2024-02-28 Thread Dean Rasheed
On Wed, 28 Feb 2024 at 09:16, jian he wrote: > > + oldcontext = MemoryContextSwitchTo(estate->es_query_cxt); > + > + node->as_epq_tupdesc = lookup_rowtype_tupdesc_copy(tupType, tupTypmod); > + > + ExecAssignExprContext(estate, >ps); > + > + node->ps.ps_ProjInfo = > +

Re: Experiments with Postgres and SSL

2024-02-28 Thread Heikki Linnakangas
On 28/02/2024 14:00, Matthias van de Meent wrote: I don't think I understand what you meant here, could you correct the sentence or expand why we want to do that? Note that with ALPN you could negotiate postgres/3.0 or postgres/4.0 during the handshake, which could save round-trips. Sorry, I

Re: When extended query protocol ends?

2024-02-28 Thread Tatsuo Ishii
> And that's also where sending a Query instead of a Sync introduces a > problem: What is supposed to happen if something fails. Let's take the > simple example Bind-Execute-Query: If the Execute causes an error, is > the Query still executed or not? And what about if the Query fails, is > the

Re: Experiments with Postgres and SSL

2024-02-28 Thread Matthias van de Meent
On Thu, 22 Feb 2024 at 18:02, Heikki Linnakangas wrote: > > On 22/02/2024 01:43, Matthias van de Meent wrote: >> On Wed, 10 Jan 2024 at 09:31, Heikki Linnakangas wrote: >>> 4. The number of combinations of sslmode, gssencmode and sslnegotiation >>> settings is scary. And we have very few tests

Re: Synchronizing slots from primary to standby

2024-02-28 Thread Bertrand Drouvot
Hi, On Wed, Feb 28, 2024 at 04:50:55PM +0530, Amit Kapila wrote: > On Wed, Feb 28, 2024 at 3:26 PM shveta malik wrote: > > > > > > Here is the patch which addresses the above comments. Also optimized > > the test a little bit. Now we use pg_sync_replication_slots() function > > instead of worker

Re: Use streaming read API in ANALYZE

2024-02-28 Thread Nazir Bilal Yavuz
Hi, On Mon, 19 Feb 2024 at 18:13, Nazir Bilal Yavuz wrote: > > I worked on using the currently proposed streaming read API [1] in ANALYZE. > The patch is attached. 0001 is the not yet merged streaming read API code > changes that can be applied to the master, 0002 is the actual code. > > The

Re: Synchronizing slots from primary to standby

2024-02-28 Thread Bertrand Drouvot
Hi, On Wed, Feb 28, 2024 at 02:23:27AM +, Zhijie Hou (Fujitsu) wrote: > Attach the V100 patch set which addressed above comments. Thanks! A few random comments: 1 === + if (!ok) + { + GUC_check_errdetail("List syntax is invalid."); + } What about to get

Re: Relation bulk write facility

2024-02-28 Thread Heikki Linnakangas
Committed, after fixing the various little things you pointed out: On 28/02/2024 00:30, Thomas Munro wrote: --- a/doc/src/sgml/installation.sgml +++ b/doc/src/sgml/installation.sgml @@ -3401,7 +3401,7 @@ export MANPATH PostgreSQL can be expected to work on current versions of

Re: Synchronizing slots from primary to standby

2024-02-28 Thread Amit Kapila
On Wed, Feb 28, 2024 at 3:26 PM shveta malik wrote: > > > Here is the patch which addresses the above comments. Also optimized > the test a little bit. Now we use pg_sync_replication_slots() function > instead of worker to test the operator-redirection using search-patch. > This has been done to

Re: Relation bulk write facility

2024-02-28 Thread Andres Freund
Hi, On 2024-02-27 12:59:14 -0800, Andres Freund wrote: > On 2024-02-27 15:45:45 -0500, Tom Lane wrote: > > Heikki Linnakangas writes: > > With AIX out of the picture, lapwing will be the only remaining > > animal testing MAXALIGN less than 8. That seems like a single > > point of failure ...

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

2024-02-28 Thread Alena Rybakina
On 28.02.2024 13:07, jian he wrote: On Wed, Feb 28, 2024 at 12:19 PM Andrei Lepikhov wrote: On 26/2/2024 11:10, Alena Rybakina wrote: On 24.02.2024 14:28, jian he wrote: Hi. I wrote the first draft patch of the documentation. it's under the section: Planner Method Configuration

Infinite loop in XLogPageRead() on standby

2024-02-28 Thread Alexander Kukushkin
Hello hackers, I spent some time debugging an issue with standby not being able to continue streaming after failover. The problem manifests itself by following messages in the log: LOG: received SIGHUP, reloading configuration files LOG: parameter "primary_conninfo" changed to "port=58669

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

2024-02-28 Thread jian he
On Wed, Feb 28, 2024 at 12:19 PM Andrei Lepikhov wrote: > > On 26/2/2024 11:10, Alena Rybakina wrote: > > On 24.02.2024 14:28, jian he wrote: > >> Hi. > >> I wrote the first draft patch of the documentation. > >> it's under the section: Planner Method Configuration > >>

Re: Synchronizing slots from primary to standby

2024-02-28 Thread shveta malik
On Wed, Feb 28, 2024 at 1:33 PM Bertrand Drouvot wrote: > > Hi, > A few comments: Thanks for reviewing. > > 1 === > > +* used to run normal SQL queries > > s/run normal SQL/run SQL/ ? > > As mentioned up-thread I don't like that much the idea of creating such a test > but if we do then

Re: Relation bulk write facility

2024-02-28 Thread Andres Freund
Hi, On 2024-02-28 00:24:01 +0400, Heikki Linnakangas wrote: > Here's a patch to fully remove AIX support. Thomas mentioned to me that cfbot failed with this applied: https://cirrus-ci.com/task/6348635416297472

Re: bug report: some issues about pg_15_stable(8fa4a1ac61189efffb8b851ee77e1bc87360c445)

2024-02-28 Thread jian he
On Tue, Feb 27, 2024 at 8:53 PM Dean Rasheed wrote: > > Attached is a very rough patch. It seemed better to build the > projection in the executor rather than the planner, since then the > extra work can be avoided, if EPQ is not invoked. > > It seems to work (it passes the isolation tests, and I

Re: Synchronizing slots from primary to standby

2024-02-28 Thread Amit Kapila
On Wed, Feb 28, 2024 at 12:31 PM Bertrand Drouvot wrote: > > On Wed, Feb 28, 2024 at 06:48:37AM +, Zhijie Hou (Fujitsu) wrote: > > On Wednesday, February 28, 2024 2:38 PM Bertrand Drouvot > > wrote: > > > > 2. > > > > Can we add a test case to demonstrate that the '=' operator can be > > >

Re: ALTER TABLE SET ACCESS METHOD on partitioned tables

2024-02-28 Thread Michael Paquier
On Wed, Feb 21, 2024 at 08:46:48AM +0100, Peter Eisentraut wrote: > Yes, I think most people agreed that that would be the preferred behavior. Challenge accepted. As of the patch attached. Tablespaces rely MyDatabaseTableSpace to fallback to the database's default if not specified, but we

Re: Synchronizing slots from primary to standby

2024-02-28 Thread Bertrand Drouvot
Hi, On Wed, Feb 28, 2024 at 12:29:01PM +0530, shveta malik wrote: > On Wed, Feb 28, 2024 at 8:49 AM Amit Kapila wrote: > > > > > > Few comments: > > Thanks for the feedback. > > > === > > 1. > > - if (logical) > > + if (logical || !replication) > > { > > > > Can we add a comment