Re: Read-only tables to avoid row visibility check

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Seamus Abshere <seamus(at)abshere(dot)net>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Melvin Davidson <melvin6925(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Read-only tables to avoid row visibility check
Date: 2016-02-22 22:45:28
Message-ID: 22147.1456181128@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Seamus Abshere <seamus(at)abshere(dot)net> writes:
> Being able to tell postgres that our table is "Read Only" has imaginary
> mystical properties for me, first and foremost being able to count
> against indexes without ever hitting the disk.

>> 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.

> So this should happen already?

Yeah. Index-only scans will work if all (or at least most) of the table
hasn't been modified since the last VACUUM. If we had a READ ONLY
property, I do not think it would affect that logic at all; it would just
prevent future mods going forward. Which, as noted, you could already do
by revoking suitable privileges.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ashish Chauhan 2016-02-22 23:02:52 Re: Live steraming replication setup issue!
Previous Message Melvin Davidson 2016-02-22 22:42:23 Re: Get the date of creation of objects in the database