Pgbackrest has encryption built in. If you use a repo host on top, you can divide your eggs into different baskets, which is a Good Thing (TM)
Читать полностью…Honestly, this gets complicated... Whatever monitoring tool you use, you should point at these things. And set appropriate alarms. I've written my own, as well as leveraged a few others. A couple free Nagios, etc. As well as paid ones.
The important things are:
1) Monitoring
2) At least DUMPING (pg_dump), and practicing your restores
3) Having Backups, and testing the restores. PgBackrest, etc. etc.
Without that. You are BEGGING for data loss. (My personal NAS just died b/c the power supply).
Stuff Happens. And you are not a professional if you don't know how to recover your DB! LOL
remember, you can run out of diskspace for 2 reasons. WAL (logging), and DATA (tables,rows, etc).
Читать полностью…ok noted, base on default_tablespace it's will base on on PGDATA , and PGDATA will depend on disk drive i am correct?
Читать полностью…do you have any recommendation to share about geojson
is possible to save it from a POST api rest and save it in a postgres db
sample something like this
https://gist.github.com/rogergcc/913dee43310d35cda9a3383e094bed1b
or a simple crud project about this
A while ago, I was editing this PostgreSQL wiki page:
https://wiki.postgresql.org/wiki/Count_estimate
The function count_estimate
has the same issue; it accepts a query as text.
I spent a little time playing around but couldn't figure out how to pass an actual query to it, thus ended up adding a warning:
Do not pass an unsanitized query
to this function, as it is subject to SQL injection.
Читать полностью…
Yeah, that kind of dynamic column list was something SQL didn't have a design item, and it pops up once in a while.
Читать полностью…I think there's something weird about the way it works right now, and not in a good way. It is unclear to me what would be better, though.
Читать полностью…A tricky point about this is that in a crosstab, you don't know what the output column labels should be until you see what rows you get. But that means you don't know it until execution time. Which is a problem because the plan needs to contain that information. So maybe your CREATE CROSSTAB mycrosstab
syntax would have to include a column list.
Hello and welcome to this chat. Here we discuss PostgreSQL and provide best-effort voluntary support on Postgresql issues.
If you have any question, try asking kindly, including log files, error descriptions and perhaps what you're trying to do.
- 🚫 photos and screenshots
- 🚫 spam and offtopic
- ✅ questions with log files and clear explanation of what's gone wrong
⬇️ Press the button down here ⬇️
Effectively a Tablespace in PG is just a folder.
When that device fills up, you are cooked.
Unlike Oracle (where you can add additional "files" to a tablespace, that can be on any or many different drives)...
This is one of the limitations of PG.
When you start running out of space. You need to create a new tablespace somewhere else (on a new drive).
And start moving things to be stored there.
Or you need to use a type of storage that allows you to add to the filesystem.
HTH
anyone experience on that pls help clearify me or provide support document.thank q
Читать полностью…Hello team,
I wonder one thing on postgres regrading with Posgres tablespace.
by default is will using pg_default for all database creation .
SELECT *Читать полностью…
FROM (
SELECT product, year, sales
FROM sales_data
)
PIVOT (
SUM(sales)
FOR year IN (2021 AS year_2021, 2022 AS year_2022)
);
Said another way, introducing a new SQL construct because it doesn't feel right to you might actually be a great idea, but not if the new thing also doesn't feel right....
Читать полностью…I could live with that. It's also probably not worth introducing a whole new SQL construct just because I don't like the way passing queries as strings "feels." :-)
Читать полностью…To be more clear. You would use the (...) to define the columns returned.
That's interesting. But that would create a rather specific object that needs to be destroyed/recreated as the years would change in the future?
CREATE CROSSTAB mycrosstab(product TEXT, year_2021 int, year_2023 int) AS SELECT …Читать полностью…
I was thinking of something like view syntax:
CREATE CROSSTAB mycrosstab(...) AS SELECT …Читать полностью…