Re: Shared access methods?

From: Andres Freund <andres(at)anarazel(dot)de>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Shared access methods?
Date: 2018-06-14 17:10:29
Message-ID: 20180614171029.o2fvparavvtkglpb@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2018-06-14 15:59:22 +0300, Alexander Korotkov wrote:
> > b) extensions containing AMs would need to do something INSERT ... ON
> > CONFLICT DO NOTHING like.
>
> We already have CREATE ACCESS METHOD command. I think this command
> should handle that internally. And I don't understand why "ON
> CONFLICT DO NOTHING". If AM with given name already exists in pg_am,
> why should we ignore the error?

Well, right now an AM containing extension creates things in each
database (i.e. same scope as extensions). But with shared AMs that
wouldn't be the case - you might still want to create the extension in
another database. So we'd need to have CREATE ACCESS METHOD check
whether already is the same entry, and only delete it on DROP ACCESS
METHOD if there's no dependencies from other databases...

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2018-06-14 17:20:54 Re: Index maintenance function for BRIN doesn't check RecoveryInProgress()
Previous Message Tom Lane 2018-06-14 16:35:20 Re: server crashed with TRAP: FailedAssertion("!(!parallel_aware || pathnode->path.parallel_safe)"