Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-25 Thread Ashutosh Sharma
On Tue, Jun 25, 2024 at 12:40 AM Jeff Davis wrote: > > On Wed, 2024-06-19 at 08:53 +0530, Ashutosh Sharma wrote: > > For standalone functions, users can easily adjust the search_path > > settings as needed. However, managing this becomes challenging for > > functions created via extensions.

Re: Fix possible overflow of pg_stat DSA's refcnt

2024-06-25 Thread Michael Paquier
On Tue, Jun 25, 2024 at 05:01:55PM +0200, Anthonin Bonnefoy wrote: > During backend initialisation, pgStat DSA is attached using > dsa_attach_in_place with a NULL segment. The NULL segment means that > there's no callback to release the DSA when the process exits. > pgstat_detach_shmem only calls

Re: cost delay brainstorming

2024-06-25 Thread Andy Fan
Andy Fan writes: > >> - Longrunning transaction prevents increasing relfrozenxid, we run autovacuum >> over and over on the same relation, using up the whole cost budget. This is >> particularly bad because often we'll not autovacuum anything else, building >> up a larger and larger

Re: Should we document how column DEFAULT expressions work?

2024-06-25 Thread David G. Johnston
On Tue, Jun 25, 2024 at 9:50 PM David Rowley wrote: > On Wed, 26 Jun 2024 at 13:31, David G. Johnston > wrote: > > I'd suggest adding to: > > > > DEFAULT default_expr > > The DEFAULT clause assigns a default data value for the column whose > column definition it appears within. The value is any

Re: Should we document how column DEFAULT expressions work?

2024-06-25 Thread Tom Lane
David Rowley writes: > If people don't properly understand these special timestamp input > values, then maybe the documentation in [1] needs to be improved. At > the moment the details are within parentheses. Namely "(In particular, > now and related strings are converted to a specific time

Re: Should we document how column DEFAULT expressions work?

2024-06-25 Thread David Rowley
On Wed, 26 Jun 2024 at 13:31, David G. Johnston wrote: > I'd suggest adding to: > > DEFAULT default_expr > The DEFAULT clause assigns a default data value for the column whose column > definition it appears within. The value is any variable-free expression (in > particular, cross-references to

Re: New standby_slot_names GUC in PG 17

2024-06-25 Thread Bertrand Drouvot
Hi, On Wed, Jun 26, 2024 at 04:17:45AM +, Zhijie Hou (Fujitsu) wrote: > On Wednesday, June 26, 2024 9:40 AM Masahiko Sawada > wrote: > > > > On Tue, Jun 25, 2024 at 5:32 PM Amit Kapila > > wrote: > > > > > > I feel synchronized better indicates the purpose because we ensure > > > such

RE: New standby_slot_names GUC in PG 17

2024-06-25 Thread Zhijie Hou (Fujitsu)
On Wednesday, June 26, 2024 9:40 AM Masahiko Sawada wrote: > > On Tue, Jun 25, 2024 at 5:32 PM Amit Kapila > wrote: > > > > On Tue, Jun 25, 2024 at 12:30 PM Masahiko Sawada > wrote: > > > > > > On Tue, Jun 25, 2024 at 1:54 PM Amit Kapila > wrote: > > > > > > > > > > > So, my > > > >

Re: psql (PostgreSQL) 17beta2 (Debian 17~beta2-1.pgdg+~20240625.1534.g23c5a0e) Failed to retrieve data from the server..

2024-06-25 Thread Tom Lane
Bruce Momjian writes: > On Tue, Jun 25, 2024 at 05:52:47PM -0700, David G. Johnston wrote: >> We seem to be missing a release note item for the catalog breakage done in >> f696c0c >> https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=f696c0cd5f > It seemed too internal to mention in

Re: CI, macports, darwin version problems

2024-06-25 Thread Tom Lane
Thomas Munro writes: > But I thought of an easier way: instead of trying to do my own cache > invalidation with shell script and duct tape, I can include the > current OS major version in the cache key used to carry the > macports directory between CI runs. Hopefully Cirrus's cache machinery >

Re: speed up a logical replica setup

2024-06-25 Thread Amit Kapila
On Wed, Jun 26, 2024 at 7:21 AM Euler Taveira wrote: > > On Mon, Jun 24, 2024, at 3:47 AM, Hayato Kuroda (Fujitsu) wrote: > > > pg_createsubscriber fails on a dbname containing a space. Use > > appendConnStrVal() here and for other params in get_sub_conninfo(). See the > > CVE-2016-5424 commits

Re: CI, macports, darwin version problems

2024-06-25 Thread Thomas Munro
On Wed, Jun 26, 2024 at 12:00 PM Tom Lane wrote: > Thomas Munro writes: > > I know how to find out which darwin version is running: uname -r | sed > > 's/\..*//'. What I don't know is how to find the darwin version for a > > macports installation. > > "port platform"? Thanks, that's exactly

Re: Improve the connection failure error messages

