Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

From: Andres Freund <andres(at)anarazel(dot)de>
To: "Nishant, Fnu" <nishantf(at)amazon(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Nasby, Jim" <nasbyj(at)amazon(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie>, Jeremy Finzel <finzelj(at)gmail(dot)com>
Subject: Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
Date: 2018-05-29 18:13:15
Message-ID: 20180529181315.6cgzjahpas36ydge@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 2018-05-29 18:06:12 +0000, Nishant, Fnu wrote:
> Hi,
>
> > To achieve this we can allocate Form_pg_class structures (for shared
> > relations… a small number) on shared memory.
>
> But why would this be necessary / a good idea? Even if we decided it
> were, it seems like it'd end up being quite invasive. But I doubt it's
> a good plan, because relcache entries want / need to be updated
> differently in the transaction that does the changes (as it needs to see
> the effect of catalog changes before commit) than other sessions (which
> only should see them after commit).
>
> It will be a good idea as, we can avoid maintaining file
> (creation/deletion/updation) for period of engine running and we do
> not need to invalidate other backend cache.

a) That's a major change. Shouldn't be considered for a bugfix.
b) This is going to have locking issues / lock contention.

> > Why is this good idea?
> Lets take an example (assuming we have 1000 postgres backends running).
> With shared memory scheme-
> Operation wise, for a transaction, we allocate/free once (private memory allocation) and memcpy data to and fro (from shared to private and back to shared)...
> Overall memory footprint 1 shared copy and 1 private only when updating.
> No file creation/deletion/updation.

I don't buy that nailed relations are a meaningful part of that
problem. They hardly ever change. And a shared cache is a much bigger
issues.

Greetings,

Andres Freund

In response to

Browse pgsql-general by date

  From Date Subject
Next Message nageswara Bandla 2018-05-29 19:14:21 Pgagent is not reading pgpass file either in Windows or Linux.
Previous Message Nishant, Fnu 2018-05-29 18:06:12 Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

Browse pgsql-hackers by date

  From Date Subject
Next Message Christoph Berg 2018-05-29 18:49:49 Re: plperl fails with perl 5.28
Previous Message Nishant, Fnu 2018-05-29 18:06:12 Re: found xmin from before relfrozenxid on pg_catalog.pg_authid