Database Features Questions,
От | Joe Kislo |
---|---|
Тема | Database Features Questions, |
Дата | |
Msg-id | 39C8F5DC.7F141686@athenium.com обсуждение исходный текст |
Список | pgsql-general |
I've never used PostgreSQL before, and I have some questions I couldn't locate the answers to in any of the postgresql manuals I've found. Forgive me if they've been asked a dozen times before. Can I create nested transactions? EG: Can I create transaction1 do some work create transaction2 do some work commit/or/rollback transaction2 do some work commit/or/rollback transaction1 If not, how can I simulate this? Can I create transactions which other connections can access to? Server 1 starts Transaction named "WebRequest-1234" Server 1 does work in transaction "WebRequest-1234" Server 2 does work in transaction "WebRequest-1234" Server 2 signals completion to Server 1 Server 1 commits/or/rollsback transaction "WebRequest-1234" Another example of this would be a multithreaded database application trying to achieve parallelism in reporting inside the context of the uncommitted changes in a transaction: Thread 1 starts Transaction "Transaction-1234" Thread 1 does some work Thread 1 dispatches Threads 2,3,4 Thread 2 does some heavy reporting inside context of Transaction-1234 Thread 3 does some heavy reporting inside context of Transaction-1234 Thread 4 does some heavy reporting inside context of Transaction-1234 Thread 1 waits for threads to complete Thread 1 commits/rollsback Transaction-1234 In this case they could should share a single DBConnection, but that would not allow any parallelism in the DB. If this is not possible, how I can simulate this? I see that to create unique identifiers for a column, I can use the OID value or a sequence. If I use a sequence, is there any way of having the sequence value returned after an insert, instead of the OID? Or for every insert I do, do I need to do two requests -- One to insert, and one to do a lookup by OID to fetch the sequence number of the row I just inserted? Semirelated question, what is the maximum bound of the OID value? If I fetch this value using JDBC, what type does it come back as? And what happens when that overflows? Another question is, if postgre does not support these features, does Interbase, Oracle or another DB support these types of features? Thanks, -Joe
В списке pgsql-general по дате отправления: