Re: RS_EPHEMERAL vs RS_TEMPORARY

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Antonin Houska <ah(at)cybertec(dot)at>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: RS_EPHEMERAL vs RS_TEMPORARY
Date: 2020-02-25 08:01:23
Message-ID: e81812de-036f-6040-884a-2448ae5c5ea0@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2020-02-25 08:30, Antonin Houska wrote:
> 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

The general idea is that an "ephemeral" slot is a future persistent slot
that is not completely initialized yet. If there is a crash and you
find an ephemeral slot, you can clean it up. The name is perhaps a bit
odd, you can think of it as an uninitialized one. A temporary slot is
one that behaves like a temporary table: It is removed at the end of a
session.

Perhaps the implementation differences are not big or are none, but it's
relevant for reporting. For example, the pg_replication_slots view
shows which slots are temporary. You wouldn't want to show an ephemeral
slot as temporary.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message 王胜利 2020-02-25 08:03:12 Re: [Proposal] Add accumulated statistics for wait event
Previous Message Robert Haas 2020-02-25 07:55:03 Re: Error on failed COMMIT