Re: Proposed patch for key managment

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Proposed patch for key managment
Дата
Msg-id 20201207044223.GA12952@momjian.us
обсуждение исходный текст
Ответ на Re: Proposed patch for key managment  (Masahiko Sawada <masahiko.sawada@2ndquadrant.com>)
Список pgsql-hackers
On Mon, Dec  7, 2020 at 09:30:03AM +0900, Masahiko Sawada wrote:
> Thank you for updating the patch!
> 
> I think we need explicit_bzero() also in freeing the keywrap context.

pg_cryptohash_free() already has this:

    explicit_bzero(state, sizeof(pg_cryptohash_state));
    explicit_bzero(ctx, sizeof(pg_cryptohash_ctx));

Do we need more?

> BTW, when we need -R option pg_ctl command to start the server, how
> can we start it in the single-user mode?

I added code for that, but I hadn't tested it yet.  Now that I tried it,
I realized that it is awkward to supply a file descriptor number (that
will be closed) from the command-line, so I added code and docs to allow
-1 to duplicate standard error, and it worked:

    $ postgres --single -R -1 -D /u/pg/data
    
    Enter password:
    PostgreSQL stand-alone backend 14devel
    backend> select 100;
             1: ?column?    (typeid = 23, len = 4, typmod = -1, byval = t)
            ----
             1: ?column? = "100"    (typeid = 23, len = 4, typmod = -1, byval = t)
            ----

Updated patch at the same URL:

    https://github.com/postgres/postgres/compare/master...bmomjian:key.diff

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee




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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Single transaction in the tablesync worker?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Proposed patch for key managment