Search Postgresql Archives

Re: Practical question.

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

 



:) , something that is analogous to a race condition. is this something I shouldn't be concerned with? I suppose if I knew for certain there was some kind of synchronous behavior, then I wouldn't fear a potentially subsequent event completing before the previous one doing so.

As a possible solution, I'm thinking that I can make the trigger be a before trigger, where the before trigger captures the 'nextvalue' for both the actual insert and the table creation would be based on this, while incrementing the sequence to guarantee that each successive pull on the nextvalue will have the correct one.

Does that sound plausible?

Thanks,

Tom Lane wrote:

louis gonzales <gonzales@xxxxxxxxxxxxxx> writes:
As an example:
insertX which initiates the trigger reads the 'nextvalue' from the sequence and begins to create the associcated table insertY happens almost at the same time, so that it gets the same 'nextvalue' from the sequence

[ blink... ]  Whatever makes you think that could happen?

			regards, tom lane


--
Email:    louis.gonzales@xxxxxxxxxxxxxx
WebSite:  http://www.linuxlouis.net
"Open the pod bay doors HAL!" -2001: A Space Odyssey
"Good morning starshine, the Earth says hello." -Willy Wonka



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux