RS_EPHEMERAL vs RS_TEMPORARY - Mailing list pgsql-hackers

From Antonin Houska
Subject RS_EPHEMERAL vs RS_TEMPORARY
Date
Msg-id 15192.1582615857@antos
Whole thread Raw
Responses Re: RS_EPHEMERAL vs RS_TEMPORARY
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Vladimir Sitnikov
Date:
Subject: Re: Error on failed COMMIT
Next
From: Peter Eisentraut
Date:
Subject: Re: ALTER TABLE ... SET STORAGE does not propagate to indexes