2024-06-25 Thread Peter Smith
FYI - I created a CF entry [1] for this because AFAIK the patch is just waiting for a committer to check if it is OK to be pushed, but maybe nobody has noticed it. == [1] https://commitfest.postgresql.org/48/5075/ Kind Regards, Peter Smith. Fujitsu Australia

Re: Pgoutput not capturing the generated columns

2024-06-25 Thread Peter Smith
Hi Shlok. Here are my review comments for patch v10-0003 == General. 1. The patch has lots of conditions like: if (att->attgenerated && (att->attgenerated != ATTRIBUTE_GENERATED_STORED || !include_generated_columns)) continue; IMO these are hard to read. Although more verbose, please

Re: Injection point locking

2024-06-25 Thread Michael Paquier
On Tue, Jun 25, 2024 at 09:10:06AM -0700, Noah Misch wrote: > I think your last sentence is what Heikki is saying should happen, and I > agree. Yes, it matters. As written, InjectionPointRun() could cache an > entry_by_name->function belonging to a different injection point. That's true, we

Re: psql (PostgreSQL) 17beta2 (Debian 17~beta2-1.pgdg+~20240625.1534.g23c5a0e) Failed to retrieve data from the server..

2024-06-25 Thread Bruce Momjian
On Tue, Jun 25, 2024 at 05:52:47PM -0700, David G. Johnston wrote: > On Tue, Jun 25, 2024 at 5:36 PM André Verwijs wrote: > > psql (PostgreSQL) 17beta2 (Debian 17~beta2-1.pgdg+~20240625.1534.g23c5a0e) > > > column "daticulocale" does not exist > LINE 5: datconnlimit, daticulocale,

Re: speed up a logical replica setup

2024-06-25 Thread Euler Taveira
On Mon, Jun 24, 2024, at 3:47 AM, Hayato Kuroda (Fujitsu) wrote: > > pg_createsubscriber fails on a dbname containing a space. Use > > appendConnStrVal() here and for other params in get_sub_conninfo(). See the > > CVE-2016-5424 commits for more background. For one way to test this > >

Re: New standby_slot_names GUC in PG 17

2024-06-25 Thread Masahiko Sawada
On Tue, Jun 25, 2024 at 5:32 PM Amit Kapila wrote: > > On Tue, Jun 25, 2024 at 12:30 PM Masahiko Sawada > wrote: > > > > On Tue, Jun 25, 2024 at 1:54 PM Amit Kapila wrote: > > > > > > > > So, my > > > preference is in order as follows: synchronized_standby_slots, > > > wait_for_standby_slots,

Re: Should we document how column DEFAULT expressions work?

2024-06-25 Thread David G. Johnston
On Tue, Jun 25, 2024 at 4:11 PM Tom Lane wrote: > James Coleman writes: > > On Tue, Jun 25, 2024 at 4:59 PM Tom Lane wrote: > >> Uh ... what? I recall something about that with respect to certain > >> features such as nextval(), but you're making it sound like there > >> is something generic

Re: [PATCH] Add ACL (Access Control List) acronym

2024-06-25 Thread David G. Johnston
On Mon, Jun 24, 2024 at 10:11 PM Michael Paquier wrote: > On Tue, Jun 25, 2024 at 12:20:20AM +0200, Joel Jacobson wrote: > > Thanks, much better. New version attached. > > + The PostgreSQL documentation, and code, > refers > + to the specifications within the ACL as "privileges". This

Re: [PATCH] Add ACL (Access Control List) acronym

2024-06-25 Thread David G. Johnston
On Tue, Jun 25, 2024 at 5:30 PM Michael Paquier wrote: > On Tue, Jun 25, 2024 at 11:55:03AM -0500, Nathan Bossart wrote: > > On Tue, Jun 25, 2024 at 08:10:24AM +0200, Joel Jacobson wrote: > > > On Tue, Jun 25, 2024, at 07:11, Michael Paquier wrote: > > >> v1 is fine without the "privileges list"

Re: psql (PostgreSQL) 17beta2 (Debian 17~beta2-1.pgdg+~20240625.1534.g23c5a0e) Failed to retrieve data from the server..

2024-06-25 Thread David G. Johnston
On Tue, Jun 25, 2024 at 5:36 PM André Verwijs wrote: > psql (PostgreSQL) 17beta2 (Debian 17~beta2-1.pgdg+~20240625.1534.g23c5a0e) > column "daticulocale" does not exist > LINE 5: datconnlimit, daticulocale, daticurules, datcollversion, > ^ > HINT: Perhaps you meant to reference the column

Re: psql (PostgreSQL) 17beta2 (Debian 17~beta2-1.pgdg+~20240625.1534.g23c5a0e) Failed to retrieve data from the server..

2024-06-25 Thread Tom Lane
=?UTF-8?Q?Andr=C3=A9_Verwijs?= writes: > retrieve information from database: > column "daticulocale" does not exist > LINE 5: datconnlimit, daticulocale, daticurules, datcollversion, > ^ > HINT: Perhaps you meant to reference the column "db.datlocale". I'm guessing you need to complain to the

