Re: pgsql: Refactor code in tablecmds.c to check and process tablespace mov
От | Alvaro Herrera |
---|---|
Тема | Re: pgsql: Refactor code in tablecmds.c to check and process tablespace mov |
Дата | |
Msg-id | 20210127140741.GA14174@alvherre.pgsql обсуждение исходный текст |
Ответ на | pgsql: Refactor code in tablecmds.c to check and process tablespace mov (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: pgsql: Refactor code in tablecmds.c to check and process tablespace mov
|
Список | pgsql-committers |
On 2021-Jan-27, Michael Paquier wrote: > Refactor code in tablecmds.c to check and process tablespace moves Thanks, looks good. Small comment: CheckRelationTableSpaceMove is documented as + * Returns true if the relation can be moved to the new tablespace; + * false otherwise. but in reality it returns false if the relation does not *need* to be moved because the tablespace is the same as before. In the cases where it "cannot" be moved, what it does is raise an error. Maybe this needs is just be documented more clearly: "Returns true if the relation can be moved to the new tablespace; raises an error if it is not possible to do the move; returns false if the move would have no effect." For cases of relation with storage, I find it suspicious that the functions are documented to be fine with just ShareUpdateExclusiveLock. I think it'd be safer for the comment to explicitly indicate that for relations with storage, lock should be AEL. -- Álvaro Herrera 39°49'30"S 73°17'W
В списке pgsql-committers по дате отправления: