Re: Auto close idle connections for specific user (not by pg_cancel command)

2019-02-05 Thread Thomas Poty
You are right. So it is not suitable for your case. Sorry Le mar. 5 févr. 2019 à 19:27, Ravi Krishna a écrit : > > > > > https://www.cybertec-postgresql.com/en/idle_in_transaction_session_timeout-terminating-idle-transactions-in-postgresql/ > > > > And use alter role in database set idle_in_tran

Re: Auto close idle connections for specific user (not by pg_cancel command)

2019-02-05 Thread Thomas Poty
/sql-alterrole.html Regards Le mar. 5 févr. 2019 à 18:59, Thomas Poty a écrit : > Hi, > Maybe pgterminator could help you > https://github.com/trustly/pgterminator > Regards > Thomas > > Le mar. 5 févr. 2019 à 18:52, Pavel Stehule a > écrit : > >> Hi >> >

Re: Auto close idle connections for specific user (not by pg_cancel command)

2019-02-05 Thread Thomas Poty
Hi, Maybe pgterminator could help you https://github.com/trustly/pgterminator Regards Thomas Le mar. 5 févr. 2019 à 18:52, Pavel Stehule a écrit : > Hi > > > út 5. 2. 2019 v 18:47 odesílatel Emi napsal: > >> Hello, >> >> In psql, may I know is there a way/config that idle connections could be >

Major upgrade from 9.6.10 to 10.6 and pg_stat_statement update

2019-01-30 Thread Thomas Poty
Hi, I am about to upgrade from 9.6.10 to 10.6 . I read, in the release notes of the 9.6.11 and of the 10.6, an "alter extension pg_stat_statements update" must be done. So, after my upgrade, must the update of pg_statements be done ? Thanks Thomas

number and type of locks for an alter sequence

2019-01-28 Thread Thomas Poty
Hello , In PG10, when I am altering a sequence, i see 2 locks in pg_locks matching my sequence: a RowExclusiveLock and a ShareRowExclusiveLock My question is Why 2 locks? Someone on irc said it was for catalog but i am no sure because pg_locks.relationid is the same for the 2 locks. At the same

Re: Idle connections / sessions

2018-12-12 Thread Thomas Poty
db > props to it. > > > > /Josef > > > > > > *Från:* Thomas Poty [mailto:thomas.p...@gmail.com] > *Skickat:* den 12 december 2018 11:11 > *Till:* pgsql-general@lists.postgresql.org > *Ämne:* Re: Idle connections / sessions > > > > Hi Josef, >

Re: Idle connections / sessions

2018-12-12 Thread Thomas Poty
Hi Josef, pg_terminator may help you. thomas Le mer. 12 déc. 2018 à 11:02, Fabio Pardi a écrit : > Hi Josef, > > please avoid cross posting to multiple lists. > > I m not a developer, but I think that if you do not want idle connections, > you should terminate them on the side they have been c

Re: increasing HA

2018-09-05 Thread Thomas Poty
> On Wed, 5 Sep 2018 17:45:05 +0200 > Thomas Poty wrote: > > > We have one master and 2 slaves so 3 nodes > > So what is the "HA" that you're trying to "increase"? Are you adding a 3rd > slave? A 2nd master? A hot standby? All of the above? > > -- > Dmitri Maziuk > >

Re: increasing HA

2018-09-05 Thread Thomas Poty
might want to look at redis in the first place. We have one master and 2 slaves so 3 nodes Le mer. 5 sept. 2018 à 16:42, Dmitri Maziuk a écrit : > On Wed, 5 Sep 2018 13:23:41 +0200 > Thomas Poty wrote: > > > At first glance, i may use for automatic failover PAF, a proxy HAproxy >

Re: increasing HA

2018-09-05 Thread Thomas Poty
15:44, Jehan-Guillaume (ioguix) de Rorthais < iog...@free.fr> a écrit : > On Wed, 5 Sep 2018 15:06:21 +0200 > Thomas Poty wrote: > > > > In fact, PAF does not support slots. So it is not a good candidate if > > > slot are a requirement. > > Effectively slots are

Re: increasing HA

2018-09-05 Thread Thomas Poty
thanks Le mer. 5 sept. 2018 à 14:15, Jehan-Guillaume (ioguix) de Rorthais < iog...@free.fr> a écrit : > On Wed, 5 Sep 2018 13:23:41 +0200 > Thomas Poty wrote: > > > Hi Jehan-Guillaume, > > Hello, > > > Thanks for your opinion. > > > > At first glance

Re: increasing HA

2018-09-05 Thread Thomas Poty
Hi Jehan-Guillaume, Thanks for your opinion. At first glance, i may use for automatic failover PAF, a proxy HAproxy and for fencincg, i am a bit disappointed, i don't know what to do/use How about you, do you have any preference about tools/solutions to use ? now, I am aware that i will have to

increasing HA

