Re: Indexing fragments of a column's value ?

2023-11-03 Thread Thomas Boussekey
Le ven. 3 nov. 2023 à 21:01, Tom Lane a écrit : > David Gauthier writes: > > I'm asking about the possibility of indexing portions of a column's value > > where the column has a static field format. > > GIN indexes are meant for exactly that. You might have to write your > own opclass to break

Re: Materialized Views - Way to refresh automatically (Incrementaly)

2023-05-11 Thread Thomas Boussekey
Hello Le jeu. 11 mai 2023, 12:46, FOUTE K. Jaurès a écrit : > Hello Everyone, > > Is There a way on PostgresQL 14 to automatically increment a Materialized > Views ? > Have a look at pg_ivm extension https://github.com/sraoss/pg_ivm > > -- > Jaurès FOUTE > Hope this helps, Thomas > >

Re: Autovacuum on sys tables

2022-12-19 Thread Thomas Boussekey
VACUUM ANALYZE will: - remove dead tuples definition - refresh statistics (can improve execution plans for queries) Have a look at this website, it explains that better than me ;) : https://www.interdb.jp/pg/pgsql06.html > > Regards, > > *Inzamam Shafiq* > *Sr. DBA* > ---

Re: Autovacuum on sys tables

2022-12-18 Thread Thomas Boussekey
Hello Inzamam, Le sam. 17 déc. 2022 à 08:16, Inzamam Shafiq a écrit : > Dear Experts, > > Hope you are doing well. > > I have a question that autovacuum is running on sys tables like pg_class, > pg_attribute, is it a normal thing? Further, what is dead tuples are not > removed from Autovacuum,

Re: Inheritance pg_largeobject table

2022-12-08 Thread Thomas Boussekey
Le ven. 9 déc. 2022 à 06:27, Ron a écrit : > On 12/8/22 23:08, Zhao, Bing wrote: > > *Categorization: Unclassified * > > We are running PG11.11, and have more than 50T LO data about load into the > pg_largeobject table. But 32T is the limitation. > > We have created couple child tables that

Re: pg_dump is filling C: drive up to 100 percent

2022-07-19 Thread Thomas Boussekey
Hello Meera, Le mar. 19 juil. 2022 à 13:42, Meera Nair a écrit : > Hi Abdul, > > > > We do realize that. With tar format, is there a way to customize the path > used for temporary local files? > > Some way to configure another drive instead of using C:\? > I would try this solution:

Re: Problem upgrading from 10 to 14 with pg_upgrade: unexpected error upgrading "template1" database for some clusters

2022-07-11 Thread Thomas Boussekey
Hi, Le lun. 11 juil. 2022 à 21:22, Ken Yeung a écrit : > In the course of upgrading a bunch of database clusters from 10 to 14 > using pg_upgrade tool, some databases result in the following error > recorded in pg_upgrade_dump_1.log, such that cluster upgrade fails. > FATAL: password

Re: Table space not returned to the OS ?

2022-06-27 Thread Thomas Boussekey
Hello Florents, Le lun. 27 juin 2022 à 11:30, Florents Tselai a écrit : > Hi, > > A few months back (October) I had upgraded a Postgres instance from v12 —> > 14. > > The database disk size under /var/lib/postgresql/12 was around 800GB+ back > then. > Note, that IIRC I had used hard-linking

Re: SQL questiom

2022-01-21 Thread Thomas Boussekey
Le ven. 21 janv. 2022 à 11:14, a écrit : > > > Hi, > > I am using a query pretty often that looks like > SELECT <> WHERE <> AND > <> > > Is there a way (with sql or plpgsql) to convert that into > SELECT myquery('<>') > > Kind regards > Wolfgang Hamann > > > > Hello Wolfgang, You can use a

Re: List all tables from a specific database

