Re: Remove MSVC scripts from the tree

2023-12-19 Thread Peter Eisentraut
On 20.12.23 02:14, Michael Paquier wrote: Hmm. Interesting. So this basically comes down to the fact that GZIP and TAR are required in ./configure because distcheck has a hard dependency on both, but we don't support this target in meson. Is that right? No, the issue is that gzip and tar

Re: Remove MSVC scripts from the tree

2023-12-19 Thread Peter Eisentraut
On 19.12.23 17:44, Nazir Bilal Yavuz wrote: I think we need to require sed when dtrace or selinux is found, not by looking at the return value of the get_option().enabled(). Right. I think the correct condition would be sed = find_program(get_option('SED'), 'sed', native: true,

Re: Function to get invalidation cause of a replication slot.

2023-12-19 Thread Drouvot, Bertrand
Hi, On 12/20/23 7:01 AM, shveta malik wrote: Hello hackers, Attached is a patch which attempts to implement a new system function pg_get_slot_invalidation_cause('slot_name') to get invalidation cause of a replication slot. Thanks! +1 for the idea to display this information through an SQL

Re: Add new for_each macros for iterating over a List that do not require ListCell pointer

2023-12-19 Thread vignesh C
On Tue, 19 Dec 2023 at 21:22, Nathan Bossart wrote: > > On Tue, Dec 19, 2023 at 03:44:43PM +0100, Jelte Fennema-Nio wrote: > > On Tue, 19 Dec 2023 at 11:59, vignesh C wrote: > >> I noticed that this change can be done in several other places too. > > > > My guess would be that ~90% of all

Re: Change GUC hashtable to use simplehash?

2023-12-19 Thread John Naylor
On Wed, Dec 20, 2023 at 3:23 AM Jeff Davis wrote: > > On Tue, 2023-12-19 at 16:23 +0700, John Naylor wrote: > > That wasn't the next place I thought to look (that would be the > > strcmp > > call), but something like this could be worthwhile. > > The reason I looked here is that the inner while

Re: Synchronizing slots from primary to standby

2023-12-19 Thread Peter Smith
Here are some comments for the patch v50-0002. == GENERAL (I made a short study of all the ereports in this patch -- here are some findings) ~~~ 0.1 Don't need the parentheses. Checking all the ereports I see that half of them have the redundant parentheses and half of them do not; You

Function to get invalidation cause of a replication slot.

2023-12-19 Thread shveta malik
Hello hackers, Attached is a patch which attempts to implement a new system function pg_get_slot_invalidation_cause('slot_name') to get invalidation cause of a replication slot. Currently, users do not have a way to know the invalidation cause. One can only find out if the slot is invalidated

Re: Synchronizing slots from primary to standby

2023-12-19 Thread Amit Kapila
On Tue, Dec 19, 2023 at 6:35 PM Hayato Kuroda (Fujitsu) wrote: > > > walsender.c > > 01. WalSndWaitForStandbyConfirmation > > ``` > +sleeptime = WalSndComputeSleeptime(GetCurrentTimestamp()); > ``` > > It works well, but I'm not sure whether we should use WalSndComputeSleeptime() >

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2023-12-19 Thread jian he
On Tue, Dec 19, 2023 at 9:14 AM Masahiko Sawada wrote: > > > The error table hub idea is still unclear to me. I assume that there > are error tables at least on each database. And an error table can > have error data that happened during COPY FROM, including malformed > lines. Do the error tables

Re: Synchronizing slots from primary to standby

2023-12-19 Thread Amit Kapila
On Tue, Dec 19, 2023 at 5:30 PM shveta malik wrote: > > Thanks for reviewing. I have addressed these in v50. > I was looking at this patch to see if something smaller could be independently committable. I think we can extract pg_get_slot_invalidation_cause() and commit it as that function could

Re: Add a perl function in Cluster.pm to generate WAL

2023-12-19 Thread Euler Taveira
On Tue, Dec 19, 2023, at 8:00 PM, Michael Paquier wrote: > On Tue, Dec 19, 2023 at 11:25:50AM +0530, Bharath Rupireddy wrote: > > I used pg_logical_emit_message() in non-transactional mode without > > needing an explicit WAL flush as the pg_switch_wal() does a WAL flush > > at the end [1]. > >

Re: Improve eviction algorithm in ReorderBuffer

2023-12-19 Thread Amit Kapila
On Wed, Dec 20, 2023 at 6:49 AM Masahiko Sawada wrote: > > On Tue, Dec 19, 2023 at 8:02 PM Amit Kapila wrote: > > > > On Tue, Dec 19, 2023 at 8:31 AM Masahiko Sawada > > wrote: > > > > > > On Sun, Dec 17, 2023 at 11:40 AM Amit Kapila > > > wrote: > > > > > > > > > > > > The individual

Re: Transaction timeout

2023-12-19 Thread Junwang Zhao
On Wed, Dec 20, 2023 at 9:58 AM Thomas wen wrote: > > Hi Junwang Zhao > #should we invalidate lock_timeout? Or maybe just document this. > I think you mean when lock_time is greater than trasaction-time invalidate > lock_timeout or needs to be logged ? > I mean the interleaving of the

Re: "pgoutput" options missing on documentation

2023-12-19 Thread Amit Kapila
On Tue, Dec 19, 2023 at 12:55 PM Amit Kapila wrote: > > I think we should move to 0002 patch now. In that, I suggest preparing > separate back branch patches. > Emre, are you planning to share back-branch patches? -- With Regards, Amit Kapila.

Re: pgsql: Move src/bin/pg_verifybackup/parse_manifest.c into src/common.

2023-12-19 Thread Robert Haas
On Tue, Dec 19, 2023 at 8:01 PM Michael Paquier wrote: > On Tue, Dec 19, 2023 at 08:29:18PM +, Robert Haas wrote: > > Move src/bin/pg_verifybackup/parse_manifest.c into src/common. > > > > This makes it possible for the code to be easily reused by other > > client-side tools, and/or by the

回复: Transaction timeout

2023-12-19 Thread Thomas wen
Hi Junwang Zhao #should we invalidate lock_timeout? Or maybe just document this. I think you mean when lock_time is greater than trasaction-time invalidate lock_timeout or needs to be logged ? Best whish 发件人: Junwang Zhao 发送时间: 2023年12月20日 9:48 收件人:

Re: Transaction timeout

2023-12-19 Thread Junwang Zhao
On Tue, Dec 19, 2023 at 10:51 PM Junwang Zhao wrote: > > On Tue, Dec 19, 2023 at 6:27 PM Andrey M. Borodin > wrote: > > > > > > > > > On 19 Dec 2023, at 13:26, Andrey M. Borodin wrote: > > > > > > I don’t have Windows machine, so I hope CF bot will pick this. > > > > I used Github CI to

Re: Add isCatalogRel in rmgrdesc

2023-12-19 Thread Masahiko Sawada
On Tue, Dec 19, 2023 at 6:27 PM Drouvot, Bertrand wrote: > > Hi, > > On 12/19/23 9:00 AM, Masahiko Sawada wrote: > > On Tue, Dec 12, 2023 at 6:15 PM Michael Paquier wrote: > >> > >> On Tue, Dec 12, 2023 at 09:23:46AM +0100, Drouvot, Bertrand wrote: > >>> Please find attached a patch to add this

Re: index prefetching

2023-12-19 Thread Tomas Vondra
On 12/18/23 22:00, Robert Haas wrote: > On Sat, Dec 9, 2023 at 1:08 PM Tomas Vondra > wrote: >> But there's a layering problem that I don't know how to solve - I don't >> see how we could make indexam.c entirely oblivious to the prefetching, >> and move it entirely to the executor. Because how

Re: Improve eviction algorithm in ReorderBuffer

2023-12-19 Thread Masahiko Sawada
On Tue, Dec 19, 2023 at 8:02 PM Amit Kapila wrote: > > On Tue, Dec 19, 2023 at 8:31 AM Masahiko Sawada wrote: > > > > On Sun, Dec 17, 2023 at 11:40 AM Amit Kapila > > wrote: > > > > > > > > > The individual transactions shouldn't cross > > > 'logical_decoding_work_mem'. I got a bit confused by

Re: Remove MSVC scripts from the tree

2023-12-19 Thread Michael Paquier
On Tue, Dec 19, 2023 at 04:24:02PM +0100, Peter Eisentraut wrote: > Here are patches for these two issues. More testing would be appreciated. > > --- a/contrib/basebackup_to_shell/meson.build > +++ b/contrib/basebackup_to_shell/meson.build > @@ -24,7 +24,7 @@ tests += { > 'tests': [ >

Re: Remove MSVC scripts from the tree

2023-12-19 Thread Michael Paquier
On Mon, Nov 20, 2023 at 05:03:28PM +0900, Michael Paquier wrote: > Your suggestion to create a new sect2 for "Windows" as much as Andres' > suggestion are OK by as an intermediate step, and I suspect that the > end result will likely not be that. It took me some time to get back to this one, and

Re: Use of additional index columns in rows filtering

2023-12-19 Thread Tomas Vondra
On 8/19/23 02:49, Peter Geoghegan wrote: > On Tue, Aug 8, 2023 at 11:36 AM Peter Geoghegan wrote: >>> The only thing the patch does is it looks at clauses we decided not to >>> treat as index quals, and do maybe still evaluate them on index. And I >>> don't think I want to move these goalposts

Re: Update the comment in nodes.h to cover Cardinality

2023-12-19 Thread Richard Guo
On Tue, Dec 19, 2023 at 10:50 PM Peter Eisentraut wrote: > On 19.12.23 07:23, Richard Guo wrote: > > By chance I discovered that the comment for the typedefs of "double"s > > does not cover Cardinality. Should we update that comment accordingly, > > maybe something like below? > > > > - *

Re: Use of additional index columns in rows filtering

2023-12-19 Thread Tomas Vondra
Hi, It took me a while but I finally got back to working on this patch. I reread the summary of principles Peter shared in August, and I do agree with all the main points - the overall qual hierarchy and the various examples and counter-examples. I'll respond to a couple things in this

Re: Built-in CTYPE provider

2023-12-19 Thread Jeff Davis
On Tue, 2023-12-19 at 15:59 -0500, Robert Haas wrote: > FWIW, the idea that we're going to develop a built-in provider seems > to be solid, for the reasons Jeff mentions: it can be stable, and > under our control. But it seems like we might need built-in providers > for everything rather than just

Re: introduce dynamic shared memory registry

2023-12-19 Thread Michael Paquier
On Tue, Dec 19, 2023 at 10:14:44AM -0600, Nathan Bossart wrote: > On Tue, Dec 19, 2023 at 10:49:23AM -0500, Robert Haas wrote: >> On Mon, Dec 18, 2023 at 3:32 AM Andrei Lepikhov >> wrote: >>> 2. I think a separate file for this feature looks too expensive. >>> According to the gist of that code,

Re: introduce dynamic shared memory registry

2023-12-19 Thread Michael Paquier
On Tue, Dec 19, 2023 at 10:19:11AM -0600, Nathan Bossart wrote: > On Fri, Dec 08, 2023 at 04:36:52PM +0900, Michael Paquier wrote: >> Yes, tracking that in a more central way can have many usages, so your >> patch sounds like a good idea. Note that we have one case in core >> that be improved and

Re: Remove MSVC scripts from the tree

2023-12-19 Thread Michael Paquier
On Mon, Dec 18, 2023 at 02:52:41PM +0100, Peter Eisentraut wrote: > On 18.12.23 11:49, vignesh C wrote: >> Few comments: >> 1) Now that the MSVC build scripts are removed, should we have the >> reference to "MSVC build scripts" here? >> ltree.h: > > I think this note is correct and can be kept,

Re: Fix a comment in basic_archive about NO_INSTALLCHECK

2023-12-19 Thread Michael Paquier
On Mon, Dec 18, 2023 at 11:28:46AM +0530, Bharath Rupireddy wrote: > Reworded the comment a bit and attached the v2 patch. Forgot about this one, thanks! I've simplified it a bit and applied it. -- Michael signature.asc Description: PGP signature

Re: "pgoutput" options missing on documentation

2023-12-19 Thread Peter Smith
On Tue, Dec 19, 2023 at 6:25 PM Amit Kapila wrote: > > On Tue, Dec 19, 2023 at 12:07 PM Peter Smith wrote: > > > > On Tue, Dec 19, 2023 at 1:35 AM Emre Hasegeli wrote: > > > > > > > Fair enough. I think we should push your first patch only in HEAD as > > > > this is a minor improvement over the

Re: Add a perl function in Cluster.pm to generate WAL

2023-12-19 Thread Michael Paquier
On Tue, Dec 19, 2023 at 11:25:50AM +0530, Bharath Rupireddy wrote: > I used pg_logical_emit_message() in non-transactional mode without > needing an explicit WAL flush as the pg_switch_wal() does a WAL flush > at the end [1]. Indeed, that should be enough to answer my comment. > Attached v4

Re: Built-in CTYPE provider

2023-12-19 Thread Robert Haas
On Mon, Dec 18, 2023 at 2:46 PM Jeff Davis wrote: > The whole concept of "providers" is that they aren't consistent with > each other. ICU, libc, and the builtin provider will all be based on > different versions of Unicode. That's by design. > > The built-in provider will be a bit better in the

Add support for __attribute__((returns_nonnull))

2023-12-19 Thread Tristan Partin
Here is a patch which adds support for the returns_nonnull attribute alongside all the other attributes we optionally support. I recently wound up in a situation where I was checking for NULL return values of a function that couldn't ever return NULL because the inability to allocate memory

Re: Change GUC hashtable to use simplehash?

2023-12-19 Thread Jeff Davis
On Tue, 2023-12-19 at 16:23 +0700, John Naylor wrote: > That wasn't the next place I thought to look (that would be the > strcmp > call), but something like this could be worthwhile. The reason I looked here is that the inner while statement (to find the chunk size) looked out of place and

Re: pgsql: Prevent tuples to be marked as dead in subtransactions on standb

2023-12-19 Thread Robert Haas
On Tue, Dec 12, 2023 at 11:06 AM Michael Paquier wrote: > Prevent tuples to be marked as dead in subtransactions on standbys I don't think this is a good commit message. It's totally unclear what it means, and when I opened up the diff to try to see what was changed, it looked nothing like what

Re: backtrace_on_internal_error

2023-12-19 Thread Robert Haas
On Tue, Dec 19, 2023 at 11:29 AM Tom Lane wrote: > IMO, we aren't really going to get a massive payoff from this with > the current backtrace output; it's just not detailed enough. It's > better than nothing certainly, but to really move the goalposts > we'd need something approaching gdb's "bt

Re: libpq compression (part 3)

2023-12-19 Thread Jacob Burroughs
> I believe this patch series is ready for detailed review/testing, with one > caveat: as can be seen here https://cirrus-ci.com/build/6732518292979712 , > the build is passing on all platforms and all tests except for the primary > SSL test on Windows. One correction: I apparently missed a

Re: Add --check option to pgindent

2023-12-19 Thread Tristan Partin
On Tue Dec 19, 2023 at 10:36 AM CST, Jelte Fennema-Nio wrote: On Mon, 18 Dec 2023 at 22:18, Tristan Partin wrote: > Here is an additional patch which implements the behavior you described. > The first patch is just Daniel's squashed version of my patches. I think we'd still want the early exit

Re: Add new for_each macros for iterating over a List that do not require ListCell pointer

2023-12-19 Thread Jelte Fennema-Nio
On Tue, 19 Dec 2023 at 16:52, Nathan Bossart wrote: > I'm not sure we should proceed with rewriting most/all eligible foreach > loops. I think it's fine to use the new macros in new code or to update > existing loops in passing when changing nearby code, but rewriting > everything likely just

Re: Remove MSVC scripts from the tree

2023-12-19 Thread Nazir Bilal Yavuz
Hi, On Tue, 19 Dec 2023 at 18:24, Peter Eisentraut wrote: > > On 18.12.23 14:52, Peter Eisentraut wrote: > >> 2) I had seen that if sed/gzip is not available meson build will fail: > >> 2.a) > >> Program gsed sed found: NO > >> meson.build:334:6: ERROR: Program 'gsed sed' not found or not

