Обсуждение: BUG #16535: Implementing Autonomous Transactions in Postgresql

Поиск
Список
Период
Сортировка

BUG #16535: Implementing Autonomous Transactions in Postgresql

От
PG Bug reporting form
Дата:
The following bug has been logged on the website:

Bug reference:      16535
Logged by:          Isha Sonal
Email address:      ishasonal1841@yahoo.com
PostgreSQL version: 11.0
Operating system:   unix
Description:

I am trying to enable logging / auditing / progress tracking feature even if
my all transactions are rollbacked back. I tried to handle it with
procedures but its not working. Please suggest how can i achieve this
feature in PostgreSQL 11.

I am currently working on Oracle DB and using Autonomous Transactions to
enable logging feature.


Re: BUG #16535: Implementing Autonomous Transactions in Postgresql

От
Christophe Pettus
Дата:

> On Jul 10, 2020, at 14:30, PG Bug reporting form <noreply@postgresql.org> wrote:
>
>
> I am trying to enable logging / auditing / progress tracking feature even if
> my all transactions are rollbacked back. I tried to handle it with
> procedures but its not working. Please suggest how can i achieve this
> feature in PostgreSQL 11.

The most straight-forward method might be to establish two separate connections to the database, one for the primary
applicationworkload and one specifically for logging and auditing, so that rollbacks or errors on the primary
connectiondo not affect the logging connection. 

--
-- Christophe Pettus
   xof@thebuild.com




Re: BUG #16535: Implementing Autonomous Transactions in Postgresql

От
"David G. Johnston"
Дата:
On Fri, Jul 10, 2020 at 2:39 PM PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      16535
Logged by:          Isha Sonal
Email address:      ishasonal1841@yahoo.com
PostgreSQL version: 11.0
Operating system:   unix
Description:       

Not really a bug report, questions like this are better directed to the -general list.
I am trying to enable logging / auditing / progress tracking feature even if
my all transactions are rollbacked back. I tried to handle it with
procedures but its not working. Please suggest how can i achieve this
feature in PostgreSQL 11.

I've seen dblink recommended for this purpose.  In short you break out of the transaction by opening a new connection to the current database from inside the database and do your non-transactional work on it.


David J.

Re: BUG #16535: Implementing Autonomous Transactions in Postgresql

От
Konstantin Knizhnik
Дата:


On 11.07.2020 00:30, PG Bug reporting form wrote:
The following bug has been logged on the website:

Bug reference:      16535
Logged by:          Isha Sonal
Email address:      ishasonal1841@yahoo.com
PostgreSQL version: 11.0
Operating system:   unix
Description:        

I am trying to enable logging / auditing / progress tracking feature even if
my all transactions are rollbacked back. I tried to handle it with
procedures but its not working. Please suggest how can i achieve this
feature in PostgreSQL 11.

I am currently working on Oracle DB and using Autonomous Transactions to
enable logging feature.

Autonomous transactions are supported in PgPro-EE (Postgres Professional clone of Postgres).
In vanilla autonomous transaction can be simulated using dblink - extension providing connections to PostgreSQL database from within a database session.

Re: BUG #16535: Implementing Autonomous Transactions in Postgresql

От
legrand legrand
Дата:
Hello,
There is pg_background extension at github that may suit your needs.

Regards
PAscal



--
Sent from: https://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html