2022-01-14 Thread Thomas Boussekey
Le ven. 14 janv. 2022 à 12:04, Ray O'Donnell a écrit : > On 14/01/2022 10:39, Flaviu2 wrote: > > I work on a project that use Postgre SQL, and I have 0 experience in > > this regard. I hope to get help here. I need two SQL scripts for Postgre: > > > > 1. Get all databases, which I aquired

Re: [RPM/CentOS7] Need to disable repo_gpgcheck on pgdg-common when using RPM version 42.0-17.1

2021-06-30 Thread Thomas Boussekey
Hello all, Yesterday, a new release of the RPM definition has been released, in order to integrate many cool updates: https://git.postgresql.org/gitweb/?p=pgrpms.git;a=summary And at 10PM yesterday, we encountered a problem on the postgresql instance upgrades that were performed pointing to the

Re: [RPM/CentOS7] Need to disable repo_gpgcheck on pgdg-common when using RPM version 42.0-17.1

2021-05-07 Thread Thomas Boussekey
Hello, Le ven. 7 mai 2021 à 13:55, Devrim Gündüz a écrit : > > Hi, > > On Thu, 2021-05-06 at 16:29 +0200, Thomas Boussekey wrote: > > > > > This morning, a new RPM version has been sent to > > https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/ w

[RPM/CentOS7] Need to disable repo_gpgcheck on pgdg-common when using RPM version 42.0-17.1

2021-05-06 Thread Thomas Boussekey
Hello all, This morning, a new RPM version has been sent to https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/ with version ID 42.0-17.1 We had to adapt our tooling to comply with this new repository file. We faced the following error on section pgdg-common > Failure talking to

Re: getting tables list of other schema too

2021-02-24 Thread Thomas Boussekey
Hello Atul, You can use set a filter to limit the tables returned, i.e: \dt college.* HTH, Thomas Le mer. 24 févr. 2021 à 08:54, Atul Kumar a écrit : > Hi, > > I have postgres 9.6 cluster running on centos 7 machine. > > when I set search_path to any user made schema with below command > >

Re: When are largobject records TOASTed into pg_toast_2613?

2020-08-31 Thread Thomas Boussekey
Thanks Laurenz for your email Le lun. 31 août 2020 à 09:42, Laurenz Albe a écrit : > On Sat, 2020-08-29 at 21:18 +0200, Thomas Boussekey wrote: > > You can find at the end of this email, a new version of the script that > I use to remove the TOAST table on pg_largobject catalog

Re: When are largobject records TOASTed into pg_toast_2613?

2020-08-29 Thread Thomas Boussekey
temctl restart postgresql-9.5.service echo -e "Drop relation pg_toast_2613" | tee -a "${LOG_REMOVE}" psql -U postgres --dbname=${database_name} -At --no-psqlrc -c "DROP TABLE pg_toast.pg_toast_2613;" | tee -a "${LOG_REMOVE}" sed -i '/^allow_system_tabl

Re: When are largobject records TOASTed into pg_toast_2613?

2020-08-21 Thread Thomas Boussekey
Le ven. 21 août 2020 à 16:45, Laurenz Albe a écrit : > On Fri, 2020-08-21 at 15:46 +0200, Thomas Boussekey wrote: > > Le ven. 21 août 2020 à 15:10, Laurenz Albe a > écrit : > > > On Fri, 2020-08-21 at 14:00 +0200, Thomas Boussekey wrote: > > > > Working on

Fwd: When are largobject records TOASTed into pg_toast_2613?

2020-08-21 Thread Thomas Boussekey
-- Forwarded message - De : Thomas Boussekey Date: ven. 21 août 2020 à 15:37 Subject: Re: When are largobject records TOASTed into pg_toast_2613? To: Laurenz Albe Le ven. 21 août 2020 à 15:10, Laurenz Albe a écrit : > On Fri, 2020-08-21 at 14:00 +0200, Thomas Boussekey wr

Re: When are largobject records TOASTed into pg_toast_2613?