Re: add non-option reordering to in-tree getopt_long

2023-12-19 Thread Nathan Bossart
On Mon, Dec 18, 2023 at 09:31:54PM -0500, Tom Lane wrote: > Agreed, if it actually is 19 years old. I'm wondering a little bit > if there could be some moderately-recent glibc behavior change > involved. I'm not excited enough about it to go trawl their change > log, but we should keep our ears

Re: Add --check option to pgindent

2023-12-19 Thread Jelte Fennema-Nio
On Mon, 18 Dec 2023 at 22:18, Tristan Partin wrote: > Here is an additional patch which implements the behavior you described. > The first patch is just Daniel's squashed version of my patches. I think we'd still want the early exit behaviour when only --check is provided. No need to spend time

Re: backtrace_on_internal_error

2023-12-19 Thread Tom Lane
Robert Haas writes: > The last change we made in this area that, at least for me, massively > improved debuggability was the change to log the current query string > when a backend crashes. That's such a huge help; I can't imagine going > back to the old way where you had basically no idea what

Re: [DOC] Introducing Quick Start Guide to PL/pgSQL and PL/Python Documentation

2023-12-19 Thread Ishaan Adarsh
Subject: Clarification on the Purpose of the Patch Hi Peter, The intention was to address the challenge faced by newcomers in understanding how to write an extension for PostgreSQL. The existing documentation, while comprehensive, lacks a consolidated and easy-to-follow tutorial that serves as a

