Re: Minimal logical decoding on standbys

2023-04-04 Thread Amit Kapila
On Mon, Apr 3, 2023 at 12:05 PM Amit Kapila wrote: > > On Mon, Apr 3, 2023 at 4:39 AM Alvaro Herrera wrote: > > > > > From 56a9559555918a99c202a0924f7b2ede9de4e75d Mon Sep 17 00:00:00 2001 > > > From: bdrouvotAWS > > > Date: Tue, 7 Feb 2023 08:59:47 + > > > Subject: [PATCH v52 3/6] Allow log

Re: Should vacuum process config file reload more often

2023-04-04 Thread Masahiko Sawada
On Wed, Apr 5, 2023 at 5:05 AM Melanie Plageman wrote: > > On Tue, Apr 4, 2023 at 4:27 AM Masahiko Sawada wrote: > > --- > > -if (worker->wi_proc != NULL) > > -elog(DEBUG2, "autovac_balance_cost(pid=%d > > db=%u, rel=%u, dobalance=%s cost_limit=%d, cost_lim

Re: Temporary tables versus wraparound... again

2023-04-04 Thread Greg Stark
On Wed, 29 Mar 2023 at 17:48, Justin Pryzby wrote: > > The patch still occasionally fails its tests under freebsd. > https://cirrus-ci.com/github/postgresql-cfbot/postgresql/commitfest/42/3358 So on the one hand, I don't think the plan is to actually commit the tests. They're very specific to one

Fix code comment in postgres_fdw.c

2023-04-04 Thread Koshi Shibagaki (Fujitsu)
Hi Hackers, This Koshi Shibagaki. I found out that there is a mistake written in contrib/postgres_fdw/postgres_fdw.c. Patch file is attached. The non-existent function name " ExecCheckRTEPerms " was written in the comment in postgresBeginForeignScan. This mistake is considered to have occurred

Re: [BUG] pg_stat_statements and extended query protocol

2023-04-04 Thread Michael Paquier
On Wed, Apr 05, 2023 at 04:07:21AM +, Imseih (AWS), Sami wrote: >> - es_processed: number of tuples processed during one ExecutorRun() >> call. >> - es_total_processed: total number of tuples aggregated across all >> ExecutorRun() calls. > > I thought hard about this point and for some reason

Re: what should install-world do when docs are not available?

2023-04-04 Thread Andres Freund
Hi, On 2023-04-04 21:46:11 -0700, Andres Freund wrote: > Pushed the changes. This failed on crake - afaict because the meson buildfarm code disables all features. Because 'docs' is a feature now, the BF code building doc/src/sgml/html fails. Greetings, Andres Freund

Re: what should install-world do when docs are not available?

2023-04-04 Thread Andres Freund
Hi, On 2023-03-29 17:51:01 -0500, Justin Pryzby wrote: > > +Enables the building of documentation in HTML > > and > > +man format. It defaults to auto. > > + > > +Enables the building of documentation in PDF > > +format. It defaults to auto. > > These sound awkwar

Re: proposal: psql: show current user in prompt

2023-04-04 Thread Pavel Stehule
út 4. 4. 2023 v 21:11 odesílatel Pavel Stehule napsal: > > > út 4. 4. 2023 v 20:50 odesílatel Pavel Stehule > napsal: > >> >> >> út 4. 4. 2023 v 19:55 odesílatel Tom Lane napsal: >> >>> Pavel Stehule writes: >>> > út 4. 4. 2023 v 18:42 odesílatel Tom Lane napsal: >>> >> Basically, I want to r

Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode

2023-04-04 Thread Peter Geoghegan
On Tue, Apr 4, 2023 at 8:14 PM David Rowley wrote: > 14. Not related to this patch, but why do we have half the vacuum > related GUCs in vacuum.c and the other half in globals.c? I see > vacuum_freeze_table_age is defined in vacuum.c but is also needed in > autovacuum.c, so that rules out the glob

Re: [BUG] pg_stat_statements and extended query protocol

2023-04-04 Thread Imseih (AWS), Sami
> Doing nothing for calls now is fine by me, though I > agree that this could be improved at some point, as seeing only 1 > rather than N for each fetch depending on the size is a bit confusing. I think we will need to clearly define what "calls" is. Perhaps as mentioned above, we may need separat

Re: [PATCH] reduce page overlap of GiST indexes built using sorted method

2023-04-04 Thread Alexander Lakhin
Hi, 04.02.2022 03:52, Alexander Korotkov wrote: Thank you for the revision. This patch looks good to me. I've slightly adjusted comments and formatting and wrote the commit message. I'm going to push this if no objections. While exploring the gist test coverage (that is discussed in [1]) I'

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-04-04 Thread John Naylor
On Wed, Apr 5, 2023 at 7:32 AM Andres Freund wrote: > > Portability nit: mdzeroextend() doesn't know whether posix_fallocate() was > > used in FileFallocate(). > > Fair point. I would however like to see a different error message for the two > ways of extending, at least initially. What about ref

Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode

2023-04-04 Thread David Rowley
On Wed, 5 Apr 2023 at 05:53, Melanie Plageman wrote: > Attached v10 addresses the review feedback below. Thanks. Here's another round on v10-0001: 1. The following documentation fragment does not seem to be aligned with the code: 16 GB. The minimum size is the lesser of 1/8 th

Re: POC: Lock updated tuples in tuple_update() and tuple_delete()

2023-04-04 Thread Michael Paquier
On Tue, Apr 04, 2023 at 01:25:46AM +0300, Alexander Korotkov wrote: > Pavel, thank you for you review, revisions and rebase. > We'll reconsider this once v17 is branched. The patch was still in the current CF, so I have moved it to the next one based on the latest updates. -- Michael signature.

Re: [BUG] pg_stat_statements and extended query protocol

2023-04-04 Thread Michael Paquier
On Tue, Apr 04, 2023 at 09:48:17PM +, Imseih (AWS), Sami wrote: > The "calls" tracking is removed from Estate. Unlike v1 however, > I added a check for the operation type. Inside ExecutorRun, > es_total_processed is incremented when the operation is > a SELECT. This check is done for es_process

Re: on placeholder entries in view rule action query's range table

2023-04-04 Thread Amit Langote
On Thu, Jan 12, 2023 at 10:06 AM Tom Lane wrote: > Amit Langote writes: > > On Mon, Jan 9, 2023 at 5:58 AM Tom Lane wrote: > >> Conceivably we could make it work by allowing RTE_SUBQUERY RTEs to > >> carry a relation OID and associated RTEPermissionInfo, so that when a > >> view's RTE_RELATION R

Re: Track IO times in pg_stat_io

2023-04-04 Thread Andres Freund
Hi, On 2023-03-31 15:44:58 -0400, Melanie Plageman wrote: > From 789d4bf1fb749a26523dbcd2c69795916b711c68 Mon Sep 17 00:00:00 2001 > From: Melanie Plageman > Date: Tue, 21 Mar 2023 16:00:55 -0400 > Subject: [PATCH v8 1/4] Count IO time for temp relation writes > > Both pgstat_database and pgBuffe

Re: [PATCH] Add function to_oct

2023-04-04 Thread Kirk Wolak
On Thu, Feb 23, 2023 at 6:32 AM Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 20.12.22 23:08, Eric Radman wrote: > > This patch is a new function based on the implementation of to_hex(int). > > > > Since support for octal integer literals was added, to_oct(int) allows > > octal

Re: Minimal logical decoding on standbys

2023-04-04 Thread Andres Freund
Hi, On 2023-04-04 17:33:25 -0700, Jeff Davis wrote: > On Tue, 2023-04-04 at 14:55 -0400, Robert Haas wrote: > > That's presumably OK, in the > > sense that they'll go back to sleep and eventually wake up again, but > > it means they might end up chronically behind sending out WAL to > > cascading

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-04-04 Thread Melanie Plageman
On Tue, Apr 4, 2023 at 4:35 PM Pavel Luzanov wrote: > > On 03.04.2023 23:50, Melanie Plageman wrote: > > Attached is a tiny patch to add standalone backend type to > > pg_stat_activity documentation (referenced by pg_stat_io). > > > > I mentioned both the bootstrap process and single user mode pro

Re: Minimal logical decoding on standbys

2023-04-04 Thread Jeff Davis
On Tue, 2023-04-04 at 14:55 -0400, Robert Haas wrote: > Thanks for your continued work on $SUBJECT. I just took a look at > 0004, and I think that at the very least the commit message needs > work. Nobody who is not a hacker is going to understand what problem > this is fixing, because it makes ref

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-04-04 Thread Andres Freund
Hi, On 2023-03-30 12:28:57 +0700, John Naylor wrote: > On Thu, Mar 30, 2023 at 10:02 AM Andres Freund wrote: > > Attached is v6. Changes: > > 0006: > > +ereport(ERROR, > +errcode_for_file_access(), > +errmsg("could not extend file \"%s\" with posix_fallocate(): >

Comment typo in recent push

2023-04-04 Thread Peter Smith
There seems to be a comment typo in the recent commit "Perform logical replication actions as the table owner" [1]. /* * Switch back to the original user ID. * * If we created a new GUC nest level, also role back any changes that were * made within it. */ /role back/rollback/ ~~ PSA a tin

CREATE SUBSCRIPTION -- add missing tab-completes

2023-04-04 Thread Peter Smith
There are some recent comment that added new options for CREATE SUBSCRIPTION "Add new predefined role pg_create_subscription." [1] This added a new "password_required" option. "Add a run_as_owner option to subscriptions." [2] This added a "run_as_owner" option. ~~ AFAICT the associated tab-comp

Re: monitoring usage count distribution

2023-04-04 Thread Andres Freund
Hi, On 2023-04-04 14:31:36 -0400, Robert Haas wrote: > On Mon, Jan 30, 2023 at 6:30 PM Nathan Bossart > wrote: > > My colleague Jeremy Schneider (CC'd) was recently looking into usage count > > distributions for various workloads, and he mentioned that it would be nice > > to have an easy way to

Re: monitoring usage count distribution

2023-04-04 Thread Andres Freund
Hi, On 2023-04-04 14:14:36 -0400, Greg Stark wrote: > Tom expressed skepticism that there's wide interest here. It seems as > much from the lack of response. But perhaps that's just because people > don't understand what the importance of this info is -- I certainly > don't :) pg_buffercache has

Re: fill_seq_fork_with_data() initializes buffer without lock

2023-04-04 Thread Andres Freund
Hi, On 2023-04-04 11:55:01 -0700, Andres Freund wrote: > Look at: > > static void > fill_seq_fork_with_data(Relation rel, HeapTuple tuple, ForkNumber forkNum) > { > Buffer buf; > Pagepage; > sequence_magic *sm; > OffsetNumber offnum; > > /* Initia

Re: psql \watch 2nd argument: iteration count

2023-04-04 Thread Kirk Wolak
On Fri, Mar 24, 2023 at 10:32 PM Andrey Borodin wrote: > On Thu, Mar 23, 2023 at 10:15 PM Yugo NAGATA wrote: > > > > Here is my review on the v9 patch. > > > > + /* we do not prevent numerous names iterations like > i=1 i=1 i=1 */ > > + have_sleep = true; > >

Re: monitoring usage count distribution

2023-04-04 Thread Melanie Plageman
On Tue, Apr 4, 2023 at 2:40 PM Tom Lane wrote: > > Robert Haas writes: > > On Mon, Jan 30, 2023 at 6:30 PM Nathan Bossart > > wrote: > >> My colleague Jeremy Schneider (CC'd) was recently looking into usage count > >> distributions for various workloads, and he mentioned that it would be nice >

Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry

2023-04-04 Thread Michael Paquier
On Tue, Apr 04, 2023 at 09:04:34PM +0900, Michael Paquier wrote: > This addition looks OK for me. Thanks for the patch! Okay, finally done. One part that was still not complete to me in light of the information ddfc2d9 has removed is that the number of physical reads could be lower than the repo

Re: Check whether binaries can be released for s390x

2023-04-04 Thread Thomas Munro
On Wed, Apr 5, 2023 at 3:03 AM Robert Haas wrote: > On Tue, Apr 4, 2023 at 9:30 AM Namrata Bhave wrote: > > Thank you for getting back. > > > > The request is mainly for the developer community to build and publish > > s390x binaries, apologies if I wasn't clear earlier. > > We can provide s390x

Re: Parallel Full Hash Join

2023-04-04 Thread Thomas Munro
On Wed, Apr 5, 2023 at 7:37 AM Tom Lane wrote: > The comment is no longer in sync with the code: this if-test used to > reject JOIN_FULL and JOIN_RIGHT, and no longer does so, but the comment > still claims it should. Shouldn't we drop the sentence beginning > "Similarly"? (I see that there's no

Re: [BUG] pg_stat_statements and extended query protocol

2023-04-04 Thread Imseih (AWS), Sami
> I was looking back at this thread, and the suggestion to use one field > in EState sounds fine to me. Sami, would you like to send a new > version of the patch (simplified version based on v1)? Here is v4. The "calls" tracking is removed from Estate. Unlike v1 however, I added a check for the o

Re: doc: add missing "id" attributes to extension packaging page

2023-04-04 Thread Karl O. Pinc
On Tue, 4 Apr 2023 21:52:31 +0200 Brar Piening wrote: > On 04.04.2023 at 16:54, Peter Eisentraut wrote: > > The XSLT implementation looks sound to me.  It would be a touch > > better if it had some comments about which parts of the templates > > were copied from upstream stylesheets and which we

Re: ICU locale validation / canonicalization

2023-04-04 Thread Thomas Munro
MSVC now says this on master: [17:48:12.446] c:\cirrus\src\backend\utils\adt\pg_locale.c(2912) : warning C4715: 'icu_language_tag': not all control paths return a value CI doesn't currently fail for MSVC warnings, so it's a bit hidden. FWIW cfbot does show this with a ⚠ sign with its new system f

Re: psql: Add role's membership options to the \du+ command

2023-04-04 Thread Pavel Luzanov
On 04.04.2023 23:00, Robert Haas wrote: On Tue, Apr 4, 2023 at 3:02 PM David G. Johnston wrote: So, by way of example: regress_du_role1 | cannot login | regress_du_role0 granted by regress_du_admin with admin, inherit, set | Description for regress_du_role1 That seems wider than necessary.

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2023-04-04 Thread Pavel Luzanov
On 03.04.2023 23:50, Melanie Plageman wrote: Attached is a tiny patch to add standalone backend type to pg_stat_activity documentation (referenced by pg_stat_io). I mentioned both the bootstrap process and single user mode process in the docs, though I can't imagine that the bootstrap process is

Re: SQL/JSON revisited

2023-04-04 Thread Andrew Dunstan
On 2023-04-04 Tu 08:36, Alvaro Herrera wrote: Surely this can be made cleaner. By the way -- that comment about clauses being non-standard, can you spot exactly *which* clauses that comment applies to? Sadly, I don't think we're going to be able to make further progress before feature free

Re: Should vacuum process config file reload more often

2023-04-04 Thread Melanie Plageman
On Tue, Apr 4, 2023 at 4:27 AM Masahiko Sawada wrote: > The 0001 patch mostly looks good to me except for one > point: > > @@ -391,7 +389,7 @@ heap_vacuum_rel(Relation rel, VacuumParams *params, > Assert(params->index_cleanup != VACOPTVALUE_UNSPECIFIED); > Assert(params->truncate

Re: psql: Add role's membership options to the \du+ command

2023-04-04 Thread Robert Haas
On Tue, Apr 4, 2023 at 3:02 PM David G. Johnston wrote: > So, by way of example: > > regress_du_role1 | cannot login | regress_du_role0 granted by > regress_du_admin with admin, inherit, set | Description for regress_du_role1 > > ~140 character width with description That seems wider than necess

Re: doc: add missing "id" attributes to extension packaging page

2023-04-04 Thread Brar Piening
On 04.04.2023 at 16:54, Peter Eisentraut wrote: First of all, it works very nicely and is very useful.  Very welcome. Thank you! The XSLT implementation looks sound to me.  It would be a touch better if it had some comments about which parts of the templates were copied from upstream styles

Re: SQL/JSON revisited

2023-04-04 Thread Jonathan S. Katz
On 4/4/23 3:40 PM, Nikita Malakhov wrote: Hi hackers! The latest SQL standard contains dot notation for JSON. Are there any plans to include it into Pg 16? Or maybe we should start a separate thread for it? I would recommend starting a new thread to discuss the dot notation. Thanks, Jonath

Re: SQL/JSON revisited

2023-04-04 Thread Nikita Malakhov
Hi hackers! The latest SQL standard contains dot notation for JSON. Are there any plans to include it into Pg 16? Or maybe we should start a separate thread for it? Thanks! On Tue, Apr 4, 2023 at 3:36 PM Alvaro Herrera wrote: > On 2023-Apr-04, Amit Langote wrote: > > > On Tue, Apr 4, 2023 at

Re: Parallel Full Hash Join

2023-04-04 Thread Tom Lane
Thomas Munro writes: > I committed the main patch. This left the following code in hash_inner_and_outer (joinpath.c): /* * If the joinrel is parallel-safe, we may be able to consider a * partial hash join. However, we can't handle JOIN_UNIQUE_OUTER, * because

Re: proposal: psql: show current user in prompt

2023-04-04 Thread Pavel Stehule
út 4. 4. 2023 v 20:50 odesílatel Pavel Stehule napsal: > > > út 4. 4. 2023 v 19:55 odesílatel Tom Lane napsal: > >> Pavel Stehule writes: >> > út 4. 4. 2023 v 18:42 odesílatel Tom Lane napsal: >> >> Basically, I want to reject this on the grounds that it's not >> >> useful enough to justify th

Re: psql: Add role's membership options to the \du+ command

2023-04-04 Thread David G. Johnston
On Tue, Apr 4, 2023 at 10:37 AM Tom Lane wrote: > Robert Haas writes: > > On Tue, Apr 4, 2023 at 1:12 PM Tom Lane wrote: > >> I wonder if, while we're here, we should apply the idea of > >> joining-with-newlines-not-commas to the attributes column too. > > > That would make the column narrower,

Re: Minimal logical decoding on standbys

2023-04-04 Thread Robert Haas
On Tue, Apr 4, 2023 at 5:44 AM Drouvot, Bertrand wrote: > Oh right, even better, thanks! > Done in V58 and now this is as simple as: > > + if (DoNotInvalidateSlot(s, xid, &oldestLSN)) > { > /* then, we are not forcing for invalidation */ Tha

fill_seq_fork_with_data() initializes buffer without lock

2023-04-04 Thread Andres Freund
Hi, Look at: static void fill_seq_fork_with_data(Relation rel, HeapTuple tuple, ForkNumber forkNum) { Buffer buf; Pagepage; sequence_magic *sm; OffsetNumber offnum; /* Initialize first page of relation with special magic number */

Re: proposal: psql: show current user in prompt

2023-04-04 Thread Pavel Stehule
út 4. 4. 2023 v 19:55 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > út 4. 4. 2023 v 18:42 odesílatel Tom Lane napsal: > >> Basically, I want to reject this on the grounds that it's not > >> useful enough to justify the overhead of marking the "role" GUC > >> as GUC_REPORT. The proble

Re: monitoring usage count distribution

2023-04-04 Thread Tom Lane
Robert Haas writes: > On Mon, Jan 30, 2023 at 6:30 PM Nathan Bossart > wrote: >> My colleague Jeremy Schneider (CC'd) was recently looking into usage count >> distributions for various workloads, and he mentioned that it would be nice >> to have an easy way to do $SUBJECT. > I'm skeptical that

Re: Commitfest 2023-03 starting tomorrow!

2023-04-04 Thread Greg Stark
On Tue, 4 Apr 2023 at 11:18, Tom Lane wrote: > > > * clean up permission checks after 599b33b94 > > I believe that the actual bug fixes are in, and what's left is just a test > case that people weren't very excited about adding. So maybe this should > get closed out as committed. I'm not super c

Re: monitoring usage count distribution

2023-04-04 Thread Robert Haas
On Mon, Jan 30, 2023 at 6:30 PM Nathan Bossart wrote: > My colleague Jeremy Schneider (CC'd) was recently looking into usage count > distributions for various workloads, and he mentioned that it would be nice > to have an easy way to do $SUBJECT. I've attached a patch that adds a > pg_buffercache

Re: monitoring usage count distribution

2023-04-04 Thread Greg Stark
On Mon, 30 Jan 2023 at 18:31, Nathan Bossart wrote: > > My colleague Jeremy Schneider (CC'd) was recently looking into usage count > distributions for various workloads, and he mentioned that it would be nice > to have an easy way to do $SUBJECT. I've attached a patch that adds a > pg_buffercache

Re: Minimal logical decoding on standbys

2023-04-04 Thread Jeff Davis
On Tue, 2023-04-04 at 11:42 +0200, Drouvot, Bertrand wrote: > Done in V58 and now this is as simple as: Minor comments on 0004 (address if you agree): * Consider static inline for WalSndWakeupProcessRequests()? * Is the WalSndWakeup() in KeepFileRestoredFromArchive() more like the flush case? Wh

Re: Remove dead macro exec_subplan_get_plan

2023-04-04 Thread Gregory Stark (as CFM)
On Fri, 16 Sept 2022 at 03:33, Zhang Mingli wrote: > > On Sep 16, 2022, 14:47 +0800, Richard Guo , wrote: > > How about add it to the CF to not lose track of it? > > Will add it, thanks~ I guess not losing track of it is only helpful if we do eventually commit it. Otherwise we would rather lose t

Re: proposal: psql: show current user in prompt

2023-04-04 Thread Tom Lane
Pavel Stehule writes: > út 4. 4. 2023 v 18:42 odesílatel Tom Lane napsal: >> Basically, I want to reject this on the grounds that it's not >> useful enough to justify the overhead of marking the "role" GUC >> as GUC_REPORT. The problems with it not going to work properly >> with old servers are

Re: Minimal logical decoding on standbys

2023-04-04 Thread Andres Freund
Hi, On 2023-04-04 18:54:33 +0200, Drouvot, Bertrand wrote: > if (check_on_xid) > { > if (terminating) > appendStringInfo(&err_msg, _("terminating process %d to release > replication slot \"%s\" because it conflicts with recovery"), > pid, >

Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode

2023-04-04 Thread Melanie Plageman
On Mon, Apr 3, 2023 at 8:37 PM David Rowley wrote: > > On Tue, 4 Apr 2023 at 02:49, Melanie Plageman > wrote: > > v9 attached. > > I've made a pass on the v9-0001 patch only. Here's what I noted down: Thanks for the review! Attached v10 addresses the review feedback below. Remaining TODOs: -

Re: Minimal logical decoding on standbys

2023-04-04 Thread Andres Freund
Hi, On 2023-04-04 13:21:38 +0200, Alvaro Herrera wrote: > On 2023-Apr-03, Andres Freund wrote: > > > Hm? That's what the _'s do. We build strings in parts in other places too. > > No, what _() does is mark each piece for translation separately. But a > translation cannot be done on string piece

Re: possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-04-04 Thread Pavel Stehule
út 4. 4. 2023 v 19:34 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > út 4. 4. 2023 v 16:20 odesílatel Tom Lane napsal: > >> If we do that, then the confusion you were concerned about upthread > >> goes away and we could shorten the keyword back down to > "pg_routine_oid", > >> which se

Re: psql: Add role's membership options to the \du+ command

2023-04-04 Thread Tom Lane
Robert Haas writes: > On Tue, Apr 4, 2023 at 1:12 PM Tom Lane wrote: >> I wonder if, while we're here, we should apply the idea of >> joining-with-newlines-not-commas to the attributes column too. > That would make the column narrower, which might be good, because it > seems to me that listing t

Re: possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-04-04 Thread Tom Lane
Pavel Stehule writes: > út 4. 4. 2023 v 16:20 odesílatel Tom Lane napsal: >> If we do that, then the confusion you were concerned about upthread >> goes away and we could shorten the keyword back down to "pg_routine_oid", >> which seems like a good thing for our carpal tunnels. > has sense OK,

Re: psql: Add role's membership options to the \du+ command

2023-04-04 Thread Robert Haas
On Tue, Apr 4, 2023 at 1:12 PM Tom Lane wrote: > I wonder if, while we're here, we should apply the idea of > joining-with-newlines-not-commas to the attributes column too. > That's another source of inconsistency in the proposed display. That would make the column narrower, which might be good,

Re: proposal: psql: show current user in prompt

2023-04-04 Thread Pavel Stehule
út 4. 4. 2023 v 18:42 odesílatel Tom Lane napsal: > Kirk Wolak writes: > > Changed status to Ready for Committer. (100% Guessing here...) > > Basically, I want to reject this on the grounds that it's not > useful enough to justify the overhead of marking the "role" GUC > as GUC_REPORT. The prob

Re: psql: Add role's membership options to the \du+ command

2023-04-04 Thread Tom Lane
Robert Haas writes: > I'm not sure what the right thing to do is here. It's a problem to > have new information in the catalogs that you can't view via > \d. But displaying that information as a string of > characters that will be gibberish to anyone but an expert doesn't > necessarily seem like i

Re: possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-04-04 Thread Pavel Stehule
út 4. 4. 2023 v 16:20 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > There is reduced patch + regress tests > > One more thing: I do not think it's appropriate to allow this in > GET STACKED DIAGNOSTICS. That's about reporting the place where > an error occurred, not the current locati

Re: Minimal logical decoding on standbys

2023-04-04 Thread Drouvot, Bertrand
Hi, On 4/4/23 1:21 PM, Alvaro Herrera wrote: Hi, On 2023-Apr-03, Andres Freund wrote: Hm? That's what the _'s do. We build strings in parts in other places too. No, what _() does is mark each piece for translation separately. But a translation cannot be done on string pieces, and later hav

RE: [Proposal] Add foreign-server health checks infrastructure

2023-04-04 Thread Hayato Kuroda (Fujitsu)
Dear Fujii-san, Tom, Thank you for giving a suggestion! PSA new version. > Regarding 0001 patch, on second thought, to me, it seems odd to expose > a function that doesn't have anything to directly do with PostgreSQL > as a libpq function. The function simply calls poll() on the socket > with POL

Re: proposal: psql: show current user in prompt

2023-04-04 Thread Tom Lane
Kirk Wolak writes: > Changed status to Ready for Committer. (100% Guessing here...) Basically, I want to reject this on the grounds that it's not useful enough to justify the overhead of marking the "role" GUC as GUC_REPORT. The problems with it not going to work properly with old servers are an

Re: psql: Add role's membership options to the \du+ command

2023-04-04 Thread Robert Haas
On Tue, Apr 4, 2023 at 12:13 PM Tom Lane wrote: > Hmm ... not sure I like the proposed output. The 'a', 'i', 's' > annotations are short but they don't have much else to recommend them. Yeah, I don't like that, either. I'm not sure what the right thing to do is here. It's a problem to have new

Re: psql: Add role's membership options to the \du+ command

2023-04-04 Thread David G. Johnston
On Tue, Apr 4, 2023 at 9:13 AM Tom Lane wrote: > "David G. Johnston" writes: > > I've marked this Ready for Committer. > > Hmm ... not sure I like the proposed output. The 'a', 'i', 's' > annotations are short but they don't have much else to recommend them. > On the other hand, there's nearby

Re: psql: Add role's membership options to the \du+ command

2023-04-04 Thread Tom Lane
"David G. Johnston" writes: > I've marked this Ready for Committer. Hmm ... not sure I like the proposed output. The 'a', 'i', 's' annotations are short but they don't have much else to recommend them. On the other hand, there's nearby precedent for single-letter abbreviations in ACL displays.

Re: running logical replication as the subscription owner

2023-04-04 Thread Robert Haas
On Mon, Apr 3, 2023 at 10:09 PM Noah Misch wrote: > I gather we agree on what to do for v16, which is good. I have committed the patches. -- Robert Haas EDB: http://www.enterprisedb.com

Re: Fix the description of GUC "max_locks_per_transaction" and "max_pred_locks_per_transaction" in guc_table.c

2023-04-04 Thread Tom Lane
Nathan Bossart writes: > On Wed, Feb 22, 2023 at 12:40:07PM +, wangw.f...@fujitsu.com wrote: >> After some rethinking, I think users can easily get exact value according to >> exact formula, and I think using accurate formula can help users adjust >> max_locks_per_transaction or max_predicate_

Re: logical decoding and replication of sequences, take 2

2023-04-04 Thread Gregory Stark (as CFM)
Fwiw the cfbot seems to have some failing tests with this patch: [19:05:11.398] # Failed test 'initial test data replicated' [19:05:11.398] # at t/030_sequences.pl line 75. [19:05:11.398] # got: '1|0|f' [19:05:11.398] # expected: '132|0|t' [19:05:11.398] [19:05:11.398] # Failed test 'advance sequ

Re: Improving btree performance through specializing by key shape, take 2

2023-04-04 Thread Gregory Stark (as CFM)
Hm. The cfbot has a fairly trivial issue with this with a unused variable: 18:36:17.405] In file included from ../../src/include/access/nbtree.h:1184, [18:36:17.405] from verify_nbtree.c:27: [18:36:17.405] verify_nbtree.c: In function ‘palloc_btree_page’: [18:36:17.405] ../../src/include/access/nb

Re: Commitfest 2023-03 starting tomorrow!

2023-04-04 Thread Tom Lane
"Gregory Stark (as CFM)" writes: > However I tried to do a pass of the Needs Review patches and found > that a lot of them were really waiting for comment and seemed to be > useful features or bug fixes that already had a significant amount of > work put into them and seemed likely to get committe

Re: RFC: logical publication via inheritance root?

2023-04-04 Thread Jacob Champion
On Mon, Apr 3, 2023 at 8:53 PM Peter Smith wrote: > > FYI, the WIP patch does not seem to apply cleanly anymore using the latest > HEAD. Yes, sorry -- after 062a84442, the architecture needs to change in a way that I'm still working through. I've moved the patch to Waiting on Author while I figu

Re: Commitfest 2023-03 starting tomorrow!

2023-04-04 Thread Gregory Stark (as CFM)
Only a few more days remain before feature freeze. We've now crossed over 100 patches committed according to the CF app: Status summary: March 15March 22March 28April 4 Needs review: 152 128 116 96 Waiting on Author: 42 36

Re: Check whether binaries can be released for s390x

2023-04-04 Thread Robert Haas
On Tue, Apr 4, 2023 at 9:30 AM Namrata Bhave wrote: > Thank you for getting back. > > The request is mainly for the developer community to build and publish s390x > binaries, apologies if I wasn't clear earlier. > We can provide s390x VMs to build and test postgresql binaries if you feel > infra

Re: doc: add missing "id" attributes to extension packaging page

2023-04-04 Thread Peter Eisentraut
On 23.03.23 20:08, Brar Piening wrote: I've also attached the (unchanged)  make_html_ids_discoverable patch for convenience so this email now contains two patches for postgresql (ending with .postgresql.patch) and one patch for pgweb (ending with .pgweb.patch). Here is my view on this: First o

Re: Minimal logical decoding on standbys

2023-04-04 Thread Drouvot, Bertrand
Hi, On 4/4/23 3:43 PM, Amit Kapila wrote: On Tue, Apr 4, 2023 at 6:05 PM Drouvot, Bertrand I think we might want to consider slot's effective_xmin instead of data.xmin as we use that to store xmin_horizon when we build the full snapshot. Oh, I did not know about the 'effective_xmin' and was

Re: [PATCH] Clarify the behavior of the system when approaching XID wraparound

2023-04-04 Thread Pavel Borisov
On Tue, 4 Apr 2023 at 17:08, Aleksander Alekseev wrote: > > Hi, > > > The proposed changes are in patchset v5. > > Pavel, John, thanks for your feedback. > > > I've looked into the patches v4. > > For 0001: > > I think long "not accepting commands that generate" is equivalent to > > more concise "

Re: [PATCH] Reuse Workers and Replication Slots during Logical Replication

2023-04-04 Thread Gregory Stark (as CFM)
On Sun, 26 Feb 2023 at 19:11, Melanie Plageman wrote: > > This is cool! Thanks for working on this. > I had a chance to review your patchset and I had some thoughts and > questions. It looks like this patch got a pretty solid review from Melanie Plageman in February just before the CF started. It

Re: doc: add missing "id" attributes to extension packaging page

2023-04-04 Thread Peter Eisentraut
On 29.03.23 18:03, Brar Piening wrote: On 29.03.2023 at 06:52, Hayato Kuroda (Fujitsu) wrote: FYI - my patch is pushed Thanks! Could you please rebase your patch? Done and tested. Patch is attached. I have committed the most recent patch that added some missing IDs. (I also added a mi

Re: possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-04-04 Thread Tom Lane
Pavel Stehule writes: > There is reduced patch + regress tests One more thing: I do not think it's appropriate to allow this in GET STACKED DIAGNOSTICS. That's about reporting the place where an error occurred, not the current location. Eventually it might be interesting to retrieve the OID of

Re: Why enable_hashjoin Completely disables HashJoin

2023-04-04 Thread Robert Haas
On Tue, Apr 4, 2023 at 3:38 AM Quan Zongliang wrote: > Because someone noticed that when he set enable_hashjoin, > enable_mergejoin and enable_nestloop to off. The statement seemed to get > stuck (actually because it chose the NestedLoop path, which took a long > long time to run). > If enable_has

Re: Minimal logical decoding on standbys

2023-04-04 Thread Amit Kapila
On Tue, Apr 4, 2023 at 6:05 PM Drouvot, Bertrand wrote: > > On 4/4/23 1:43 PM, Amit Kapila wrote: > > On Tue, Apr 4, 2023 at 3:14 PM Drouvot, Bertrand > > wrote: > >> > > > > > > +static inline bool > > +LogicalReplicationSlotXidsConflict(ReplicationSlot *s, TransactionId xid) > > +{ > > + Transa

Re: Should vacuum process config file reload more often

2023-04-04 Thread Daniel Gustafsson
> On 4 Apr 2023, at 00:35, Melanie Plageman wrote: > > On Mon, Apr 3, 2023 at 3:08 PM Andres Freund wrote: >> On 2023-04-03 14:43:14 -0400, Tom Lane wrote: >>> Melanie Plageman writes: v13 attached with requested updates. >>> >>> I'm afraid I'd not been paying any attention to this discus

RE: Check whether binaries can be released for s390x

2023-04-04 Thread Namrata Bhave
Hi Jonathan, Thank you for getting back. The request is mainly for the developer community to build and publish s390x binaries, apologies if I wasn't clear earlier. We can provide s390x VMs to build and test postgresql binaries if you feel infra is a blocker. Please let me know if any more inf

Re: generic plans and "initial" pruning

2023-04-04 Thread Amit Langote
On Tue, Apr 4, 2023 at 6:41 AM Tom Lane wrote: > Amit Langote writes: > > [ v38 patchset ] > > I spent a little bit of time looking through this, and concluded that > it's not something I will be wanting to push into v16 at this stage. > The patch doesn't seem very close to being committable on i

Re: Check whether binaries can be released for s390x

2023-04-04 Thread Jonathan S. Katz
Hi Namrata, On 4/4/23 8:56 AM, Namrata Bhave wrote: Hi, We are looking forward to get help from community on publishing s390x binaries. As per downloads page, apt repo supports Ubuntu on amd,arm,i386 and ppc64le. We had reached out earlier and are ready to provide infra if needed. Wanted t

Re: ICU locale validation / canonicalization

2023-04-04 Thread Peter Eisentraut
On 31.03.23 12:11, Jeff Davis wrote: On Thu, 2023-03-30 at 08:59 +0200, Peter Eisentraut wrote: I don't think we should show the notice when the canonicalization doesn't change anything.  This is not useful: +NOTICE:  using language tag "und-u-kf-upper" for locale "und-u-kf- upper" Done. Al

Re: [PATCH] Clarify the behavior of the system when approaching XID wraparound

2023-04-04 Thread Aleksander Alekseev
Hi, > The proposed changes are in patchset v5. Pavel, John, thanks for your feedback. > I've looked into the patches v4. > For 0001: > I think long "not accepting commands that generate" is equivalent to > more concise "can't generate". Frankly I don't think this is a good change for this parti

Check whether binaries can be released for s390x

2023-04-04 Thread Namrata Bhave
Hi, We are looking forward to get help from community on publishing s390x binaries. As per downloads page, apt repo supports Ubuntu on amd,arm,i386 and ppc64le. We had reached out earlier and are ready to provide infra if needed. Wanted to check again if community is willing to help. Thank you

Re: SQL/JSON revisited

2023-04-04 Thread Alvaro Herrera
On 2023-Apr-04, Amit Langote wrote: > On Tue, Apr 4, 2023 at 2:16 AM Alvaro Herrera wrote: > > - the gram.y solution to the "ON ERROR/ON EMPTY" clauses is quite ugly. > > I think we could make that stuff use something similar to > > ConstraintAttributeSpec with an accompanying post-processin

Re: Minimal logical decoding on standbys

2023-04-04 Thread Drouvot, Bertrand
Hi, On 4/4/23 1:43 PM, Amit Kapila wrote: On Tue, Apr 4, 2023 at 3:14 PM Drouvot, Bertrand wrote: +static inline bool +LogicalReplicationSlotXidsConflict(ReplicationSlot *s, TransactionId xid) +{ + TransactionId slot_xmin; + TransactionId slot_catalog_xmin; + + slot_xmin = s->data.xmin; +

Re: fairywren exiting in ecpg

2023-04-04 Thread Andrew Dunstan
On 2023-04-03 Mo 21:15, Andres Freund wrote: Hi, Looks like fairywren is possibly seeing something I saw before and spent many days looking into: https://postgr.es/m/20220909235836.lz3igxtkcjb5w7zb%40awork3.anarazel.de which led me to add the following to .cirrus.yml: # Cirrus defaults to

Re: [BUG] pg_stat_statements and extended query protocol

2023-04-04 Thread Michael Paquier
On Tue, Apr 04, 2023 at 03:29:07AM +, Imseih (AWS), Sami wrote: >> We clearly do need to fix the >> reported rowcount for cases where ExecutorRun is invoked more than >> once per ExecutorEnd call; but I think that's sufficient. > > Sure, the original proposed fix, but with tracking the es_tota

Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry

2023-04-04 Thread Michael Paquier
On Wed, Mar 29, 2023 at 07:44:20AM +0200, Drouvot, Bertrand wrote: > Please find a draft attached. This addition looks OK for me. Thanks for the patch! -- Michael signature.asc Description: PGP signature

  1   2   >