2020-08-21 Thread Thomas Boussekey
Le ven. 21 août 2020 à 14:00, Thomas Boussekey a écrit : > Hello all, > > Working on a PostgreSQL 9.5 to 12 upgrade, I encounter problems on a > PostgreSQL instance when I have an existing table `pg_toast_2613` into my > application database. > > The upgrade process fai

When are largobject records TOASTed into pg_toast_2613?

2020-08-21 Thread Thomas Boussekey
Hello all, Working on a PostgreSQL 9.5 to 12 upgrade, I encounter problems on a PostgreSQL instance when I have an existing table `pg_toast_2613` into my application database. The upgrade process fails with the following error: ``` No match found in new cluster for old relation with OID 16619

Re: autovacuum failing on pg_largeobject and disk usage of the pg_largeobject growing unchecked

2020-06-24 Thread Thomas Boussekey
Le mer. 24 juin 2020 à 16:24, Jim Hurne a écrit : > "Daniel Verite" wrote on 06/24/2020 10:08:27 AM: > > Unfortunately it [pg_repack] can't work with pg_largeobject > > That is unfortunate, and potentially leaves us in a difficult spot. > > Is it possible to configure PosgreSQL to use a user

Re: SQL pretty pritner?

2019-10-28 Thread Thomas Boussekey
Hello all, I use this github project in order to highlight SQL code on my slides: https://romannurik.github.io/SlidesCodeHighlighter/ It doesn't highlight 100% of Postgres SQL code, but it's a correct basis! Hope this helps, Thomas Le lun. 28 oct. 2019 à 14:37, Ron a écrit : > But does it

Customizing the PSQL prompt with environment variables using value-dependant coloring

2019-04-11 Thread Thomas Boussekey
Hello everyone, I'm trying to create a custom PSQL prompt with a part of it colored in function of its value. To be more explicit, we are using a physical replication and I'd like to display in the prompt "MASTER" in red or "slave" in green, when we are connected on the database server. #

Re: adding more space to the existing 9.6 cluster

2019-02-21 Thread Thomas Boussekey
Hello all, If I were in your situation, I would analyze if it could move only a part of the 36 databases to the new disk. * Either, I will move some of the databases to the new disk, * Either, In the largest databases, I will consider to work in multiple tablespace configuration, using the

Re: Question about partition table

2018-10-28 Thread Thomas Boussekey
Hello Yuxia, As time partitioning is a natively available, I recommend you to use time-partitioning, as it is. You can find below an example I used to subpartition my transaction table by quaterly partition. I have a repository table named miniexport.tby_part_followup to pilot partition

Re: using a plpgsql function argument as a table column.

2018-08-28 Thread Thomas Boussekey
Hello, Yes, you can :-) Using a functional that returns a table, like in the following example: http://www.postgresqltutorial.com/plpgsql-function-returns-a-table/ You will have to generate a dynamic sql statement for querying your table with the accurate WHERE clause. Like in this example:

Re: Granting a user the privilege to create views?

2018-08-28 Thread Thomas Boussekey
Hello Olivier, You can write an event trigger that will prevent specific user to create objects that are not views. Link to the CREATE EVENT TRIGGER documentation: https://www.postgresql.org/docs/current/static/sql-createeventtrigger.html Regards, Thomas Le mar. 28 août 2018 à 11:00, pavan95

Re: PG Sharding

2018-01-29 Thread Thomas Boussekey
gt; cross shard queries. > > BR > Matej > > > 2018-01-29 16:15 GMT+01:00 Thomas Boussekey <thomas.bousse...@gmail.com>: > >> Hello, >> >> Facing the same situation, I'm considering 3 solutions: >> - Sharding with postgres_xl (waiting for a Pg10 relea

Re: PG Sharding

2018-01-29 Thread Thomas Boussekey
Hello, Facing the same situation, I'm considering 3 solutions: - Sharding with postgres_xl (waiting for a Pg10 release) - Sharding with citusdata (Release 7.2, compatible with Pg10 and pg_partman, seems interesting) - Partitioning with PG 10 native partitioning or pg_partman With colleagues, we