Re: Cannot pg_dump_all anymore...

2025-03-19 Thread Greg Sabino Mullane
On Wed, Mar 19, 2025 at 10:02 AM E-BLOKOS wrote: > is it possible a crash happened with a VACUUM and a machine reboot in same > time? > More likely to be a problem with pg_repack. Please tell us the exact versions of pg_repack and Postgres in use here. Cheers, Greg -- Crunchy Data - https://w

Re: size of attributes table is too big

2025-03-19 Thread Álvaro Herrera
Hello On 2025-Mar-19, Siraj G wrote: > I have a PG (v16) instance which is occupying around 1TB of storage. Out of > this, around 350GB is occupied by the table pg_catalog.pg_attribute. > Why is the catalog table's size so big? Heavy use of temp tables is a known cause of this. > I think this t

Re: size of attributes table is too big

2025-03-19 Thread Adrian Klaver
On 3/19/25 10:06, Siraj G wrote: Hello! I have a PG (v16) instance which is occupying around 1TB of storage. Out Exact version of Postgres 16, include the x in 16.x. of this, around 350GB is occupied by the table pg_catalog.pg_attribute. Why is the catalog table's size so big? Here are the

Re: size of attributes table is too big

2025-03-19 Thread Pavel Stehule
st 19. 3. 2025 v 18:14 odesílatel Álvaro Herrera napsal: > Hello > > On 2025-Mar-19, Siraj G wrote: > > > I have a PG (v16) instance which is occupying around 1TB of storage. Out > of > > this, around 350GB is occupied by the table pg_catalog.pg_attribute. > > Why is the catalog table's size so b

Re: How to recover correctly master and replica using backup made by pg_basebackup?

2025-03-19 Thread Evgeniy Ratkov
On 07/11/2024 22:19, Evgeniy Ratkov wrote:Hello.I try to use pg_basebackup to make backup and recover master and replicafrom it.I recover master with action "promote". Next, I recover replica from thesamebackup with action "shutdown". After it, I start replica with configuredconnectionand replicati

Re: size of attributes table is too big

2025-03-19 Thread Siraj G
Hello Pavel The SQL instance is a target of google DMS and it does have a physical replica. A couple of weeks back we did have a performance issue and vacuum was run at that time to fix the problem. Very soon we may run into the same problem I presume. Regards Siraj On Wed, Mar 19, 2025 at 10:4

Re: Restoring only a subset of schemas

2025-03-19 Thread Sylvain Cuaz
Le 17/03/2025 à 16:29, Tom Lane a écrit : Sylvain Cuaz writes:     Now if I want to restore from a full dump of this DB, but with only one "cXXX" and the "Common" schema : - if I pass --create --schema=Common, then the CREATE SCHEMA is missing, i.e. it only emits data inside "Common" and th

Re: pgvector as standard PostgreSQL feature?

2025-03-19 Thread Sebastien Flaesch
Go it, makes total sense. So pgvector etc will probably remain an extension for a while. Thanks for the note about BIT type. I have missed that it's a standard built-in type. Seb From: Christophe Pettus Sent: Wednesday, March 19, 2025 9:19 AM To: Sebastien Flae

Re: Restoring only a subset of schemas

2025-03-19 Thread Sylvain Cuaz
Le 17/03/2025 à 16:21, Adrian Klaver a écrit : On 3/17/25 07:57, Sylvain Cuaz wrote: Hi all, I have a DB with one schema named "Common" holding data referenced by other schemas. All other schemas have the same structure (tables and fields) and are named "cXXX" where XXX is just an int. T

Re: size of attributes table is too big

2025-03-19 Thread Siraj G
Hi Adrian Used this query to find the sizes: select relname AS object_name,relkind AS object_type,pg_size_pretty(pg_relation_size(oid)) AS object_size FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'pg_catalog') ORDER BY pg_relation_size(oid) DESC; We have clos

Re: After upgrading libpq, the same function(PQftype) call returns a different OID

2025-03-19 Thread Tom Lane
Adrian Klaver writes: > On 3/18/25 23:41, Sebastien Flaesch wrote: >> I was not expecting this file to be in a "server" folder, when it's to >> be used for client apps. > Not surprising. As I understand it this is the code used to build the > type entries in the system catalog pg_type. More th

Re: size of attributes table is too big

2025-03-19 Thread Adrian Klaver
On 3/19/25 10:36 AM, Siraj G wrote: Hi Adrian Used this query to find the sizes: select  relname AS object_name,relkind AS object_type,pg_size_pretty(pg_relation_size(oid)) AS object_size FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'pg_catalog') ORDER

Re: Cannot pg_dump_all anymore...

2025-03-19 Thread E-BLOKOS
On 3/18/2025 5:49 AM, Greg Sabino Mullane wrote: First figure out which database is having that issue, by using pg_dump --schema-only on each database in turn. Then run this SQL on the database giving the error to see if the type exists, or what is nearby: select oid, typname, typtype, typnam

Re: size of attributes table is too big

2025-03-19 Thread Ron Johnson
On Wed, Mar 19, 2025 at 1:06 PM Siraj G wrote: > Hello! > > I have a PG (v16) instance which is occupying around 1TB of storage. Out > of this, around 350GB is occupied by the table pg_catalog.pg_attribute. > Why is the catalog table's size so big? > > Here are the sizes: > > pg_attribute > 338 G

Re: Cannot pg_dump_all anymore...

2025-03-19 Thread E-BLOKOS
Hi, On 3/19/2025 7:08 AM, Greg Sabino Mullane wrote: On Wed, Mar 19, 2025 at 10:02 AM E-BLOKOS wrote: is it possible a crash happened with a VACUUM and a machine reboot in same time? More likely to be a problem with pg_repack.  Please tell us the exact versions of pg_repack and Post

Re: Restoring only a subset of schemas

2025-03-19 Thread Tom Lane
Sylvain Cuaz writes: > Further, I don't see how it's an edge-case, at the core I just want to > restore some but not all the > schemas. This is possible for pg_dump, see my response to Adrian Klaver. You have a very good point that it's annoying that pg_restore's --schema switch doesn't act lik