pg_sql | Unsorted

Telegram-канал pg_sql - PostgreSQL

2830

English speaking PostgreSQL public chat. This group is for discussions on PostgreSQL-related topics and strives to provide best-effort support as well.

Subscribe to a channel

PostgreSQL

Searching for "backup schema postgresql" pulls up the exact command needed to do it in my favorite search engine, along with a description from some stackexchange website

Читать полностью…

PostgreSQL

RPO/RTO may be just fine. There arw different cases...


But pg_dump requires a lot of knowledge to make a reliable backup. No DDL at time of a backup, no gigabyte rows, some mess with functions order and some care about recursive foreign keys to name a few troubles...

This could be called exceptional knowledge today for non-DBA. So my answer is: you can make a usable backup system out of pg_dump, but it's a non-trivial work, usually impossible in typical environment.

Читать полностью…

PostgreSQL

Also, pretending like you don't know what someone wants when they say they're looking for a way to back up one schema is pretty unhelpful, IMHO. You know they're looking for pg_dump -n right? So like if you want to also tell them to maybe look into other options, cool, but I mean, telling them that there's no way to do it because you hate pg_dump is just being confusing oon purpose.

Читать полностью…

PostgreSQL

Well, pg_dump is a tool for dumping data, pg_**basebackup** is the tool for creating a proper backup

Читать полностью…

PostgreSQL

Well, the blog post hardly recommends pg_dump. And these reasons are mentioned. But my main point is that saying "don't use pg_dump because the RPO/RTO suck" is a perfectly fine argument, but saying "pg_dump is not a backup tool" is 100% useless because it doesn't help anybody understand anything.

Читать полностью…

PostgreSQL

Especially considering the fact that pg_dump is NOT an exact copy of the data, so the chance of your recovery failing can be high with schemas that are "messy"

Читать полностью…

PostgreSQL

I have an exact opposite article in my drafts

Читать полностью…

PostgreSQL

Thanks for your help

Читать полностью…

PostgreSQL

No, it needs to be done specifically for postgresql?(I tested the code in python, it works fine)
Anyway, thanks for the reply, I will read more about it

Читать полностью…

PostgreSQL

Hi everyone
Has anyone had a problem with sending rest request to internal url? I tried pqsl_http, PLPYTHON3U. Requests are sent (for example to google.com), but not to the url inside the local network.

Читать полностью…

PostgreSQL

Try to fetch it with curl, then install it directly with rpm

Читать полностью…

PostgreSQL

Thank you makes a lot of sense

Читать полностью…

PostgreSQL

pg_dump -n schemaname

Читать полностью…

PostgreSQL

Can anybody send me the command to take the backup of one schema with data?

Читать полностью…

PostgreSQL

so I guess it is the best one to use here in this use case

Читать полностью…

PostgreSQL

OP could search online in a couple of seconds and get an answer. Posing the question that way means you just don't care and I'd say a response like that is correct to perhaps further stimulate OP to research themselves

Читать полностью…

PostgreSQL

I bet a lot of people would disagree with that too, in the sense that most people shouldn't be running that themselves rather than via a tool. But what I think is that it's silly to argue about what it means to be a backup tool. What's important is to educate people about what to do and why to do it like that. Getting stuck on the words we use to describe things isn't the way forward, in my opinion.

Читать полностью…

PostgreSQL

Perhaps we should say "pg_dump is not a backup tool, pg_basebackup is" :)

Читать полностью…

PostgreSQL

Very few problems are solved by getting mad at people for having bad opinions.

Читать полностью…

PostgreSQL

I'm proud that I provoked that!

(But i'm upset a little, though, that it was unintentional).

Читать полностью…

PostgreSQL

Main point is: pg_dump(all) has horrible RPO/RTO, and when disaster strikes and you need to get back up quickly, needing to setup and dump back in loads of data can make the difference

Читать полностью…

PostgreSQL

I just stumbled over https://rhaas.blogspot.com/2024/10/is-pgdump-backup-tool.html

LOL Robert , *that* was quick 👏

Читать полностью…

PostgreSQL

Check for $http_proxy and $https_proxy in your Python testbed.

Читать полностью…

PostgreSQL

That sounds like a problem with your internal network. Did you set a proxy environment variable or so?

Читать полностью…

PostgreSQL

Reported S H [7505889847] to admins.​​​

Читать полностью…

PostgreSQL

Hello everyone , need help while instalation , i am trying to install postgresql14 on my rhel 7 using yum , i have followed the instructions from postgre but still i have a issue as below

[root@localhost ~]# sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpmLoaded plugins: langpacks, product-id, search-disabled-repos
Cannot open: https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm. Skipping.Error: Nothing to do

i have disabled firewall not sure what i am missing can someone please help me here

Читать полностью…

PostgreSQL

1) You cannot do anything good with clusters (currently).

The commodity hardware cluster are always slower than single node of the same price.
Well, it's possible to get performance gain from clusters on a low-end hardware — if you'll separate them completely. No dependencies, no links, no synchronization, and client decides where to go.
But if you didn't do that yet — perhaps, something in busyness logic prevents it, isn't it?

So, just stick to a single server. It would be faster upto a really big servers, with many hundreds of cores, tens terabytes of RAM, tens of millions IOPS.

1.5) Proxmox isn't a bare metal. Either you have a bare metal w/o proxmox, or proxmox with containers or vms.


2) All of the tasks in postgres are done by queries.
So, in order to change something — you probably would need to change queries. Or at least look at them.
In particular, if you want more performance — go and measure your queries, than start thinking about optimising them.
No silver bullet.
Just get to work and do that — measure, look at explain, change algorithms, change structures.

Читать полностью…

PostgreSQL

$ pg_dump -h <hostname> -U <username> -W <db_name> > dumped.sql


The -W prompt for a password.

everything under <> are things to be filled by you (without them).

that's the most simplified form if you do not need something more (e.g. query/pattern matching).

Читать полностью…

PostgreSQL

interesting, I'll go to check it out better.

Thank you @unfoxo and @Musty_10

Читать полностью…

PostgreSQL

and also a connection pooler at the same time

Читать полностью…
Subscribe to a channel