Re: introduce dynamic shared memory registry

2023-12-19 Thread Nathan Bossart
On Fri, Dec 08, 2023 at 04:36:52PM +0900, Michael Paquier wrote: > Yes, tracking that in a more central way can have many usages, so your > patch sounds like a good idea. Note that we have one case in core > that be improved and make use of what you have here: autoprewarm.c. I'll add a patch for

Re: introduce dynamic shared memory registry

2023-12-19 Thread Nathan Bossart
On Tue, Dec 19, 2023 at 10:49:23AM -0500, Robert Haas wrote: > On Mon, Dec 18, 2023 at 3:32 AM Andrei Lepikhov > wrote: >> 2. I think a separate file for this feature looks too expensive. >> According to the gist of that code, it is a part of the DSA module. > > -1. I think this is a totally

Re: backtrace_on_internal_error

2023-12-19 Thread Robert Haas
On Fri, Dec 8, 2023 at 1:34 PM Andres Freund wrote: > Oh, very much agreed. But I suspect we won't quickly do the same for > out-of-core extensions... I feel like this is a problem that will sort itself out just fine. The rules about using ereport() and elog() could probably be better documented

Re: Remove MSVC scripts from the tree

2023-12-19 Thread Tristan Partin
On Tue Dec 19, 2023 at 9:24 AM CST, Peter Eisentraut wrote: On 18.12.23 14:52, Peter Eisentraut wrote: >> 2) I had seen that if sed/gzip is not available meson build will fail: >> 2.a) >> Program gsed sed found: NO >> meson.build:334:6: ERROR: Program 'gsed sed' not found or not executable > >

