Re: Meaning of .log_cnt? (WRT REPLICATION) - Mailing list pgsql-general

From Richard Huxton
Subject Re: Meaning of .log_cnt? (WRT REPLICATION)
Date
Msg-id 200304041808.38962.dev@archonet.com
Whole thread Raw
In response to Re: Meaning of .log_cnt?  ("Ed L." <pgsql@bluepolka.net>)
List 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


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: heap_mark4update: (am)invalid tid in triggers
Next
From: Tom Lane
Date:
Subject: Re: Meaning of .log_cnt?