Re: Why is hot_standby_feedback off by default?

2023-10-22 Thread sirisha chamarthi
On Sun, Oct 22, 2023 at 4:56 AM Vik Fearing wrote: > On 10/22/23 09:50, sirisha chamarthi wrote: > > Is there any specific reason hot_standby_feedback default is set to off? > > > Yes. No one wants a rogue standby to ruin production. > Agreed. I believe that any reason

Re: Why is hot_standby_feedback off by default?

2023-10-22 Thread sirisha chamarthi
Hi Andres, On Sun, Oct 22, 2023 at 12:08 PM Andres Freund wrote: > Hi, > > On October 22, 2023 4:56:15 AM PDT, Vik Fearing > wrote: > >On 10/22/23 09:50, sirisha chamarthi wrote: > >> Is there any specific reason hot_standby_feedback default is set to off? > >

Why is hot_standby_feedback off by default?

2023-10-22 Thread sirisha chamarthi
Hi Hackers, Is there any specific reason hot_standby_feedback default is set to off? I see some explanation in the thread [1] about recovery_min_apply_delay value > 0 causing table bloat. However, recovery_min_apply_delay is set to 0 by default. So, if a server admin wants to change this value,

Re: Fix documentation for max_wal_size and min_wal_size

2023-04-18 Thread sirisha chamarthi
Hi On Mon, Apr 17, 2023 at 9:38 PM Michael Paquier wrote: > On Mon, Apr 17, 2023 at 07:57:58PM -0700, sirisha chamarthi wrote: > > On Fri, Apr 14, 2023 at 1:01 AM Kyotaro Horiguchi < > horikyota@gmail.com> > > wrote: > >> So, I personally think it should b

Re: Fix documentation for max_wal_size and min_wal_size

2023-04-17 Thread sirisha chamarthi
Hi, On Fri, Apr 14, 2023 at 1:01 AM Kyotaro Horiguchi wrote: > At Thu, 13 Apr 2023 12:01:04 -0700, sirisha chamarthi < > sirichamarth...@gmail.com> wrote in > > The documentation [1] says max_wal_size and min_wal_size defaults are 1GB > > and 80 MB respectively. Howev

Fix documentation for max_wal_size and min_wal_size

2023-04-13 Thread sirisha chamarthi
Hi, The documentation [1] says max_wal_size and min_wal_size defaults are 1GB and 80 MB respectively. However, these are configured based on the wal_segment_size and documentation is not clear about it. Attached a patch to fix the documentation. [1]

Add ps display while waiting for wal in read_local_xlog_page_guts

2023-04-12 Thread sirisha chamarthi
Hi, pg_create_logical_replication_slot can take longer than usual on a standby when there is no activity on the primary. We don't have enough information in the pg_stat_activity or process title to debug why this is taking so long. Attached a small patch to update the process title while waiting

Wasted Vacuum cycles when OldestXmin is not moving

2023-01-10 Thread sirisha chamarthi
Hi Hackers, vacuum is not able to clean up dead tuples when OldestXmin is not moving (because of a long running transaction or when hot_standby_feedback is behind). Even though OldestXmin is not moved from the last time it checked, it keeps retrying every autovacuum_naptime and wastes CPU cycles

Re: Introduce a new view for checkpointer related stats

2022-12-01 Thread sirisha chamarthi
On Thu, Dec 1, 2022 at 9:50 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > On Wed, Nov 30, 2022 at 5:15 PM Bharath Rupireddy > wrote: > > > > I don't have a strong opinion about changing column names. However, if > > we were to change it, I prefer to use names that > >

Re: Prefetch the next tuple's memory during seqscans

2022-11-23 Thread sirisha chamarthi
On Tue, Nov 22, 2022 at 11:44 PM David Rowley wrote: > On Wed, 23 Nov 2022 at 20:29, sirisha chamarthi > wrote: > > I ran your test1 exactly like your setup except the row count is 300 > (with 13275 blocks). Shared_buffers is 128MB and the hardware configuration > det

Re: Prefetch the next tuple's memory during seqscans

2022-11-22 Thread sirisha chamarthi
On Tue, Nov 22, 2022 at 1:58 PM David Rowley wrote: > On Thu, 3 Nov 2022 at 06:25, Andres Freund wrote: > > Attached is an experimental patch/hack for that. It ended up being more > > beneficial to make the access ordering more optimal than prefetching the > tuple > > contents, but I'm not at

Re: Catalog_xmin is not advanced when a logical slot is lost

2022-11-21 Thread sirisha chamarthi
On Mon, Nov 21, 2022 at 10:56 AM Alvaro Herrera wrote: > On 2022-Nov-21, sirisha chamarthi wrote: > > > I have a old .partial file in the data directory to reproduce this. > > I don't think the .partial file is in itself important. But I think > this whole thing is a dis

Re: Catalog_xmin is not advanced when a logical slot is lost

2022-11-21 Thread sirisha chamarthi
On Mon, Nov 21, 2022 at 10:40 AM sirisha chamarthi < sirichamarth...@gmail.com> wrote: > > > On Mon, Nov 21, 2022 at 10:11 AM Alvaro Herrera > wrote: > >> On 2022-Nov-21, sirisha chamarthi wrote: >> >> > It appears to be. wal_sender is setting restart_

Re: Catalog_xmin is not advanced when a logical slot is lost

2022-11-21 Thread sirisha chamarthi
On Mon, Nov 21, 2022 at 10:11 AM Alvaro Herrera wrote: > On 2022-Nov-21, sirisha chamarthi wrote: > > > It appears to be. wal_sender is setting restart_lsn to a valid LSN even > > when the slot is invalidated. > > > postgres@pgvm:~$ /usr/local/pgsql/bin/pg_receivewal -

Re: Catalog_xmin is not advanced when a logical slot is lost

2022-11-21 Thread sirisha chamarthi
On Mon, Nov 21, 2022 at 9:12 AM Alvaro Herrera wrote: > On 2022-Nov-21, sirisha chamarthi wrote: > > > On Mon, Nov 21, 2022 at 8:05 AM Alvaro Herrera > > wrote: > > > > Thank you. I had pushed mine for CirrusCI to test, and it failed the > > > assert

Re: Catalog_xmin is not advanced when a logical slot is lost

2022-11-21 Thread sirisha chamarthi
On Mon, Nov 21, 2022 at 8:05 AM Alvaro Herrera wrote: > On 2022-Nov-21, sirisha chamarthi wrote: > > > > > I am a fan of stricter, all-assumption-covering conditions. In case > we > > > > don't want to check restart_lsn, an Assert might be useful to

Re: Catalog_xmin is not advanced when a logical slot is lost

2022-11-21 Thread sirisha chamarthi
Thanks Alvaro, Ashutosh for your comments. On Mon, Nov 21, 2022 at 6:20 AM Alvaro Herrera wrote: > On 2022-Nov-21, Ashutosh Bapat wrote: > > > Maybe. In that case pg_get_replication_slots() should be changed. We > > should use the same criteria to decide whether a slot is invalidated > > or

Proposal: Allow user with pg_monitor role to call pg_stat_reset* functions

