2830
English speaking PostgreSQL public chat. This group is for discussions on PostgreSQL-related topics and strives to provide best-effort support as well.
Are there anybody know why psql -c <commands> looks like execute multiple statements in one transaction?
I use psql -c 'truncate foo; copy foo from stdin' It blocks my other select operation.
I read the docs.
> PostgreSQL actually treats every SQL statement as being executed within a transaction.
The behaviours looks like difference with the docs.
Thank you
How do you envision anyone helping you if you don't provide details?
Читать полностью…
https://www.postgresql.org/docs/current/app-pgdump.html -j njobs
--jobs=njobs
Run the dump in parallel by dumping njobs tables simultaneously. This option may reduce the time needed to perform the dump but it also increases the load on the database server.
From https://www.postgresql.org/docs/current/storage-toast.html
The TOAST management code is triggered only when a row value to be stored in a table is wider than TOAST_TUPLE_THRESHOLD bytes (normally 2 kB). The TOAST code will compress and/or move field values out-of-line until the row value is shorter than TOAST_TUPLE_TARGET bytes (also normally 2 kB, adjustable) or no more gains can be had. During an UPDATE operation, values of unchanged fields are normally preserved as-is; so an UPDATE of a row with out-of-line values incurs no TOAST costs if none of the out-of-line values change.
No, there is something similar called toast storage and you can change the storage used by the table but it you want to use compression you should use an extension like timescale, cstore or columnar store from citus and outside from the database using a file system that allow compression like zfs.. .
Читать полностью…
Is there is table level compression option in PostgreSQL
Читать полностью…
Hello Guys, Greetings of the day, Anyone looking for PostgreSQL developer jobs feel free to reach me. Thanks.
Читать полностью…
That sounds utterly broken indeed. I assume tables #2 & #3 are imported from some other system or ro and just serve to fill gaps? How about you create a view with LEFT OUTER JOINs and some coalesce() magic out of #2/#3 and LEFT JOIN that during your INSERT?
Читать полностью…
I have three different tables, but the name column is the same in all three. One is the main table (village), and I want the data from the other two tables to be inserted into the main village automatically whenever data is inserted if the name matches the found same of the village name? How?
Читать полностью…
Here you said high level theory, can you tell me a bit about it.
High level system design?
🙏
Thank you so much for your time explaining me.
Actually I was in a hurry to learn it in a single day that's is why 😁.
Out of curiosity, how long will it take to learn it?
Working as an intern, everything running sooooo fast. 😐
Thank you Kirk 🙏
Hello all, I'm a newbie to postgresql.
Is there a batch separator in postgresql similar to "GO" statement in mssql?
Thanks in advance
PostgreSQL Person of the Week interview with: Amul Sul
https://postgresql.life/post/amul_sul/
Also think about the various impacts.
It really matters if you are running your backup over a slow network.
Or if you are dumping locally (usually much faster, but then the pg_dump threads are running on your DB).
Compression can help or hurt. Depending on where your bottleneck is.
Because you could make the backup faster, and then take a LOT LONGER to get the data off the machine where you need it. YMMV (Your Mileage May Vary). To test things, you can LIMIT the data you are dumping.
Finally, pg_dump is NOT REALLY a backup tool. Long term, please consider a REAL backup solution.
How can I reduce the backup time, is there any parameters that I need to set for fast backup
Читать полностью…
The only compression you can get is TOAST, aka storing unusually large values externally from the table
Читать полностью…
I am setting up logical replication, and the table is growing non-stop. That is, it becomes larger in size in the target database than in the source database. On the source database, pg_276149_sync_273122_7361807020861252240 grows, the indicator is replicationslotlag, to about 1700mb and then drops to zero and grows again. Is this normal?
Читать полностью…
CREATE OR REPLACE FUNCTION fetch_employee_records(refcursor_name REFCURSOR)
RETURNS REFCURSOR AS $$
BEGIN
-- Open the cursor with the given name and execute the query
OPEN refcursor_name FOR
SELECT * FROM employees;
-- Return the cursor
RETURN refcursor_name;
END;
$$ LANGUAGE plpgsql;
How to create function with refcursor in postgresql and how to call that function?
Читать полностью…
Simply the Elevator Pitch.
Enough information that if your MOM asked what a Kubernetes was, you could tell her the ESSENCE of it in a short elevator ride.
Everyone is different. And different at every skill...
Try to remember how things were 200 years ago. No electricity.
Horse travel, or walking.
Your trip to the store was ONCE A MONTH at best. It took All day.
Don't rush. Learn. It doesn't matter how long you estimate. It only matters if you focus and spend the time required.
Sometimes Repetition helps. But I find doing HANDS on really helps.
Also, try to learn SLOWER. Quit racing through the material (if you are).
If you are going painfully slow, then try to find the exercises that allow you to follow along.
You should know the high-level theory.
Then develop your skills. (Install, Startup, Custom startup, shutdown).
Good Luck!