Re: Hot-Standby and sequences

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Wouter D'Haeseleer" <wdh(at)vasco(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Hot-Standby and sequences
Date: 2011-02-02 15:13:53
Message-ID: 20357.1296659633@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Wouter D'Haeseleer" <wdh(at)vasco(dot)com> writes:
> I have a question about sequences in combination with streaming
> replication.
> It seems something strange is happening with sequences which are
> streamed to the slave.

> When updating the sequence the last_value on the slave shifts with 32
> and halts at this value until the master increased the value also with
> 32.
> Is this normal behavior ?

Yes, this is expected because of the hacks that are used to minimize
the number of WAL records emitted during nextval() operations. The
slave is seeing the state that would prevail on the master, too, if the
master were to crash and restart.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sergey Zaharchenko 2011-02-02 15:30:00 Re: Query plan optimization: sorting vs. partitioning
Previous Message Tom Lane 2011-02-02 15:06:25 Re: Query plan optimization: sorting vs. partitioning