Re: WIP: Access method extendability

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Teodor Sigaev <teodor(at)sigaev(dot)ru>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: Access method extendability
Date: 2015-11-02 11:32:28
Message-ID: CAPpHfduXU7zGFr2ULyAjFXaTomh=T6ZpvwaiwPAq4kduK+kmoQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

Thank you for review!

On Mon, Sep 7, 2015 at 6:41 PM, Teodor Sigaev <teodor(at)sigaev(dot)ru> wrote:

> Some notices:
>
> 1) create-am.3.patch.gz
> As I understand, you didn't add schema name to access method. Why?
> Suppose, if we implement SQL-like interface for AM screation/dropping then
> we should provide a schema qualification for them
>

Per subsequent discussion it's unclear why we need to make access methods
schema qualified.

> 2) create-am.3.patch.gz get_object_address_am()
> + switch (list_length(objname))
> ...
> + case 2:
> + catalogname = strVal(linitial(objname));
> + amname = strVal(lthird(objname));
> ^^^^^^ seems, it should be
> lsecond()
>

Fixed.

> 3) create-am.3.patch.gz
> Suppose, RM_GENERIC_ID is part of generic-xlog.3.patch.gz
>

Fixed.

4) Makefile(s)
> As I can see, object files are lexicographically ordered
>

Fixed.

5) gindesc.c -> genericdesc.c in file header
>

Fixed.

> 6) generic-xlog.3.patch.gz
> I don't like an idea to split START_CRIT_SECTION and END_CRIT_SECTION to
> GenericXLogStart and GenericXLogFinish. User's code could throw a error or
> allocate memory between them and error will become a panic.

Fixed. Now, critical section is only inside GenericXLogFinish.
GenericXLogRegister returns pointer to the page copies which could be
modified. GenericXLogFinish swaps the data between page copy and page
itself. That allow us to avoid critical section in used code.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
generic-xlog.4.patch.gz application/x-gzip 5.2 KB
create-am.4.patch.gz application/x-gzip 8.0 KB
bloom-contrib.4.patch.gz application/x-gzip 36.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2015-11-02 11:38:54 Re: onlyvalue aggregate (was: First Aggregate Funtion?)
Previous Message Haribabu Kommi 2015-11-02 11:10:59 Re: BUG #13741: vacuumdb does not accept valid password