Comment by Frank Heikens on Changing rounding mode for decimal values
Create a TRIGGER FUNCTION and a BEFORE TRIGGER that do precisely what you want them to do.
View ArticleComment by Frank Heikens on Is pg_dump as acceptable as pg_dumpall for...
I'm troubleshooting an error on the new system We'd love to help you, but we do need at least the error message. pg_dumpall also dumps the global objects that are not part of a single database, like...
View ArticleComment by Frank Heikens on Error "could not reserve shared memory region ......
It’s a misconfigured system, for Windows you should use very low settings for shared buffers.
View ArticleComment by Frank Heikens on PostgreSQL 13 on Windows –“invalid page in block...
Try to make a backup with just the data: pg_dump --data-only -d your_database
View ArticleComment by Frank Heikens on is this a good pratice, using varchar as data...
Yes, see Kimball: kimballgroup.com/data-warehouse-business-intelligence-resources/…
View ArticleComment by Frank Heikens on Copy pasting timestampz values don't work on...
@anta40 Why do you cast your column to a varchar? If this is a UUID, you just destroyed the option to use the index for this column to find the correct record
View ArticleComment by Frank Heikens on What will be the root cause for the incident?
Please share the query, the DDL for all tables and indexes involved, and the results from explain(analyze, verbose, buffers, settings) for this query. All in plain text, as an update to the question....
View ArticleComment by Frank Heikens on Database storage block corruption detection by...
I’m voting to close this question because this is about hardware, not specifically about databases.
View ArticleComment by Frank Heikens on Is it bad practice to just attempt to delete rows...
But I can also just simply occasionally try to delete the rows and skip the ones where this fails because of a foreign key constraint violation. Sounds like a plan! It's simple, reliable, and...
View ArticleComment by Frank Heikens on How can different types of indexes in PostgreSQL...
You didn’t share any information which makes it impossible to help you. Please check the manual about how to get information from your database: postgresql.org/docs/current/performance-tips.html
View ArticleComment by Frank Heikens on Truncate partitions with foreign key to a...
Your foreign key references the parent table, not the table partition directly. What you want is, to my knowledge, not supported by pg_partman.
View ArticleComment by Frank Heikens on Postgresql XID wrap around prevention overloading...
You could set vacuum_freeze_min_age to 0 for these partitions. That will freeze all tuples. See also stackoverflow.com/questions/70179712/…
View ArticleComment by Frank Heikens on Postgres recovery
Could you share some information about what PostgreSQL version, what OS, any error messages in the logfiles, etc.
View ArticleComment by Frank Heikens on Postgresql XID wrap around prevention overloading...
@zerz If you can't drop the old (empty?) partitions, you might be able to merge them. Instead of 100k empty tables, just one or two.
View ArticleAnswer by Frank Heikens for Truncate partitions with foreign key to a...
The first issue is what TRUNCATE can and can not do. Or actually WILL NOT DO. See this part of the manual:TRUNCATE cannot be used on a table that has foreign-key referencesfrom other tables, unless all...
View ArticleComment by Frank Heikens on VACUUM: ERROR: invalid memory alloc request size...
Since you're paying for EnterpriseDB, I recommend contacting their support desk.
View ArticleComment by Frank Heikens on Materialized CTE seems not to be materialized in...
It's using the wrong index on your table "time" (not a great name btw...). Could you share the results from explain(analyze, verbose, buffers, settings) and the DDL for all tables and indexes involved?...
View ArticleComment by Frank Heikens on What type of database should I use for this...
persistence to disk as a single file is a limiting factor; most databases work differently. Check SQLite, this could be a good match, and performance can be good enough.
View ArticleComment by Frank Heikens on cluster vs replica in mariadb or mysql
How can we determine what this unknown tutorial aims to explain? Just read the documentation written by MariaDB: mariadb.com/docs/server
View ArticleComment by Frank Heikens on How to correctly dumpall a PostgreSQL cluster...
Before you restore your database, create a new database as a target database and create the extension postgis_raster. When this is done, you can restore your backup, using this new database....
View Article