Re: Replication identifiers, take 4

From: Andres Freund <andres(at)anarazel(dot)de>
To: Petr Jelinek <petr(at)2ndquadrant(dot)com>
Cc: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Steve Singer <steve(at)ssinger(dot)info>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Subject: Re: Replication identifiers, take 4
Date: 2015-04-08 12:22:29
Message-ID: 20150408122229.GA9764@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2015-04-08 12:24:53 Re: Replication identifiers, take 4
Previous Message Petr Jelinek 2015-04-08 12:17:04 Re: Replication identifiers, take 4