public inbox for [email protected]help / color / mirror / Atom feed
recovery.conf and archive_cleanup_command 4+ messages / 3 participants [nested] [flat]
* recovery.conf and archive_cleanup_command @ 2022-10-08 12:51 Rita <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Rita @ 2022-10-08 12:51 UTC (permalink / raw) To: pgsql-novice I have primary and standby replication setup. On my primary the archive directory is rather large (30GB) and growing. On my standby I have recovery.conf which has archive_cleanup_command = 'pg_archivecleanup -d /var/lib/pgsql/11/data/archive %r' I was under the impression this line would remove data from my primary AND standby. Is that not the case? -- --- Get your facts first, then you can distort them as you please.-- ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: recovery.conf and archive_cleanup_command @ 2022-10-09 17:32 Laurenz Albe <[email protected]> parent: Rita <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Laurenz Albe @ 2022-10-09 17:32 UTC (permalink / raw) To: Rita <[email protected]>; pgsql-novice On Sat, 2022-10-08 at 08:51 -0400, Rita wrote: > I have primary and standby replication setup. > > On my primary the archive directory is rather large (30GB) and growing. On my standby I have recovery.conf which has > archive_cleanup_command = 'pg_archivecleanup -d /var/lib/pgsql/11/data/archive %r' > > I was under the impression this line would remove data from my primary AND standby. Is that not the case? That depends on your PostgreSQL version, for instance. Also, it depends on whether the standby server is running and actually recovering. Finally, it depends on whether the standby can execute the command successfully or not. Did you look at the standby's logs? Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: recovery.conf and archive_cleanup_command @ 2023-05-12 13:45 Yang Steve <[email protected]> parent: Laurenz Albe <[email protected]> 0 siblings, 1 reply; 4+ messages in thread From: Yang Steve @ 2023-05-12 13:45 UTC (permalink / raw) To: Laurenz Albe <[email protected]>; +Cc: Rita <[email protected]>; pgsql-novice I am using PostgreSQL Version 15 now, however, archive_cleanup_command only triggered on standby box, not on primary. Is that expected as designing? Laurenz Albe <[email protected]> 于2022年10月10日周一 04:33写道: > On Sat, 2022-10-08 at 08:51 -0400, Rita wrote: > > I have primary and standby replication setup. > > > > On my primary the archive directory is rather large (30GB) and growing. > On my standby I have recovery.conf which has > > archive_cleanup_command = 'pg_archivecleanup -d > /var/lib/pgsql/11/data/archive %r' > > > > I was under the impression this line would remove data from my primary > AND standby. Is that not the case? > > That depends on your PostgreSQL version, for instance. > > Also, it depends on whether the standby server is running and actually > recovering. > Finally, it depends on whether the standby can execute the command > successfully or not. > > Did you look at the standby's logs? > > Yours, > Laurenz Albe > -- > Cybertec | https://www.cybertec-postgresql.com > > > ^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: recovery.conf and archive_cleanup_command @ 2023-05-12 14:52 Laurenz Albe <[email protected]> parent: Yang Steve <[email protected]> 0 siblings, 0 replies; 4+ messages in thread From: Laurenz Albe @ 2023-05-12 14:52 UTC (permalink / raw) To: Yang Steve <[email protected]>; +Cc: Rita <[email protected]>; pgsql-novice On Fri, 2023-05-12 at 23:45 +1000, Yang Steve wrote: > Laurenz Albe <[email protected]> 于2022年10月10日周一 04:33写道: > > On Sat, 2022-10-08 at 08:51 -0400, Rita wrote: > > > I have primary and standby replication setup. > > > > > > On my primary the archive directory is rather large (30GB) and growing. On my standby I have recovery.conf which has > > > archive_cleanup_command = 'pg_archivecleanup -d /var/lib/pgsql/11/data/archive %r' > > > > > > I was under the impression this line would remove data from my primary AND standby. Is that not the case? > > > > That depends on your PostgreSQL version, for instance. > > > > Also, it depends on whether the standby server is running and actually recovering. > > Finally, it depends on whether the standby can execute the command successfully or not. > > > > Did you look at the standby's logs? > > I am using PostgreSQL Version 15 now, however, archive_cleanup_command only triggered on standby box, not on primary. > Is that expected as designing? Yes. It is a recovery parameter, and they are only used if PostgreSQL is in recovery. The parameter makes no sense unless you are recovering. Yours, Laurenz Albe ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2023-05-12 14:52 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-10-08 12:51 recovery.conf and archive_cleanup_command Rita <[email protected]> 2022-10-09 17:32 ` Laurenz Albe <[email protected]> 2023-05-12 13:45 ` Yang Steve <[email protected]> 2023-05-12 14:52 ` Laurenz Albe <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox