Re: Read-only tables to avoid row visibility check

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Seamus Abshere <seamus(at)abshere(dot)net>
Cc: Melvin Davidson <melvin6925(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Read-only tables to avoid row visibility check
Date: 2016-02-22 21:48:26
Message-ID: CAKFQuwaHzg4vL+ne0_xtpSL2Wi_hR373QAHO0Qh=hgZ=Ahuzxw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Feb 22, 2016 at 2:38 PM, Seamus Abshere <seamus(at)abshere(dot)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.​

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Edson F. Lidorio 2016-02-22 22:00:23 Get the date of creation of objects in the database
Previous Message John Wiencek 2016-02-22 21:43:19 synch streaming replication question