Re: Autonomous transaction
| От | Greg Stark |
|---|---|
| Тема | Re: Autonomous transaction |
| Дата | |
| Msg-id | 87isaixfxu.fsf@stark.xeocode.com обсуждение исходный текст |
| Ответ на | Autonomous transaction (Daniel Daoust <daoustd_ca@yahoo.ca>) |
| Список | pgsql-general |
Daniel Daoust <daoustd_ca@yahoo.ca> writes: > Hi, knowing that "autonomous transaction" (Oracle > concept of) are not yet implemented in PostgreSQL, has > anyone found a work-around. I need to preserve > database states from a potential rollback and then log > them inside database tables. Postgres goes to great lengths to ensure this is impossible :) > What about: > > 1) using memory structures to hold the info, then > commit to the database just before exit (after the > rollback occurred). Well this option in your application layer is how I would do it as it's the simplest. However: > 3) send messages to a daemon/database job that will > write to the tables using another > connection/transaction ??? This option is doable entirely in the database if that's your goal. You can do this using dblink which is the contrib directory. It would probably be quite simple to implement, though the most complex in another sense. With twice as many connections it could be hard to determine where slowdowns are starting for example. And Better make sure your error logging connections don't trigger any errors... -- greg
В списке pgsql-general по дате отправления: