Re: Read-only tables to avoid row visibility check - Mailing list pgsql-general

From David G. Johnston
Subject Re: Read-only tables to avoid row visibility check
Date
Msg-id CAKFQuwaHzg4vL+ne0_xtpSL2Wi_hR373QAHO0Qh=hgZ=Ahuzxw@mail.gmail.com
Whole thread Raw
In response to Re: Read-only tables to avoid row visibility check  (Seamus Abshere <seamus@abshere.net>)
Responses Re: Read-only tables to avoid row visibility check  (Seamus Abshere <seamus@abshere.net>)
List pgsql-general
On Mon, Feb 22, 2016 at 2:38 PM, Seamus Abshere <seamus@abshere.net> wrote:
On Mon, Feb 22, 2016, at 06:30 PM, Melvin Davidson wrote:
> However, at this time, there is no such option as SET READ ONLY in any version of PostgreSQL.

I know.

I am wondering if hypothetical read-only tables would make index-only
scans more possible by avoiding the need for row visibility checks.

​If the system is working properly then a READ ONLY table in fact should be able to use Index Only Scans without the hack of a DBA telling it that said table is READ ONLY.​  The presence or absence of such an attribute should not impact that particular optimization.  Corner cases such as, "it was READ ONLY so I made it writable, wrote to it, then changed it back to READ ONLY", have not been considered here.

​Since the answer to your actual question would be "it depends on the implementation" it would probably be more constructive to actually communicate the thoughts that provoked the question.

David J.​

pgsql-general by date:

Previous
From: John Wiencek
Date:
Subject: synch streaming replication question
Next
From: "Edson F. Lidorio"
Date:
Subject: Get the date of creation of objects in the database