Re: Statistics Import and Export

2025-02-22 Thread Tom Lane
BTW, while nosing around looking for an explanation for our cross-version-upgrade woes, I chanced to notice that relation_statistics_update rejects negative values for relpages and relallvisible. This is nonsense. Internally those values are BlockNumbers and can have any value from 0 to UINT32_MA

Re: Psql meta-command conninfo+

2025-02-22 Thread Alvaro Herrera
On 2025-Feb-21, Sami Imseih wrote: > > If we want to include 'role' in this output, what I'd propose is to > > have \conninfo issue "SHOW role", which is accepted by every server > > version. If it fails (say because we're in an aborted transaction), > > just omit that row from the output. > > v

Re: PATCH: warn about, and deprecate, clear text passwords

2025-02-22 Thread Guillaume Lelarge
On 21/02/2025 23:33, Greg Sabino Mullane wrote: There have been a few complaints lately about the fact that we cavalierly allow clear text passwords to be sent when doing CREATE USER or ALTER USER. These, of course, can end up in many places, such as pg_stat_activity, pg_stat_statements, .psql_

Re: Restrict copying of invalidated replication slots

2025-02-22 Thread Peter Smith
Some review comments for patch v2-0001. == Commit message 1. Currently we can copy an invalidated logical and physical replication slot using functions 'pg_copy_logical_replication_slot' and 'pg_copy_physical_replication_slot' respectively. With this patch we will throw an error in such cases

Re: MAX_BACKENDS size (comment accuracy)

2025-02-22 Thread Thomas Munro
On Sun, Feb 23, 2025 at 4:16 AM Andres Freund wrote: > We do count the number of lwlock share lockers and the number of buffer > refcounts within those bits. And obviously 0 lockers/refcounts has to be > valid. So I think the limit is correct? Ah, right. That makes perfect sense. The 18 bits ne

Re: Elimination of the repetitive code at the SLRU bootstrap functions.

2025-02-22 Thread Álvaro Herrera
On 2025-Feb-18, Evgeny Voropaev wrote: > Created functions BootStrapSlruPage,SimpleLruZeroAndLogPage, > WriteSlruZeroPageXlogRec. Using of these functions allows to delete > ZeroXYZPage functions, WriteXYZZeroPageXlogRec functions and eliminate code > repetitions. I think the overall idea here is

Re: Simplify the logic a bit (src/bin/scripts/reindexdb.c)

2025-02-22 Thread Álvaro Herrera
On 2025-Feb-21, Ranier Vilela wrote: > Any chance to push this forward? > Is it worth creating a committfest entry? Yeah, I'll have a look. -- Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseDB.com/ "Entristecido, Wutra (canción de Las Barreras) echa a

Re: MAX_BACKENDS size (comment accuracy)

2025-02-22 Thread Andres Freund
Hi, On 2025-02-22 18:54:08 +1300, Thomas Munro wrote: > On Sat, Feb 22, 2025 at 7:27 AM Andres Freund wrote: > +#define MAX_BACKENDS_BITS18 > +#define MAX_BACKENDS((1 << MAX_BACKENDS_BITS)-1) > > +1 for working forwards from the bits. But why not call it > PROC_NUMBER_BITS?

Re: Non-text mode for pg_dumpall

2025-02-22 Thread jian he
hi. v20-0001 in src/bin/pg_dump/pg_dumpall.c, we have: static const char *connstr = ""; case 'd': connstr = pg_strdup(optarg); break; i am not sure you can declare it as "const" for connstr. since connstr value can be changed. ``#include "pg_backup.h"`

Re: Make query cancellation keys longer

2025-02-22 Thread Jelte Fennema-Nio
On Mon, 9 Sept 2024 at 17:58, Robert Haas wrote: > > On Fri, Aug 16, 2024 at 11:29 AM Robert Haas wrote: > > > I'll split this patch like that, to make it easier to compare and merge > > > with Jelte's corresponding patches. > > > > That sounds great. IMHO, comparing and merging the patches is th

Re: Fix logging for invalid recovery timeline

