Re: Detecting if current transaction is modifying the database - Mailing list pgsql-general

From Tom Lane
Subject Re: Detecting if current transaction is modifying the database
Date
Msg-id 13030.1470791212@sss.pgh.pa.us
Whole thread Raw
In response to Re: Detecting if current transaction is modifying the database  (Christian Ohler <ohler@shift.com>)
List pgsql-general
Christian Ohler <ohler@shift.com> writes:
> ...  (But that's a guess.  AFAICT, creating a temp table
> also produces WAL records, so perhaps checking for them is no better
> than checking for a transaction ID after all.)

Well, creating a temp table makes entries in the system catalogs, which
requires both an XID and WAL entries.  The same goes for most database
alterations, really.  There are very limited cases where you can produce
WAL without assigning an XID or vice versa, but I'm not sure it's worth
your while to distinguish.

            regards, tom lane


pgsql-general by date:

Previous
From: Christian Ohler
Date:
Subject: Re: Detecting if current transaction is modifying the database
Next
From: Patrick B
Date:
Subject: permissions PostgreSQL 9.5