RE: ReplicationSlotRelease() crashes when the instance is in the single user mode

Поиск
Список
Период
Сортировка
От Hayato Kuroda (Fujitsu)
Тема RE: ReplicationSlotRelease() crashes when the instance is in the single user mode
Дата
Msg-id OSCPR01MB14966F06D84A7A9C26570A519F530A@OSCPR01MB14966.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Re: ReplicationSlotRelease() crashes when the instance is in the single user mode  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: ReplicationSlotRelease() crashes when the instance is in the single user mode
Список pgsql-hackers
Dear Michael,

> You could also validate that using the CI, assuming that you have a
> cloned repo on github with the CI enabled.  See src/tools/ci/README.
> I use that a lot with local branches for pre-commit validations where
> things could break across the board.

I have run the tests on my CI and found that windows cannot accept the test.
Per attached output, starting the postgres with the single-user mode was failed
because the user had admin permissions [1]. However, pg_ctl start command could be
done by the same user.
I'm not familiar with Windows, but according to your blogpost [2], Windows seems
to allows running some server command by generating the restricted context for
running postgres commands. In case of single-user mode, however, we directly run
the given command with the current user. So, there is a possibility that only
instance can boot only by pg_ctl.
Based on that, I want to skip the test on windows platform rather than modifying
the ci environment.

IIUC, other tests which uses --single cannot work on windows as well.

> Hmm.  src/test/modules/test_misc/ makes more sense to me here.  (No
> need to send an updated patch just for that.)

I did not notice the directory and looked nice. Updated.

[1]:
```
# Running: postgres --single -F -c exit_on_error=true -D
C:\cirrus\build/testrun/recovery/049_slots_in_single_user_mode\data/t_049_slots_in_single_user_mode_node_data/pgdata
postgres
Execution of PostgreSQL by a user with administrative permissions is not
permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromises.  See the documentation for
more information on how to properly start the server.
```

[2]: https://paquier.xyz/postgresql-2/postgres-utilities-restricted-token/

Best regards,
Hayato Kuroda
FUJITSU LIMITED


Вложения

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