Re: Few observations in replication slots related code
От | Amit Kapila |
---|---|
Тема | Re: Few observations in replication slots related code |
Дата | |
Msg-id | CAA4eK1JERi+P8L0jJ_3AJ1bJUNqa8RVekyUSBU510GqQW237pw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Few observations in replication slots related code (Andres Freund <andres@2ndquadrant.com>) |
Ответы |
Re: Few observations in replication slots related code
|
Список | pgsql-hackers |
On Fri, Jun 13, 2014 at 1:45 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> On 2014-06-13 13:01:59 +0530, Amit Kapila wrote:
> > Okay, but if it crashes before saving the persistency to permanent
> > file and there remains a .tmp for this replication slot which it created
> > during save of this persistency information, then also xmin will get
> > lost, because during startup it will not consider such a slot.
>
> I can't follow here. If it crashes before it's marked persistent it'll
> get deleted at startup (c.f. RestoreSlotFromDisk). And .tmp slots are
> cleaned up at restart.
> On 2014-06-13 13:01:59 +0530, Amit Kapila wrote:
> > Okay, but if it crashes before saving the persistency to permanent
> > file and there remains a .tmp for this replication slot which it created
> > during save of this persistency information, then also xmin will get
> > lost, because during startup it will not consider such a slot.
>
> I can't follow here. If it crashes before it's marked persistent it'll
> get deleted at startup (c.f. RestoreSlotFromDisk). And .tmp slots are
> cleaned up at restart.
Yes that's fine, the point I wanted to say here is that the flush
of slot in CreateInitDecodingContext() wouldn't save xmin in all
cases which is I think what it want to achieve.
В списке pgsql-hackers по дате отправления: