Feature Request: log_line_prefix %h Counterpart

2024-01-25 Thread Jawala
Hello, Looking for an escape sequence for log_line_prefix for the IP address that traffic was destined to, i.e., the *local* address of the TCP connection, natural counterpart to "remote IP address". If PostgreSQL listens on all/multiple interfaces, useful to be able to log to which a connection

Re: permission denied on socket

2024-01-25 Thread Tom Lane
Atul Kumar writes: > I checked the permissions on /tmp directory and it shows "drwxrwxrwt." > already, do I need to check something else as well ? That seems fine, but what about the socket file itself? regards, tom lane

Re: permission denied on socket

2024-01-25 Thread Atul Kumar
I checked the permissions on /tmp directory and it shows "drwxrwxrwt." already, do I need to check something else as well ? Regards. On Fri, Jan 26, 2024 at 3:00 AM Tom Lane wrote: > Ron Johnson writes: > > On Thu, Jan 25, 2024 at 3:32 PM Adrian Klaver > > > wrote: > >> Best guess is you are

Re: field error on refreshed materialized view

2024-01-25 Thread Michael Nolan
On Thu, Jan 25, 2024 at 3:38 PM Tom Lane wrote: > > Michael Nolan writes: > > On the 10.4 server this materialized view works, but on the 16.1 > > server it fails: > > > uscf=# refresh materialized view uscf_vip; > > refresh materialized view uscf_vip; > > ERROR: value too long for type character

Re: field error on refreshed materialized view

2024-01-25 Thread Tom Lane
Michael Nolan writes: > On the 10.4 server this materialized view works, but on the 16.1 > server it fails: > uscf=# refresh materialized view uscf_vip; > refresh materialized view uscf_vip; > ERROR: value too long for type character varying(255) > Both materialized view tables appear to be iden

Re: field error on refreshed materialized view

2024-01-25 Thread Adrian Klaver
On 1/25/24 1:29 PM, Michael Nolan wrote: I'm in the process of updating a server from postgresql 10.4 on Centos 7 to 16.1 on AlmaLInux 9, and am reminded of the old line about when you're up to your necks in alligators, it is difficult to remember that your goal was to drain the swamp. We have

Re: permission denied on socket

2024-01-25 Thread Tom Lane
Ron Johnson writes: > On Thu, Jan 25, 2024 at 3:32 PM Adrian Klaver > wrote: >> Best guess is you are using a version of psql that is expecting the >> socket to be somewhere else then where it actually is. > Is "permission denied" really the error you get when the socket does not > exist? Nope,

field error on refreshed materialized view

2024-01-25 Thread Michael Nolan
I'm in the process of updating a server from postgresql 10.4 on Centos 7 to 16.1 on AlmaLInux 9, and am reminded of the old line about when you're up to your necks in alligators, it is difficult to remember that your goal was to drain the swamp. We have several materialized views that are refreshe

Re: permission denied on socket

2024-01-25 Thread Adrian Klaver
On 1/25/24 12:39 PM, Ron Johnson wrote: On Thu, Jan 25, 2024 at 3:32 PM Adrian Klaver wrote: [snip] Best guess is you are using a version of psql that is expecting the socket to be somewhere else then where it actually is. Is "permission denied" really the error you get when the soc

Re: permission denied on socket

2024-01-25 Thread Ron Johnson
On Thu, Jan 25, 2024 at 3:32 PM Adrian Klaver wrote: [snip] > Best guess is you are using a version of psql that is expecting the > socket to be somewhere else then where it actually is. > Is "permission denied" really the error you get when the socket does not exist? Trying "psql --host=/var/r

Re: permission denied on socket

2024-01-25 Thread Ron Johnson
On Thu, Jan 25, 2024 at 3:23 PM Atul Kumar wrote: > Hi, > > I have postgres 13 running on centos 7. > > I am facing an issue while trying to connect the cluster using the below > command. > > -bash-4.2$ psql postgres > > psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: > P

Re: permission denied on socket

2024-01-25 Thread Adrian Klaver
On 1/25/24 12:22, Atul Kumar wrote: Hi, I have postgres 13 running on centos 7. I am facing an issue while trying to connect the cluster using the below command. -bash-4.2$ psql postgres psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: Permission denied With the P

Re:

2024-01-25 Thread Ron Johnson
On Thu, Jan 25, 2024 at 12:29 PM Tom Lane wrote: > Ron Johnson writes: > > EXPLAIN SELECT works inside a FOR loop, but only the first line of the > > EXPLAIN output is stored. What's the magic sauce for seeing the whole > > EXPLAIN output? > > The usual way is to run a FOR loop over the lines o

permission denied on socket

2024-01-25 Thread Atul Kumar
Hi, I have postgres 13 running on centos 7. I am facing an issue while trying to connect the cluster using the below command. -bash-4.2$ psql postgres psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: Permission denied Is the server running locally and accepting

Re:

2024-01-25 Thread Tom Lane
Ron Johnson writes: > EXPLAIN SELECT works inside a FOR loop, but only the first line of the > EXPLAIN output is stored. What's the magic sauce for seeing the whole > EXPLAIN output? The usual way is to run a FOR loop over the lines of output. Quick & dirty example: regression=# do $$ declare l

[no subject]

2024-01-25 Thread Ron Johnson
PG 14.10 (and 9.6.24, which we're migrating off of). EXPLAIN SELECT works inside a FOR loop, but only the first line of the EXPLAIN output is stored. What's the magic sauce for seeing the whole EXPLAIN output? (The purpose is to generate many queries and see how the BIND and SELECT times change

Re: Clarification regarding managing advisory locks in postgresql

2024-01-25 Thread Sasmit Utkarsh
Okay Thanks. Also please help me understand the below scenarios >From the above statement, I understand is (please correct if I'm wrong here), When we fork a client process, each process gets its own database connection or transaction context. Therefore, locks acquired in one process (or transacti