Re: Sequence "self" change - possible?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/28/2011 10:04 PM, Lukasz Brodziak wrote:
Hello,

Is it possible for sequence to decrement its value by itself? Or is it
possible to see wether it was changed by someone. The thing is that on
one of our clinet's DB sequence rolled back to the state from 8 months ago.

It shouldn't generally be possible, no. It'd have to be changed by a call to nextval(), setval() or the like, or a direct UPDATE to the underlying sequence pseudo-table.

Could someone have tried to restore a backup from 8 months ago? That'd result in a setval(...) call when pg_restore or psql (depending on backup format) tried to set the sequence position.

In your case, though, your next post mentions possible database corruption, so I'm wondering if this is related. If something's been scribbling over the database files, someone's half-restored an old file-level backup, or something similarly horrible then anything could happen.

--
Craig Ringer


--
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux