pg_sql | Unsorted

Telegram-канал pg_sql - PostgreSQL

2634

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

Did anyone use Debezium on postgreSQL?

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

PostgreSQL

I am talking about postgresql schema only.

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

PostgreSQL

Hello. On postgresql, a schema is a logical division of a single database.
Are you talking about actual postgresql schemas or mistakingly using the mysql nomenclature where every database is called "schema"?

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

PostgreSQL

>requiring us to rebuild the entire setup from a base backup

Just FYI, if this ever happens again and you only want to transfer the changed files, stop the secondary server, use pg_backup_start on the primary and use rsync with the archive (-a) and delete (-d) option to perfectly sync the two data folders. Don't forget afterwards to touch standby.signal inside the folder of the target so it doesn't switch timeline.

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

PostgreSQL

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 ⬇️

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

PostgreSQL

Hi, how to grant user access for all db in postgresql. Can you please share the command

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

PostgreSQL

Yep, I used repmngr for this issue and it works fine with me.

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

PostgreSQL

@NickBluth

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

PostgreSQL

Hi everyone, we are using PostgreSQL 14.9 with a master and replica server setup. During maintenance activities, we stop both servers. However, after restarting them, the replication does not resume automatically, requiring us to rebuild the entire setup from a base backup. This is problematic given our database size is around 500GB
Is there any solution for this Its very help full for me

Thanks

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

PostgreSQL

But that doesn't change your checkpoint frequency, which happens based on amount of data. *Not* amount of files.

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

PostgreSQL

No. You'll just split the same amount of data into less files. But it's still the same amount of data.

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

PostgreSQL

Let's make an easier comparison. If you owe me $1000, I don't care if you pay me in $1, $10 or $100 bills. Because I don't care how many bills you hand over, just what their total value (in $$$) is.

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

PostgreSQL

Well, my point is: if I changed the wal segment in initialization to 64MB or 128MB for example, that would result in each wal file will hold more data, so fewer files generated, but large in size compared to 16MB.

With checkpoints archive timeout to increase it, this will extend the intervals postgreSQL takes to write pages from memory to disk, so the checkpoint process will be less frequently happened when I increase it, and the wal data will accumulated (Increased) between the checkpoints , leading to fewer but larger wal segment. So you will result in having less wal segments but larger in size.

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

PostgreSQL

Yes, exactly that would reduce the number of files as we increased the segment size, and increaed the the checkpoints timeout

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

PostgreSQL

It works without any vendor. U can edit postgresql.conf.

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

PostgreSQL

pg_dump can dump (and hence drop/recreate) single schemas.

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

PostgreSQL

If you use pg_dump with the -C option (create database), then the resulting sql dump will contain all the needed instructions to create the database if it doesn't exist, and will not touch any other database

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

PostgreSQL

Hi team,

I have taken a one schema backup from uat server.
And I need to restore it on the prod server where the prod server consists of 50+ schema.

The one i have to restore the schema is NEW one ( i mean that schema is not their in prod server)

Will it affect yaa flush all the other schema and will restore only one?

Please share the command to restore the schema.

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

PostgreSQL

There's no ready-made command for that. You'll need a separate GRANT for each database. You could use some \gexec on pg_databases to achieve it.

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

PostgreSQL

check the group roles

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

PostgreSQL

Well, since you probably also want to have a backup anyway (you do, do you?!?), set up a WAL archive, configure your archive_command and restore_command properly and live happily ever after.
Otherwise raise wal_keep_segments and/or use replication slots.

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

PostgreSQL

Okay did you find any solution?

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

PostgreSQL

Somehow I experience the same issue, when restarting, or when manually do the promote() on the standby.

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

PostgreSQL

Is there any open source tool for postgreSQL to monitor the behaviour of the database metrics in a REAL-TIME?

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

PostgreSQL

Yes, exactly it is the same amount of data in total, but in less files. that's what I meant in the first.

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

PostgreSQL

Nope, I am not talking about the wal size itself, I am talking about the wal segment.

The wal size will be fixed for example 1GB max to reach to flush the data.

For example, If I disabled the checkpoint timeout parameter, then postgreSQL will depend on the max wal size set, which by default is 1GB to reach then make the checkpoint and write the data to disk. So, at the current state, If the segment file increaed it make sense that would have more space to data to be stored, so fewer segments generated. Is this correct?

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

PostgreSQL

So you're saying the size of the bucket changes depending on what you choose to transport the water with?

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

PostgreSQL

Wrong. A checkpoint is triggered whenever max_wal_size or checkpoint_timeout is exceeded, whatever happens first. And max_wal_size is independent of the WAL segments' individual size, just the total amount of disk space they use together in pg_wal/.
If you fill a 10 liter bucket with water, it doesn't matter if you use a spoon or a 1 liter bottle. It'f full when you have transferred 10 liters, not when you moved your arm a certain amount of times.
max_wal_size is the size of your bucket. wal_segment_size is "spoon or bottle".
You want a bigger bucket. Get it?

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

PostgreSQL

Also, keep in mind. If you have an index defined. It will slow it down.
If the index does not increase in ONE direction only (Like IDs do)... Then it SIGNIFICANTLY slows things down.
In my case, for HUGE imports, I will delete the index and recreate it.
In one example, I had 23hrs to import data with 2 indexes. And 45 minutes to import data without indexes.
Rebuilding the indices took a few hours (both at the same time).
YMMV

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

PostgreSQL

That just changes the number of files, not the allocated disk space.

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