Re: introduce dynamic shared memory registry

2023-12-19 Thread Nathan Bossart
On Mon, Dec 18, 2023 at 12:05:28PM +0300, Nikita Malakhov wrote: > Just a suggestion - maybe it is worth adding a function for detaching the > segment, > for cases when we unload and/or re-load the extension? Hm. We don't presently have a good way to unload a library, but you can certainly DROP

Re: meson: Stop using deprecated way getting path of files

2023-12-19 Thread Tristan Partin
On Mon Dec 18, 2023 at 12:43 AM CST, John Naylor wrote: On Tue, Dec 5, 2023 at 3:27 AM Tristan Partin wrote: > > On Mon Dec 4, 2023 at 2:10 PM CST, Tom Lane wrote: > > Not sure what you were using, but are you aware that SQL access to the > > buildfarm database is available to project members?

Re: introduce dynamic shared memory registry

2023-12-19 Thread Nathan Bossart
On Mon, Dec 18, 2023 at 03:32:08PM +0700, Andrei Lepikhov wrote: > 3. The dsm_registry_init_or_attach routine allocates a DSM segment. Why not > create dsa_area for a requestor and return it? My assumption is that most modules just need a fixed-size segment, and if they really needed a DSA

Re: Add new for_each macros for iterating over a List that do not require ListCell pointer