2025-02-22 Thread David Steele
On 2/21/25 09:09, Benoit Lobréau wrote: On 2/20/25 4:40 PM, David Steele wrote: Benoit -- this was your idea. Did you want to submit a patch yourself? Here is an attempt at that. I kept the wording I used above. Is it fine to repeat the whole ereport block twice? I think for translation pur

Re: PATCH: warn about, and deprecate, clear text passwords

2025-02-22 Thread Guillaume Lelarge
On 22/02/2025 09:07, Guillaume Lelarge wrote: On 21/02/2025 23:33, Greg Sabino Mullane wrote: There have been a few complaints lately about the fact that we cavalierly allow clear text passwords to be sent when doing CREATE USER or ALTER USER. These, of course, can end up in many places, such

Re: Virtual generated columns

2025-02-22 Thread Richard Guo
On Sat, Feb 22, 2025 at 11:55 PM Richard Guo wrote: > Attached are the updated patches to fix all the mentioned issues. I > plan to push them early next week after staring at the code for a bit > longer, barring any objections. Sign... I neglected to make the change in 0001 that a Var newnode co

Re: generic plans and "initial" pruning

2025-02-22 Thread Tender Wang
Alexander Lakhin 于2025年2月22日周六 23:00写道: > Hello Amit, > > 21.02.2025 05:40, Amit Langote wrote: > > I pushed the final piece yesterday. > > > Please look at new error, produced by the following script, > starting from 525392d57: > CREATE TABLE t(id int) PARTITION BY RANGE (id); > CREATE INDEX idx

Re: Virtual generated columns

2025-02-22 Thread Richard Guo
On Sat, Feb 22, 2025 at 2:35 AM Dean Rasheed wrote: > On Fri, 21 Feb 2025 at 06:16, Richard Guo wrote: > > * The expansion of virtual generated columns occurs after subquery > > pullup, which can lead to issues. This was an oversight on my part. > > Initially, I believed it wasn't possible for a

Re: generic plans and "initial" pruning

2025-02-22 Thread Alexander Lakhin
Hello Amit, 21.02.2025 05:40, Amit Langote wrote: I pushed the final piece yesterday. Please look at new error, produced by the following script, starting from 525392d57: CREATE TABLE t(id int) PARTITION BY RANGE (id); CREATE INDEX idx on t(id); CREATE TABLE tp_1 PARTITION OF t FOR VALUES FROM

Re: Add new protocol message to change GUCs for usage with future protocol-only GUCs

2025-02-22 Thread Jelte Fennema-Nio
On Tue, 18 Feb 2025 at 09:51, Jelte Fennema-Nio wrote: > Rebased it, and moved some of the new header definitions around to > hopefully not have to rebase again. This required another rebase, but I've decided that I think it'll be most fruitful to continue the discussion on protocol changes in th

Re: TAP test started using meson, can get a tcp port already used by another test.

2025-02-22 Thread Zharkov Roman
On 2025-02-22 04:11, Andrew Dunstan wrote: On 2025-02-21 Fr 11:49 AM, Andres Freund wrote: Pushed. Thanks Thank you very much! Best regards, Roman Zharkov

Re: Statistics Import and Export

2025-02-22 Thread Jeff Davis
On Fri, 2025-02-21 at 07:24 +, Hayato Kuroda (Fujitsu) wrote: > I hope I'm in the correct thread. I found the commit 1fd1bd8 - it is > so cool. Yes, documentation corrections are appreciated, thank you. > But pgupgrade.sgml [2] and source code [3] said that statistics must > be updated. Chan

Re: Proposal: Filter irrelevant change before reassemble transactions during logical decoding

2025-02-22 Thread Peter Smith
Hi Ajin, Some review comments for v14-0002. == src/backend/replication/logical/decode.c 1. There is lots of nearly duplicate code checking to see if a change is filterable DecodeInsert: + /* + * When filtering changes, determine if the relation associated with the change + * can be skipped.

Re: [PATCH] Fix Potential Memory Leak in pg_amcheck Code

2025-02-22 Thread Kirill Reshke
Hi! On Fri, 7 Feb 2025 at 13:28, Daniel Gustafsson wrote: > > That being said, there is > value in doing the right thing and setting good examples in our own code as > many do read it and reference it. > We call PQclear on such a > case elsewhere in the file so it's not entirely consistent, but