Re: plperl version on the meson setup summary screen

2025-03-17 Thread Zharkov Roman
On 2025-03-14 13:08, vignesh C wrote: One suggestion, there are many other external libraries for which we don't display the version, can we include the version for them too: Hello, We have seven "libraries" whose versions meson does not show: bonjour, bsd_auth, docs, docs_pdf, nls, pam, plper

Re: Snapshot related assert failure on skink

2025-03-17 Thread Thomas Munro
On Tue, Mar 18, 2025 at 12:59 AM Tomas Vondra wrote: > On 3/17/25 12:36, Tomas Vondra wrote: > > I'm still fiddling with the script, trying to increase the probability > > of the (apparent) race condition. On one machine (old Xeon) I can hit it > > very easily/reliably, while on a different machin

Fix couple of typos

2025-03-17 Thread vignesh C
Hi, While reviewing another patch, I found a couple of typos: 1) subid should have been pubid in AlterPublicationOwner and AlterPublicationOwner_oid functions. 2) Only tuples with XIDs/MXIDs older than the the FreezeLimit/MultiXactCutoff are frozen in the common case. Should have been" Only tuples

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Daniil Davydov
Hi, On Mon, Mar 17, 2025 at 4:48 PM Steven Niu wrote: > > 1. namespace.c, if relation->schemaname is pg_temp but myTempNamespace > isn't set, the error information might be misleading. Consider checking > OidIsValid(myTempNamespace) first. Could you please clarify exactly which place in the code

Re: Add Pipelining support in psql

2025-03-17 Thread Michael Paquier
On Mon, Mar 17, 2025 at 10:50:50AM +0100, Anthonin Bonnefoy wrote: > 0001: This introduces the \sendpipeline meta-command and forbid \g in > a pipeline. This is to fix the formatting options of \g that are not > supported in a pipeline. > > 0002: Allows ';' to send a query using extended protocol

Re: Random pg_upgrade 004_subscription test failure on drongo

2025-03-17 Thread vignesh C
On Thu, 13 Mar 2025 at 18:10, Heikki Linnakangas wrote: > > Hmm, this problem isn't limited to this one pg_upgrade test, right? It > could happen with any pg_upgrade invocation. And perhaps in a running > server too, if a relfilenumber is reused quickly. Yes, it can happen with these scenarios.

Re: 64 bit numbers vs format strings

2025-03-17 Thread Peter Eisentraut
On 15.03.25 03:42, Thomas Munro wrote: - I don't think it's proper to assume that pgoff_t or off_t matches int64_t. So we should make pgoff_t a typedef for int64_t everywhere. It's a bit annoying that we have to teach everyone to remember to use PRId64 to print it, though. The ramifications

Re: 64 bit numbers vs format strings

2025-03-17 Thread Tom Lane
Peter Eisentraut writes: > This is not really possible. The behavior is baked deeply into > the gettext code. (Also note that you don't only need support in > xgettext, which is part of our build system, but also in the runtime > library, which we don't control.) Hmm, I find that comment fa

RE: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET

2025-03-17 Thread Bykov Ivan
Hello, Michael! > So, here is attached a counter-proposal, where we can simply added a > counter tracking a node count in _jumbleNode() to add more entropy to > the mix, incrementing it as well for NULL nodes. It definitely looks like a more reliable solution than my variant, which only counts NU

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Daniil Davydov
Hi, On Sun, Mar 16, 2025 at 7:53 PM vignesh C wrote: > I noticed that the following Andrey's comment regarding the isolation > test from [1] and Andres's comment from [2] are pending. I'm changing > the commitfest entry to Waiting on Author, please provide an updated > patch and update it to Nee

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Daniil Davydov
Hi, On Mon, Mar 17, 2025 at 1:52 PM David G. Johnston wrote: > > My understanding is the limitation of an owner of a temporary relation in one > session being disallowed to alter its contents from another session is an > implementation consequence, and not some fundamental model restriction. I

