Re: Psql wants to use IP6 when connecting to self using tcp...

2021-06-21 Thread Stephan Knauss
On 22.06.2021 02:44, Jerry Levan wrote: The below fails... the 'fe80' is the ip6 address of big box. [jerry@bigbox ~]$ psql -h bigbox psql: error: FATAL: no pg_hba.conf entry for host "fe80::fe3f:dbff:fed1:f62e%enp7s0", user "lxxx", database "lxxx", SSL off [...] Netstat shows that Postgres

Re: Psql wants to use IP6 when connecting to self using tcp...

2021-06-21 Thread Tom Lane
Jerry Levan writes: > The below fails... the 'fe80' is the ip6 address of big box. > [jerry@bigbox ~]$ psql -h bigbox > psql: error: FATAL: no pg_hba.conf entry for host > "fe80::fe3f:dbff:fed1:f62e%enp7s0", user "lxxx", database "lxxx", SSL off This is mostly a matter of how your local DNS

Re: How to automatically delete idle client connections?

2021-06-21 Thread Yu Watanabe
Ron , David Thank you for the advice. SQL statement had worked out in our environment and are also looking forward to the new release. Best Regards, Yu Watanabe On Tue, Jun 22, 2021 at 6:05 AM Ron wrote: > On 6/21/21 5:17 AM, David Rowley wrote: > > On Mon, 21 Jun 2021 at 21:59, Yu Watanabe

Psql wants to use IP6 when connecting to self using tcp...

2021-06-21 Thread Jerry Levan
Today I upgraded my Fedora system to Fedora 35 which included an upgrade to PostgreSQL 13.x.x. I did an initdb and restored my existing db from a dump. I modified pg_hba.conf to allow access machines on my local network hostall all 192.168.1.0/24 trust I modif

Re: How to automatically delete idle client connections?

2021-06-21 Thread Ron
On 6/21/21 5:17 AM, David Rowley wrote: On Mon, 21 Jun 2021 at 21:59, Yu Watanabe wrote: I have tried setting idle_in_transaction_session_timeout , however, this does not delete idle sessions. Would there be any expiry settings to delete client idle sessions automatically ? There is idle

Re: replace inside regexp_replace

2021-06-21 Thread David G. Johnston
On Monday, June 21, 2021, Oliver Kohll wrote: > > select regexp_replace( > 'here is [[my text]] to replace and [[some more]]', > E'\\[\\[(.*?)\\]\\]', > replace(E'\\1', ' ', '_'), > 'g' > ); > Side note, you seldom want to use “E” (escape) string literals with regexes (or in general really) usin

Re: replace inside regexp_replace

2021-06-21 Thread hubert depesz lubaczewski
On Mon, Jun 21, 2021 at 02:27:22PM +0100, Oliver Kohll wrote: > It half works, i.e. it removes the brackets but doesn't seem to process the > inner replace. It's as if the select were just > select regexp_replace( > 'here is [[my text]] to replace and [[some more]]', > E'\\[\\[(.*?)\\]\\]', > E'\\1

Re: user privileges

2021-06-21 Thread Laurenz Albe
On Mon, 2021-06-21 at 16:10 +0530, Atul Kumar wrote: > My question can be silly but I need to ask that if a user is created > without login privilege then what is the use of below command why > don't postgres prompt error on it > > CREATE ROLE nolog_user WITH PASSWORD 'pass1'; > > as the user is

Re: replace inside regexp_replace

2021-06-21 Thread Francisco Olarte
Oliver: On Mon, Jun 21, 2021 at 3:27 PM Oliver Kohll wrote: ... > My attempt to do that is the regex > select regexp_replace( > 'here is [[my text]] to replace and [[some more]]', > E'\\[\\[(.*?)\\]\\]', > replace(E'\\1', ' ', '_'), > 'g' > ); > which results in > 'here is my text to replace and

XX001ERROR: found xmin from before relfrozenxid for pg_authid and pg_database

2021-06-21 Thread Brajendra Pratap Singh
Hi, Good Morning... We are getting below issue on postgresql 9.6.8 version XX001ERROR: found xmin 3355284520 from before relfrozenxid 1097492040 XX001CONTEXT: automatic vacuum of table "xyz.pg_catalog.pg_authid" XX001ERROR: found xmin 3355284522 from before relfrozenxid 1097492055 XX001CONTEXT:

How to hash a large amount of data within Postgres?

2021-06-21 Thread Thorsten Schöning
Hi all, I'm one of those people still storing user uploaded files within Postgres instead of some file system and over the years this increased to a point where individual uploads of multiple GiB are reached. Some years ago I implemented some SQL to read all files, build a table of SHA256 hashes

replace inside regexp_replace

2021-06-21 Thread Oliver Kohll
Hi, I have some text 'here is [[my text]] to replace and [[some more]]' which I want to transform to 'here is my_text to replace and some_more' i.e. wherever there are double square brackets, remove them and replace spaces in the contents with underscores. My attempt to do that is the regex

Re: user privileges

2021-06-21 Thread Charles Clavadetscher
Hello On 2021-06-21 12:40, Atul Kumar wrote: Hi, My question can be silly but I need to ask that if a user is created without login privilege then what is the use of below command why don't postgres prompt error on it CREATE ROLE nolog_user WITH PASSWORD 'pass1'; A user without login privile

user privileges

2021-06-21 Thread Atul Kumar
Hi, My question can be silly but I need to ask that if a user is created without login privilege then what is the use of below command why don't postgres prompt error on it CREATE ROLE nolog_user WITH PASSWORD 'pass1'; as the user is created with login privileges then what is the use such user ?

Re: How to automatically delete idle client connections?

2021-06-21 Thread David Rowley
On Mon, 21 Jun 2021 at 21:59, Yu Watanabe wrote: > I have tried setting idle_in_transaction_session_timeout , however, this > does not delete idle sessions. > > Would there be any expiry settings to delete client idle sessions > automatically ? There is idle_session_timeout in PostgreSQL 14,

How to automatically delete idle client connections?

2021-06-21 Thread Yu Watanabe
Dear community. I would like to ask a question regarding the below error occurred when using psql client. My environment is postgresql 12.3 docker container. https://hub.docker.com/layers/postgres/library/postgres/12.3/images/sha256-23839ca029051ca19072dc7f40b252ae8cbcd7ef632f7b8e2da09ba3abc60214?

Is it Possible to Rename Replication Slot + Can Publisher be Paused

2021-06-21 Thread Avi Weinberg
Hi Experts, 1. Is it possible to rename replication slot? 2. Is it possible to pause publisher and resume if from the point it stopped after few minutes? It know it is possible to do it with subscriber, but since I have many subscribers, I would like to do the pause to the publisher. IM