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

I always use wal_level logical in prod. Whatever benefits of minimum wal_level do not overpower flexibility of logical even at high dml rates.

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

PostgreSQL

While I agree on that point.

That's it?

No comments on psql plug-ins?
Adding your own commands?

Do you use PSQL?

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

PostgreSQL

will check this one!
same here - most are using promeheues+grafana

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

PostgreSQL

Thanks @tzirechnoy
May I know which monitor tools you're using? I just found pg_dash but i wonder if there are better tools.

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

PostgreSQL

I don't use docker or other automation, my pg runs on debian containers

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

PostgreSQL

so you manually also backup the /etc?

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

PostgreSQL

Why bother? Windows is just a dead OS at this point

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

PostgreSQL

@unfoxo and @NickBluth (And any other power users)
Nik and I have been thinking about PSQL.
I tried twice to get the windows version to accept "readline" and got it "close".
But there are a FEW unacceptable issues.

Also, PSQL has zero extensibility, but the source code is decently organized.
Nik is experimenting with a rewrite in Rust (Using Claude + Agents).

I, OTOH, am strongly considering... Rewriting the existing PSQL into a Plug-In based architecture.
The existing functionality would be "Builtin" and not require any extra files. To be 100% Compatible.

But the overarching goals are to allow for plugins that could:
1) Add "\" commands (protecting from interfering with existing registered ones)
2) Add/Change the base "editing" of commands
3) Add Pre-Processing of commands, to support enhanced scripting (Likely requiring a --#!<fmt> header)
Nik has some interesting stuff working like this where template scripts can be created.
4) Add multi-buffer to the PSQL terminal so you can swap out, and do \d <table>
5) Add an error handler, with edit and rewrite on a bad query to correct it...
6) Potential AI or other tool integration (LSP for auto complete)
7) A plugin that lets you use the PLPGSQL Breakpoints and trace the code
8) etc...

But the ultimate goal would be to have an object file that could be wrapped and used by another program (like VIM) where it can load this as an API to hit PG. Without losing any core things that PG lets you do (Unless you specifically turn them off).

You no longer have to recreate everything PSQL does. You could write only the add-on features you want. And keep all of the base PSQL functionality as your starting point.

But the GOAL is to rebuild the maintained version of PSQL in this manner.

And over time, systems wrap this as their terminal approach to getting to PG?

So, PSQL only needs to support what it supports today. It can be externally grown/modified.

Obviously PSQL -X... Type option to NOT LOAD any plugins...

Thoughts? Issues? Ideas? Suggestions???
(Including, how do you think the Hackers will respond to this idea?)

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

PostgreSQL

Please explain what is (MVCC) in posgre

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

PostgreSQL

It's easier to convert physical replica to logical using pg_replication_slot_advance (before pg17) and skip initial sync.

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

PostgreSQL

I mean technically that might work but only if you can pause the original DB until you are finished and can start the subscription.

Probably the way to go if you are CPU-limited on the replica is to remove indexes and then re-add them later. Or add entirely new ones. The indexes can differ, it's just the definition of the columns you copy that has to be at least compatible, IIRC.

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

PostgreSQL

hey, anyone here is a Russian? could anyone from Russia dm me? I received a VN in Russian, which I don't understand

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

PostgreSQL

PgAdmin will let you set breakpoints in the code and trace through them. I would NOT do this on a production server.

We created a routine that lets us turn ON and OFF NOTIFY output.
And we put the LOGGING code in the procedures. When it's off, it simply returns.
When it's on, we get the output messages to the console (and optionally can be logged to the postgresql.log).

But good luck. Nothing FREE that I know of has implemented the debugger piece...

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

PostgreSQL

I never tried that, thanks for mentioning it

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

PostgreSQL

Unless you work with GIS data. I like how pgadmin shows me a map of the items in my database, that is how I found errors before even trying to display the data on a map myself.

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

PostgreSQL

I do use psql, but i find it already well done and complete for my needs. The console is limited compared to a GUI solution, i wouldn't know what to add to be honest

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

PostgreSQL

this conversion means i will also need to restart the master in order to change the wal_level right?

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

PostgreSQL

*i do not know and do not claim it is better or something like against the others. Maybe, zabbix is worse as I don't like zabbix....

In fact, most most of my friends do work with prometheus/grafana just fine.

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

PostgreSQL

1) Yes, I'm nearly always backup /etc on my servers.
2) No, usually postgres configs are restored not from backups — they are saved in git with comments as the other code.

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

PostgreSQL

I usually backup the entire system, except the data folder, so that when i restore i can do:
- restore the container/vm to have a ready made OS image running
- restore the data

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

PostgreSQL

/etc part is stored in git and unpacked after restore (sometimes port and binding ip is corrected after that).

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

PostgreSQL

by default the postgresql.conf is usually set to /etc
when you guys use pg_basebackup do you also copy the conf files manually or you just change the conf files to be part of the $PGDATA?

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

PostgreSQL

I think this might give you a good start -> https://www.postgresql.org/docs/current/mvcc-intro.html

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

PostgreSQL

https://www.percona.com/blog/how-to-convert-postgresql-streaming-replication-to-logical-replication/

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

PostgreSQL

I would only need to stop the master in order to change wal level to logical no? I couldn't find anything online about this. Only the options of dump-restore and copy

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

PostgreSQL

Question regard logical replication in version 13 - how do I make the initial copy for large DBs? Is it possible to make the replication from a pg-basebackup/a snapshot of the master machine?

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

PostgreSQL

i use standard c debugger in vscode

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

PostgreSQL

Hello Everyone,
What is the best free tool for debugging PostgreSQL functions and procedures?

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

PostgreSQL

datagrip shows map as well

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

PostgreSQL

psql is enough for any dba use case and pgadmin runs unnecessary queries for monitoring which is harmful at scale. Overall gui is trash, connection is counter intuitive for newbies. There are better options for gui addicts like dBeaver, datagrip etc

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