2022-11-21 Thread sirisha chamarthi
Hi Hackers, At present, calling pg_stat_reset* functions requires super user access unless explicitly grant execute permission on those. In this thread, I am proposing to grant execute on them to users with pg_monitor role permissions. This comes handy to the monitoring users (part of pg_monitor

Re: Fix comments atop pg_get_replication_slots

2022-11-20 Thread sirisha chamarthi
Amit, thanks for looking into this! On Sun, Nov 20, 2022 at 11:38 PM Amit Kapila wrote: > On Mon, Nov 21, 2022 at 12:45 PM sirisha chamarthi > wrote: > > > > Hi Hackers, > > > > The comments atop seem to indicate that it is only showing active > replicatio

Fix comments atop pg_get_replication_slots

2022-11-20 Thread sirisha chamarthi
Hi Hackers, The comments atop seem to indicate that it is only showing active replication slots. The comment is ambiguous as it also shows all the slots including lost and inactive slots. Attached a small patch to fix it. Thanks, Sirisha

Catalog_xmin is not advanced when a logical slot is lost

2022-11-20 Thread sirisha chamarthi
Hi Hackers, forking this thread from the discussion [1] as suggested by Amit. Catalog_xmin is not advanced when a logical slot is invalidated (lost) until the invalidated slot is dropped. This patch ignores invalidated slots while computing the oldest xmin. Attached a small patch to address this

Re: Reviving lost replication slots

2022-11-10 Thread sirisha chamarthi
y. > Thanks! If there is a general agreement on this in this forum, I would like to start working on this patch, > > At Tue, 8 Nov 2022 19:39:58 -0800, sirisha chamarthi < > sirichamarth...@gmail.com> wrote in > > > If it's a streaming replication slot, the standby will any

Re: Reviving lost replication slots

2022-11-10 Thread sirisha chamarthi
On Wed, Nov 9, 2022 at 2:37 AM Amit Kapila wrote: > On Fri, Nov 4, 2022 at 1:40 PM sirisha chamarthi > wrote: > > > Is the intent of setting restart_lsn to InvalidXLogRecPtr was to > disallow reviving the slot? > > > > I think the intent i

Re: Reviving lost replication slots

2022-11-08 Thread sirisha chamarthi
On Mon, Nov 7, 2022 at 11:17 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > On Tue, Nov 8, 2022 at 12:08 PM sirisha chamarthi > wrote: > > > > On Fri, Nov 4, 2022 at 11:02 PM Amit Kapila > wrote: > >> > >> On Fri, Nov 4,

Re: Reviving lost replication slots

2022-11-08 Thread sirisha chamarthi
On Tue, Nov 8, 2022 at 1:36 AM Amit Kapila wrote: > On Tue, Nov 8, 2022 at 12:08 PM sirisha chamarthi > wrote: > > > > On Fri, Nov 4, 2022 at 11:02 PM Amit Kapila > wrote: > >> > >> On Fri, Nov 4, 2022 at 1:40 PM sirisha chamarthi > >> wrote: &

Re: Reviving lost replication slots

2022-11-07 Thread sirisha chamarthi
Hi Amit, Thanks for your comments! On Fri, Nov 4, 2022 at 11:02 PM Amit Kapila wrote: > On Fri, Nov 4, 2022 at 1:40 PM sirisha chamarthi > wrote: > > > > A replication slot can be lost when a subscriber is not able to catch up > with the load on the primary and the WA

Reviving lost replication slots

2022-11-04 Thread sirisha chamarthi
Hi, A replication slot can be lost when a subscriber is not able to catch up with the load on the primary and the WAL to catch up exceeds max_slot_wal_keep_size. When this happens, target has to be reseeded (pg_dump) from the scratch and this can take longer. I am investigating the options to

Re: Fix GetWALAvailability function code comments for WALAVAIL_REMOVED return value

2022-10-20 Thread sirisha chamarthi
On Wed, Oct 19, 2022 at 7:59 PM Kyotaro Horiguchi wrote: > At Wed, 19 Oct 2022 13:06:08 +0530, Bharath Rupireddy < > bharath.rupireddyforpostg...@gmail.com> wrote in > > On Wed, Oct 19, 2022 at 12:39 PM sirisha chamarthi > > wrote: > > > > > > The curr

Fix GetWALAvailability function code comments for WALAVAIL_REMOVED return value

2022-10-19 Thread sirisha chamarthi
Hi Hackers, The current code comment says that the replication stream on a slot with the given targetLSN can't continue after a restart but even without a restart the stream cannot continue. The slot is invalidated and the walsender process is terminated by the checkpoint process. Attaching a

Unable to connect to Postgres13 server from psql client built on master

2022-04-12 Thread sirisha chamarthi
Hi hackers. I am unable to connect to my Postgres server (version 13 running) in Azure Postgres from the PSQL client built on the latest master. However, I am able to connect to the Postgres 15 server running locally on the machine. I installed an earlier version of the PSQL client (v 12) and was

Documentation issue with pg_stat_recovery_prefetch

2022-04-11 Thread sirisha chamarthi
Hi, I was going through pg_stat_recovery_prefetch documentation and saw an issue with formatting. Attached a small patch to fix the issue. This is the first time I am sending an email to hackers. Please educate me if I miss something.