Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Is columnar extension enabling all hydra capability on a new db inside the docker ? #52

Closed
muntdan opened this issue Mar 23, 2023 · 4 comments

Comments

@muntdan
Copy link

muntdan commented Mar 23, 2023

I am running latest docker for PG 14.
I would like to create a new hydra db inside the docker beside the default postgres db
to be able to test different schemas and as best practices states to have another db beside postgres.

I can enable columnar on the new db by
CREATE EXTENSION IF NOT EXISTS columnar;
Is this enough for all hydra capability/features ?

Is either template0 or template1 better/recommended ?

@wuputah
Copy link
Member

wuputah commented Mar 23, 2023

Correct, creating the columnar extension is the only action which is done for you because we add this file to the image:
https://github.com/hydradatabase/hydra/blob/main/files/postgres/docker-entrypoint-initdb.d/columnar.sql

Hydra adds other extensions, but these extensions need to be explicitly installed with CREATE EXTENSION. You can see these being added to the image here:
https://github.com/hydradatabase/hydra/blob/main/Dockerfile#L24-L44

template0 and template1 are built into Postgres and are not modified by Hydra; the default template is template1. There's no need to specify the source template when using CREATE DATABASE unless you are modifying these templates for your own purposes.
https://www.postgresql.org/docs/current/manage-ag-templatedbs.html

@muntdan
Copy link
Author

muntdan commented Mar 24, 2023

Thank you for the swift response but if you indulge me I still have some follow-up questions regarding:

Hydra adds other extensions, but these extensions need to be explicitly installed with CREATE EXTENSION. You can see these being added to the image here: https://github.com/hydradatabase/hydra/blob/main/Dockerfile#L24-L44

  1. So a new db I create with CREATE EXTENSION IF NOT EXISTS columnar; has the columnar equivalent capability
    but doesnt have hydra full functionality as it doesnt have all the other extensions enabled?
  2. Can/should I enable them to make it full feature ? so I can run lets say accurate benchmarks of performance
    or what will be the implications of not enabling those ?
  3. If indeed default postgres db has other extensions enabled, why does running
    SELECT * FROM pg_extension; on postgres db only shows 2: "plpgsql" & "columnar" ?
  4. Being such a popular extension/motive to use postgres, can I make a Github Issue to request inclusion of postgis in the list of extension you add to the docker /extensions folder ?

@wuputah
Copy link
Member

wuputah commented Mar 24, 2023

Extensions can be "installed" into a database using CREATE EXTENSION as needed, but are otherwise "available" (i.e. installed into the image). You can see all extensions using SELECT * FROM pg_available_extensions. The other extensions are foreign data wrappers; they are there if you need them, and there's no reason to install them if you are intending to test columnar.

You are welcome to create an issue for Postgis and we can use that to discuss and judge interest. However, as the image is open source and available, adding additional items to the image is left to you to customize to your needs, but this requires familiarity with Docker.

Postgis is already available in Hydra's cloud product.

@muntdan
Copy link
Author

muntdan commented Mar 25, 2023

Thank you for the answers.
I made this issue: #60

@muntdan muntdan closed this as completed Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants