pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
problem in sequence 2+ messages / 2 participants [nested] [flat]
* problem in sequence @ 2006-02-28 05:51 Suvarna <suvarnat@cygnus.stpp.soft.net> 0 siblings, 0 replies; 2+ messages in thread From: Suvarna @ 2006-02-28 05:51 UTC (permalink / raw) To: pgsql-admin In postgresql 7.3.2 if the server shuts down abruptly then sequence does not behave properly. Next val after rebooting server shows gsp between last number & next val ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: problem in sequence @ 2006-03-01 17:23 Jason Minion <jason.minion@sigler.com> 0 siblings, 0 replies; 2+ messages in thread From: Jason Minion @ 2006-03-01 17:23 UTC (permalink / raw) To: Suvarna <suvarnat@cygnus.stpp.soft.net>; pgsql-admin This is likely because transactions have been rolled back due to the shutdown. Sequences operate *outside* of transaction space - operations on a sequence will not be rolled back from a transaction, and a commit has no effect. There is probably a better way to put that. However, they should not be used when sequential numbers are necessary. Notice that you can use functions on the same sequence across multiple transactions concurrently, a lock is only necessary during the execution of the function, not the transaction. If you do need distinct sequential number generation, I would suggest an AFTER INSERT trigger that determines the next value necessary. You would also need to lock the table appropriately in that trigger. There will be performance penalties for this. You should also update/upgrade your PostgreSQL installation!! Please see: http://www.postgresql.org/docs/8.1/interactive/sql-createsequence.html Jason Minion ________________________________ From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Suvarna Sent: Monday, February 27, 2006 11:51 PM To: pgsql-admin@postgresql.org Subject: [ADMIN] problem in sequence In postgresql 7.3.2 if the server shuts down abruptly then sequence does not behave properly. Next val after rebooting server shows gsp between last number & next val ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-03-01 17:23 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2006-02-28 05:51 problem in sequence Suvarna <suvarnat@cygnus.stpp.soft.net> 2006-03-01 17:23 Re: problem in sequence Jason Minion <jason.minion@sigler.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox