Cloud Storage
Get a free S3 bucket by signing up at s3.pgmooncake.com.
By default, Columnstore table data is stored locally. You can configure your Object Store to store both data and metadata. We support S3 and R2 buckets.
S3 Buckets
SELECT mooncake.create_secret('<name>', 'S3', '<key_id>',
'<secret>', '{"REGION": "<s3-region>"}');
R2 Buckets
SELECT mooncake.create_secret('<name>', 'S3', '<key_id>',
'<secret>', '{"ENDPOINT":"<ACCOUNT_ID>.r2.cloudflarestorage.com"}');
GCP Buckets
Add the Service Account JSON string directly:
SELECT mooncake.create_secret('<name>', 'GCS', '<HMAC_key_id>',
'<HMAC_secret>', '{"GCS_SECRET":"Service Account JSON string"}');
Set Default Bucket
After adding your credentials, set the default bucket where your columnstore tables will be written.
For R2 and S3:
ALTER DATABASE <database> SET mooncake.default_bucket = 's3://<bucket>';
For GCP:
SET mooncake.default_bucket = 'gs://<gcs_bucket>';
By default, all columnstore tables created will be written to this bucket.
Notes
If you are using pg_mooncake on Neon, you must bring your own S3 bucket or get a free one.
We’re working to improve this DX.