"Marie G. Tuite" <marie(dot)tuite(at)edisonaffiliates(dot)com> writes:
> select last_value from domain_info_tbl_key_seq;
> This returns the same value as currval.
Au contraire --- the values are not necessarily the same, for exactly
the reason the OP was concerned about. last_value will be the last
value any backend got from nextval(); currval is the last value *your*
backend got from nextval().
regards, tom lane