Skip to content

last_value column in pg_sequences table not maintained correctly #2577

@emarsden

Description

@emarsden
pgeltestdb=> create sequence foo;
CREATE SEQUENCE
pgeltestdb=> select last_value from pg_sequences where sequencename='foo';
 last_value 
------------
(0 ligne)
pgeltestdb=> select nextval('foo');
 nextval 
---------
       1
(1 ligne)

pgeltestdb=> select last_value from pg_sequences where sequencename='foo';
 last_value 
------------
(0 ligne)

Expecting value 1 for the last query.

Using the :latest Docker image, which reports a server_version=15.17.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions