mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-26 04:09:50 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Feature ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) Yes ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description GW plumbing of compact command 1- Route the compact command to the backend. 2- Add a dummy C handler function for `compact` that does nothing and throws the same error. Next PR is going to add support for compact in the backend with blocking writes by running VACUUM FULL ---- #### AI description (iteration 1) #### PR Classification New feature #### PR Summary This pull request adds support for the `compact` command in the MongoDB Postgres runtime. - Added `CompactAsync` method in `PostgresClient.cs` to handle the compact command. - Implemented `command_compact` function in the new file `compact.c`. - Updated `PostgresMongoClient.cs` to include the `CompactAsync` method. - Modified `MongoRequestParser.cs` to parse the compact command. - Added SQL function definitions for the compact command in `compact--0.103-0.sql` and `compact--latest.sql`. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
11 lines
323 B
PL/PgSQL
11 lines
323 B
PL/PgSQL
#include "udfs/projection/bson_projection--0.104-0.sql"
|
|
#include "udfs/index_mgmt/create_index_background--0.104-0.sql"
|
|
#include "udfs/schema_mgmt/compact--0.104-0.sql"
|
|
|
|
-- Schedule the index build task
|
|
DO LANGUAGE plpgsql $cmd$
|
|
BEGIN
|
|
PERFORM __API_SCHEMA_INTERNAL__.schedule_background_index_build_jobs();
|
|
END;
|
|
$cmd$;
|