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

Add your S3 credentials:

SELECT mooncake.create_secret('<name>', 'S3', '<key_id>', 
          '<secret>', '{"REGION": "<s3-region>"}');

R2 Buckets

Add your credentials:

SELECT mooncake.create_secret('<name>', 'S3', '<key_id>', 
          '<secret>', '{"ENDPOINT":"<ACCOUNT_ID>.r2.cloudflarestorage.com/"}');

Set Default Bucket

After adding your credentials, set the default bucket where your columnstore tables will be written.

ALTER DATABASE <database> SET mooncake.default_bucket = 's3://<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.