Re: Replication identifiers, take 4 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Replication identifiers, take 4
Date
Msg-id 20150408122229.GA9764@awork2.anarazel.de
Whole thread Raw
In response to Re: Replication identifiers, take 4  (Petr Jelinek <petr@2ndquadrant.com>)
Responses Re: Replication identifiers, take 4
List pgsql-hackers
On 2015-04-08 14:17:04 +0200, Petr Jelinek wrote:
> And you guys are not getting my point. What I proposed was to not reuse the
> RI id immediately because that can make debugging issues with
> replication/conflict handling harder when something happens after cluster
> configuration has changed.

If that's the goal, you shouldn't delete the replication identifier at
that point. That's the only sane way preventing it from being reused.

> Whether it's done using Oid or some other way, I don't really care and
> wrapping around eventually is ok, since the old origin info for
> transactions will be cleared out during the freeze at the latest
> anyway.

How are you proposing to do the allocation then? There's no magic
preventing immediate reuse with oids or anything else. The oid counter
might *already* have wrapped around and point exactly to the identifier
you're about to delete. Then when you deleted it it's going to be reused
for the next allocated oid.

Andres Freund



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: Replication identifiers, take 4
Next
From: Petr Jelinek
Date:
Subject: Re: Replication identifiers, take 4