Re: speed up a logical replica setup

2024-06-25 Thread Euler Taveira
On Tue, Jun 25, 2024, at 3:24 AM, Amit Kapila wrote: > On Tue, Jun 25, 2024 at 3:38 AM Noah Misch wrote: > > > > On Mon, Jun 24, 2024 at 05:20:21PM +0530, Amit Kapila wrote: > > > On Sun, Jun 23, 2024 at 11:52 AM Noah Misch wrote: > > > > > > > > > +static void > > > > >

Re: improve predefined roles documentation

2024-06-25 Thread David G. Johnston
On Tue, Jun 25, 2024 at 1:19 PM Nathan Bossart wrote: > On Tue, Jun 25, 2024 at 04:04:03PM -0400, Robert Haas wrote: > > Looking at this again, how happy are you with the way you've got > > several roles per instead of one for each? I realize > > that was probably part of the intent of the

psql (PostgreSQL) 17beta2 (Debian 17~beta2-1.pgdg+~20240625.1534.g23c5a0e) Failed to retrieve data from the server..

2024-06-25 Thread André Verwijs
psql (PostgreSQL) 17beta2 (Debian 17~beta2-1.pgdg+~20240625.1534.g23c5a0e) Failed to retrieve data from the server.. retrieve information from database: column "daticulocale" does not exist LINE 5: datconnlimit, daticulocale, daticurules, datcollversion, ^ HINT: Perhaps you meant to reference

Re: [PATCH] Add ACL (Access Control List) acronym

2024-06-25 Thread Michael Paquier
On Tue, Jun 25, 2024 at 11:55:03AM -0500, Nathan Bossart wrote: > On Tue, Jun 25, 2024 at 08:10:24AM +0200, Joel Jacobson wrote: > > On Tue, Jun 25, 2024, at 07:11, Michael Paquier wrote: > >> v1 is fine without the "privileges list" part mentioned by Nathan in > >> the first reply. > > > > v2 is

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2024-06-25 Thread Noah Misch
On Mon, Nov 27, 2023 at 01:43:26AM +0200, Alexander Korotkov wrote: > v61 looks good to me. I'm going to push it as long as there are no > objections. This yielded commit 4ed8f09 "Index SLRUs by 64-bit integers rather than by 32-bit integers" and left some expressions coercing SLRU page numbers

Re: Backporting BackgroundPsql

2024-06-25 Thread Michael Paquier
On Wed, Jun 26, 2024 at 02:12:42AM +0200, Alvaro Herrera wrote: > FWIW I successfully used the preliminary PqFFI stuff Andrew posted to > write a test program for bug #18377, which I think ended up being better > than with BackgroundPsql, so I think it's a good way forward. As for > back-patching

Re: Backporting BackgroundPsql

2024-06-25 Thread Alvaro Herrera
On 2024-Jun-25, Tom Lane wrote: > Daniel Gustafsson writes: > > However, since Andrew is actively aiming to replace all of this shortly, > > should > > we wait a see where that lands to avoid having to backport another library > > change? > > I would like to see what he comes up with ... but

Re: CI, macports, darwin version problems

2024-06-25 Thread Tom Lane
Thomas Munro writes: > I know how to find out which darwin version is running: uname -r | sed > 's/\..*//'. What I don't know is how to find the darwin version for a > macports installation. "port platform"? regards, tom lane

CI, macports, darwin version problems

