PostgreSQL

PostgresQL is a free and open-source object-relational database management system emphasizing extensibility and standards compliance.

PostgreSQL subscription active
You will receive email notifications for new publications on PostgreSQL.
290 Results
  • Question

    How can I run a rake task in my production environment?

    I have set up a rake task that I want to run once an hour using a cron expression. I got it working on my local dev environment, but I can't get it to work on my production environment hosted here. I have the followin...
    Accepted Answer: HI! Let me see if I can help. The first thing that comes to mind is that you do need to set the environment and use bundle. Be sure you're in the root of your rails app, and that you're using the user your app runs as...
    1 By donkerbc Ruby on Rails PostgreSQL Ruby Ubuntu 18.04
  • Question

    Costs estimation from App Platform Service to Managed Kubernetes

    I need to evaluate where does my project can start and as complete as possible initial costs, as well as later upgradings. Having 3 Nginx-PHP Docker images that connect to a Postgresql DB. I am evaluating App Platfo...
    Accepted Answer: Hello, The App platform integrates with the Managed Databases, so it is best to consider using a Managed Cluster. You should not really run a database on the App platform itself as the storage is ephemeral: https://do...
    1 By gerdaniels DigitalOcean App Platform DigitalOcean Managed Kubernetes DigitalOcean Managed PostgreSQL Database CentOS PostgreSQL
  • Question

    One Django App for Multiple Different Customers

    Hello, I have a django app deployed in DO. Currently I have 3 customers, so I created 3 different droplets. Its ok for now but I may have another 3-4 customers signing up in next few days and I expect it to grow 3-4 c...
    Accepted Answer: Hello, Having each customer on a separate Droplet has its benefits so that if one server has issues, not all of your customers would be affected but just one. Taking a snapshot of the server and then spinning up a new...
    1 By getpushpan Django PostgreSQL DigitalOcean Droplets
  • Question

    Remote access to PostgreSQL with pgAdmin

    I can't access remotely to a PostgreSQL, with pgAdmin database installed on an Ubuntu 16.04 droplet, with the Wordpress one install. I would like to import a dump file, with the database settings from my local compute...
    Accepted Answer: @aleixalcover When doing a port scan on 139.59.151.107, only ports 22 and 80 seem to be open, so if you need to connect remotely, you'd need to open port 5432 in the firewall to be able to connect. Since you're on Ub...
    2 By aleixalcover PostgreSQL Ubuntu 16.04
  • Question

    Not able to Install "plperlu" as Extension for Postgres managed database

    Hi, When I am trying to create the Postgres extension "plperlu", I am getting the below error. defaultdb=> CREATE EXTENSION plperlu; ERROR: permission denied to create extension "plperlu" HINT: Must be superuser to...
    Accepted Answer: Hi there, Unfortunately, DigitalOcean does not support the "plperlu" Postgres extension as it's an untrusted language that would allow the full ability to access anything the Postgres process can. This extension will ...
    1 By Rajkishore DigitalOcean Managed PostgreSQL Database PostgreSQL
  • Question

    Django app not updating after set up with Postgres, Nginx, and Gunicorn on Ubuntu 20.04

    I have set up a Django app successfully using a DO droplet. I following this tutorial: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-20-04. After maki...
    Accepted Answer: Hi there, If you change Gunicorn socket or service files, first reload the daemon: sudo systemctl daemon-reload And then also restart the following two: sudo systemctl restart gunicorn.socket gunicorn.service Let ...
    1 By calebpeter4 Django Ubuntu 20.04 PostgreSQL Nginx
  • Question

    setup multiple databases on one postgres server with different users for each

    Hi I am using the digital ocean managed database, but I wanna be able to host more then one database, for more then one application at once, for security I want to restrict each database to a specific user and then ad...
    Accepted Answer: Hi there, Yes, this is doable. You can do this by modifying the user privileges. You can follow the steps on how to do that here: https://docs.digitalocean.com/products/databases/postgresql/how-to/modify-user-privileg...
    1 By aluf DigitalOcean Managed PostgreSQL Database PostgreSQL Databases
  • Question

    How to connect Postgres managed database as a datasource in Google Data Studio

    Hello, I want to connect Postgres managed database to google data studio but I get an error while trying to establish a connection. any guidance will be helpful.
    Accepted Answer: Hi Please follow the below steps to connect Postgres Managed database as the data source for google data studio 1) Downloaded the CA certificate for your DigitalOcean instance from the console ( this will be a Server ...
    2 By Rajkishore DigitalOcean Managed PostgreSQL Database PostgreSQL
  • Question

    How to check metrics like CPU, Disk, RAM utilization in Managed database cluster.

    I want to know how to check disk, cpu and RAM usage of the managed MySQL and Postgresql database cluster?
    Accepted Answer: Hi, To view performance metrics, click the name of the database to go to its Overview page, then click the Insights tab. The Select object drop-down menu lists the cluster itself and all the databases in the cluster....
    1 By priyankamalik DigitalOcean Managed MySQL Database DigitalOcean Managed PostgreSQL Database MySQL PostgreSQL
  • Question

    Cannot connect with dev database due to SSL issue

    I'm using DigitalOcean App Platform to host a small node.js app. For the time being, I decided to go with the dev database that happens to be PostgreSQL. I understand it's not meant to be used in production, but does ...
    Accepted Answer: So I ended up figuring out how to solve this. Later after I submitted this ticket. I didn't realize up until then that the dev database provides an CA cert. So once I did, all I had to do was to add one extra option i...
    1 By mateust Node.js DigitalOcean App Platform PostgreSQL
  • Question

    How do I find the SSL certificate required for database components in App Platform?

    I'm trying to deploy a node.js application that interacts with a Postgres database via DO App Platform. I'm using the provided ${db.DATABASE_URL} environment variable and I can see it enforces SSL. I'm getting the Unh...
    Accepted Answer: Just found out the docs: https://www.digitalocean.com/docs/app-platform/how-to/use-environment-variables/#define-build-time-environment-variables Using code like this (https://www.digitalocean.com/community/questions/...
    1 By abelborges PostgreSQL Node.js DigitalOcean App Platform
  • Question

    How can I investigate Postgres managed server error: SSL connection has been closed unexpectedly

    From time to time our system fails when either inserting or querying to a UDF with the error: SSL connection has been closed unexpectedly but I am unable to figure out how to investigate the cause of this error. Can a...
    Accepted Answer: Hi, What I would do... Turn on logging connections and disconnections in postgresql.conf file. There are two parameters for that which are set off by default. [label postgresql.conf] log_connections = on log_disconne...
    1 By douglasd PostgreSQL
  • Question

    Web Hosting a Django web site in a droplet.

    I wonder if anyone can help me with this... I've got a website that I've built using Django & Python and Postgres. I understand I can install Django, Python and Postgres and deploy the website into to a droplet, but w...
    Accepted Answer: Hi there @closverges2004, With your DigitalOcean Droplets, you will get root access and you will be able to install all of the packages and services that you need. You can follow this step by step tutorial on how to s...
    2 By closverges2004 Django Development Deployment PostgreSQL Python Frameworks
  • Question

    Can't communicate from docker container (.NET Core App) to postgreSQL on host droplet!

    What connectionstring should I use to connect from my Docker container (.NET Core App) to my PostgreSQL database installed on the host Droplet. Both container and database are on the same droplet. Navigating to the we...
    Accepted Answer: using --net=host in the docker command fixed it actually! docker run -d -p 5000:5000 --net=host
    1 By strofc DigitalOcean Droplets Docker Container PostgreSQL
  • Question

    Cheapest DigitalOcean plan that suits my requirements for a new Website

    I'm writing to determine the cheapest DigitalOcean plan that suits my requirements for a new Website. Elementum.asia will be selling eBooks in PDF format. Projected number of titles: 120 by end-2021, 480 by end-2022, ...
    Accepted Answer: Hello, @vinayEel You can definitely start with some of the smallest packages and upgrade in the future if this is needed. I will recommend choosing the Intel or AMD Premium Droplets option with 2GB RAM and 50GB NVMe ...
    2 By merrymuze CentOS PostgreSQL
  • Question

    Do managed postgres databases run the autovacuum demon?

    As described here - https://www.postgresql.org/docs/current/routine-vacuuming.html#AUTOVACUUM I didn't see any mention in the DigitalOcean docs, so I assume not, but wanted to make sure - I'm new to pg and not sure wh...
    Accepted Answer: I reached out to support some time back with that very question ``` Currently, in our managed Postgres database we have autovacuum enabled and below are some of the values we have set for the parameters that affect au...
    6 By bburnskm PostgreSQL DigitalOcean Managed PostgreSQL Database
  • Question

    media files returns 404 not found

    my nginx file looks like: ``` location = /favicon.ico { accesslog off; lognot_found off; } location /static/ { alias /home/me/projectdir/static/; } location /media/ { alias /home/me/projectdir/media/; } locati...
    Accepted Answer: Hi there @elprincipe, Do you see any errors in your Nginx error log? You can check that with the following command: command,bash sudo tail -100 /var/log/nginx/error.log It is quite possible that Nginx does not have t...
    1 By elprincipe Nginx Python PostgreSQL Django Python Frameworks Ubuntu 18.04 Databases
  • Question

    How to import Geopackages into Postgres/Postgis database?

    Hi everyone, I would like to know how to import a Geopackage file containing raster into a Postgis database. I tried with gdal library "ogr2ogr". This is the command line I used: ogr2ogr -f PostgreSQL PG:"dbname='data...
    Accepted Answer: Hello, I think that your firewall might be blocking your connections on port 5432, so I would suggest running the command locally from your Droplet. What you should usually do is: SSH to your Droplet (https://www.digi...
    1 By Heryx PostgreSQL Linux Commands Linux Basics
  • Question

    Managed Postgres Clusters: pg_restore errors for superuser privileges

    I'm trying to import a database with pg_restore to a managed postgres cluster but I get the following error: could not execute query: ERROR: must be superuser to create an operator class I'm connecting as "doadmin" w...
    Accepted Answer: Hey there, At this time it isn't possible to create a superuser with DO Managed Databases; this bars operator class access as a superuser is always needed to create one. We're learning more about Managed Databases eve...
    12 By maxovolab PostgreSQL
  • Question

    How do I connect to a postgres connection pool with managed databases?

    We have decided to use Postgres and digital oceans managed databases for our next project. This database will handle about 10 million page visits a month, with certain points having spikes in traffic. We created a dat...
    Accepted Answer: To answer my own question, use the pool name to connect instead of the db name. postgresql://{user_name}:{password}@datalab-do-user-6674409-0.b.db.ondigitalocean.com:{pool_port_number}/{<^>pool_name<^>}?sslmode=requ...
    1 By gbland Databases PostgreSQL