Re: found xmin from before relfrozenxid on pg_catalog.pg_authid

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
Дата
Msg-id 20180529181315.6cgzjahpas36ydge@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: found xmin from before relfrozenxid on pg_catalog.pg_authid  ("Nishant, Fnu" <nishantf@amazon.com>)
Список 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
(fromshared 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Nishant, Fnu"
Дата:
Сообщение: Re: found xmin from before relfrozenxid on pg_catalog.pg_authid
Следующее
От: Christoph Berg
Дата:
Сообщение: Re: plperl fails with perl 5.28