Read_only.md.json 13 KB

1234567891011121314151617
  1. {
  2. "6ed5703ad40b966f92382f965dcb9bad2dcddf550b54fb87958b3fcfed581a48": {
  3. "original": "# Read-only mode\n\nRead-only mode for a connection disables any table or global modifications. Therefore, queries like `create`, `drop`, various types of `alter`, `attach`, `optimize`, and data modification queries such as `insert`, `replace`, `delete`, `update`, and others will all be rejected. Changing daemon-wide settings using `SET GLOBAL` is also not possible in this mode.\n\nHowever, you can still perform all search operations, generate snippets, and run `CALL PQ` queries. Additionally, you can modify local (connection-wide) settings.\n\nTo check if your current connection is read-only or not, execute the `show variables like 'session_read_only'` statement. A value of `1` indicates read-only, while `0` means not read-only (usual).\n\n## Activation\n\nTypically, you define a separate [listen](../Server_settings/Searchd.md#listen) directive in read-only mode by adding the suffix `_readonly` to it. However, you can also do this interactively for the current connection by executing the `SET ro=1` statement via SQL.\n\n## Deactivation\n\nIf you're connected to a [VIP](../Server_settings/Searchd.md#listen) socket, you can execute `SET ro=0` (even if the socket you are connected to was defined as read-only in the config and not interactively). This will switch the connection to the usual (not read-only) mode with all modifications allowed.\n\nFor standard (non-VIP) connections, escaping read-only mode is only possible by reconnecting if it was set interactively, or by updating the configuration file and restarting the daemon.\n\n<!-- proofread -->\n\n",
  4. "translations": {
  5. "chinese": "# \u53ea\u8bfb\u6a21\u5f0f\n\n\u8fde\u63a5\u7684\u53ea\u8bfb\u6a21\u5f0f\u7981\u7528\u4efb\u4f55\u8868\u6216\u5168\u5c40\u4fee\u6539\u3002\u56e0\u6b64\uff0c`create`\u3001`drop`\u3001\u5404\u79cd\u7c7b\u578b\u7684`alter`\u3001`attach`\u3001`optimize`\u4ee5\u53ca\u8bf8\u5982`insert`\u3001`replace`\u3001`delete`\u3001`update`\u7b49\u6570\u636e\u4fee\u6539\u67e5\u8be2\u90fd\u4f1a\u88ab\u62d2\u7edd\u3002\u5728\u6b64\u6a21\u5f0f\u4e0b\uff0c\u4e5f\u65e0\u6cd5\u4f7f\u7528`SET GLOBAL`\u66f4\u6539\u5b88\u62a4\u8fdb\u7a0b\u8303\u56f4\u7684\u8bbe\u7f6e\u3002\n\n\u4f46\u662f\uff0c\u60a8\u4ecd\u7136\u53ef\u4ee5\u6267\u884c\u6240\u6709\u641c\u7d22\u64cd\u4f5c\uff0c\u751f\u6210\u6458\u8981\uff0c\u5e76\u8fd0\u884c`CALL PQ`\u67e5\u8be2\u3002\u6b64\u5916\uff0c\u60a8\u53ef\u4ee5\u4fee\u6539\u672c\u5730\uff08\u8fde\u63a5\u8303\u56f4\u5185\uff09\u7684\u8bbe\u7f6e\u3002\n\n\u8981\u68c0\u67e5\u5f53\u524d\u8fde\u63a5\u662f\u5426\u4e3a\u53ea\u8bfb\uff0c\u8bf7\u6267\u884c`show variables like 'session_read_only'`\u8bed\u53e5\u3002\u503c\u4e3a`1`\u8868\u793a\u53ea\u8bfb\uff0c\u503c\u4e3a`0`\u8868\u793a\u975e\u53ea\u8bfb\uff08\u6b63\u5e38\uff09\u3002\n\n## \u542f\u7528\n\n\u901a\u5e38\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5728[listen](../Server_settings/Searchd.md#listen)\u6307\u4ee4\u4e2d\u6dfb\u52a0\u540e\u7f00`_readonly`\u6765\u5b9a\u4e49\u4e00\u4e2a\u72ec\u7acb\u7684\u53ea\u8bfb\u6a21\u5f0f\u76d1\u542c\u7aef\u53e3\u3002\u7136\u800c\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u6267\u884cSQL\u8bed\u53e5`SET ro=1`\uff0c\u4e3a\u5f53\u524d\u8fde\u63a5\u4ea4\u4e92\u5f0f\u542f\u7528\u53ea\u8bfb\u6a21\u5f0f\u3002\n\n## \u7981\u7528\n\n\u5982\u679c\u60a8\u8fde\u63a5\u7684\u662f[VIP](../Server_settings/Searchd.md#listen)\u5957\u63a5\u5b57\uff0c\u53ef\u4ee5\u6267\u884c`SET ro=0`\uff08\u5373\u4f7f\u60a8\u8fde\u63a5\u7684\u5957\u63a5\u5b57\u5728\u914d\u7f6e\u4e2d\u88ab\u5b9a\u4e49\u4e3a\u53ea\u8bfb\u4e14\u4e0d\u662f\u4ea4\u4e92\u5f0f\u8bbe\u7f6e\uff09\u3002\u8fd9\u5c06\u628a\u8fde\u63a5\u5207\u6362\u56de\u901a\u5e38\uff08\u975e\u53ea\u8bfb\uff09\u6a21\u5f0f\uff0c\u5141\u8bb8\u6240\u6709\u4fee\u6539\u64cd\u4f5c\u3002\n\n\u5bf9\u4e8e\u6807\u51c6\uff08\u975eVIP\uff09\u8fde\u63a5\uff0c\u53ea\u6709\u5728\u4ea4\u4e92\u5f0f\u8bbe\u7f6e\u7684\u53ea\u8bfb\u6a21\u5f0f\u4e0b\uff0c\u91cd\u65b0\u8fde\u63a5\u624d\u80fd\u9000\u51fa\u53ea\u8bfb\u6a21\u5f0f\uff1b\u6216\u8005\u901a\u8fc7\u66f4\u65b0\u914d\u7f6e\u6587\u4ef6\u5e76\u91cd\u542f\u5b88\u62a4\u8fdb\u7a0b\u6765\u9000\u51fa\u3002\n\n<!-- proofread -->",
  6. "russian": "# \u0420\u0435\u0436\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f\n\n\u0420\u0435\u0436\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043b\u044e\u0431\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0442\u0430\u0431\u043b\u0438\u0446 \u0438\u043b\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0442\u0438\u043f\u0430 `create`, `drop`, \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0438\u0434\u044b `alter`, `attach`, `optimize` \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a `insert`, `replace`, `delete`, `update` \u0438 \u0434\u0440\u0443\u0433\u0438\u0435, \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u044b. \u0422\u0430\u043a\u0436\u0435 \u0432 \u044d\u0442\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u0435\u043c\u043e\u043d\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e `SET GLOBAL`.\n\n\u041e\u0434\u043d\u0430\u043a\u043e \u0432\u044b \u0432\u0441\u0451 \u0435\u0449\u0451 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0432\u0441\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u0430, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043d\u0438\u043f\u043f\u0435\u0442\u044b \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b `CALL PQ`. \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 (\u0434\u043b\u044f \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f) \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.\n\n\u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043b\u0438 \u0432\u0430\u0448\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043d\u0435\u0442, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 `show variables like 'session_read_only'`. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 `1` \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0440\u0435\u0436\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u0430 `0` \u2014 \u043d\u0435 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f (\u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c).\n\n## \u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f\n\n\u041e\u0431\u044b\u0447\u043d\u043e \u0432\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 [listen](../Server_settings/Searchd.md#listen) \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043a \u043d\u0435\u0439 \u0441\u0443\u0444\u0444\u0438\u043a\u0441 `_readonly`. \u041e\u0434\u043d\u0430\u043a\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0434\u043b\u044f \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 `SET ro=1` \u0447\u0435\u0440\u0435\u0437 SQL.\n\n## \u0414\u0435\u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f\n\n\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b \u043a \u0441\u043e\u043a\u0435\u0442\u0443 [VIP](../Server_settings/Searchd.md#listen), \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c `SET ro=0` (\u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u043e\u043a\u0435\u0442, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0432\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u044b, \u0431\u044b\u043b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435, \u0430 \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e). \u042d\u0442\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0432 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0440\u0435\u0436\u0438\u043c (\u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f) \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0451\u043d\u043d\u044b\u043c\u0438 \u0432\u0441\u0435\u043c\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f\u043c\u0438.\n\n\u0414\u043b\u044f \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 (\u043d\u0435-VIP) \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0443\u0442\u0451\u043c \u043f\u0435\u0440\u0435\u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0440\u0435\u0436\u0438\u043c \u0431\u044b\u043b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e, \u043b\u0438\u0431\u043e \u043f\u0443\u0442\u0451\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0434\u0435\u043c\u043e\u043d\u0430.\n\n<!-- proofread -->"
  7. },
  8. "is_code_or_comment": false,
  9. "model": "openai:gpt-4.1-mini",
  10. "updated_at": 1766339775
  11. },
  12. "__meta": {
  13. "source_text": "# Read-only mode\n\nRead-only mode for a connection disables any table or global modifications. Therefore, queries like `create`, `drop`, various types of `alter`, `attach`, `optimize`, and data modification queries such as `insert`, `replace`, `delete`, `update`, and others will all be rejected. Changing daemon-wide settings using `SET GLOBAL` is also not possible in this mode.\n\nHowever, you can still perform all search operations, generate snippets, and run `CALL PQ` queries. Additionally, you can modify local (connection-wide) settings.\n\nTo check if your current connection is read-only or not, execute the `show variables like 'session_read_only'` statement. A value of `1` indicates read-only, while `0` means not read-only (usual).\n\n## Activation\n\nTypically, you define a separate [listen](../Server_settings/Searchd.md#listen) directive in read-only mode by adding the suffix `_readonly` to it. However, you can also do this interactively for the current connection by executing the `SET ro=1` statement via SQL.\n\n## Deactivation\n\nIf you're connected to a [VIP](../Server_settings/Searchd.md#listen) socket, you can execute `SET ro=0` (even if the socket you are connected to was defined as read-only in the config and not interactively). This will switch the connection to the usual (not read-only) mode with all modifications allowed.\n\nFor standard (non-VIP) connections, escaping read-only mode is only possible by reconnecting if it was set interactively, or by updating the configuration file and restarting the daemon.\n\n<!-- proofread -->\n\n",
  14. "updated_at": 1768530797,
  15. "source_md5": "080f28da0d84c2933145cdc7e5a54bbd"
  16. }
  17. }