I'm trying to figure out what's specific about RS_EPHEMERAL and RS_TEMPORARY
slot kinds. The following comment (see definition of the
ReplicationSlotPersistency enumeration) tells when each kind is dropped

 * Slots marked as PERSISTENT are crash-safe and will not be dropped when
 * released. Slots marked as EPHEMERAL will be dropped when released or after
 * restarts.  Slots marked TEMPORARY will be dropped at the end of a session
 * or on error.
...
typedef enum ReplicationSlotPersistency

However I don't see the actual difference: whenever ReplicationSlotCleanup()
is called (on error or session end), ReplicationSlotRelease() has already been
called too. And as for server restart, I see that RestoreSlotFromDisk()
discards both EPHEMERAL and TEMPORARY. Do we really need both of them?

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com


Reply via email to