Re: Trigger more frequent autovacuums of heavy insert tables

2025-02-06 Thread Japin Li
On Thu, 06 Feb 2025 at 10:42, Melanie Plageman wrote: > Attached v6 is rebased over 306dc520b9dfd60 > > On Wed, Feb 5, 2025 at 8:54 PM wenhui qiu wrote: >> >> Hi Melanie Plageman >>Thank you for working on this ,Actually, there were two patches >> aimed at optimizing vacuum-triggered process

Re: Fix assert failure when decoding XLOG_PARAMETER_CHANGE on primary

2025-02-06 Thread Bertrand Drouvot
Hi, On Fri, Feb 07, 2025 at 11:00:39AM +0530, Amit Kapila wrote: > On Fri, Feb 7, 2025 at 12:11 AM Masahiko Sawada wrote: > > > > On Wed, Feb 5, 2025 at 10:17 PM Amit Kapila wrote: > > > > > > On Thu, Feb 6, 2025 at 12:30 AM Masahiko Sawada > > > wrote: > > > > > > > > I've updated the patch a

Re: Better visualization of default values

2025-02-06 Thread Vladlen Popolitov
Marcos Pegoraro писал(а) 2025-02-06 04:07: Reading DOCs sometimes is boring because you want to know only the default value of something. I know what that GUC is, I know how to change it, I only don't remember what its default value is. Then you have to read that entire paragraph just to read tha

Re: Avoid updating inactive_since for invalid replication slots

2025-02-06 Thread Peter Smith
On Wed, Feb 5, 2025 at 2:29 PM Amit Kapila wrote: > > On Wed, Feb 5, 2025 at 5:53 AM Peter Smith wrote: > > > > Some review comments for v2-0001. > > > > == > > doc/src/sgml/system-views.sgml > > > > 1. > > The time when the slot became inactive. NULL if the slot is currently > > being stream

[PATCH] Fix Potential Memory Leak in pg_amcheck Code

2025-02-06 Thread Saladin
Dear pgsql-hackers, While reviewing the code of pg_amcheck, I discovered a potential issue that could lead to a memory leak. Specifically, there is a missing PQclear(result) call before the database connection is disconnected, which could leave the query result unfreed. To resolve this,

Re: Fix for a crash caused by triggers in cross-partition updates