2024-06-25 Thread Thomas Munro
Hi, Problem #1: we're still using Ventura, but Cirrus has started doing this: Only ghcr.io/cirruslabs/macos-runner:sonoma is allowed. Automatically upgraded. It doesn't do it to cfbot, which runs macOS stuff on PGDG-hosted Mac Minis, but it does it to regular users who use free compute minutes

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2024-06-25 Thread Robert Haas
On Tue, Jun 25, 2024 at 4:41 PM Andres Freund wrote: > I doubt that's doable in the back branches. And even on HEAD, I don't think > it's a particularly attractive option - there's just a global vistest for each > of the types of objects with a specific horizon (they need to be updated >

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

2024-06-25 Thread Alena Rybakina
On 24.06.2024 18:28, Robert Haas wrote: On Fri, Jun 21, 2024 at 6:52 PM Alena Rybakina wrote: It's hard to tell, but I think it might be one of the good places to apply transformation. Let me describe a brief conclusion on the two approaches. This explanation is somewhat difficult for me to

Re: Should we document how column DEFAULT expressions work?

2024-06-25 Thread Tom Lane
James Coleman writes: > On Tue, Jun 25, 2024 at 4:59 PM Tom Lane wrote: >> Uh ... what? I recall something about that with respect to certain >> features such as nextval(), but you're making it sound like there >> is something generic going on with DEFAULT. > Hmm, I guess I'd never considered

Re: IPC::Run accepts bug reports

2024-06-25 Thread Noah Misch
On Mon, Jun 17, 2024 at 01:56:46PM -0400, Robert Haas wrote: > On Sat, Jun 15, 2024 at 7:48 PM Noah Misch wrote: > > Separating this from the pytest thread: > > > > On Sat, Jun 15, 2024 at 01:26:57PM -0400, Robert Haas wrote: > > > The one > > > thing I know about that *I* think is a pretty big

Re: Should we document how column DEFAULT expressions work?

2024-06-25 Thread James Coleman
On Tue, Jun 25, 2024 at 4:59 PM Tom Lane wrote: > > James Coleman writes: > > It's possible I'm the only one who's been in this situation, but I've > > multiple times found myself explaining to a user how column DEFAULT > > expressions work: namely how the quoting on an expression following > >

Re: RFC: Additional Directory for Extensions

2024-06-25 Thread David E . Wheeler
On Jun 25, 2024, at 10:43 AM, Robert Haas wrote: > If we want to work on making the sorts of changes that > you're proposing, let's do it on a separate thread. It's not going to > be meaningfully harder to move in that direction after some patch like > this than it is today. I appreciate this

Zero -downtime FULL VACUUM/clustering/defragmentation with zero-downtime and now extra disk space

2024-06-25 Thread Ahmed Yarub Hani Al Nuaimi
Hi guys, This is inspired by this TODO list https://wiki.postgresql.org/wiki/Todo#CLUSTER and by pg_repack and pg_freeze projects. My final goal is to create an extension that does direct data-file to data-file transfer (no intermediate tables, no triggers) with no blocking at all in order to

Re: Backporting BackgroundPsql

2024-06-25 Thread Daniel Gustafsson
> On 25 Jun 2024, at 22:57, Tom Lane wrote: > > Daniel Gustafsson writes: >> Before pulling any triggers I think >> https://commitfest.postgresql.org/48/4959/ >> should be considered, since Tom found some flaws in the current code around >> how >> timers and timeouts are used. > > That's

Re: Should we document how column DEFAULT expressions work?

2024-06-25 Thread Tom Lane
James Coleman writes: > It's possible I'm the only one who's been in this situation, but I've > multiple times found myself explaining to a user how column DEFAULT > expressions work: namely how the quoting on an expression following > the keyword DEFAULT controls whether or not the expression is

Re: Backporting BackgroundPsql

2024-06-25 Thread Tom Lane
Daniel Gustafsson writes: > Before pulling any triggers I think https://commitfest.postgresql.org/48/4959/ > should be considered, since Tom found some flaws in the current code around > how > timers and timeouts are used. That's certainly another issue to consider, but is it really a blocker

Should we document how column DEFAULT expressions work?

2024-06-25 Thread James Coleman
Hello, It's possible I'm the only one who's been in this situation, but I've multiple times found myself explaining to a user how column DEFAULT expressions work: namely how the quoting on an expression following the keyword DEFAULT controls whether or not the expression is evaluated at the time

Re: Backporting BackgroundPsql

2024-06-25 Thread Daniel Gustafsson
> On 25 Jun 2024, at 16:26, Tom Lane wrote: > > Andres Freund writes: >> On 2024-06-25 13:26:23 +0300, Heikki Linnakangas wrote: >>> 1. Write the new test differently on backbranches. Before 664d757531, the >>> test needs to work a lot harder to use the background psql session, calling >>>

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2024-06-25 Thread Andres Freund
On 2024-06-25 14:35:00 -0400, Robert Haas wrote: > Is there any way that we could instead tweak things so that we adjust > the visibility test object itself? Like can have a GlobalVisTest API > where we can supply the OldestXmin from the VacuumCutoffs and have it > ... do something useful with

Re: improve predefined roles documentation

2024-06-25 Thread Nathan Bossart
On Tue, Jun 25, 2024 at 04:04:03PM -0400, Robert Haas wrote: > Looking at this again, how happy are you with the way you've got > several roles per instead of one for each? I realize > that was probably part of the intent of the change, to move the data > from below the table into the table, and

Re: scalability bottlenecks with (many) partitions (and more)

2024-06-25 Thread Robert Haas
On Tue, Jun 25, 2024 at 6:04 AM Tomas Vondra wrote: > Yeah, definitely needs comment explaining this. > > I admit those numbers are pretty arbitrary primes, to implement a > trivial hash function. That was good enough for a PoC patch, but maybe > for a "proper" version this should use a better

Re: Apparent bug in WAL summarizer process (hung state)

2024-06-25 Thread Robert Haas
On Tue, Jun 25, 2024 at 3:51 PM Tom Lane wrote: > This comment seems to be truncated: Thanks. New version attached. -- Robert Haas EDB: http://www.enterprisedb.com v2-0001-Prevent-summarizer-hang-when-summarize_wal-turned.patch Description: Binary data

Re: improve predefined roles documentation

2024-06-25 Thread Robert Haas
On Tue, Jun 25, 2024 at 3:26 PM Nathan Bossart wrote: > I used this in v4 (with some minor changes). Looking at this again, how happy are you with the way you've got several roles per instead of one for each? I realize that was probably part of the intent of the change, to move the data from

Re: Apparent bug in WAL summarizer process (hung state)

2024-06-25 Thread Tom Lane
Robert Haas writes: > Yeah, this is a bug. It seems that the WAL summarizer process, when > restarted, wants to restart from wherever it was previously > summarizing WAL, which is correct if that WAL is still around, but if > summarize_wal has been turned off in the meanwhile, it might not be >

Re: Apparent bug in WAL summarizer process (hung state)

2024-06-25 Thread Robert Haas
On Mon, Jun 24, 2024 at 1:56 PM Israel Barth Rubio wrote: > I've been playing a bit with the incremental backup feature which might come > as > part of the 17 release, and I think I hit a possible bug in the WAL summarizer > process. > > The issue that I face refers to the summarizer process

Re: improve predefined roles documentation

2024-06-25 Thread Nathan Bossart
On Tue, Jun 25, 2024 at 11:28:18AM -0500, Nathan Bossart wrote: > On Tue, Jun 25, 2024 at 12:16:30PM -0400, Robert Haas wrote: >> pg_database_owner is a predefined role for which membership consists, >> implicitly, of the current database owner. It cannot be granted >> membership in any role, and

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2024-06-25 Thread Robert Haas
On Tue, Jun 25, 2024 at 1:10 PM Andres Freund wrote: > That said, obviously there will be plenty setups where this won't cause an > issue. I don't really have a handle on how often it'd be a problem. Fair enough. Even if it's not super-common, it doesn't seem like a great idea to regress such

Re: Proposal: Document ABI Compatibility

2024-06-25 Thread David E. Wheeler
On Jun 25, 2024, at 7:33 AM, Peter Eisentraut wrote: > I took at a stab at this, using some of your text, but discussing API and ABI > separately. Oh man this is fantastic, thank you! I’d be more than happy to just turn this into a patch. But where should it go? Upthread I assumed xfunc.sgml,

Re: Patch bug: Fix jsonpath .* on Arrays

2024-06-25 Thread David E. Wheeler
On Jun 25, 2024, at 12:46 AM, Степан Неретин wrote: > Hi! Looks good to me, but I have several comments. Thanks for your review! > Your patch improves tests, but why did you change formatting in > jsonpath_exec.c? What's the motivation? It’s not just formatting. From the commit message: >

Re: Proposal for Updating CRC32C with AVX-512 Algorithm.

2024-06-25 Thread Bruce Momjian
On Tue, Jun 25, 2024 at 05:41:12PM +, Amonson, Paul D wrote: > > It would be good to know exactly what, if any, changes the Intel > > lawyers want us to make to our license if we accept this patch. > > I asked about this and there is nothing Intel requires here license > wise. They believe

RE: Proposal for Updating CRC32C with AVX-512 Algorithm.

2024-06-25 Thread Amonson, Paul D
> It would be good to know exactly what, if any, changes the Intel lawyers want > us to make to our license if we accept this patch. I asked about this and there is nothing Intel requires here license wise. They believe that there is nothing wrong with including Clause-3 BSD like licenses under

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-06-25 Thread Stan Hu
Thanks, everyone. Sorry to create multiple threads on this. As I mentioned in the other thread, I've already submitted a bug report to Apple (FB14047412). My colleagues know a key macOS engineer, and they have reached out to him to review that thread and bug report. I'll update if we hear

Re: New standby_slot_names GUC in PG 17

2024-06-25 Thread Nathan Bossart
On Tue, Jun 25, 2024 at 02:02:09PM +0530, Amit Kapila wrote: > On Tue, Jun 25, 2024 at 12:30 PM Masahiko Sawada > wrote: >> On Tue, Jun 25, 2024 at 1:54 PM Amit Kapila wrote: >> > So, my >> > preference is in order as follows: synchronized_standby_slots, >> > wait_for_standby_slots,

Re: RFC: Additional Directory for Extensions

2024-06-25 Thread David E. Wheeler
On Jun 24, 2024, at 5:32 PM, Jelte Fennema-Nio wrote: > Still, for the sake of completeness it might make sense to support > this whole list in extension_destdir. (assuming it's easy to do) It should be with the current patch, which just uses a prefix to paths in `pg_config`. So if SHAREDIR is

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2024-06-25 Thread Andres Freund
Hi, On 2024-06-25 12:31:11 -0400, Robert Haas wrote: > On Tue, Jun 25, 2024 at 11:39 AM Melanie Plageman > wrote: > > On Tue, Jun 25, 2024 at 10:31 AM Robert Haas wrote: > > > On Tue, Jun 25, 2024 at 9:07 AM Andres Freund wrote: > > > > It's not hard - but it has downsides. It'll mean that -

Re: [PATCH] Add ACL (Access Control List) acronym

2024-06-25 Thread Nathan Bossart
On Tue, Jun 25, 2024 at 08:10:24AM +0200, Joel Jacobson wrote: > On Tue, Jun 25, 2024, at 07:11, Michael Paquier wrote: >> v1 is fine without the "privileges list" part mentioned by Nathan in >> the first reply. > > v2 is exactly that, but renamed and attached, so we have an entry this > was the

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2024-06-25 Thread Robert Haas
On Tue, Jun 25, 2024 at 11:39 AM Melanie Plageman wrote: > On Tue, Jun 25, 2024 at 10:31 AM Robert Haas wrote: > > On Tue, Jun 25, 2024 at 9:07 AM Andres Freund wrote: > > > It's not hard - but it has downsides. It'll mean that - outside of vacuum > > > - > > > we'll much more often not react

Re: improve predefined roles documentation

2024-06-25 Thread Nathan Bossart
On Tue, Jun 25, 2024 at 12:16:30PM -0400, Robert Haas wrote: > pg_database_owner is a predefined role for which membership consists, > implicitly, of the current database owner. It cannot be granted > membership in any role, and no role can be granted membership in > pg_database_owner. However,

Re: improve predefined roles documentation

2024-06-25 Thread Robert Haas
On Tue, Jun 25, 2024 at 11:35 AM Nathan Bossart wrote: > IIUC the intent of this is to expand on the following sentence in the > existing docs: > > pg_database_owner cannot be a member of any role, and it cannot have > non-implicit members. > > My instinct would be to do something

Re: Injection point locking

2024-06-25 Thread Noah Misch
On Tue, Jun 25, 2024 at 11:14:57AM +0900, Michael Paquier wrote: > On Mon, Jun 24, 2024 at 01:29:38PM +0300, Heikki Linnakangas wrote: > > InjectionPointRun() acquires InjectionPointLock, looks up the hash entry, > > and releases the lock: > > > > > LWLockAcquire(InjectionPointLock, LW_SHARED);

Re: Direct SSL connection and ALPN loose ends

2024-06-25 Thread Jacob Champion
On Tue, Jun 25, 2024 at 7:20 AM Dave Cramer wrote: > > On Tue, 25 Jun 2024 at 09:37, Vladimir Sitnikov > wrote: >> >> "SSL". Technically, the proper term is TLS, and even the document refers to >> "IANA TLS ALPN Protocol IDs" (TLS, not SSL). >> I would not die on that hill, however, going for

Re: Backporting BackgroundPsql

2024-06-25 Thread Andrew Dunstan
On 2024-06-25 Tu 10:26 AM, Tom Lane wrote: Andres Freund writes: On 2024-06-25 13:26:23 +0300, Heikki Linnakangas wrote: 1. Write the new test differently on backbranches. Before 664d757531, the test needs to work a lot harder to use the background psql session, calling pump() etc. That's

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2024-06-25 Thread Michail Nikolaev
Hello, Noah! Answering https://www.postgresql.org/message-id/flat/20240612194857.1c.nmisch%40google.com#684361ba86bad11f4e9fd84dfa8e0084 > On your other thread, it would be useful to see stack traces from the high-CPU > processes once the live lock has ended all query completion. I was wrong,

Re: Direct SSL connection and ALPN loose ends

2024-06-25 Thread Jacob Champion
On Thu, Jun 20, 2024 at 4:32 PM Jacob Champion wrote: > Thanks, > --Jacob Hey Heikki, [sending this to the list in case it's not just me] I cannot for the life of me get GMail to deliver your latest message, even though I see it on postgresql.org. It's not in spam; it's just gone. I wonder if

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2024-06-25 Thread Melanie Plageman
On Tue, Jun 25, 2024 at 10:31 AM Robert Haas wrote: > > On Tue, Jun 25, 2024 at 9:07 AM Andres Freund wrote: > > It's not hard - but it has downsides. It'll mean that - outside of vacuum - > > we'll much more often not react to horizons going backwards due to > > hot_standby_feedback. Which

Re: improve predefined roles documentation

2024-06-25 Thread Nathan Bossart
On Mon, Jun 24, 2024 at 03:53:46PM -0700, David G. Johnston wrote: > pg_database_owner owns the initially created public schema and has an > implicit membership list of one - the role owning the connected-to database. > It exists to encourage and facilitate best practices regarding database >

Re: Backporting BackgroundPsql

2024-06-25 Thread Melanie Plageman
On Tue, Jun 25, 2024 at 7:40 AM Andres Freund wrote: > > Hi, > > On 2024-06-25 13:26:23 +0300, Heikki Linnakangas wrote: > > While fixing a recent bug on visibility on a standby [1], I wrote a > > regression test that uses BackgroundPsql to run some queries in a > > long-running psql session. The

Fix possible overflow of pg_stat DSA's refcnt

2024-06-25 Thread Anthonin Bonnefoy
Hi, During backend initialisation, pgStat DSA is attached using dsa_attach_in_place with a NULL segment. The NULL segment means that there's no callback to release the DSA when the process exits. pgstat_detach_shmem only calls dsa_detach which, as mentioned in the function's comment, doesn't

Re: RFC: Additional Directory for Extensions

2024-06-25 Thread Robert Haas
On Tue, Jun 25, 2024 at 6:12 AM Alvaro Herrera wrote: > Now, I'm not saying that this is an easy journey. But if we don't > start, we're not going to get there. I actually kind of agree with you. I think I've said something similar in a previous email to the list somewhere. But I don't agree

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-06-25 Thread Tom Lane
Andres Freund writes: > On 2024-06-25 16:49:32 +0300, Aleksander Alekseev wrote: >> Another question is whether we should fix this while the SDK is in >> beta or only after it is released. > Yea. Stan has started multiple threads about this, which is not doing anyone any favors, but that issue

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2024-06-25 Thread Alena Rybakina
On 24.06.2024 17:37, Melanie Plageman wrote: On Mon, Jun 24, 2024 at 4:10 AM Alena Rybakina wrote: We can fix this by always removing tuples considered dead before VacuumCutoffs->OldestXmin. This is okay even if a reconnected standby has a transaction that sees that tuple as alive, because it

Re: pg_combinebackup --clone doesn't work

2024-06-25 Thread Tomas Vondra
On 6/25/24 15:21, Peter Eisentraut wrote: > On 21.06.24 18:10, Tomas Vondra wrote: >> On 6/21/24 00:07, Tomas Vondra wrote: >>> Here's a fix adding the missing headers to pg_combinebackup, and fixing >>> some compile-time issues in the ifdef-ed block. >>> >>> I've done some basic manual testing

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2024-06-25 Thread Robert Haas
On Tue, Jun 25, 2024 at 9:07 AM Andres Freund wrote: > It's not hard - but it has downsides. It'll mean that - outside of vacuum - > we'll much more often not react to horizons going backwards due to > hot_standby_feedback. Which means that hot_standby_feedback, when used without > slots, will

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-06-25 Thread Andres Freund
Hi, On 2024-06-25 16:49:32 +0300, Aleksander Alekseev wrote: > ... to make sure Postgres will not find the older version of SDK (it > did until I made this step). You should be able to influence that by specifying -Ddarwin_sysroot=... > ... and get the error reported by Stan. Also I can

Re: Backporting BackgroundPsql

2024-06-25 Thread Tom Lane
Andres Freund writes: > On 2024-06-25 13:26:23 +0300, Heikki Linnakangas wrote: >> 1. Write the new test differently on backbranches. Before 664d757531, the >> test needs to work a lot harder to use the background psql session, calling >> pump() etc. That's doable, but as noted in the discussion

Re: add a new explain option including_query for include query string inside the json plan output

2024-06-25 Thread Tom Lane
Matthias van de Meent writes: > On Tue, 25 Jun 2024 at 10:55, jian he wrote: >> for json format, add a new option to let the explain json output also >> include the actual query string. > Wouldn't the user be able to keep track of the query they wanted > explained by themselves? If not, why?

Re: improve ssl error code, 2147483650

2024-06-25 Thread Tom Lane
Peter Eisentraut writes: > On 21.06.24 16:53, Tom Lane wrote: >> Most of libpq gets at strerror_r via SOCK_STRERROR for Windows >> portability. Is that relevant here? > Looking inside the OpenSSL code, it makes no efforts to translate > between winsock error codes and standard error codes, so

Re: Direct SSL connection and ALPN loose ends

2024-06-25 Thread Dave Cramer
On Tue, 25 Jun 2024 at 09:37, Vladimir Sitnikov wrote: > I reviewed the documentation for "direct ALPN connections' ', and it looks > like it could be improved. > Here's the link: > https://www.postgresql.org/docs/17/protocol-flow.html#PROTOCOL-FLOW-SSL > > The currently suggested values for

Re: Recommended books for admin

2024-06-25 Thread Muhammad Ikram
Hi , Here is a lately published book https://www.amazon.com/PostgreSQL-Administration-Cookbook-real-world-challenges-ebook/dp/B0CP5PPSTQ Muhammad Ikram Bitnine Global On Tue, 25 Jun 2024 at 19:09, Bill Smith wrote: > Check out the left side bar > > Documentation

Re: Recommended books for admin

2024-06-25 Thread Bill Smith
Check out the left side bar https://www.postgresql.org/docs/ > On Jun 25, 2024, at 10:04 AM, Tom Browder wrote: > > I’m a complete novice, although I’ve dipped my toes in Admin waters a couple > of times in my many years of using Linux. > > Can anyone recommend a good book on installing

Re: Recommended books for admin

2024-06-25 Thread Kashif Zeeshan
Hi Tom There is alot of stuff available online, you just need to find it, also the Official PG documentation is extensive too.. Regards Kashif Zeeshan On Tue, Jun 25, 2024 at 7:04 PM Tom Browder wrote: > I’m a complete novice, although I’ve dipped my toes in Admin waters a > couple of times

Recommended books for admin

2024-06-25 Thread Tom Browder
I’m a complete novice, although I’ve dipped my toes in Admin waters a couple of times in my many years of using Linux. Can anyone recommend a good book on installing Postgres on multiple, connected multiuser systems, tuning it, managing users, backups, updated, etc. A cookbook/checklist approach

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

2024-06-25 Thread Robert Haas
On Mon, Jun 24, 2024 at 9:19 AM Jelte Fennema-Nio wrote: > > > Patch 3: Similar to 1 & 2 in that it has no actual effect yet. But > > > after bumping the version this would be a user visible API change, so > > > I expect it requires a bit more discussion. > > > > I don't know if this is the right

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-06-25 Thread Aleksander Alekseev
Hi, > IMO the right way to test PostgreSQL against the recent beta version > of MacOS SDK would be replacing (via a symlink perhaps) the SDK > provided by the "Command Line Tools for Xcode" package > (/Library/Developer/CommandLineTools/SDKs/). Or alternatively finding > the official way of

Re: Direct SSL connection and ALPN loose ends

2024-06-25 Thread Vladimir Sitnikov
I reviewed the documentation for "direct ALPN connections' ', and it looks like it could be improved. Here's the link: https://www.postgresql.org/docs/17/protocol-flow.html#PROTOCOL-FLOW-SSL The currently suggested values for "sslnegotiations" are "direct" and "postgres". The project name is

Re: pg_combinebackup --clone doesn't work

2024-06-25 Thread Peter Eisentraut
On 21.06.24 18:10, Tomas Vondra wrote: On 6/21/24 00:07, Tomas Vondra wrote: Here's a fix adding the missing headers to pg_combinebackup, and fixing some compile-time issues in the ifdef-ed block. I've done some basic manual testing today - I plan to test this a bit more tomorrow, and I'll

RE: Pgoutput not capturing the generated columns

2024-06-25 Thread Hayato Kuroda (Fujitsu)
Dear Shlok, Thanks for updating patches! Below are my comments, maybe only for 0002. 01. General IIUC, we are not discussed why ALTER SUBSCRIPTION ... SET include_generated_columns is prohibit. Previously, it seems okay because there are exclusive options. But now, such restrictions are gone.

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2024-06-25 Thread Andres Freund
On 2024-06-25 08:42:02 -0400, Robert Haas wrote: > On Tue, Jun 25, 2024 at 8:03 AM Andres Freund wrote: > > I think that's going in the wrong direction. We *want* to prune more > > aggressively if we can (*), the necessary state is represented by the > > vistest. That's a different thing than

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2024-06-25 Thread Robert Haas
On Tue, Jun 25, 2024 at 8:03 AM Andres Freund wrote: > I think that's going in the wrong direction. We *want* to prune more > aggressively if we can (*), the necessary state is represented by the > vistest. That's a different thing than *having* to prune tuples beyond a > certain xmin (the cutoff

Re: improve ssl error code, 2147483650

2024-06-25 Thread Peter Eisentraut
On 21.06.24 16:53, Tom Lane wrote: Peter Eisentraut writes: - strlcpy(errbuf, strerror(ERR_GET_REASON(ecode)), SSL_ERR_LEN); + strerror_r(ERR_GET_REASON(ecode), errbuf, SSL_ERR_LEN); Most of libpq gets at strerror_r via SOCK_STRERROR for Windows portability. Is that relevant

Re: Meson far from ready on Windows

2024-06-25 Thread Dave Page
Hi On Tue, 25 Jun 2024 at 12:39, Andres Freund wrote: > Hi, > > On 2024-06-25 11:54:56 +0100, Dave Page wrote: > > https://github.com/dpage/winpgbuild proves that the hacks above are not > > required *if* you build the dependencies in the recommended way for use > > with MSVC++ (where

Re: Logical Replication of sequences

2024-06-25 Thread Shlok Kyal
On Thu, 20 Jun 2024 at 18:24, vignesh C wrote: > > On Wed, 19 Jun 2024 at 20:33, vignesh C wrote: > > > > On Tue, 18 Jun 2024 at 16:10, Amit Kapila wrote: > > > > > > > > > Agreed and I am not sure which is better because there is a value in > > > keeping the state name the same for both

Re: PostgreSQL does not compile on macOS SDK 15.0

2024-06-25 Thread Aleksander Alekseev
Hi, > I've reproduced this issue by: > > 1. Download the XCode 16 beta 2 ZIP file: > https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_16_beta/Xcode_16_beta.xip > 2. Extract this to `/tmp`. > 3. Then I ran: > > export >

Re: Proposal: Document ABI Compatibility

2024-06-25 Thread Dagfinn Ilmari Mannsåker
Peter Eisentraut writes: > On 24.06.24 22:26, David E. Wheeler wrote: >>> But now we're talking about API. That might be subject of another >> document or another section in this one, but it seems confusing to mix >> this with the ABI discussion. >> Hrm. They’re super closely-related in my

  1   2   >