Re: Providing catalog view to pg_hba.conf file - Patch submission

From: Greg Stark <stark(at)mit(dot)edu>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Providing catalog view to pg_hba.conf file - Patch submission
Date: 2015-03-02 16:36:14
Message-ID: CAM-w4HMod-CiOSCXkMX6hG4MfpjgxXh7d2jFjC_S2M2MSzkTTQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 2, 2015 at 1:42 PM, Greg Stark <stark(at)mit(dot)edu> wrote:

> ​So earlier someone commented that using lists list_nth() seemed odd and a
> tuplestore might be better. In fact using lists this way is O(n^2). I've
> done some quick tests and it doesn't start being a problem until about
> 10,000 lines which obviously isn't a terribly common way to use
> pg_hba_settings. However we have in the past had people doing multi-tenant
> clusters with hundreds or thousands of databases in a cluster complaining
> about scalability of certain operations. It would be a shame to introduce a
> new one.
>
> It does seem annoying to use a tuplestore as IIRC the function scan node
> also materializes the results in recent years. But at least it would scale
> linearly.
>

So I didn't get the memo about SFRM_Materialize. Here's a rewrite of this
using that interface which seems to test ok up to 100k. At that point I
start running into memory errors on reading the HBA file so I guess that's
an indication that's large enough to stop worrying about it.

--
greg

Attachment Content-Type Size
Catalog_view_to_HBA_settings_patch_V6S.patch text/x-patch 18.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan de Visser 2015-03-02 16:48:45 Re: Idea: closing the loop for "pg_ctl reload"
Previous Message Stephen Frost 2015-03-02 16:34:06 Re: Additional role attributes && superuser review