Re: Synchronizing slots from primary to standby

2024-01-10 Thread Bertrand Drouvot
Hi, On Wed, Jan 10, 2024 at 12:23:14PM +, Zhijie Hou (Fujitsu) wrote: > On Wednesday, January 10, 2024 2:26 PM Dilip Kumar > wrote: > > > > + LogicalConfirmReceivedLocation(remote_slot->confirmed_lsn); > > + LogicalIncreaseXminForSlot(remote_slot->confirmed_lsn, > > +

Re: Make mesage at end-of-recovery less scary.

2024-01-10 Thread Kyotaro Horiguchi
At Fri, 5 Jan 2024 16:02:24 +0530, vignesh C wrote in > On Wed, 22 Nov 2023 at 13:01, Kyotaro Horiguchi > wrote: > > > > Anyway, this requires rebsaing, and done. > > Few tests are failing at [1], kindly post an updated patch: Thanks! The errors occurred in a part of the tests for

Re: speed up a logical replica setup

2024-01-10 Thread Amit Kapila
On Thu, Jan 11, 2024 at 7:59 AM Euler Taveira wrote: > > On Wed, Jan 10, 2024, at 1:33 AM, Shlok Kyal wrote: > > Here the standby node would be waiting for the 'consistent_lsn' wal > during recovery but this wal will not be present on standby if no > physical replication is setup. Hence the

Re: A recent message added to pg_upgade

2024-01-10 Thread Michael Paquier
On Thu, Jan 11, 2024 at 11:25:44AM +0530, Amit Kapila wrote: > On Thu, Jan 11, 2024 at 9:08 AM Michael Paquier wrote: >> Hence, how about something like that: >> "The logical replication launcher is disabled during binary upgrades, >> as a logical replication workers running on the cluster

Re: A recent message added to pg_upgade

2024-01-10 Thread Amit Kapila
On Thu, Jan 11, 2024 at 9:08 AM Michael Paquier wrote: > > On Wed, Jan 10, 2024 at 06:02:12PM +0530, Amit Kapila wrote: > > - if (max_logical_replication_workers == 0) > > + /* > > + * The logical replication launcher is disabled during binary upgrades, > > + * as logical replication workers can

Re: A failure in t/038_save_logical_slots_shutdown.pl

2024-01-10 Thread Amit Kapila
On Wed, Jan 10, 2024 at 2:08 PM Bharath Rupireddy wrote: > > I've been observing a failure in t/038_save_logical_slots_shutdown.pl > of late on my developer system: > > t/038_save_logical_slots_shutdown.pl .. 1/? > # Failed test 'Check that the slot's confirmed_flush LSN is the same > as the

Re: introduce dynamic shared memory registry

2024-01-10 Thread Bharath Rupireddy
On Thu, Jan 11, 2024 at 10:42 AM Michael Paquier wrote: > > >> 3. IIUC, this feature eventually makes both shmem_request_hook and > >> shmem_startup_hook pointless, no? Or put another way, what's the > >> significance of shmem request and startup hooks in lieu of this new > >> feature? I think

Re: A failure in t/038_save_logical_slots_shutdown.pl

2024-01-10 Thread Amit Kapila
On Wed, Jan 10, 2024 at 6:37 PM vignesh C wrote: > > I got the log files from Bharath offline. Thanks Bharath for sharing > the log files offline. > The WAL record sequence is exactly the same in the failing test and > tests which are passing. > One observation in our case the confirmed flush lsn

Introduce XID age and inactive timeout based replication slot invalidation

2024-01-10 Thread Bharath Rupireddy
Hi, Replication slots in postgres will prevent removal of required resources when there is no connection using them (inactive). This consumes storage because neither required WAL nor required rows from the user tables/system catalogs can be removed by VACUUM as long as they are required by a

Re: introduce dynamic shared memory registry

2024-01-10 Thread Michael Paquier
On Mon, Jan 08, 2024 at 11:16:27AM -0600, Nathan Bossart wrote: > On Mon, Jan 08, 2024 at 10:53:17AM +0530, Bharath Rupireddy wrote: >> 1. I think we need to add some notes about this new way of getting >> shared memory for external modules in the Shared Memory and >> LWLocks section in

Re: Show WAL write and fsync stats in pg_stat_io

2024-01-10 Thread Michael Paquier
On Wed, Jan 10, 2024 at 07:24:50PM -0500, Melanie Plageman wrote: > I have code review feedback as well, but I've saved that for my next email. Ah, cool. > On Wed, Jan 3, 2024 at 8:11 AM Nazir Bilal Yavuz wrote: >> On Sun, 31 Dec 2023 at 03:58, Michael Paquier wrote: >> Oh, I understand it

Re: Documentation to upgrade logical replication cluster

2024-01-10 Thread vignesh C
On Wed, 10 Jan 2024 at 15:50, Amit Kapila wrote: > > On Thu, Jan 4, 2024 at 2:22 PM vignesh C wrote: > > > > We have documentation on how to upgrade "publisher" and "subscriber" > > at [1], but currently we do not have any documentation on how to > > upgrade logical replication clusters. > >

Re: Adding facility for injection points (or probe points?) for more advanced tests

2024-01-10 Thread Michael Paquier
On Wed, Jan 10, 2024 at 03:21:03PM +0530, Ashutosh Bapat wrote: > On Tue, Jan 9, 2024 at 10:09 AM Michael Paquier wrote: >>> +#ifdef USE_INJECTION_POINTS >>> +static bool >>> +file_exists(const char *name) >>> >>> There's similar function in jit.c and dfmgr.c. Can we not reuse that code? >> >>

Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

2024-01-10 Thread Tom Lane
Michael Paquier writes: > I am wondering if we'd better backpatch all that, TBH. Seems like a good idea to me. regards, tom lane

Re: add function argument names to regex* functions.

2024-01-10 Thread Dian Fay
On Wed Jan 10, 2024 at 9:18 AM EST, jian he wrote: > On Tue, Jan 9, 2024 at 8:52 AM Dian Fay wrote: > > > > On Mon Jan 8, 2024 at 9:26 AM EST, jian he wrote: > > > On Mon, Jan 8, 2024 at 8:44 AM Dian Fay wrote: > > > > The `regexp_replace` summary in table 9.10 is mismatched and still > > > >

Re: heavily contended lwlocks with long wait queues scale badly

2024-01-10 Thread Michael Paquier
On Wed, Jan 10, 2024 at 09:17:47PM -0600, Nathan Bossart wrote: > Now that commit a4adc31 has had some time to bake and concerns about > unintended consequences may have abated, I wanted to revive this > back-patching discussion. I see a few possibly-related reports [0] [1] > [2], and I'm now

Re: pg_ctl start may return 0 even if the postmaster has been already started on Windows

2024-01-10 Thread Michael Paquier
On Tue, Jan 09, 2024 at 09:40:12PM -0500, Tom Lane wrote: > No Windows expert here, but it does seem like the same argument > applies. Yeah, I've applied the same restriction for pg_regress to avoid similar problems as we spawn a postgres process in this case. I've tested it and it was not

Re: A recent message added to pg_upgade

2024-01-10 Thread Michael Paquier
On Wed, Jan 10, 2024 at 06:02:12PM +0530, Amit Kapila wrote: > - if (max_logical_replication_workers == 0) > + /* > + * The logical replication launcher is disabled during binary upgrades, > + * as logical replication workers can stream data during the upgrade > + * which can cause replication

Re: introduce dynamic shared memory registry

2024-01-10 Thread Nathan Bossart
On Thu, Jan 11, 2024 at 09:50:19AM +0700, Andrei Lepikhov wrote: > On 9/1/2024 00:16, Nathan Bossart wrote: >> On Mon, Jan 08, 2024 at 10:53:17AM +0530, Bharath Rupireddy wrote: >> > 2. FWIW, I'd like to call this whole feature "Support for named DSM >> > segments in Postgres". Do you see anything

Re: Streaming I/O, vectored I/O (WIP)

2024-01-10 Thread Thomas Munro
On Thu, Jan 11, 2024 at 8:58 AM Heikki Linnakangas wrote: > On 10/01/2024 06:13, Thomas Munro wrote: > > Bikeshedding call: I am open to better suggestions for the names > > PrepareReadBuffer() and CompleteReadBuffers(), they seem a little > > grammatically clumsy. > > How will these functions

Re: the s_lock_stuck on perform_spin_delay

2024-01-10 Thread Andy Fan
Robert Haas writes: > Thanks for jumping in with a review, Matthias! FWIW, Matthias is also the first one for this proposal at this thread, thanks for that as well! -- Best Regards Andy Fan

Re: heavily contended lwlocks with long wait queues scale badly

2024-01-10 Thread Nathan Bossart
On Mon, Nov 21, 2022 at 10:31:14AM -0500, Jonathan S. Katz wrote: > On 11/20/22 2:56 PM, Andres Freund wrote: >> I still think it might be worth to backpatch in a bit, but so far the votes >> on >> that weren't clear enough on that to feel comfortable. > > My general feeling is "yes" on

Re: the s_lock_stuck on perform_spin_delay

2024-01-10 Thread Andy Fan
Hi Matthias, Thanks for the review! Matthias van de Meent writes: > On Wed, 10 Jan 2024 at 02:44, Andy Fan wrote: >> Hi, >> >> I want to know if Andres or you have plan >> to do some code review. I don't expect this would happen very soon, just >> want to make sure this will not happen that

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2024-01-10 Thread jian he
On Tue, Jan 9, 2024 at 10:36 PM torikoshia wrote: > > On Tue, Dec 19, 2023 at 10:14 AM Masahiko Sawada > wrote: > > If we want only such a feature we need to implement it together (the > > patch could be split, though). But if some parts of the feature are > > useful for users as well, I'd

Re: introduce dynamic shared memory registry

2024-01-10 Thread Andrei Lepikhov
On 9/1/2024 00:16, Nathan Bossart wrote: On Mon, Jan 08, 2024 at 10:53:17AM +0530, Bharath Rupireddy wrote: 1. I think we need to add some notes about this new way of getting shared memory for external modules in the Shared Memory and LWLocks section in xfunc.sgml? This will at least tell

RE: Random pg_upgrade test failure on drongo

2024-01-10 Thread Hayato Kuroda (Fujitsu)
Dear Alexander, Amit, > > But tomorrow it could be for other tables and if we change this > > TRUNCATE logic for pg_largeobject (of which chances are less) then > > there is always a chance that one misses changing this comment. I feel > > keeping it generic in this case would be better as the

Re: speed up a logical replica setup

2024-01-10 Thread Euler Taveira
On Wed, Jan 10, 2024, at 1:33 AM, Shlok Kyal wrote: > Here the standby node would be waiting for the 'consistent_lsn' wal > during recovery but this wal will not be present on standby if no > physical replication is setup. Hence the command will be waiting > infinitely for the wal. Hmm. Some

Re: Update docs for default value of fdw_tuple_cost

2024-01-10 Thread John Naylor
On Tue, Dec 26, 2023 at 11:27 PM Umair Shahid wrote: > > Commit cac169d686eddb277880a0d8a760ac3007b4846a updated the default value of > fdw_tuple_cost from 0.01 to 0.2. The attached patch updates the docs to > reflect this change. Pushed, thanks!

Re: Synchronizing slots from primary to standby

2024-01-10 Thread Peter Smith
Here are some review comments for patch v58-0002 (FYI - I quickly checked with the latest v59-0002 and AFAIK all these review comments below are still relevant) == Commit message 1. If a logical slot is invalidated on the primary, slot on the standby is also invalidated. ~ /slot on the

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

2024-01-10 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Wed, 10 Jan 2024 16:53:48 +0900, Masahiko Sawada wrote: >> Interesting. But I feel that it introduces another (a bit) >> tricky mechanism... > > Right. On the other hand, I don't think the idea 3 is good

Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-01-10 Thread Masahiko Sawada
On Mon, Jan 8, 2024 at 8:35 PM John Naylor wrote: > > On Wed, Jan 3, 2024 at 9:10 PM John Naylor wrote: > > > > On Tue, Jan 2, 2024 at 8:01 PM Masahiko Sawada > > wrote: > > > > > I agree that we expose RT_LOCK_* functions and have tidstore use them, > > > but am not sure the if

Re: Show WAL write and fsync stats in pg_stat_io

2024-01-10 Thread Melanie Plageman
I have code review feedback as well, but I've saved that for my next email. On Wed, Jan 3, 2024 at 8:11 AM Nazir Bilal Yavuz wrote: > > On Sun, 31 Dec 2023 at 03:58, Michael Paquier wrote: > > > > On Tue, Dec 26, 2023 at 03:35:52PM +0300, Nazir Bilal Yavuz wrote: > > > On Tue, 26 Dec 2023 at

Re: initdb --no-locale=C doesn't work as specified when the environment is not C

2024-01-10 Thread Tom Lane
Kyotaro Horiguchi writes: > It seems somewhat intentional that only lc_messages references the > environment at boot time. On the other hand, previously, in the > absence of a specified locale, initdb would embed the environmental > value in the configuration file, as it seems to be documented.

Re: Built-in CTYPE provider

2024-01-10 Thread Daniel Verite
Jeff Davis wrote: > Attached a more complete version that fixes a few bugs [v15 patch] When selecting the builtin provider with initdb, I'm getting the following setup: $ bin/initdb --locale=C.UTF-8 --locale-provider=builtin -D/tmp/pgdata The database cluster will be initialized

Re: GUCifying MAX_WAL_SEND

2024-01-10 Thread Michael Paquier
On Thu, Jan 11, 2024 at 01:15:48AM +0330, Majid Garoosi wrote: > Why do I think it can be beneficial to GUCify it? > We use Postgres in K8s along with RBD disks. Today, I found out that > because we use remote disks, it's better to read bigger chunks of data from > the disk in one operation. In

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

2024-01-10 Thread Jelte Fennema-Nio
On Wed, 10 Jan 2024 at 22:12, Robert Haas wrote: > Could you explain why you think that the protocol version bump is necessary? Patch 0006 adds a new protocol message to the protocol. Somehow the client needs to be told that the server understands that message. Using the protocol version seems

Re: Emit fewer vacuum records by reaping removable tuples during pruning

2024-01-10 Thread Melanie Plageman
On Wed, Jan 10, 2024 at 3:54 PM Robert Haas wrote: > > On Tue, Jan 9, 2024 at 5:42 PM Melanie Plageman > wrote: > > Done in attached v6. > > Don't kill me, but: > > + /* > +* For now, pass no_indexes == false > regardless of whether or not > +

GUCifying MAX_WAL_SEND

2024-01-10 Thread Majid Garoosi
Hello all, *TL; DR* There has been a discussion about GUCifying the MAX_WAL_SEND constant in walsender.c in here nearly 7 years ago, but resulting in nothing in the end. Today, I found out the configurability of this parameter can be very helpful. So, I

Re: Stack overflow issue

2024-01-10 Thread Heikki Linnakangas
On 05/01/2024 19:23, Robert Haas wrote: On Fri, Nov 24, 2023 at 10:47 AM Heikki Linnakangas wrote: What do you think? At least for 0001 and 0002, I think we should just add the stack depth checks. With regard to 0001, CommitTransactionCommand() and friends are hard enough to understand as

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

2024-01-10 Thread Robert Haas
On Mon, Jan 8, 2024 at 5:52 PM Jelte Fennema-Nio wrote: > It's still bumping the protocol version. I think this is a necessity > with the current changeset, since ParameterSet now applies to plain > GUCs too and. As I clarified in a previous email, this does **not** > break old clients, since the

Re: Emit fewer vacuum records by reaping removable tuples during pruning

2024-01-10 Thread Robert Haas
On Tue, Jan 9, 2024 at 5:42 PM Melanie Plageman wrote: > Done in attached v6. Don't kill me, but: + /* +* For now, pass no_indexes == false regardless of whether or not +* the relation has indexes. In the future we may enable

Re: Create shorthand for including all extra tests

2024-01-10 Thread Peter Eisentraut
On 05.09.23 19:26, Nazir Bilal Yavuz wrote: Thanks for the feedback! I updated the patch, 'needs-private-lo' option enables kerberos, ldap, load_balance and ssl extra tests now. As was discussed, I don't think "needs private lo" is the only condition for these tests. At least kerberos and

Re: Streaming I/O, vectored I/O (WIP)

2024-01-10 Thread Heikki Linnakangas
On 10/01/2024 06:13, Thomas Munro wrote: Bikeshedding call: I am open to better suggestions for the names PrepareReadBuffer() and CompleteReadBuffers(), they seem a little grammatically clumsy. How will these functions work in the brave new async I/O world? I assume PrepareReadBuffer() will

Re: Make psql ignore trailing semicolons in \sf, \ef, etc

2024-01-10 Thread Tom Lane
Laurenz Albe writes: > On Mon, 2024-01-08 at 15:48 -0500, Tom Lane wrote: >> Is this enough of a bug to deserve back-patching? I'm not sure. > I like the patch, but I wouldn't back-patch it. I'd call the current > behavior a slight inconsistency rather than an outright bug, and I think > that

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

2024-01-10 Thread Jelte Fennema-Nio
v6 attached with the following changes: 1. Fixed rebase conflicts with master 2. removed PGC_S_PROTOCOL (but kept PGC_PROTOCOL and PGC_SU_PROTOCOL). This extra source level was not needed. And after some more testing I realized this extra source level even caused problems, since protocol

Re: Postgres Partitions Limitations (5.11.2.3)

2024-01-10 Thread Laurenz Albe
On Wed, 2024-01-10 at 13:41 +0100, Magnus Hagander wrote: > It still reads a bit weird to me. How about the attached wording instead? Thanks! I am fine with your wording. Yours, Laurenz Albe

Re: [PATCH] Add sortsupport for range types and btree_gist

2024-01-10 Thread Bernd Helmle
Am Mittwoch, dem 10.01.2024 um 20:13 +0500 schrieb Andrey M. Borodin: > I think GiST sortsupport comments are more relevant, so there's no > need for this pfree()s. > > Also, please check other thread, maybe you will find some useful code > there [0,1]. It was committed[2] once, but reverted.

Re: Add BF member koel-like indentation checks to SanityCheck CI

2024-01-10 Thread Tristan Partin
On Wed Jan 10, 2024 at 1:58 AM CST, Tom Lane wrote: Bharath Rupireddy writes: > IMO, running the > pgindent in at least one of the CI systems if not all (either as part > task SyanityCheck or task Linux - Debian Bullseye - Autoconf) help > catches things early on in CF bot runs itself. This

Re: [PATCH] Add sortsupport for range types and btree_gist

2024-01-10 Thread Bernd Helmle
Am Mittwoch, dem 10.01.2024 um 08:00 +0800 schrieb jian he: > you do  `CREATE INDEX ON pgbench_accounts USING gist(aid);` > but the original patch didn't change contrib/btree_gist/btree_int4.c > So I doubt your benchmark is related to the original patch. > or maybe I missed something. > The

Re: Test slots invalidations in 035_standby_logical_decoding.pl only if dead rows are removed

2024-01-10 Thread Bertrand Drouvot
Hi, On Wed, Jan 10, 2024 at 05:00:01PM +0300, Alexander Lakhin wrote: > 10.01.2024 12:46, Bertrand Drouvot wrote: > > > Would it be possible to also send the standby logs? > > Yes, please look at the attached logs. This time I've build postgres with > -DWAL_DEBUG and ran tests with TEMP_CONFIG

Re: Relation bulk write facility

2024-01-10 Thread Robert Haas
On Fri, Nov 24, 2023 at 10:22 PM Heikki Linnakangas wrote: > Yeah, I'm not very happy with this interface. The model is that you get > a buffer to write to by calling bulkw_alloc_buf(). Later, you hand it > over to bulkw_write(), which takes ownership of it and frees it later. > There is no other

Re: the s_lock_stuck on perform_spin_delay

2024-01-10 Thread Robert Haas
Thanks for jumping in with a review, Matthias! On Wed, Jan 10, 2024 at 8:03 AM Matthias van de Meent wrote: > I'm not 100% sure on the policy of this, but theoretically you could > use LockAquireExtended(dontWait=true) while holding a spin lock, as > that would not have an unknown duration. Then

Re: Custom explain options

2024-01-10 Thread Andrei Lepikhov
On 10/1/2024 20:27, Konstantin Knizhnik wrote: On 10/01/2024 8:46 am, Michael Paquier wrote: On Wed, Jan 10, 2024 at 01:29:30PM +0700, Andrei Lepikhov wrote: What do you think about this really useful feature? Do you wish to develop it further? I am biased here.  This seems like a lot of

Re: Multidimensional Histograms

2024-01-10 Thread Andrei Lepikhov
On 8/1/2024 16:21, Alexander Cheshev wrote: Hi Andrei, Maybe my wording needed to be more precise. I didn't implement multidimensional histograms before, so I don't know how expensive they are. I meant that for dependency statistics over about six columns, we have a lot of combinations to

Re: [PATCH] Add sortsupport for range types and btree_gist

2024-01-10 Thread Andrey M. Borodin
> On 10 Jan 2024, at 19:18, jian he wrote: > > what I am confused: > In fmgr.h > > /* > * Support for cleaning up detoasted copies of inputs. This must only > * be used for pass-by-ref datatypes, and normally would only be used > * for toastable types. If the given pointer is different

Re: POC: Extension for adding distributed tracing - pg_tracing

2024-01-10 Thread Jelte Fennema-Nio
On Wed, 10 Jan 2024 at 15:55, Anthonin Bonnefoy wrote: > PREPARE test_prepared (text, integer) AS /*$1*/ SELECT $2; > EXECUTE > test_prepared('dddbs=''postgres.db'',traceparent=''00-0009-0009-01''', > 1); Wow, I had no idea that parameters could be

Re: Random pg_upgrade test failure on drongo

2024-01-10 Thread Alexander Lakhin
10.01.2024 13:37, Amit Kapila wrote: But tomorrow it could be for other tables and if we change this TRUNCATE logic for pg_largeobject (of which chances are less) then there is always a chance that one misses changing this comment. I feel keeping it generic in this case would be better as the

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2024-01-10 Thread Bharath Rupireddy
On Fri, Jan 5, 2024 at 7:20 AM Jeff Davis wrote: > > On Wed, 2023-12-20 at 15:36 +0530, Bharath Rupireddy wrote: > > Thanks. Attaching remaining patches as v18 patch-set after commits > > c3a8e2a7cb16 and 766571be1659. > > Comments: Thanks for reviewing. > I still think the right thing for this

Re: [PATCH] Add sortsupport for range types and btree_gist

2024-01-10 Thread jian he
On Wed, Jan 10, 2024 at 8:00 AM jian he wrote: > > ` > from the doc, add sortsupport function will only influence index build time? > > +/* > + * GiST sortsupport comparator for ranges. > + * > + * Operates solely on the lower bounds of the ranges, comparing them using > + * range_cmp_bounds(). >

Re: add function argument names to regex* functions.

2024-01-10 Thread jian he
On Tue, Jan 9, 2024 at 8:52 AM Dian Fay wrote: > > On Mon Jan 8, 2024 at 9:26 AM EST, jian he wrote: > > On Mon, Jan 8, 2024 at 8:44 AM Dian Fay wrote: > > > The `regexp_replace` summary in table 9.10 is mismatched and still > > > specifies the first parameter name as `string` instead of

Re: System username in pg_stat_activity

2024-01-10 Thread Joe Conway
On 1/10/24 08:59, Magnus Hagander wrote: On Wed, Jan 10, 2024 at 2:56 PM Bertrand Drouvot I think it depends what we want the new field to reflect. If it is the exact same thing as the SYSTEM_USER then I think it has to be text (as the SYSTEM_USER is made of "auth_method:identity"). Now if we

Re: System username in pg_stat_activity

2024-01-10 Thread Bertrand Drouvot
Hi, On Wed, Jan 10, 2024 at 02:59:42PM +0100, Magnus Hagander wrote: > On Wed, Jan 10, 2024 at 2:56 PM Bertrand Drouvot > I definitely think it should be the same. If it's not exactly the > same, then it should be *two* columns, one with auth method and one > with the name. > > And thinking more

Re: System username in pg_stat_activity

2024-01-10 Thread Magnus Hagander
On Wed, Jan 10, 2024 at 2:56 PM Bertrand Drouvot wrote: > > Hi, > > On Wed, Jan 10, 2024 at 02:08:03PM +0100, Magnus Hagander wrote: > > On Wed, Jan 10, 2024 at 1:44 PM Aleksander Alekseev > > wrote: > > > > > > Hi, > > > > > > Thanks for the patch. > > +1 > > > > > This overlaps with for

Re: Custom explain options

2024-01-10 Thread Konstantin Knizhnik
On 09/01/2024 10:33 am, vignesh C wrote: On Sat, 21 Oct 2023 at 18:34, Konstantin Knizhnik wrote: Hi hackers, EXPLAIN statement has a list of options (i.e. ANALYZE, BUFFERS, COST,...) which help to provide useful details of query execution. In Neon we have added PREFETCH option which shows

Re: System username in pg_stat_activity

2024-01-10 Thread Bertrand Drouvot
Hi, On Wed, Jan 10, 2024 at 02:08:03PM +0100, Magnus Hagander wrote: > On Wed, Jan 10, 2024 at 1:44 PM Aleksander Alekseev > wrote: > > > > Hi, > > > > Thanks for the patch. +1 > > > This overlaps with for example the values in pg_stat_gss, but it will > > > include values for authentication

Re: System username in pg_stat_activity

2024-01-10 Thread Magnus Hagander
On Wed, Jan 10, 2024 at 2:27 PM Dagfinn Ilmari Mannsåker wrote: > > Magnus Hagander writes: > > > On Wed, Jan 10, 2024 at 1:44 PM Aleksander Alekseev > > wrote: > >> > >> It hurts my sense of beauty that usename and authname are of different > >> types. But if I'm the only one, maybe we can

Re: Custom explain options

2024-01-10 Thread Konstantin Knizhnik
On 10/01/2024 8:29 am, Andrei Lepikhov wrote: On 30/11/2023 22:40, Konstantin Knizhnik wrote: In all this cases we are using array of `Instrumentation` and if it contains varying part, then it is not clear where to place it. Yes, there is also code which serialize and sends instrumentations

Re: System username in pg_stat_activity

2024-01-10 Thread Dagfinn Ilmari Mannsåker
Magnus Hagander writes: > On Wed, Jan 10, 2024 at 1:44 PM Aleksander Alekseev > wrote: >> >> It hurts my sense of beauty that usename and authname are of different >> types. But if I'm the only one, maybe we can close our eyes on this. >> Also I suspect that placing usename and authname in a

Re: Custom explain options

2024-01-10 Thread Konstantin Knizhnik
On 10/01/2024 8:46 am, Michael Paquier wrote: On Wed, Jan 10, 2024 at 01:29:30PM +0700, Andrei Lepikhov wrote: What do you think about this really useful feature? Do you wish to develop it further? I am biased here. This seems like a lot of code for something we've been delegating to the

Re: Make attstattarget nullable

2024-01-10 Thread Alvaro Herrera
On 2023-Dec-23, Peter Eisentraut wrote: > Here is an updated patch rebased over 3e2e0d5ad7. > > The 0001 patch stands on its own, but I also tacked on two additional WIP > patches that simplify some pg_attribute handling and make these kinds of > refactorings simpler in the future. See

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

2024-01-10 Thread vignesh C
On Wed, 10 Jan 2024 at 15:04, Amit Kapila wrote: > > On Wed, Jan 10, 2024 at 2:59 PM Shlok Kyal wrote: > > > > This patch is not applying on the HEAD. Please rebase and share the > > updated patch. > > > > IIRC, there were some regressions observed with this patch. So, one > needs to analyze

Re: System username in pg_stat_activity

2024-01-10 Thread Magnus Hagander
On Wed, Jan 10, 2024 at 1:44 PM Aleksander Alekseev wrote: > > Hi, > > Thanks for the patch. > > > The attached patch adds a column "authuser" to pg_stat_activity which > > contains the username of the externally authenticated user, being the > > same value as the SYSTEM_USER keyword returns in a

Re: A failure in t/038_save_logical_slots_shutdown.pl

2024-01-10 Thread vignesh C
On Wed, 10 Jan 2024 at 14:08, Bharath Rupireddy wrote: > > Hi, > > I've been observing a failure in t/038_save_logical_slots_shutdown.pl > of late on my developer system: > > t/038_save_logical_slots_shutdown.pl .. 1/? > # Failed test 'Check that the slot's confirmed_flush LSN is the same > as

Re: the s_lock_stuck on perform_spin_delay

2024-01-10 Thread Matthias van de Meent
On Wed, 10 Jan 2024 at 02:44, Andy Fan wrote: > Hi, > > I want to know if Andres or you have plan > to do some code review. I don't expect this would happen very soon, just > want to make sure this will not happen that both of you think the other > one will do, but actually none of them does it

Re: Show WAL write and fsync stats in pg_stat_io

2024-01-10 Thread Nazir Bilal Yavuz
Hi, On Wed, 10 Jan 2024 at 08:25, Michael Paquier wrote: > > On Wed, Jan 03, 2024 at 04:10:58PM +0300, Nazir Bilal Yavuz wrote: > > > > I thought removing op_bytes completely ( as you said "This patch > > extends it with two more operation sizes, and there are even cases > > where it may be a

Re: System username in pg_stat_activity

2024-01-10 Thread Aleksander Alekseev
Hi, Thanks for the patch. > The attached patch adds a column "authuser" to pg_stat_activity which > contains the username of the externally authenticated user, being the > same value as the SYSTEM_USER keyword returns in a backend. I believe what was meant is "authname", not "authuser". > This

Re: Postgres Partitions Limitations (5.11.2.3)

2024-01-10 Thread Magnus Hagander
On Tue, Dec 5, 2023 at 3:57 PM Ashutosh Bapat wrote: > > On Tue, Dec 5, 2023 at 1:40 AM Laurenz Albe wrote: > > > > On Fri, 2023-12-01 at 18:49 +0530, Ashutosh Bapat wrote: > > > On Thu, Nov 30, 2023 at 10:29 PM Laurenz Albe > > > wrote: > > > > > > > > On Thu, 2023-11-30 at 19:22 +0530,

Re: Refactoring backend fork+exec code

2024-01-10 Thread Heikki Linnakangas
On 08/12/2023 14:33, Heikki Linnakangas wrote: + [PMC_AV_LAUNCHER] = {"autovacuum launcher", AutoVacLauncherMain, true}, + [PMC_AV_WORKER] = {"autovacuum worker", AutoVacWorkerMain, true}, + [PMC_BGWORKER] = {"bgworker", BackgroundWorkerMain, true}, + [PMC_SYSLOGGER] =

Re: [patch] pg_basebackup: mention that spread checkpoints are the default in --help

2024-01-10 Thread Magnus Hagander
On Tue, Oct 31, 2023 at 8:01 PM Michael Banck wrote: > > Hi, > > On Tue, Oct 31, 2023 at 04:59:24PM +0530, Shlok Kyal wrote: > > I went through the Cfbot for this patch and found out that the build > > is failing with the following error (Link: > >

Re: A recent message added to pg_upgade

2024-01-10 Thread Amit Kapila
On Wed, Jan 10, 2024 at 10:11 AM Michael Paquier wrote: > > On Wed, Nov 15, 2023 at 07:58:06AM +0530, Amit Kapila wrote: > > I am fine with this but there is no harm in doing this before or along > > with the main patch. As of now, I don't see any problem but as the > > main patch is still under

Re: Compile warnings in dbcommands.c building with meson

2024-01-10 Thread Aleksander Alekseev
Hi, > When building current head on debian bullseye I get this compile warning: > > In file included from ../src/backend/commands/dbcommands.c:20: > ../src/backend/commands/dbcommands.c: In function ‘createdb’: > ../src/include/postgres.h:104:9: warning: ‘src_hasloginevt’ may be > used

Re: Slightly improved meson error for docs tools

2024-01-10 Thread Aleksander Alekseev
Hi, > least lists what's expected -- I'm not sure if this is the way to go, > or if we should somehow list the individual tools that are failing > here? Personally I think the patch is OK. -- Best regards, Aleksander Alekseev

System username in pg_stat_activity

2024-01-10 Thread Magnus Hagander
The attached patch adds a column "authuser" to pg_stat_activity which contains the username of the externally authenticated user, being the same value as the SYSTEM_USER keyword returns in a backend. This overlaps with for example the values in pg_stat_gss, but it will include values for

Slightly improved meson error for docs tools

2024-01-10 Thread Magnus Hagander
The meson build doesn't tell you what tool is missing when trying to build the docs (and you don't have it in the path.. sigh), it just tells you that something is missing. Attached is a small patch that at least lists what's expected -- I'm not sure if this is the way to go, or if we should

Re: WIP Incremental JSON Parser

2024-01-10 Thread Andrew Dunstan
On 2024-01-09 Tu 13:46, Jacob Champion wrote: On Tue, Dec 26, 2023 at 8:49 AM Andrew Dunstan wrote: Quite a long time ago Robert asked me about the possibility of an incremental JSON parser. I wrote one, and I've tweaked it a bit, but the performance is significantly worse that that of the

Re: Random pg_upgrade test failure on drongo

2024-01-10 Thread Amit Kapila
On Wed, Jan 10, 2024 at 3:30 PM Alexander Lakhin wrote: > > 10.01.2024 12:31, Amit Kapila wrote: > > I am slightly hesitant to add any particular system table name in the > > comments as this can happen for any other system table as well, so > > slightly adjusted the comments in the attached.

Compile warnings in dbcommands.c building with meson

2024-01-10 Thread Magnus Hagander
When building current head on debian bullseye I get this compile warning: In file included from ../src/backend/commands/dbcommands.c:20: ../src/backend/commands/dbcommands.c: In function ‘createdb’: ../src/include/postgres.h:104:9: warning: ‘src_hasloginevt’ may be used uninitialized in this

Re: Documentation to upgrade logical replication cluster

2024-01-10 Thread Amit Kapila
On Mon, Jan 8, 2024 at 12:52 PM Bharath Rupireddy wrote: > > On Thu, Jan 4, 2024 at 2:22 PM vignesh C wrote: > > > > Hi, > > > > We have documentation on how to upgrade "publisher" and "subscriber" > > at [1], but currently we do not have any documentation on how to > > upgrade logical

Re: Documentation to upgrade logical replication cluster

2024-01-10 Thread Amit Kapila
On Thu, Jan 4, 2024 at 2:22 PM vignesh C wrote: > > We have documentation on how to upgrade "publisher" and "subscriber" > at [1], but currently we do not have any documentation on how to > upgrade logical replication clusters. > Here is a patch to document how to upgrade different logical >

Re: Is the subtype_diff function in CREATE TYPE only can be C function?

2024-01-10 Thread Ashutosh Bapat
On Wed, Jan 10, 2024 at 1:49 PM ddme wrote: > > Hi all, > > I notice that the CREATE TYPE syntax can specify subtype_diff function > > CREATE TYPE name AS RANGE ( > SUBTYPE = subtype > [ , SUBTYPE_OPCLASS = subtype_operator_class ] > [ , COLLATION = collation ] > [ , CANONICAL =

Re: Extend pgbench partitioning to pgbench_history

2024-01-10 Thread Shlok Kyal
Sorry, I did not intend to send this message for this email. I by mistake sent this mail. Please ignore this mail On Wed, 10 Jan 2024 at 15:27, Shlok Kyal wrote: > > Hi, > > There are some test failures reported by Cfbot at [1]: > > [09:15:01.794] 192/276 postgresql:pgbench / >

Re: Random pg_upgrade test failure on drongo

2024-01-10 Thread Alexander Lakhin
10.01.2024 12:31, Amit Kapila wrote: I am slightly hesitant to add any particular system table name in the comments as this can happen for any other system table as well, so slightly adjusted the comments in the attached. However, I think it is okay to mention the particular system table name in

Re: Extend pgbench partitioning to pgbench_history

2024-01-10 Thread Shlok Kyal
Hi, There are some test failures reported by Cfbot at [1]: [09:15:01.794] 192/276 postgresql:pgbench / pgbench/001_pgbench_with_server ERROR 7.48s exit status 3 [09:15:01.794] >>> INITDB_TEMPLATE=/tmp/cirrus-ci-build/build/tmp_install/initdb-template

Re: Adding facility for injection points (or probe points?) for more advanced tests

2024-01-10 Thread Ashutosh Bapat
On Tue, Jan 9, 2024 at 10:09 AM Michael Paquier wrote: > > Okay, I can see your point. I have reorganized the docs in the > following order: > - INJECTION_POINT > - Attach > - Detach Thanks. This looks better. Needs further wordsmithy. But that can wait till the code has been reviewed. > > >

Re: Test slots invalidations in 035_standby_logical_decoding.pl only if dead rows are removed

2024-01-10 Thread Bertrand Drouvot
Hi, On Tue, Jan 09, 2024 at 08:00:00PM +0300, Alexander Lakhin wrote: > Michael, it definitely increases stability of the test (tens of iterations > with 20 tests in parallel performed successfully), Thanks for testing! > although I've managed to > see another interesting failure (twice): > 13  

Re: speed up a logical replica setup

2024-01-10 Thread vignesh C
On Wed, 6 Dec 2023 at 12:53, Euler Taveira wrote: > > On Thu, Nov 9, 2023, at 8:12 PM, Michael Paquier wrote: > > On Thu, Nov 09, 2023 at 03:41:53PM +0100, Peter Eisentraut wrote: > > On 08.11.23 00:12, Michael Paquier wrote: > >> - Should the subdirectory pg_basebackup be renamed into something

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

2024-01-10 Thread Amit Kapila
On Wed, Jan 10, 2024 at 2:59 PM Shlok Kyal wrote: > > This patch is not applying on the HEAD. Please rebase and share the > updated patch. > IIRC, there were some regressions observed with this patch. So, one needs to analyze those as well. I think we should mark it as "Returned with feedback".

Re: Random pg_upgrade test failure on drongo

2024-01-10 Thread Amit Kapila
On Tue, Jan 9, 2024 at 4:30 PM Alexander Lakhin wrote: > > 09.01.2024 13:08, Amit Kapila wrote: > > > >> As to checkpoint_timeout, personally I would not increase it, because it > >> seems unbelievable to me that pg_restore (with the cluster containing only > >> two empty databases) can run for

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

2024-01-10 Thread Shlok Kyal
Hi, This patch is not applying on the HEAD. Please rebase and share the updated patch. Thanks and Regards Shlok Kyal On Wed, 10 Jan 2024 at 14:55, Peter Smith wrote: > > Oops - now with attachments > > On Mon, Aug 21, 2023 at 5:56 PM Peter Smith wrote: >> >> Hi Melih, >> >> Last week we

Re: Relation bulk write facility

2024-01-10 Thread Heikki Linnakangas
On 09/01/2024 08:50, vignesh C wrote: There are few compilation errors reported by CFBot at [1], patch needs to be rebased: Here you go. -- Heikki Linnakangas Neon (https://neon.tech) From b1791303c54da762ecf3d63f1a60d5b93732af57 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed,

  1   2   >