2023-12-19 Thread Nathan Bossart
On Tue, Dec 19, 2023 at 03:44:43PM +0100, Jelte Fennema-Nio wrote: > On Tue, 19 Dec 2023 at 11:59, vignesh C wrote: >> I noticed that this change can be done in several other places too. > > My guess would be that ~90% of all existing foreach loops in the > codebase can be easily rewritten (and

Re: introduce dynamic shared memory registry

2023-12-19 Thread Robert Haas
On Mon, Dec 18, 2023 at 3:32 AM Andrei Lepikhov wrote: > 2. I think a separate file for this feature looks too expensive. > According to the gist of that code, it is a part of the DSA module. -1. I think this is a totally different thing than DSA. More files aren't nearly as expensive as the

Re: [DOC] Introducing Quick Start Guide to PL/pgSQL and PL/Python Documentation

2023-12-19 Thread Peter Eisentraut
On 16.12.23 11:49, Ishaan Adarsh wrote: 1. Added a new section titled "Quick Start Guide" to both PL/pgSQL and PL/Python documentation. 2. Included step-by-step instructions for users to get started with these procedural languages. 3. Provided explanations, code snippets, and examples to

Re: Add --check option to pgindent

2023-12-19 Thread Tristan Partin
On Mon Dec 18, 2023 at 3:18 PM CST, Tristan Partin wrote: On Mon Dec 18, 2023 at 10:50 AM CST, Tristan Partin wrote: > On Mon Dec 18, 2023 at 10:14 AM CST, Jelte Fennema-Nio wrote: > > On Mon, 18 Dec 2023 at 13:42, Daniel Gustafsson wrote: > > > I think this is pretty much ready to go, the

Re: Remove MSVC scripts from the tree

2023-12-19 Thread Peter Eisentraut
On 18.12.23 14:52, Peter Eisentraut wrote: 2) I had seen that if sed/gzip is not available meson build will fail: 2.a) Program gsed sed found: NO meson.build:334:6: ERROR: Program 'gsed sed' not found or not executable Yes, this would need to be improved.  Currently, sed is only required if

