Re: Meaning of <sequence>.log_cnt? (WRT REPLICATION)

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Ed L(dot)" <pgsql(at)bluepolka(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: Meaning of <sequence>.log_cnt? (WRT REPLICATION)
Date: 2003-04-04 17:08:38
Message-ID: 200304041808.38962.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Friday 04 Apr 2003 5:20 pm, Ed L. wrote:
> On Friday April 4 2003 9:12, Richard Huxton wrote:
> > IIRC sequence numbers are handed out in batches rather than one at a
> > time, to reduce contention between backends. I think this is the number
> > of unused sequence numbers in the batch.
>
> If you were wanting to sync a sequence on 2 separate dbs, as in
> master-slave replication, log_cnt would not be a column you would care
> about?

Sorry - not sure there, it might be an idea to contact one of the replication
projects and ask there. If the slave is read-only it's not an issue of
course, but if you want to failover to the slave then you'll need to do a
setval() based on the largest used sequence value. If it's only used in one
column that's simple. If it's used in several places, more fiddly.

--
Richard Huxton

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-04-04 17:11:07 Re: Meaning of <sequence>.log_cnt?
Previous Message Tom Lane 2003-04-04 16:56:58 Re: ERROR: heap_mark4update: (am)invalid tid in triggers