2018-09-04 Thread Thomas Poty
Hello, I am looking after some advice about solution allowing to increase High availability? Here is a bit of context : I have an Master-Slave architecture - 1 master - 2 asynchronous slaves using replication slot - backup is made with barman using replication slot - Wal archiving is done to

Re: Barman versus pgBackRest

2018-09-04 Thread Thomas Poty
Your problem looks like this one ;-) https://groups.google.com/forum/#!topic/pgbarman/kXcEpSLhw8w answer may help Physical backup/restore operates on a whole cluster... Le mar. 4 sept. 2018 à 14:47, Ron a écrit : > On 09/04/2018 07:14 AM, Thomas Poty wrote: > > > Do you just c

Re: Barman versus pgBackRest

2018-09-04 Thread Thomas Poty
> Do you just change the IP address of the "restore target"? Do you expect a typical restore command? If yes, here is a small bash script I use for check restore ... barmanBackupID="" barmanBackupServer=$1 if [ 1 -eq $# ]; then echo ${barmanBackupServer} barmanBackupID=$(barman list-backup

Re: Problem Postgres

2018-06-26 Thread Thomas Poty
Hello, Can you try with a superuser? Le mar. 26 juin 2018 à 10:06, Emanuele Musella a écrit : > Good morning, > > we have the following error: > > 2018-06-26 09:48:44 CEST ERRORE: non è stato possibile ottenere > informazioni sul file "base/16395/19739338": Permission denied > 2018-06-26 09:48:

Re: Schema/Data conversion opensource tools from MySQL to PostgreSQL

2018-06-26 Thread Thomas Poty
Hi Chiranjeevi, I know my answer doesn't answer your request but we have just converted a database from mysql to postgresql with about 1000 tables. We had to convert some functions present in mysql but not in postgresql Also we had to convert queries. I converted all of that manually, table by tab

Re: Issue on public schéma with Pg_restore

2018-04-26 Thread Thomas Poty
:28 GMT+02:00 Adrian Klaver : > On 04/26/2018 12:03 AM, Thomas Poty wrote: > >> Hi, >> > > Comments in line below. > > >> *About version :* >> >> This is the same on both server >> >> _ + source

Re: Issue on public schéma with Pg_restore

2018-04-26 Thread Thomas Poty
an template0 (like --template) only relevent with --create of pg_restore. Is it possible to discuss about these potentiel features? with whom? Is there a specific canal? i would like to thank Adrian. Regards Thomas 2018-04-26 9:03 GMT+02:00 Thomas Poty : > Hi, > > *About ve

Re: Issue on public schéma with Pg_restore

2018-04-26 Thread Thomas Poty
:00 Adrian Klaver : > On 04/25/2018 11:07 AM, Thomas Poty wrote: > >> Hello, >> Here is the context : >> > > Postgres version? > > I have a db db1 with a schéma public on cluster C1. >> This schéma doesn't have any privileges on public role. >

Issue on public schéma with Pg_restore

2018-04-25 Thread Thomas Poty
Hello, Here is the context : I have a db db1 with a schéma public on cluster C1. This schéma doesn't have any privileges on public role. I have a dump of this db. On an other cluster C2, the template1 doesn't contain schema public. I have restored db1 on cluster C2 and i saw public role had the p

Re: Using the public schema

2018-04-23 Thread Thomas Poty
Erratum : The main problem with the public schéma is the default privileges (*create*) granted to all users able to connect. Le lun. 23 avr. 2018 à 21:16, Thomas Poty a écrit : > Hi charlin, > I invite you to read this doc it explains very well the security issue > with the publ

Re: Using the public schema

2018-04-23 Thread Thomas Poty
Hi charlin, I invite you to read this doc it explains very well the security issue with the public schéma : https://wiki.postgresql.org/wiki/A_Guide_to_CVE-2018-1058:_Protect_Your_Search_Path The main problem with the public schéma is the default privileges (execute) granted to all users able to

Re: Barman versus pgBackRest

2018-04-11 Thread Thomas Poty
DBs of different location. I am very impatient to see "replication slot" support and "remote restore" feature added. Thank you for your time, Regards, Thomas 2018-03-09 15:56 GMT+01:00 David Steele : > Hi Thomas, > > On 3/6/18 2:53 PM, Thomas Poty wrote: &g

Re: algo for canceling a deadlocked transaction

2018-04-09 Thread Thomas Poty
Hello Tom, Thank you for the clarification! Regards, Thomas Le lun. 9 avr. 2018 à 17:04, Tom Lane a écrit : > Christophe Pettus writes: > >> On Apr 9, 2018, at 07:33, Thomas Poty wrote: > >> ok, and long answer ? is it random? > > > It's not literal

Re: algo for canceling a deadlocked transaction

2018-04-09 Thread Thomas Poty
x27;t be causing deadlocks to happen in the first place. I didn't want to predict the deadlock happening. I only want to know if it is predictable to know which transaction will be canceled. Thank you 2018-04-09 15:51 GMT+02:00 Stephen Frost : > Greetings, > > * Thomas Poty (

algo for canceling a deadlocked transaction

2018-04-09 Thread Thomas Poty
Good afternoon, My question is : In case of a deadlock between 2 transaction, how to know which transaction will be canceled? Is it predictable? I have tried to look into sources but i have found nothing. ( probably, i am the problem) Regards, Thomas

Re: dealing with lock

2018-04-07 Thread Thomas Poty
Thank you Thomas Regards Thomas Le sam. 7 avr. 2018 à 08:01, Thomas Kellerer a écrit : > Adrian Klaver schrieb am 07.04.2018 um 00:02: > >> Is there a way to identify the list of statements that have to rewrite > the table. > > > > https://www.postgresql.org/docs/10/static/sql-altertable.html >

Re: dealing with lock

2018-04-07 Thread Thomas Poty
Thank you Laurenz! Regards Thomas Le sam. 7 avr. 2018 à 00:02, Adrian Klaver a écrit : > On 04/06/2018 12:09 PM, Thomas Poty wrote: > > Thank you Laurenz ! > > > > > > We will certainly have to change our release management. > > > > Is there a way to id

Re: dealing with lock

2018-04-06 Thread Thomas Poty
, Thomas 2018-04-06 17:11 GMT+02:00 Laurenz Albe : > On Fri, 2018-04-06 at 16:58 +0200, Thomas Poty wrote: > > Here is a bit of context : we are migrating from MySQL to PostgreSQL and > we have about 1000 tables. > > Some tables are quite small but some others are very large. The ser

dealing with lock

2018-04-06 Thread Thomas Poty
Hello All, Here is a bit of context : we are migrating from MySQL to PostgreSQL and we have about 1000 tables. Some tables are quite small but some others are very large. The service provided to our clients relies on a high avaiability with a minimum down time due to any legal deadlines. So, lets

Re: primary key and unique index

2018-03-24 Thread Thomas Poty
e-mail in error, please inform us immediately on +44 (0)1963 370511 > and delete it and all copies from your system. > > > > *Thales UK Limited. A company registered in England and Wales. Registered > Office: 350 Longwater Avenue, Green Park, Reading, RG2 6GF. Registered >

primary key and unique index

2018-03-23 Thread Thomas Poty
Hi all, I am migrating fromMySQL to Postgresql 9.6. In MySQL a "show create table" gives me : ... PRIMARY KEY (`ID`,`CountryCode`,`LanguageCode`), UNIQUE KEY `unique_my table_4` (`ID`,`CountryCode`,`LanguageCode`), ... So, In PostgreSQL, does it make sense to create a primary key AND a uni

Barman versus pgBackRest

2018-03-06 Thread Thomas Poty
Hello Community, I hesitate to use barman or pgBackRest. I have found a lot of common points between them and a few differences: About pgBarman, I like : - be able restore on a remote server from the backup server - use replication slots for backingup wal on the backup server. About pgBackRest,

Re: weird result by changing type enum array to text array of a column

2018-02-05 Thread Thomas Poty
Hello Rob, I already read this. I have already executed this kind of procedure except with an array. I don't know why but now it is working :-s Thank you for your reply :-) Thomas 2018-02-05 13:16 GMT+01:00 rob stone : > > > On Mon, 2018-02-05 at 11:26 +0100, Thomas Poty wr

weird result by changing type enum array to text array of a column

2018-02-05 Thread Thomas Poty
Hello, I m running 9.5.10 on centos 7. I have a colmun "TestFields", its type is an array of an enum. I would like to change the type of this column by an array of text. So i execute -> alter table "controldetailpromoters" alter column "TestFields" type text[] The command seems to be correctly

Re: Sv: Re: Sv: Re: Sv: Re: Sv: Re: data-checksums

2018-01-10 Thread Thomas Poty
Hello, A question seems to be, according to me, important : How a corruption, detected thanks to data-checksums, is fixed? Thank you, Thomas Le 10 janv. 2018 20:39, "Andres Freund" a écrit : > On 2018-01-09 20:51:17 -0500, Stephen Frost wrote: > > Greetings, > > > > * Andreas Joseph Krogh (andr

Re: Array of foreign key

2017-12-23 Thread Thomas Poty
Good evening all, I have just see all the messages. Thanks for that. First, Peter Holzer has exactly understooden my need. I am à bit disappointed this feature is not implemented. It would be great. Then, I know enum is probably not the best choice but it is historic in our database. Like I said

Re: Array of foreign key

2017-12-22 Thread Thomas Poty
Andreas. Thomas Le 22 déc. 2017 20:22, "Andreas Kretschmer" a écrit : > On 22 December 2017 20:02:43 CET, Thomas Poty > wrote: > >Hello all, > > > >I use postgresql 9.5 and I am looking for way to have a column which is > >an > >array of a foreign

Array of foreign key

2017-12-22 Thread Thomas Poty
Hello all, I use postgresql 9.5 and I am looking for way to have a column which is an array of a foreign key. If what I read is correct it is currently not possible... Have you any idea how to implement this feature in a safe way (foreign key constraints) ? I don't have another idea to have a enum