2025-02-06 Thread Michael Paquier
On Fri, Feb 07, 2025 at 03:02:38PM +0900, Kyotaro Horiguchi wrote: > We received a crash report related to cross-partition updates > involving multiple triggers. > > After investigating the situation, we found that the crash occurs by > the following steps in PostgreSQL versions 11 through 14 (We

Re: Trigger more frequent autovacuums of heavy insert tables

2025-02-06 Thread wenhui qiu
Hi > We could add autovacuum_vacuum_insert_max_threshold, but with an > insert-only workload, we can expect that the cold data is being > frozen. By calculating the threshold based on unfrozen data, we are > effectively capping the threshold for inserted data without adding > another guc. If an

DOCS - inactive_since field readability

2025-02-06 Thread Peter Smith
Hi hackers. This thread proposes to improve the readability of the 'inactive_since' field description (see pg_replication_slots system view). No changes to any facts, just the wording. The current description looks like this: -- The time when the slot became inactive. NULL if the slot is cur

Re: Statistics Import and Export

2025-02-06 Thread Michael Paquier
On Wed, Feb 05, 2025 at 08:45:06PM -0800, Jeff Davis wrote: > v45-0001 addresses this by locking both the partitioned index, as well > as its table, in ShareUpdateExclusive mode. That satisfies the in-place > update requirement to take a ShareUpdateExclusiveLock on the > partitioned index, while ot

Fix for a crash caused by triggers in cross-partition updates

2025-02-06 Thread Kyotaro Horiguchi
Hello. We received a crash report related to cross-partition updates involving multiple triggers. After investigating the situation, we found that the crash occurs by the following steps in PostgreSQL versions 11 through 14 (We have not checked versions 10 and earlier.): create table tp(a int) p

Re: SLRU_PAGES_PER_SEGMENT as configure parameter

2025-02-06 Thread Daniil Davydov
On Thu, Feb 6, 2025 at 8:23 PM Daniel Gustafsson wrote: > > You should include the configure.ac changes and not just the generated code in > configure (which is fine to include for review, but the committer will > re-generate it regardless). Please also include the corresponding Meson > change >

Re: Introduce XID age and inactive timeout based replication slot invalidation

2025-02-06 Thread Amit Kapila
On Fri, Feb 7, 2025 at 8:00 AM Peter Smith wrote: > > == > src/backend/access/transam/xlog.c > > 1. > XLByteToSeg(RedoRecPtr, _logSegNo, wal_segment_size); > KeepLogSeg(recptr, &_logSegNo); > - if (InvalidateObsoleteReplicationSlots(RS_INVAL_WAL_REMOVED, > + if (InvalidateObsoleteReplicati

Re: Conflict detection for update_deleted in logical replication

2025-02-06 Thread Amit Kapila
On Fri, Feb 7, 2025 at 2:18 AM Masahiko Sawada wrote: > > I'd like to confirm what users would expect of this > max_conflict_retention_duration option and it works as expected. IIUC > users would want to use this option when they want to balance between > the reliable update_deleted conflict detec

Re: Fix assert failure when decoding XLOG_PARAMETER_CHANGE on primary

2025-02-06 Thread Amit Kapila
On Fri, Feb 7, 2025 at 12:11 AM Masahiko Sawada wrote: > > On Wed, Feb 5, 2025 at 10:17 PM Amit Kapila wrote: > > > > On Thu, Feb 6, 2025 at 12:30 AM Masahiko Sawada > > wrote: > > > > > > I've updated the patch accordingly. > > > > > > > Today, again thinking about the proposed fix, I was wond

Re: Add isolation test template in injection_points for wait/wakeup/detach

2025-02-06 Thread Michael Paquier
On Wed, Feb 05, 2025 at 11:03:25AM +, Bertrand Drouvot wrote: > I think that makes sense and the patch LGTM. > A few tests are already using this technique (including injection_points in > inplace.spec). Well, that's not the end of the story, I have brushed the CF bot for some activity and not

Re: Document NULL

2025-02-06 Thread David G. Johnston
On Thursday, February 6, 2025, jian he wrote: > On Fri, Jan 17, 2025 at 6:41 AM David G. Johnston > wrote: > > > > Yeah, I did spell check but not a grammar check. These weren't spelling > errors though. Anyway, good point running the resultant web page through > chatgpt or grammar-aware progr

Re: Introduce XID age and inactive timeout based replication slot invalidation

2025-02-06 Thread Peter Smith
Hi Nisha, Some review comments for v71-0001. == src/backend/access/transam/xlog.c 1. XLByteToSeg(RedoRecPtr, _logSegNo, wal_segment_size); KeepLogSeg(recptr, &_logSegNo); - if (InvalidateObsoleteReplicationSlots(RS_INVAL_WAL_REMOVED, + if (InvalidateObsoleteReplicationSlots(RS_INVAL_WAL_

Re: Document NULL

2025-02-06 Thread jian he
On Fri, Jan 17, 2025 at 6:41 AM David G. Johnston wrote: > > Yeah, I did spell check but not a grammar check. These weren't spelling > errors though. Anyway, good point running the resultant web page through > chatgpt or grammar-aware program. > > I still need to put together the example chang

RE: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-02-06 Thread Hayato Kuroda (Fujitsu)
Dear Shubham, Thanks for updating the patch. Previously you told that you had a plan to extend the patch to drop other replication objects [1], but I think it is not needed. pg_createsubscriber has already been able to drop the existing subscrisubscriptions in check_and_drop_existing_subscripti

Re: Show WAL write and fsync stats in pg_stat_io

2025-02-06 Thread Michael Paquier
On Thu, Feb 06, 2025 at 03:39:05PM +0300, Nazir Bilal Yavuz wrote: > My vote goes to 029. It already has the '## check checkpoint and wal > stats are incremented due to restart' part and what we are adding is > similar to that. Okay, sold, with a routine grabbing some stats from pg_stat_io based o

FSM doesn't recover after zeroing damaged page.

2025-02-06 Thread Anton A. Melnikov
Hi! At the current master i found that if not the last page of the FSM bottom layer was corrupted it is not restored after zeroing. Here is reproduction like that: 1) Create a table with FSM of 4 pages: create table t (int) as select * from generate_series(1, 1E6); delete from t where ctid in (s

Re: Should we allow ALTER OPERATOR CLASS to ADD/DROP operators and procedures?

2025-02-06 Thread Tom Lane
Tomas Vondra writes: > Which is why PostGIS devs chose a different path - updating the catalogs > to modify the opclass definition [3], using this script [4]. > That's a bit ... terrifying. Indeed. Did it not occur to them to use ALTER OPERATOR FAMILY? The end result of doing so is that the ad

Should we allow ALTER OPERATOR CLASS to ADD/DROP operators and procedures?

2025-02-06 Thread Tomas Vondra
Hi, At the moment we allow ALTER OPERATOR FAMILY to add/drop almost any part of the family, while ALTER OPERATOR CLASS allows changing only the name, owner and schema. The ALTER OPERATOR FAMILY docs [1] explain that this is because the elements included in operator family are loose/optional, and

Re: connection establishment versus parallel workers

2025-02-06 Thread Thomas Munro
On Mon, Jan 20, 2025 at 6:33 PM Thomas Munro wrote: > Here's the WIP code I have up with for that so far. > > Remaining opportunities not attempted: > 1. When a child exits, we could use a hash table to find it by pid. > 2. When looking for a bgworker slot that is not in use, we could do > somet

Re: Get rid of WALBufMappingLock

2025-02-06 Thread Alexander Korotkov
Hi! On Sun, Jan 19, 2025 at 2:11 AM Yura Sokolov wrote: > > During discussion of Increasing NUM_XLOGINSERT_LOCKS [1], Andres Freund > used benchmark which creates WAL records very intensively. While I this > it is not completely fair (1MB log records are really rare), it pushed > me to analyze wr

Re: Test to dump and restore objects left behind by regression

2025-02-06 Thread Michael Paquier
On Thu, Feb 06, 2025 at 10:43:56AM +0100, Alvaro Herrera wrote: > Great, I've looked at doing something like this in the libpq_pipeline > test for better diff reporting -- what I have uses Test::Differences, > which is pretty neat and usable, but it's not part of the standard > installed perl modul

Tests for extended MCV stats compatibility with multi-filter conditions on a single column

2025-02-06 Thread Ilia Evdokimov
Hi hackers, When a query uses multiple filters on a single column in the WHERE clause, and extended mcv statistics are applied on the column, the optimizer should take each clause into account when estimating selectivity. For example, this could be (A = 0 OR A = 1), (A BETWEEN 0 AND 5), or (A

Re: Docs for pg_basebackup needs v17 note for incremental backup

2025-02-06 Thread Daniel Gustafsson
> On 6 Feb 2025, at 15:43, David G. Johnston wrote: > On Thursday, February 6, 2025, Andrew Dunstan wrote: > > People get busy. For example, many prominent hackers spent most of the last > > week at various conferences. There are also > > other things happening less > > publicly that are claim

Re: Better visualization of default values

2025-02-06 Thread Peter Smith
On Thu, Feb 6, 2025 at 10:46 PM Marcos Pegoraro wrote: > > I agree that duplicating default values is not fine, I can remove them from > the explanation and put it only near definition. > > But about adding a new line with its default value, sometimes is fine, > sometimes not. > [1] is a good ex

Re: outdated comment in table_tuple_update definition

2025-02-06 Thread Daniel Gustafsson
> On 6 Feb 2025, at 20:00, Sergei Kornilov wrote: > I found that the parameter type was changed by commit 19d8e23 (Ignore BRIN > indexes when checking for HOT updates), but the comment was not updated. > Looks like oversight. I agree with your analysis, unless objected to I'll apply the attach

Re: "Type does not exist" error when returning array of type in non-public schema

2025-02-06 Thread David G. Johnston
On Thursday, February 6, 2025, Chris Cleveland wrote: > I solved the problem with: > > CREATE FUNCTION myfunc ... RETURNS Token[] ... SET search_path to rdb; > > I still don't know why it happens in the first place, though. > Because you are in the habit of not schema-qualifying object reference

Re: Prevent COPY FREEZE on Foreign tables

2025-02-06 Thread Nathan Bossart
On Thu, Feb 06, 2025 at 10:26:09AM -0600, Sami Imseih wrote: > That makes sense. Thanks! Committed. -- nathan

Re: "Type does not exist" error when returning array of type in non-public schema

2025-02-06 Thread Chapman Flack
On 02/06/25 16:06, Chris Cleveland wrote: > I solved the problem with: > > CREATE FUNCTION myfunc ... RETURNS Token[] ... SET search_path to rdb; > > I still don't know why it happens in the first place, though. That pretty much nails down that the type name appears somewhere in the quoted-liter

Re: "Type does not exist" error when returning array of type in non-public schema

2025-02-06 Thread Chris Cleveland
I solved the problem with: CREATE FUNCTION myfunc ... RETURNS Token[] ... SET search_path to rdb; I still don't know why it happens in the first place, though. On Thu, Feb 6, 2025 at 12:14 PM Tom Lane wrote: > "David G. Johnston" writes: > > On Thu, Feb 6, 2025 at 9:47 AM Chris Cleveland < >

Re: Using Expanded Objects other than Arrays from plpgsql

2025-02-06 Thread Tom Lane
Andrey Borodin writes: > I've found 1 users on Github [0]. And a lot of copied code like [1]. And > there might be some unindexed cases. > Let's keep paramarg2. Yeah, sounds like the best path if there are already outside users of paramarg. Do you have any further comments on this patch?

Re: Improving tracking/processing of buildfarm test failures

2025-02-06 Thread Alexander Lakhin
Hello Kuroda-san, 06.02.2025 10:55, Hayato Kuroda (Fujitsu) wrote: Dear hackers, I hope I'm on the correct thread. If not, please let me know. I found a BF failure, which may be a long-standing test issue. If so, I want you to update the Wiki page. Thank you for attention to the failure! I'v

Re: Conflict detection for update_deleted in logical replication

2025-02-06 Thread Masahiko Sawada
On Tue, Feb 4, 2025 at 10:30 PM Amit Kapila wrote: > > On Wed, Feb 5, 2025 at 6:00 AM Masahiko Sawada wrote: > > > > On Fri, Jan 31, 2025 at 9:07 PM Amit Kapila wrote: > > > > > > > > > > > I was not sure of the point of > > > > making the max_conflict_retention_duration a per-subscription > > >

Re: Optimization for lower(), upper(), casefold() functions.

2025-02-06 Thread Alexander Borisov
06.02.2025 22:08, Jeff Davis пишет: On Thu, 2025-02-06 at 18:39 +0300, Alexander Borisov wrote: Since I started to improve Unicode Case, I used the same approach, essentially a binary search, only not by individual values, but by ranges. I considered it a 4th approach because of the generated

Re: Better visualization of default values

2025-02-06 Thread Marcos Pegoraro
Em qui., 6 de fev. de 2025 às 12:32, Greg Sabino Mullane escreveu: > That seems a somewhat arbitrary goal for us to optimize for. > well, my goal was to standardize these values. As examples of non standardization you have ... "The default is typically 100 connections". Tipically ? Is it 100 or

Re: Optimization for lower(), upper(), casefold() functions.

2025-02-06 Thread Jeff Davis
On Thu, 2025-02-06 at 18:39 +0300, Alexander Borisov wrote: > Since I started to improve Unicode Case, I used the same approach, > essentially a binary search, only not by individual values, but by > ranges. I considered it a 4th approach because of the generated branches in case_index(). Case_ind

outdated comment in table_tuple_update definition

2025-02-06 Thread Sergei Kornilov
Hello I noticed that the comment for the table_tuple_update function (src/include/access/tableam.h) describes the update_indexes parameter as boolean: * update_indexes - in success cases this is set to true if new index entries * are required for this tuple Although this param

Re: Fix assert failure when decoding XLOG_PARAMETER_CHANGE on primary

2025-02-06 Thread Masahiko Sawada
On Wed, Feb 5, 2025 at 10:17 PM Amit Kapila wrote: > > On Thu, Feb 6, 2025 at 12:30 AM Masahiko Sawada wrote: > > > > I've updated the patch accordingly. > > > > Today, again thinking about the proposed fix, I was wondering about > the following case. Say, on hot_standby, the user created a logic

Re: new commitfest transition guidance

2025-02-06 Thread Tom Lane
Jacob Brazeal writes: > What if we automatically move any patches to the current commitfest if new > patch attachments are sent to the corresponding message thread? Heck, > perhaps if there are any new messages *at all* in the message thread, and > the commitfest entry has not been closed already,

Re: "Type does not exist" error when returning array of type in non-public schema

2025-02-06 Thread Tom Lane
"David G. Johnston" writes: > On Thu, Feb 6, 2025 at 9:47 AM Chris Cleveland > wrote: >> RETURN "rdb.Token"[], RETURN "rdb.Token[]" all fail. > Expecting these two to work suggests you need to re-read the section on how > quoting identifiers works. I'm wondering if it needs to be "Token". Mixe

Re: Confine vacuum skip logic to lazy_scan_skip

2025-02-06 Thread Melanie Plageman
On Wed, Feb 5, 2025 at 5:26 PM Melanie Plageman wrote: > > Yes, looking at these results, I also feel good about it. I've updated > the commit metadata in attached v14, but I could use a round of review > before pushing it. I've done a bit of self-review and updated these patches. - Melanie From

Re: new commitfest transition guidance

2025-02-06 Thread Jacob Brazeal
> > > That's not entirely true. CFBot never runs on patches that are only in > closed commitfests. > > Ofcourse the CFBot could be changed to > behave differently, but then the question becomes how should it behave > then? When do we want to stop running CFBot on patches? > > Related: What do we

Re: new commitfest transition guidance

2025-02-06 Thread Jeff Davis
On Wed, 2025-02-05 at 19:14 -0500, Peter Geoghegan wrote: > I just don't think that this new policy makes sense. At least not as > implemented. Perhaps the answer is to go in the other direction, and the CF app would just be a patch tracker without specific start and stop dates (aside from a few d

Re: "Type does not exist" error when returning array of type in non-public schema

2025-02-06 Thread Chapman Flack
Hi, On 02/06/25 11:46, Chris Cleveland wrote: > I'm developing a Postgres extension that gets installed in its own schema, > "rdb". It creates its own type, "token", and has a function that returns an > array of that type. When I SELECT the function in psql, I get an ERROR: > type "token" does not

Re: "Type does not exist" error when returning array of type in non-public schema

2025-02-06 Thread David G. Johnston
On Thu, Feb 6, 2025 at 9:47 AM Chris Cleveland wrote: > I'm developing a Postgres extension that gets installed in its own schema, > "rdb". It creates its own type, "token", and has a function that returns > an array of that type. When I SELECT the function in psql, I get an ERROR: > type "token"

"Type does not exist" error when returning array of type in non-public schema

2025-02-06 Thread Chris Cleveland
I'm developing a Postgres extension that gets installed in its own schema, "rdb". It creates its own type, "token", and has a function that returns an array of that type. When I SELECT the function in psql, I get an ERROR: type "token" does not exist It's a search_path problem. If I call SET searc

Re: [PATCH] SVE popcount support

2025-02-06 Thread Nathan Bossart
On Thu, Feb 06, 2025 at 08:44:35AM +, chiranmoy.bhattacha...@fujitsu.com wrote: >> Does this hand-rolled loop unrolling offer any particular advantage? What >> do the numbers look like if we don't do this or if we process, say, 4 >> vectors at a time? > > The unrolled version performs better

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-02-06 Thread Alvaro Herrera
Hello Rushabh, On 2025-Feb-06, Rushabh Lathia wrote: > Commit 14e87ffa5c543b5f30ead7413084c25f7735039f > > added the support for named NOT NULL constraints. We can now support > the NOT VALID/VALID named NOT

Re: Prevent COPY FREEZE on Foreign tables

2025-02-06 Thread Sami Imseih
> Given we don't have any other reports or opinions, I'm probably just going > to apply the patch to v18. That makes sense. Thanks! Sami

Re: Prevent COPY FREEZE on Foreign tables

2025-02-06 Thread Nathan Bossart
On Wed, Feb 05, 2025 at 01:36:57PM -0600, Sami Imseih wrote: >> so the only reason I can see >> for not back-patching it is that it could lead to somewhat widespread >> breakage for existing scripts, etc. which are arguably kind-of working >> today. > > That is my thought for not backpatching. It'

Re: Trigger more frequent autovacuums of heavy insert tables

2025-02-06 Thread Melanie Plageman
Attached v6 is rebased over 306dc520b9dfd60 On Wed, Feb 5, 2025 at 8:54 PM wenhui qiu wrote: > > Hi Melanie Plageman >Thank you for working on this ,Actually, there were two patches aimed at > optimizing vacuum-triggered processes, and one of them reached a consensus > and has been committe

Re: Remove unnecessary static specifier

2025-02-06 Thread Daniel Gustafsson
> On 6 Feb 2025, at 02:51, Japin Li wrote: > > On Wed, 05 Feb 2025 at 18:17, Daniel Gustafsson wrote: >>> On 5 Feb 2025, at 17:05, Tom Lane wrote: >> >>> While we're at it, could we make the adjacent "magic" string be >>> "static const char *magic"? (Probably needs a couple more >>> "const" m

Re: Optimization for lower(), upper(), casefold() functions.

2025-02-06 Thread Alexander Borisov
Hi Jeff, 06.02.2025 00:46, Jeff Davis пишет: On Tue, 2025-02-04 at 23:19 +0300, Alexander Borisov wrote: I've done many different experiments and everywhere the result is within the margin of the v2 patch result. Great, thank you for working on this! There doesn't appear to be a downside. Ev

Re: Better visualization of default values

2025-02-06 Thread David G. Johnston
On Thu, Feb 6, 2025 at 4:46 AM Marcos Pegoraro wrote: > Objective here is to those ones who know what it is, but don't > remember its default. > My approach would be to add a summary table (or tables) in the first subsection of each major X.Y (section X.Y.1) that lists the name, brief descriptio

Re: Better visualization of default values

2025-02-06 Thread Greg Sabino Mullane
On Thu, Feb 6, 2025 at 6:46 AM Marcos Pegoraro wrote: > And obviously, if you don't know the purpose of that GUC, you'll have to > read the entire paragraph to understand it. > Objective here is to those ones who know what it is, but don't > remember its default. > That seems a somewhat arbitrar

Re: Buffer overflow in zic

2025-02-06 Thread Tom Lane
Evgeniy Gorbanyov writes: > Ifyou compilezicwithASAN,you cangetthe following(notethiswill > delete/etc/localtime): > |$ sudo ./zic -l fff zic is not our code. Please take this up with the upstream IANA list t...@iana.org. (They might want to see a reproducer against their current code ... we'r

Re: Prevent COPY FREEZE on Foreign tables

2025-02-06 Thread Zhang Mingli
On Feb 6, 2025 at 03:27 +0800, Sami Imseih , wrote: > > Yeah, I'd rather error out than expect users to respond to warnings to the > > effect of "hey, you told us to do something, but we did something else that > > isn't what you asked us to do." That both retains the broken feature and > > adds mo

Re: Improve documentation regarding custom settings, placeholders, and the administrative functions

2025-02-06 Thread Zhang Mingli
On Feb 6, 2025 at 10:49 +0800, David G. Johnston , wrote: > > Yes, and when it does it is doing so in lieu of an error, and thus it is not > returning the value of the setting.  It does not mean the value taken on by > the named parameter is NULL, which is not possible. i.e., SHOW will never >

Re: SQL Property Graph Queries (SQL/PGQ)

2025-02-06 Thread Junwang Zhao
Hi Ashutosh, On Tue, Jan 28, 2025 at 6:17 PM Ashutosh Bapat wrote: > > On Fri, Jan 24, 2025 at 9:16 PM Junwang Zhao wrote: > > > > I figured out it's because I have `-DWRITE_READ_PARSE_PLAN_TREES` this > > option, > > removing this option clears the warning, but I'm not sure if this is a > > hi

Re: Re: proposal: schema variables

2025-02-06 Thread jian he
hi. git diff --check shows there is some white space there. Adding hack mailing list discussion links in each patch would be great. Others said that the first 6 patches are essential, maybe we can only post the first 6 patches. so the test CI result would be more reliable. also people would not f

Re: Docs for pg_basebackup needs v17 note for incremental backup

2025-02-06 Thread David G. Johnston
On Thursday, February 6, 2025, Andrew Dunstan wrote: > On 2025-02-05 We 7:59 PM, David G. Johnston wrote > > > People get busy. For example, many prominent hackers spent most of the > last week at various conferences. There are also other things happening > less publicly that are claiming people'

Re: Introduce XID age and inactive timeout based replication slot invalidation

2025-02-06 Thread vignesh C
On Thu, 6 Feb 2025 at 16:08, Nisha Moond wrote: > Here are the v71 patches with the above comments incorporated. Few comments: 1) While changing the switch to an if condition, the behavior of the break statement has changed. Previously, it would exit the switch, but now it exits the main for loop

Re: SLRU_PAGES_PER_SEGMENT as configure parameter

2025-02-06 Thread Daniel Gustafsson
> On 6 Feb 2025, at 11:53, Daniil Davydov <3daniss...@gmail.com> wrote: > The constant SLRU_PAGES_PER_SEGMENT defines the size of the SLRU > segments. It is currently hardcoded in slru.h. It would be nice to be > able to set this parameter during configuration (for example, by > analogy with --wit

Re: Docs for pg_basebackup needs v17 note for incremental backup

2025-02-06 Thread Andrew Dunstan
On 2025-02-05 We 7:59 PM, David G. Johnston wrote: Is there seriously not a single person in the past three weeks who has seen this and not had the minute to spare to say "yes, this should be documented"? David J. On Mon, Jan 13, 2025 at 8:13 PM David G. Johnston wrote: Hackers,

Re: Virtual generated columns

2025-02-06 Thread vignesh C
On Wed, 5 Feb 2025 at 04:06, Peter Eisentraut wrote: > > On 27.01.25 13:42, Dean Rasheed wrote: > > On Mon, 27 Jan 2025 at 09:59, Peter Eisentraut wrote: > >> > >> Here is an updated patch that integrates the above changes and also > >> makes some adjustments now that the logical replication conf

Re: new commitfest transition guidance

2025-02-06 Thread Jelte Fennema-Nio
On Thu, 6 Feb 2025 at 01:29, Tom Lane wrote: > > Peter Geoghegan writes: > > Evidently this new policy is why my skip scan patch series wasn't > > being tested by CI. > > Well no, the reason CI wasn't testing anything was the cfbot was > broken. See nearby "CFBot is broken" thread. That's not e

Re: Proposal to CREATE FOREIGN TABLE LIKE

2025-02-06 Thread Zhang Mingli
On Feb 6, 2025 at 18:31 +0800, Álvaro Herrera , wrote: > > Ah, but our fine manual already says > > The LIKE clause can also be used to copy column definitions from views, > foreign tables, or composite types. Inapplicable options (e.g., > INCLUDING INDEXES from a view) are ignored. > > so what you

Re: Show WAL write and fsync stats in pg_stat_io

2025-02-06 Thread Nazir Bilal Yavuz
Hi, On Thu, 6 Feb 2025 at 11:39, Michael Paquier wrote: > > On Thu, Feb 06, 2025 at 07:32:01AM +, Bertrand Drouvot wrote: > > That sounds ok, but I wonder if that's the best appropriate place. I could > > think of the checkpointer test in 029_stats_restart.pl and the > > startup/standby > >

Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-02-06 Thread Rushabh Lathia
Hi, Commit 14e87ffa5c543b5f30ead7413084c25f7735039f added the support for named NOT NULL constraints. We can now support the NOT VALID/VALID named NOT NULL constraints. This patch supports the NOT VALID and V

Re: Show WAL write and fsync stats in pg_stat_io

2025-02-06 Thread Nazir Bilal Yavuz
Hi, On Wed, 5 Feb 2025 at 08:30, Michael Paquier wrote: > > Please note that I have marked the CF entry at [1] as committed as the > main goal of this thread has been achieved. Do you want to pursue the > topic about the potential refactorings in pgstat_tracks_io_op() and > pgstat_tracks_io_obje

Re: Make COPY format extendable: Extract COPY TO format implementations

2025-02-06 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Wed, 5 Feb 2025 12:29:44 -0800, Masahiko Sawada wrote: >> It seems that >> FmgrInfo doesn't have return value type information. Should >> we read pg_catalog.pg_proc or something for it? > > Yes, we can do

Re: Remove useless casts to (char *)

2025-02-06 Thread Dagfinn Ilmari Mannsåker
Hi Peter, I have only skimmed the patches, but one hunk jumped out at me: Peter Eisentraut writes: > diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c > index 1bf27d93cfa..937a2b02a4f 100644 > --- a/src/backend/libpq/pqcomm.c > +++ b/src/backend/libpq/pqcomm.c > @@ -1368,7 +1

Re: Better visualization of default values

2025-02-06 Thread Marcos Pegoraro
I agree that duplicating default values is not fine, I can remove them from the explanation and put it only near definition. But about adding a new line with its default value, sometimes is fine, sometimes not. [1] is a good example which would be fine but the next ones cpu_tuple_cost, cpu_index_t

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-02-06 Thread Shubham Khanna
On Tue, Feb 4, 2025 at 5:39 PM Shlok Kyal wrote: > > On Wed, 29 Jan 2025 at 15:14, Shubham Khanna > wrote: > > > > On Wed, Jan 29, 2025 at 10:42 AM Hayato Kuroda (Fujitsu) > > wrote: > > > > > > Dear Shubham, > > > > > > > I propose adding the --clean-publisher-objects option to the > > > > pg_c

Re: Avoid possible deference NULL pointer (src/backend/optimizer/path/allpaths.c)

2025-02-06 Thread Ranier Vilela
Em qua., 5 de fev. de 2025 às 15:56, Tom Lane escreveu: > So I don't > find it to be an improvement. > Ok, I'm withdrawing this patch. Thanks to everyone who contributed to the thread. best regards, Ranier Vilela

Add missing tab completion for VACUUM and ANALYZE with ONLY option

2025-02-06 Thread Umar Hayat
Hi, Recently the ONLY option is introduced [1] for VACUUM and ANALYZE commands. Attach provides improved tab completion for this new option for both commands. Along with this also added starting parenthesis "(" auto-complete as multiple existing commands provide it and it makes it easier to separa

SLRU_PAGES_PER_SEGMENT as configure parameter

2025-02-06 Thread Daniil Davydov
Hi, The constant SLRU_PAGES_PER_SEGMENT defines the size of the SLRU segments. It is currently hardcoded in slru.h. It would be nice to be able to set this parameter during configuration (for example, by analogy with --with-segsize-blocks). What will it give us: 1) The ability to test pg_upgrade mo

Re: Introduce XID age and inactive timeout based replication slot invalidation

2025-02-06 Thread Nisha Moond
On Thu, Feb 6, 2025 at 10:17 AM Amit Kapila wrote: > > On Thu, Feb 6, 2025 at 8:02 AM Nisha Moond wrote: > > > > On Wed, Feb 5, 2025 at 2:42 PM Amit Kapila wrote: > > > > > > Would it address your concern if we write the actual idle duration > > > (now - inactive_since) instead of directly using

Re: Proposal to CREATE FOREIGN TABLE LIKE

2025-02-06 Thread Álvaro Herrera
On 2025-Feb-06, Álvaro Herrera wrote: > On 2025-Feb-06, Zhang Mingli wrote: > > > Added support for CREATE FOREIGN TABLE LIKE to enable the creation of > > foreign tables based on the column definitions, constraints of > > existing source tables. > > This feature mirrors the behavior of CREATE TA

Re: Proposal to CREATE FOREIGN TABLE LIKE

2025-02-06 Thread Álvaro Herrera
On 2025-Feb-06, Zhang Mingli wrote: > Added support for CREATE FOREIGN TABLE LIKE to enable the creation of > foreign tables based on the column definitions, constraints of > existing source tables. > This feature mirrors the behavior of CREATE TABLE LIKE, but ignores > inapplicable options such a

Re: per backend WAL statistics

2025-02-06 Thread Bertrand Drouvot
Hi, On Thu, Feb 06, 2025 at 10:38:55AM +0900, Michael Paquier wrote: > On Wed, Feb 05, 2025 at 02:28:08PM +, Bertrand Drouvot wrote: > > Agree, I'll start a dedicated thread for that. > > Thanks. Done in [1]. [1]: https://www.postgresql.org/message-id/flat/Z6SOha5YFFgvpwQY%40ip-10-97-1-34.

Move wal_buffers_full to WalUsage (and report it in pgss/explain)

2025-02-06 Thread Bertrand Drouvot
Hi hackers, While working on per-backend WAL statistics ([1]) it has been discussed to move wal_buffers_full to WalUsage (It's currently tracked in PgStat_PendingWalStats). There is some benefits doing so: - Simplifies [1] - Adds the ability to report it in pg_stat_statements (among wal_records

Re: Modern SHA2- based password hashes for pgcrypto

2025-02-06 Thread Alvaro Herrera
On 2025-Jan-28, Bernd Helmle wrote: > Python's passlib is very strict when it comes to supported characters > within a salt string. It rejects everything thats not matching '[./0- > 9A-Za-z]'. So when you provide the example above you get The reason it uses these chars is that in their scheme the

Re: Proposal to CREATE FOREIGN TABLE LIKE

2025-02-06 Thread Zhang Mingli
On Feb 3, 2025 at 08:29 +0800, Michael Paquier , wrote: > On Mon, Feb 03, 2025 at 06:22:13AM +0800, Mingli Zhang wrote: > > Yes, I would like to provide a patch. > > > > Glad to see we have come to an agreement on this. > > Just adding my +1 here. FWIW. Hi, Patch added. Added support for CREATE F

Re: Test to dump and restore objects left behind by regression

2025-02-06 Thread Alvaro Herrera
On 2025-Feb-06, Michael Paquier wrote: > On Wed, Feb 05, 2025 at 03:28:04PM +0900, Michael Paquier wrote: > > Hmm. I was reading through the patch and there is something that > > clearly stands out IMO: the new compare_dumps(). It is in Utils.pm, > > and it acts as a wrapper of `diff` with its f

Re: Statistics Import and Export

2025-02-06 Thread Corey Huinker
> > > This thread got slightly mixed up, so I'm replying to the v45-0001 > posted here, and also in response to Michael's and Corey's comments > from: > > https://www.postgresql.org/message-id/Z5H0iRaJc1wnDVLE%40paquier.xyz Thanks. > > which makes sense to me. The v45-0001 patch itself could us

Re: [PATCH] SVE popcount support

2025-02-06 Thread chiranmoy.bhattacha...@fujitsu.com
> Hm. These results are so similar that I'm tempted to suggest we just > remove the section of code dedicated to alignment. Is there any reason not > to do that? It seems that the double load overhead from unaligned memory access isn’t too taxing, even on larger inputs. We can remove it to simpl

RE: Improving tracking/processing of buildfarm test failures

2025-02-06 Thread Hayato Kuroda (Fujitsu)
Dear hackers, I hope I'm on the correct thread. If not, please let me know. I found a BF failure, which may be a long-standing test issue. If so, I want you to update the Wiki page. I found the failure at [1]. It contains two ERRORs, and I'm saying for test_decoding/isolation/slot_creation_error

Re: Show WAL write and fsync stats in pg_stat_io

2025-02-06 Thread Michael Paquier
On Thu, Feb 06, 2025 at 07:32:01AM +, Bertrand Drouvot wrote: > That sounds ok, but I wonder if that's the best appropriate place. I could > think of the checkpointer test in 029_stats_restart.pl and the startup/standby > one in one related to standby (030_stats_cleanup_replica.pl?). Though tha

Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible

2025-02-06 Thread Michael Paquier
On Mon, Nov 11, 2024 at 03:17:44PM -0800, Jacob Champion wrote: > 1. pgstat_bestart_initial() reports STATE_STARTING, fills in the early > fields and clears out the rest. > 2. pgstat_bestart_security() reports the SSL/GSS status of the > connection. This is only for backends with a valid MyProcPort

Re: Implement waiting for wal lsn replay: reloaded

2025-02-06 Thread Yura Sokolov
27.11.2024 07:08, Alexander Korotkov wrote: > Present solution > > The present patch implements a new utility command WAIT FOR LSN > 'target_lsn' [, TIMEOUT 'timeout'][, THROW 'throw']. Unlike previous > attempts to implement custom syntax, it uses only one extra unreserved > keyword. The parame