Re: Allow custom parameters with more than one dot in config files.

2023-12-19 Thread Tom Lane
Alexander Kukushkin writes: > At the moment the only requirement for custom parameter names is that they > should have one or more dots. > ... > But, Postgres fails to start if such parameters are set in the > configuration file with the following error: Hmm. > In my opinion it would be fair to

Re: pg_waldump

2023-12-19 Thread Fabrice Chapuis
Ok thanks for all these precisions Regards Fabrice On Tue, Dec 19, 2023 at 2:00 PM Matthias van de Meent < boekewurm+postg...@gmail.com> wrote: > On Tue, 19 Dec 2023, 12:27 Fabrice Chapuis, > wrote: > > > > Hi, > > Is it possible to visualize the DDL with the pg_waldump tool. I created > a

Re: Transaction timeout

2023-12-19 Thread Junwang Zhao
On Tue, Dec 19, 2023 at 6:27 PM Andrey M. Borodin wrote: > > > > > On 19 Dec 2023, at 13:26, Andrey M. Borodin wrote: > > > > I don’t have Windows machine, so I hope CF bot will pick this. > > I used Github CI to produce version of tests that seems to be is stable on > Windows. > Sorry for the

Re: Update the comment in nodes.h to cover Cardinality

2023-12-19 Thread Peter Eisentraut
On 19.12.23 07:23, Richard Guo wrote: By chance I discovered that the comment for the typedefs of "double"s does not cover Cardinality.  Should we update that comment accordingly, maybe something like below? - * Typedefs for identifying qualifier selectivities and plan costs as such. - * These

Re: Add new for_each macros for iterating over a List that do not require ListCell pointer

2023-12-19 Thread Jelte Fennema-Nio
On Tue, 19 Dec 2023 at 11:59, vignesh C wrote: > I noticed that this change can be done in several other places too. My guess would be that ~90% of all existing foreach loops in the codebase can be easily rewritten (and simplified) using these new macros. So converting all of those would likely

Re: [DOC] Introducing Quick Start Guide to PL/pgSQL and PL/Python Documentation

2023-12-19 Thread Japin Li
On Tue, 19 Dec 2023 at 17:57, Ishaan Adarsh wrote: > I've addressed the points you raised: > > 1. *Missing `` Tag:* > I reviewed the "Create the Makefile" section, and it seems that > tags are appropriately used for filenames. If there's a specific instance > where you observed a missing tag,

Re: Transaction timeout

2023-12-19 Thread Japin Li
On Tue, 19 Dec 2023 at 18:27, Andrey M. Borodin wrote: >> On 19 Dec 2023, at 13:26, Andrey M. Borodin wrote: >> >> I don’t have Windows machine, so I hope CF bot will pick this. > > I used Github CI to produce version of tests that seems to be is stable on > Windows. It still failed on

Re: Add --check option to pgindent

2023-12-19 Thread Daniel Gustafsson
> On 19 Dec 2023, at 14:51, Andrew Dunstan wrote: > > On 2023-12-18 Mo 11:14, Jelte Fennema-Nio wrote: >> On Mon, 18 Dec 2023 at 13:42, Daniel Gustafsson wrote: >>> I think this is pretty much ready to go, the attached v4 squashes the >>> changes >>> and fixes the man-page which also needed an

Re: Add --check option to pgindent

2023-12-19 Thread Andrew Dunstan
On 2023-12-18 Mo 11:14, Jelte Fennema-Nio wrote: On Mon, 18 Dec 2023 at 13:42, Daniel Gustafsson wrote: I think this is pretty much ready to go, the attached v4 squashes the changes and fixes the man-page which also needed an update. The referenced Wiki page will need an edit or two after

Correct the documentation of extension building infrastructure

2023-12-19 Thread Karina Litskevich
Hi hackers, I noticed that the documentation of extension building infrastructure [1] has a paragraph about isolation tests since v12, but they actually can be run since v14 only. Actual isolation tests support for extensions built with PGXS was added in [2] and it was agreed there that it

Re: Synchronizing slots from primary to standby

2023-12-19 Thread Amit Kapila
On Tue, Dec 19, 2023 at 5:17 PM shveta malik wrote: > > On Mon, Dec 18, 2023 at 4:22 PM Amit Kapila wrote: > > > > On Fri, Dec 15, 2023 at 11:03 AM shveta malik > > wrote: > > > > > > Sorry, I missed attaching the patch. PFA v48. > > > > > > > Few comments on v48_0002 > >

RE: Synchronizing slots from primary to standby

2023-12-19 Thread Hayato Kuroda (Fujitsu)
Dear Shveta, I resumed to review the patch. I will play more about it, but I can post some cosmetic comments. walsender.c 01. WalSndWaitForStandbyConfirmation ``` +sleeptime = WalSndComputeSleeptime(GetCurrentTimestamp()); ``` It works well, but I'm not sure whether we should use

Re: pg_waldump

2023-12-19 Thread Matthias van de Meent
On Tue, 19 Dec 2023, 12:27 Fabrice Chapuis, wrote: > > Hi, > Is it possible to visualize the DDL with the pg_waldump tool. I created a > postgres user but I cannot find the creation command in the wals Not really, no. PostgreSQL does not log DDL or DML as such in WAL. Essentially all catalog

Re: logical decoding and replication of sequences, take 2

2023-12-19 Thread Christophe Pettus
Hi, I wanted to hop in here on one particular issue: > On Dec 12, 2023, at 02:01, Tomas Vondra wrote: > - desirability of the feature: Random IDs (UUIDs etc.) are likely a much > better solution for distributed (esp. active-active) systems. But there > are important use cases that are likely to

Allow custom parameters with more than one dot in config files.

2023-12-19 Thread Alexander Kukushkin
Hi hacker, At the moment the only requirement for custom parameter names is that they should have one or more dots. For example: test5=# set a.b.c.d = 1; SET test5=# show a.b.c.d; a.b.c.d - 1 (1 row) But, Postgres fails to start if such parameters are set in the configuration file with

Re:pg_waldump

2023-12-19 Thread Sergei Kornilov
Hello It is something like rmgr: Heaplen (rec/tot):143/ 143, tx:748, lsn: 0/01530AF0, prev 0/01530AB8, desc: INSERT off: 17, flags: 0x00, blkref #0: rel 1664/0/1260 blk 0 just insertion into pg_authid (oid=1260) regards, Sergei

Re: Synchronizing slots from primary to standby

2023-12-19 Thread shveta malik
On Tue, Dec 19, 2023 at 6:58 AM Peter Smith wrote: > > Here are some comments for the patch v49-0002. > Thanks for reviewing. I have addressed these in v50. > (This is in addition to my review comments for v48-0002 [1]) > > == > src/backend/access/transam/xlogrecovery.c > > > 1.

Re: Synchronizing slots from primary to standby

2023-12-19 Thread shveta malik
On Tue, Dec 19, 2023 at 4:51 AM Peter Smith wrote: > > Here are some review comments for v48-0002 > Thanks for reviewing. Most of these are addressed in v50. Please find my comments for the rest. > == > doc/src/sgml/config.sgml > > 1. > + If slot synchronization is enabled then it

Re: Synchronizing slots from primary to standby

2023-12-19 Thread shveta malik
On Mon, Dec 18, 2023 at 4:22 PM Amit Kapila wrote: > > On Fri, Dec 15, 2023 at 11:03 AM shveta malik wrote: > > > > Sorry, I missed attaching the patch. PFA v48. > > > > Few comments on v48_0002 > Thanks for reviewing. These are addressed in v50. Please find my comments

Re: Fixing backslash dot for COPY FROM...CSV

2023-12-19 Thread Daniel Verite
vignesh C wrote: > I noticed that these tests are passing without applying patch too: > +insert into copytest2(test) values('line1'), ('\.'), ('line2'); > +copy (select test from copytest2 order by test collate "C") to :'filename' > csv; > +-- get the data back in with copy > +truncate

