Re: WIP: Access method extendability - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: WIP: Access method extendability
Date
Msg-id CAPpHfduXU7zGFr2ULyAjFXaTomh=T6ZpvwaiwPAq4kduK+kmoQ@mail.gmail.com
Whole thread Raw
In response to Re: WIP: Access method extendability  (Teodor Sigaev <teodor@sigaev.ru>)
Responses Re: WIP: Access method extendability  (Alexander Korotkov <aekorotkov@gmail.com>)
Re: WIP: Access method extendability  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Hi!

Thank you for review!

On Mon, Sep 7, 2015 at 6:41 PM, Teodor Sigaev <teodor@sigaev.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

pgsql-hackers by date:

Previous
From: Marko Tiikkaja
Date:
Subject: Re: onlyvalue aggregate (was: First Aggregate Funtion?)
Next
From: Dean Rasheed
Date:
Subject: Re: onlyvalue aggregate (was: First Aggregate Funtion?)