Re: logical replication snapshots - Mailing list pgsql-general

From Andres Freund
Subject Re: logical replication snapshots
Date
Msg-id 20180726204423.sh5ns63pqdwdn3av@alap3.anarazel.de
Whole thread Raw
In response to Re: logical replication snapshots  (Dimitri Maziuk <dmaziuk@bmrb.wisc.edu>)
List pgsql-general
On 2018-07-26 12:54:19 -0500, Dimitri Maziuk wrote:
> >> "LOG:  logical decoding found consistent point at 19/E6942440"
> >> DETAIL:  There are no running transactions."
> >>
> >> Others with more experience in this area would need to fill whether that
> >> might account for the 13 million files in the ~snapshot/ directory.
> > 
> > That indicates there's some error handling issues to be resolved. Petr?
> 
> It logs "COPY TO STDOUT", does that actually cache to disk (in ~snapshot/)?

No, it doesn't. The snapshots are internal to logical replication.


> Would it be safe to delete every file in ~snapshot/ older than some
> X-number of minutes? (And what a good X might be?)

You shouldn't manually delete them. But an explicit 'checkpoint;' (and
all automatically triggered ones), should do so for all that are
older. Is there a chance that you have some old leftover replication
slots around? Because that'd prevent cleanup?

What does SELECT * FROM pg_replication_slots ; return?

Greetings,

Andres Freund


pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: logical replication snapshots
Next
From: Dimitri Maziuk
Date:
Subject: Re: logical replication snapshots