pg_waldump

2023-12-19 Thread Fabrice Chapuis
Hi, Is it possible to visualize the DDL with the pg_waldump tool. I created a postgres user but I cannot find the creation command in the wals Thanks for help Fabrice

Re: Improve eviction algorithm in ReorderBuffer

2023-12-19 Thread Amit Kapila
On Tue, Dec 19, 2023 at 8:31 AM Masahiko Sawada wrote: > > On Sun, Dec 17, 2023 at 11:40 AM Amit Kapila wrote: > > > > > > The individual transactions shouldn't cross > > 'logical_decoding_work_mem'. I got a bit confused by your proposal to > > maintain the lists: "...splitting it into two

Re: Add new for_each macros for iterating over a List that do not require ListCell pointer

2023-12-19 Thread vignesh C
On Mon, 18 Dec 2023 at 19:00, Jelte Fennema-Nio wrote: > > The more I think about it and look at the code, the more I like the > usage of the loop style proposed in the previous 0003 patch (which > automatically declares a loop variable for the scope of the loop using > a second for loop). > > I

Re: Transaction timeout

2023-12-19 Thread Andrey M. Borodin
> On 19 Dec 2023, at 13:26, Andrey M. Borodin wrote: > > I don’t have Windows machine, so I hope CF bot will pick this. I used Github CI to produce version of tests that seems to be is stable on Windows. Sorry for the noise. Best regards, Andrey Borodin.

Re: Simplify newNode()

2023-12-19 Thread Heikki Linnakangas
On 18/12/2023 16:28, Heikki Linnakangas wrote: I think we have consensus on patch v2. It's simpler and not less performant than what we have now, at least on modern compilers. Barring objections, I'll commit that. Committed that. -- Heikki Linnakangas Neon (https://neon.tech)

Re: [DOC] Introducing Quick Start Guide to PL/pgSQL and PL/Python Documentation

2023-12-19 Thread Ishaan Adarsh
I've addressed the points you raised: 1. *Missing `` Tag:* I reviewed the "Create the Makefile" section, and it seems that tags are appropriately used for filenames. If there's a specific instance where you observed a missing tag, please provide more details, and I'll ensure it's addressed. 2.

Re: Add isCatalogRel in rmgrdesc

2023-12-19 Thread Drouvot, Bertrand
Hi, On 12/19/23 9:00 AM, Masahiko Sawada wrote: On Tue, Dec 12, 2023 at 6:15 PM Michael Paquier wrote: On Tue, Dec 12, 2023 at 09:23:46AM +0100, Drouvot, Bertrand wrote: Please find attached a patch to add this field in the related rmgrdesc (i.e all the ones that already provide the

Re: Change GUC hashtable to use simplehash?

2023-12-19 Thread John Naylor
On Tue, Dec 19, 2023 at 2:32 PM Jeff Davis wrote: > > On Mon, 2023-12-18 at 13:39 +0700, John Naylor wrote: > > For now just two: > > v10-0002 is Jeff's change to the search path cache, but with the > > chunked interface that I found to be faster. > > Did you consider specializing for the case of

Re: Fixing backslash dot for COPY FROM...CSV

2023-12-19 Thread vignesh C
On Tue, 19 Dec 2023 at 02:06, Daniel Verite wrote: > > Hi, > > PFA a patch that attempts to fix the bug that \. on a line > by itself is handled incorrectly by COPY FROM ... CSV. > This issue has been discussed several times previously, > for instance in [1] and [2], and mentioned in the > doc

Re: Transaction timeout

2023-12-19 Thread Andrey M. Borodin
> On 19 Dec 2023, at 06:25, Japin Li wrote: > > On Windows, there still have an error: Uhhmm, yes. Connection termination looks different on windows machine. I’ve checked how this looks in relication slot tests and removed select that was observing connection failure. I don’t have Windows

Re: Add isCatalogRel in rmgrdesc

2023-12-19 Thread Masahiko Sawada
On Tue, Dec 12, 2023 at 6:15 PM Michael Paquier wrote: > > On Tue, Dec 12, 2023 at 09:23:46AM +0100, Drouvot, Bertrand wrote: > > Please find attached a patch to add this field in the related rmgrdesc (i.e > > all the ones that already provide the snapshotConflictHorizon except the one > >