Re: autovacuum hung on simple tables

2022-11-27 Thread Laurenz Albe
On Mon, 2022-11-28 at 04:05 +, senor wrote: > I'm a little late getting back to this but still have no solution. > > I had inadvertently executed a vacuum freeze on a table that pg_stat_activity > indicated was currently being autovacuumed. The manual vacuum succeeded while > leaving the previ

Re: Get table catalog from pg_indexes

2022-11-27 Thread Thomas Kellerer
Igor Korot schrieb am 27.11.2022 um 23:13: >> I've never heard of a database referred to as a catalog. (That's always >> been where a database's metadata -- i.e. the pg_catalog schema -- is stored.) > > In the ODBC terminology the DB is usually referenced as catalog. JDBC uses the same term and t

Re: autovacuum hung on simple tables

2022-11-27 Thread senor
I'm a little late getting back to this but still have no solution. I 100% agree that updating postgres is best. The usual excuses for not updating apply. It will be done when it is allowed to be done. It remains 11.4 for now. I read through the changelogs up through 11.18 and didn't see anything

Re: Postgres upgrade 12 - issues with OIDs

2022-11-27 Thread David Rowley
On Mon, 28 Nov 2022 at 12:46, Venkata B Nagothi wrote: > Coming back to this thread after a while.. we have to remove OID on a 6 TB (5 > TB of indexes) table and ALTER TABLE is gonna block the table and is gonna > take hours... You may want to look into exploiting table inheritance for this. So

Re: Postgres upgrade 12 - issues with OIDs

2022-11-27 Thread Venkata B Nagothi
Coming back to this thread after a while.. we have to remove OID on a 6 TB (5 TB of indexes) table and ALTER TABLE is gonna block the table and is gonna take hours... We operate on pretty much 0 outage we do have a passive site on which we will be doing the activity.. if not ALTER TABLE.. is t

Re: Get table catalog from pg_indexes

2022-11-27 Thread Adrian Klaver
On 11/27/22 14:11, Igor Korot wrote: David, On Sun, Nov 27, 2022 at 12:55 PM David G. Johnston wrote: On Sun, Nov 27, 2022 at 11:42 AM Igor Korot wrote: It doesn't say anything about "current" DB - only the DB. Yes, but you must be connected to some database in order to execute this co

Re: Get table catalog from pg_indexes

2022-11-27 Thread Igor Korot
Ron, On Sun, Nov 27, 2022 at 4:10 PM Ron wrote: > > On 11/27/22 15:55, Adrian Klaver wrote: > > On 11/27/22 13:31, Ron wrote: > >> On 11/27/22 11:22, Igor Korot wrote: > >>> Hi, ALL, > >>> Table pg_indexes does not contain a field for a catalog. > >>> > >>> So how do I get that? > >>> > >>> SELEC

Re: Get table catalog from pg_indexes

2022-11-27 Thread Igor Korot
David, On Sun, Nov 27, 2022 at 12:55 PM David G. Johnston wrote: > > On Sun, Nov 27, 2022 at 11:42 AM Igor Korot wrote: >> >> >> It doesn't say anything about "current" DB - only the DB. > > > Yes, but you must be connected to some database in order to execute this > command: "the database" ref

Re: Get table catalog from pg_indexes

2022-11-27 Thread Ron
On 11/27/22 15:55, Adrian Klaver wrote: On 11/27/22 13:31, Ron wrote: On 11/27/22 11:22, Igor Korot wrote: Hi, ALL, Table pg_indexes does not contain a field for a catalog. So how do I get that? SELECT 1 FROM pg_indexes WHERE indexname = $1 AND tablename = $2 AND schemaname = $3 You did not

Re: Get table catalog from pg_indexes

2022-11-27 Thread Igor Korot
Thx, Adrian. On Sun, Nov 27, 2022 at 3:56 PM Adrian Klaver wrote: > > On 11/27/22 13:31, Ron wrote: > > On 11/27/22 11:22, Igor Korot wrote: > >> Hi, ALL, > >> Table pg_indexes does not contain a field for a catalog. > >> > >> So how do I get that? > >> > >> SELECT 1 FROM pg_indexes WHERE indexna

Re: Get table catalog from pg_indexes