Re: Reducing the log spam

2025-03-17 Thread Jim Jones
On 15.03.25 07:12, Laurenz Albe wrote: > ... and here is v7, improved in the spirit of > https://postgr.es/m/E132D362-A669-4606-AFE1-B45C9DFCC141%40yesql.se I just revisited this patch and v7 passes all tests from [1,2]. LGTM. Best regards, Jim [1] - https://www.postgresql.org/message-id/2055

Re: Enhancing Memory Context Statistics Reporting

2025-03-17 Thread Ashutosh Bapat
On Mon, Mar 17, 2025 at 1:23 PM Rahila Syed wrote: > >> >> v17-0002-Function-to-report-memory-context-statistics.patch >> >> + if (procNumber == MyProcNumber) >> + { >> + ereport(WARNING, >> + errmsg("cannot return statistics for local backend"), >> + errhint(

Re: pg_stat_statements and "IN" conditions

2025-03-17 Thread Álvaro Herrera
On 2025-Mar-17, Dmitry Dolgov wrote: > I'm afraid there is a disagreement about this part of the feedback. I'm > not yet convinced about the idea suggested over there (treating mutable > functions in the same way as constants) and not planning to change > anything, at least not in the current vers

Re: 64 bit numbers vs format strings

2025-03-17 Thread Thomas Munro
On Mon, Mar 17, 2025 at 11:52 PM Thomas Munro wrote: > tmunro@s11-sparc:~/gettext-hacking$ gcc test.c > tmunro@s11-sparc:~/gettext-hacking$ ./a.out > la réponse est 42 And just to be paranoid, I checked a few more things: the .mo definitely contains the literal "PRId64" (rearranged as "^@PRId64^

Re: general purpose array_sort

2025-03-17 Thread Junwang Zhao
On Sun, Mar 16, 2025 at 9:50 PM jian he wrote: > > hi. > > before commit 4618045bee4a6d3efcb489c319649d8dd9aaa738 ([0]) It seems that patch is treating int2vector and oidvector as scalar types. > > select array_sort(array(select '1 4'::int2vector union all select '1 > 2'::int2vector)); >

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-17 Thread Nazir Bilal Yavuz
Hi, I just wanted to report that the 'oauth_validator/t/001_server.pl' test failed on FreeBSD in one of my local CI runs [1]. I looked at the thread but could not find the same error report; if this is already known, please excuse me. HEAD was at 3943f5cff6 and there were no other changes. Sharin

Re: Snapshot related assert failure on skink

2025-03-17 Thread Tomas Vondra
On 3/17/25 12:36, Tomas Vondra wrote: > ... > > I'm still fiddling with the script, trying to increase the probability > of the (apparent) race condition. On one machine (old Xeon) I can hit it > very easily/reliably, while on a different machine (new Ryzen) it's very > rare. I don't know if that'

Re: Enhancing Memory Context Statistics Reporting

2025-03-17 Thread Rahila Syed
Hi Alexander, Thank you for the review. > It looks like we're increasing *num_contexts twice per child memory > context. First, it gets increased with a recursive > MemoryContextStatsInternal() call, then by adding an ichild. I might > be wrong, but I think these calculations at least deserve

Re: making EXPLAIN extensible

2025-03-17 Thread Andrei Lepikhov
On 3/12/25 20:58, Sami Imseih wrote: I think this is a seriously bad idea. The first line is already overloaded; we don't need several different extensions adding more stuff to it. Fair enough. Plus, this doesn't consider what to do in non-text output formats. the hook will be a no-op for

Re: Snapshot related assert failure on skink

2025-03-17 Thread Tomas Vondra
On 3/17/25 13:18, Thomas Munro wrote: > On Tue, Mar 18, 2025 at 12:59 AM Tomas Vondra wrote: >> On 3/17/25 12:36, Tomas Vondra wrote: >>> I'm still fiddling with the script, trying to increase the probability >>> of the (apparent) race condition. On one machine (old Xeon) I can hit it >>> very

Re: making EXPLAIN extensible

2025-03-17 Thread Robert Haas
On Thu, Mar 13, 2025 at 5:52 PM Sami Imseih wrote: > > The validation point is an interesting one. I agree that we don't > > want the behavior to depend on the order in which options are > > written. > > Here is what I applied on top of v6-0001 to correct this issue. Attaching it > as a text file

Re: Patch: Cover POSITION(bytea,bytea) with tests

2025-03-17 Thread Aleksander Alekseev
Hi Peter, > Some minor comments: > > 1. I thought the new test cases should be located earlier in the file > where there were already a couple of POSITION tests. > (see "-- E021-11 position expression") > > 2. Maybe one of your test cases can be identical to the example from > the docs [1]. > posi

Re: maintenance_work_mem = 64kB doesn't work for vacuum

2025-03-17 Thread Masahiko Sawada
On Mon, Mar 10, 2025 at 2:53 AM David Rowley wrote: > > On Mon, 10 Mar 2025 at 17:22, Masahiko Sawada wrote: > > Regarding that patch, we need to note that the lpdead_items is a > > counter that is not reset in the entire vacuum. Therefore, with > > maintenance_work_mem = 64kB, once we collect at

Re: dblink: Add SCRAM pass-through authentication

2025-03-17 Thread Jacob Champion
On Thu, Mar 13, 2025 at 2:38 PM Matheus Alcantara wrote: > I thought about this; The problem is that at this point, the scram keys > on connection options are base64 encoded (see appendSCRAMKeysInfo), so > we can't compare with the values stored on MyProcPort. I don't think that's necessary -- th

dead code in pg_upgrade

2025-03-17 Thread Nathan Bossart
While trying to decipher this comment: /* * Do the old cluster's per-database directories share a directory * with a new version-specific tablespace? */ I noticed that the condition it's referring to if (strlen(o

Re: Update Unicode data to Unicode 16.0.0

2025-03-17 Thread Jeff Davis
On Sat, 2025-03-15 at 18:23 -0700, Jeremy Schneider wrote: > Is the simple answer that functions & clauses related to both time > zones and character semantics should just all be considered STABLE > instead of IMMUTABLE? That was discussed a few times, but: (a) That doesn't exactly solve the prob

Re: Update Unicode data to Unicode 16.0.0

2025-03-17 Thread Jeff Davis
On Sun, 2025-03-16 at 19:10 +0530, vignesh C wrote: > We currently have two Commitfest entries for the same thread at [1] > and [2]. Are both still necessary, or can we consolidate tracking > into > a single entry? I'm fine removing my CF entry, but unfortunately there's no "withdrawn -- duplicate

Re: Restrict copying of invalidated replication slots

2025-03-17 Thread Masahiko Sawada
On Sun, Mar 9, 2025 at 11:16 PM Shlok Kyal wrote: > > On Fri, 28 Feb 2025 at 08:56, Amit Kapila wrote: > > > > On Fri, Feb 28, 2025 at 5:10 AM Masahiko Sawada > > wrote: > > > > > > On Thu, Feb 27, 2025 at 12:52 AM Amit Kapila > > > wrote: > > > > > > > > On Thu, Feb 27, 2025 at 10:47 AM Masa

Re: dead code in pg_upgrade

2025-03-17 Thread Tom Lane
Nathan Bossart writes: > I noticed that the condition it's referring to > if (strlen(old_cluster.tablespace_suffix) == 0) > doesn't appear to have been reachable since support for upgrading from > pre-9.2 was removed in v15 (commit e469f0a). Before then, this case seems > to have on

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread Daniil Davydov
Hi, On Mon, Mar 17, 2025 at 10:09 PM David G. Johnston wrote: > > On Monday, March 17, 2025, Daniil Davydov <3daniss...@gmail.com> wrote: >> >> >> > >> > 2."you have not any temporary relations" --> "you have no any temporary >> > relations" >> I am not an English speaker, but it seems that "have

Re: pgsql: Avoid invalidating all RelationSyncCache entries on publication

2025-03-17 Thread Robert Haas
On Thu, Mar 13, 2025 at 12:00 AM Amit Kapila wrote: > Avoid invalidating all RelationSyncCache entries on publication rename. > > On Publication rename, we need to only invalidate the RelationSyncCache > entries corresponding to relations that are part of the publication being > renamed. > > As pa

Re: Draft for basic NUMA observability

2025-03-17 Thread Bertrand Drouvot
Hi, On Mon, Mar 17, 2025 at 08:28:46AM +0100, Jakub Wartak wrote: > On Fri, Mar 14, 2025 at 1:08 PM Bertrand Drouvot > wrote: > > > > I did prepare a patch file (attached as .txt to not disturb the cfbot) to > > apply > > on top of v11 0002 (I just rebased it a bit so that it now applies on top

PG 18 major release notes

2025-03-17 Thread Bruce Momjian
I am traveling for the first two weeks of May. Therefore, assuming I am creating the PG 18 major release notes, I plan to start in early April and keep it updated with recent commits. If anyone wants to work with me on this so they can learn the process, or if they want to take over this role, pl

Re: read stream on amcheck

2025-03-17 Thread Matheus Alcantara
Hi, On Sun, Mar 16, 2025 at 10:30 AM vignesh C wrote: > > On Wed, 12 Feb 2025 at 00:11, Matheus Alcantara > wrote: > > > > Hi, > > > > Em ter., 11 de fev. de 2025 às 03:39, jian he > > escreveu: > > > hi. some minor issue i found. > > > > > > +#include "storage/block.h" > > > no need, since "#i

Re: Adding support for SSLKEYLOGFILE in the frontend

2025-03-17 Thread Jacob Champion
On Sun, Mar 16, 2025 at 6:49 AM Daniel Gustafsson wrote: > IIRC the reasoning has been that if a rogue user can inject an environment > variable into your session and read your files it's probably game over > anyways. (Personally I'm no longer as convinced by this line of argument as I once was.

Re: libpq: Process buffered SSL read bytes to support records >8kB on async API

2025-03-17 Thread Jacob Champion
On Sun, Mar 16, 2025 at 6:14 AM vignesh C wrote: > @Jacob, could you find some time to wrap this up? This will help us > assess whether it can be refined into a committable state soon. This is a bug report that likely requires backpatching; feature freeze should not be an issue here. Thanks, --J

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

2025-03-17 Thread Robert Haas
On Sun, Mar 16, 2025 at 11:36 PM David G. Johnston wrote: > It could also be: > > warning: your password is known to Big Brother > hint: use psql \password to supply a private password, or see “docs/wiki > page” for more details and a way to pre-compute and send a private password > via SQL. OK

Re: 64 bit numbers vs format strings

2025-03-17 Thread Tom Lane
Thomas Munro writes: > On Mon, Mar 17, 2025 at 8:09 PM Tom Lane wrote: >> Hmm, I find that comment fairly scary. How do we know that the >> runtime library actually gets this right on every supported platform? > I don't know too much about libintl and its history other than what > I've looked u

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-03-17 Thread Jacob Champion
On Mon, Mar 17, 2025 at 4:37 AM Nazir Bilal Yavuz wrote: > > Hi, > > I just wanted to report that the 'oauth_validator/t/001_server.pl' > test failed on FreeBSD in one of my local CI runs [1]. I looked at the > thread but could not find the same error report; if this is already > known, please exc

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread David G. Johnston
On Monday, March 17, 2025, Daniil Davydov <3daniss...@gmail.com> wrote: > > > > > 2."you have not any temporary relations" --> "you have no any temporary > > relations" > I am not an English speaker, but it seems that "have not" would be > more correct. Someone has to judge us :) > > Both are not

Re: Disabling vacuum truncate for autovacuum

2025-03-17 Thread Nathan Bossart
On Sun, Mar 16, 2025 at 06:24:59PM -0400, Robert Treat wrote: > So if the general idea is a guc "vacuum_truncate" which sets a global > default for whether vacuums and autovacuums should do truncation, and > we then have the storage parameter which would override the global > setting. And to be cle

Re: Incorrect result of bitmap heap scan.

2025-03-17 Thread Matthias van de Meent
On Sun, 16 Mar 2025 at 13:55, vignesh C wrote: > > On Wed, 5 Mar 2025 at 16:43, Matthias van de Meent > wrote: > > > > On Sun, 2 Mar 2025 at 01:35, Tom Lane wrote: > > > > > > Peter Geoghegan writes: > > > > Is everybody in agreement about committing and back patching this fix, > > > > which si

Re: Incorrect result of bitmap heap scan.

2025-03-17 Thread Andres Freund
Hi, On 2025-03-17 16:17:03 +0100, Matthias van de Meent wrote: > As I understand it, Andres agrees that the feature is unsalvageable in > backbranches ("don't think there's a realistic way to fix it"). Andres > then continues to elaborate that even if the feature were salvageable, > it wouldn't co

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread David G. Johnston
On Sunday, March 16, 2025, Daniil Davydov <3daniss...@gmail.com> wrote: > Hi, > > On Sun, Mar 16, 2025 at 7:53 PM vignesh C wrote: > > I noticed that the following Andrey's comment regarding the isolation > > test from [1] and Andres's comment from [2] are pending. I'm changing > > the commitfes

Re: pgsql: pg_upgrade: Preserve default char signedness value from old clus

2025-03-17 Thread Robert Haas
On Fri, Feb 21, 2025 at 1:20 PM Masahiko Sawada wrote: > pg_upgrade: Preserve default char signedness value from old cluster. Hi, I noticed that after running 'meson test --suite setup --suite pg_upgrade', the file delete_old_cluster.sh is left behind in the source directory, which should not ha

Re: Statistics Import and Export

2025-03-17 Thread Nathan Bossart
On Sun, Mar 16, 2025 at 05:32:15PM -0400, Corey Huinker wrote: >> >> * The custom format actually does two WriteToc() calls, and since these >> patches move the queries to this part of pg_dump, it means we'll run all >> the queries twice. The comments around this code suggest that the second >

Re: plperl version on the meson setup summary screen

2025-03-17 Thread Andrew Dunstan
On 2025-03-17 Mo 4:43 AM, Zharkov Roman wrote: On 2025-03-14 13:08, vignesh C wrote: One suggestion, there are many other external libraries for which we don't display the version, can we include the version for them too: Hello, We have seven "libraries" whose versions meson does not show: b

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

2025-03-17 Thread Jacob Champion
On Thu, Mar 13, 2025 at 10:56 AM Andres Freund wrote: > > Given the choice between a usually-working PAM module with known > > architectural flaws, and not having PAM at all, I think many users > > would rather continue using what's working for them. > > authentication_timeout currently doesn't re

Re: BitmapHeapScan streaming read user and prelim refactoring

2025-03-17 Thread Melanie Plageman
On Mon, Mar 17, 2025 at 3:44 AM Jakub Wartak wrote: > > dunno, I've just asked if it isn't suspicious to anyone except me else > that e_io_c > m_io_c rather than e_io_c <= m_io_c. My understanding > was always that to tune max IO queue depth you would do this: > a. up to N backends (up to max_conn

Re: BitmapHeapScan streaming read user and prelim refactoring

2025-03-17 Thread Andres Freund
Hi, On 2025-03-17 14:52:02 -0400, Melanie Plageman wrote: > I don't feel strongly that we need to be as rigorous for > maintenance_io_concurrency, but I'm also not sure 160 seems reasonable > (which would be the same ratio as before). I'd lean towards just setting them to the same value for now.

Re: dead code in pg_upgrade

2025-03-17 Thread Nathan Bossart
On Mon, Mar 17, 2025 at 01:56:49PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> I noticed that the condition it's referring to >> if (strlen(old_cluster.tablespace_suffix) == 0) >> doesn't appear to have been reachable since support for upgrading from >> pre-9.2 was removed in v

Re: pg_stat_statements and "IN" conditions

2025-03-17 Thread Álvaro Herrera
On 2025-Feb-14, Dmitry Dolgov wrote: > This should do it. The last patch for today, otherwise I'll probably add > more bugs than features :) Thank you. I've spent some time with this patch in the last few days, and I propose a few changes. I renamed everything from "merge" to "squash"; apart fr

Re: optimize file transfer in pg_upgrade

2025-03-17 Thread Nathan Bossart
On Wed, Mar 05, 2025 at 08:34:37PM -0600, Nathan Bossart wrote: > Thank you, Greg and Robert, for sharing your thoughts. With that, here's > what I'm considering to be a reasonably complete patch set for this > feature. This leaves about a month for rigorous testing and editing, so > I'm hopeful

Re: ZStandard (with dictionaries) compression support for TOAST compression

2025-03-17 Thread Robert Haas
On Fri, Mar 7, 2025 at 8:36 PM Nikhil Kumar Veldanda wrote: > struct/* Extended compression format */ > { > uint32va_header; > uint32va_tcinfo; > uint32va_cmp_alg; > uint32va_cmp_dictid; > charva_data[FLEXIBLE_ARRAY_MEMBER]; >

Re: optimize file transfer in pg_upgrade

2025-03-17 Thread Robert Haas
On Mon, Mar 17, 2025 at 3:34 PM Nathan Bossart wrote: > * Once committed, I should update one of my buildfarm animals to use > PG_TEST_PG_UPGRADE_MODE=--swap. It would be better if we didn't need a separate buildfarm animal to test this, because that means you won't get notified by local testin

Re: dblink: Add SCRAM pass-through authentication

2025-03-17 Thread Matheus Alcantara
On Mon, Mar 17, 2025 at 1:49 PM Jacob Champion wrote: > > On Thu, Mar 13, 2025 at 2:38 PM Matheus Alcantara > wrote: > > I thought about this; The problem is that at this point, the scram keys > > on connection options are base64 encoded (see appendSCRAMKeysInfo), so > > we can't compare with the

Re: pg_stat_statements and "IN" conditions

2025-03-17 Thread Álvaro Herrera
On 2025-Mar-17, Álvaro Herrera wrote: > You can see my patch on top of yours here: > https://github.com/alvherre/postgres/commits/query_id_squash_values/ > and the CI run here: > https://cirrus-ci.com/build/5660053472018432 Heh, this blew up on bogus SGML markup :-( Fixed and running again: http

Re: optimize file transfer in pg_upgrade

2025-03-17 Thread Bruce Momjian
On Wed, Mar 5, 2025 at 03:40:52PM -0500, Greg Sabino Mullane wrote: > On Wed, Mar 5, 2025 at 2:43 PM Nathan Bossart > wrote: > > One other design point I wanted to bring up is whether we should bother > generating a rollback script for the new "swap" mode.  In short, I'm > wondering

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread David G. Johnston
On Mon, Mar 17, 2025 at 10:58 AM Daniil Davydov <3daniss...@gmail.com> wrote: > 2) Is this really the implementation detail that we want to hide from the > user? User can just run "select pg_my_temp_schema();" and see that > there is no temp schema in the current session. > No ordinary user uses

Re: Forbid to DROP temp tables of other sessions

2025-03-17 Thread David G. Johnston
On Mon, Mar 17, 2025 at 10:58 AM Daniil Davydov <3daniss...@gmail.com> wrote: > > Please see v4 patch (only comment change). > > /* - * For missing_ok, allow a non-existent schema name to - * return InvalidOid. + * We don't allow users to access temp tables of other + * sessions (consider adding

<    1   2