2022-11-27 Thread Adrian Klaver
On 11/27/22 13:31, Ron wrote: On 11/27/22 11:22, Igor Korot wrote: Hi, ALL, Table pg_indexes does not contain a field for a catalog. So how do I get that? SELECT 1 FROM pg_indexes WHERE indexname = $1 AND tablename = $2 AND schemaname = $3 You did not look hard enough, or Google "postgresql

Re: Get table catalog from pg_indexes

2022-11-27 Thread Ron
On 11/27/22 11:22, Igor Korot wrote: Hi, ALL, Table pg_indexes does not contain a field for a catalog. So how do I get that? SELECT 1 FROM pg_indexes WHERE indexname = $1 AND tablename = $2 AND schemaname = $3 You did not look hard enough, or Google "postgresql pg_indexes". test=# \d pg_inde

Re: Get table catalog from pg_indexes

2022-11-27 Thread David G. Johnston
On Sun, Nov 27, 2022 at 11:53 AM Igor Korot wrote: > > On Sun, Nov 27, 2022 at 12:45 PM Christophe Pettus > wrote: > > > > > In PostgreSQL terminology, a single PostgreSQL instance (the cluster) > can have multiple databases. > > Just like any other DBMS. > The point was the terminology - write

Re: Get table catalog from pg_indexes

2022-11-27 Thread Adrian Klaver
On 11/27/22 10:42, Igor Korot wrote: Hi, Erik, On Sun, Nov 27, 2022 at 11:59 AM Erik Wienhold wrote: On 27/11/2022 18:22 CET Igor Korot wrote: Table pg_indexes does not contain a field for a catalog. So how do I get that? SELECT 1 FROM pg_indexes WHERE indexname = $1 AND tablename = $2 A

Re: Get table catalog from pg_indexes

2022-11-27 Thread Christophe Pettus
> On Nov 27, 2022, at 10:53, Igor Korot wrote: > Are you saying I can't run any query on other DB? Or connect to DB and > run select? The query you run only looks at the system catalogs for the database you are connected to (with the exception of the small number of global catalogs, like pg_

Re: Get table catalog from pg_indexes

2022-11-27 Thread David G. Johnston
On Sun, Nov 27, 2022 at 11:42 AM Igor Korot wrote: > > It doesn't say anything about "current" DB - only the DB. > Yes, but you must be connected to some database in order to execute this command: "the database" refers to this database you are connected to. The catalogs are not information_sche

Re: Get table catalog from pg_indexes

2022-11-27 Thread Igor Korot
Hi, Christopher, On Sun, Nov 27, 2022 at 12:45 PM Christophe Pettus wrote: > > > > > On Nov 27, 2022, at 10:42, Igor Korot wrote: > > > > It doesn't say anything about "current" DB - only the DB. > > In PostgreSQL terminology, a single PostgreSQL instance (the cluster) can > have multiple datab

Re: Get table catalog from pg_indexes

2022-11-27 Thread Christophe Pettus
> On Nov 27, 2022, at 10:42, Igor Korot wrote: > > It doesn't say anything about "current" DB - only the DB. In PostgreSQL terminology, a single PostgreSQL instance (the cluster) can have multiple databases. The database the connection is currently open to is the current database.

Re: Get table catalog from pg_indexes

2022-11-27 Thread Igor Korot
Hi, Erik, On Sun, Nov 27, 2022 at 11:59 AM Erik Wienhold wrote: > > > On 27/11/2022 18:22 CET Igor Korot wrote: > > > > Table pg_indexes does not contain a field for a catalog. > > > > So how do I get that? > > > > SELECT 1 FROM pg_indexes WHERE indexname = $1 AND tablename = $2 AND > > schemana

Re: Get table catalog from pg_indexes

2022-11-27 Thread Erik Wienhold
> On 27/11/2022 18:22 CET Igor Korot wrote: > > Table pg_indexes does not contain a field for a catalog. > > So how do I get that? > > SELECT 1 FROM pg_indexes WHERE indexname = $1 AND tablename = $2 AND > schemaname = $3 Use SELECT current_database() if you need to know the catalog. pg_indexes o

Get table catalog from pg_indexes

2022-11-27 Thread Igor Korot
Hi, ALL, Table pg_indexes does not contain a field for a catalog. So how do I get that? SELECT 1 FROM pg_indexes WHERE indexname = $1 AND tablename = $2 AND schemaname = $3 Thank you.