set search_path "$owner". And name versus literal for schemas.

2024-06-18 Thread Dominique Devienne
Hi. Two things related to the search_path. First, [the doc][1] mentions one can use a variable like "$user" for the search_path. But setting the search_path is also for FUNCTIONs and PROCEDUREs, and there what I really REALLY would like, is the ability to use "$owner", to limit the search_path to

Re: Monitoring logical replication

2024-06-18 Thread Shaheed Haque
Hi all, Is there an "official" pairing of LSN values on the publication and subscription sides that should be used to track the delta between the two systems? I ask because Google is full of different pairs being used. I tried to identify the highest level interface points exposed, i.e. what is do

Re: How to attach partition with primary key

2024-06-18 Thread Alvaro Herrera
On 2024-Jun-18, Philipp Faster wrote: > As I understand, PostgreSQL refuses to use existing primary key for > some reason and tries to create its own as a children of > "Transactions" table's primary key. Yeah. Your case sounds like the primary key in the partitioned table has some slight defini

Re: DROP COLLATION vs pg_collation question

2024-06-18 Thread Karsten Hilbert
Am Sun, Jun 16, 2024 at 04:38:49PM -0400 schrieb Tom Lane: > It's really kind of moot, since you can't change the encoding > of an existing database. So any pg_collation entries that are > for an incompatible encoding cannot be used for anything in that > database, and they might as well not be t

Re: DROP COLLATION vs pg_collation question

2024-06-18 Thread Karsten Hilbert
Am Tue, Jun 18, 2024 at 03:02:56PM +0200 schrieb Karsten Hilbert: > I see, and since any database can be used as a template for > more databases, which can be create with an encoding > different from the template, Proving myself wrong: root@hermes:~/tmp# sudo -u postgres psql -e -f /tmp/db.sql

Re: Monitoring logical replication

2024-06-18 Thread Ron Johnson
On Tue, Jun 18, 2024 at 5:03 AM Shaheed Haque wrote: > Hi all, > > Is there an "official" pairing of LSN values on the publication and > subscription sides that should be used to track the delta between the two > systems? I ask because Google is full of different pairs being used. I > tried to id

Re: How to attach partition with primary key

2024-06-18 Thread Philipp Faster
Hey Alvaro and everyone, Thank you for replying! I've checked `pg_dump -s`, but it didn't help - the definition here was exactly the same (except order, but I didn't notice it since in my actual schema there are thousands of rows). I've done a bad job describing my issue in the first place: I lef

Re: How to attach partition with primary key

2024-06-18 Thread Alvaro Herrera
On 2024-Jun-18, Philipp Faster wrote: > I've done a bad job describing my issue in the first place: I left out a > key definition statement that I thought doesn't play any role in the issue: > another unique index on the same columns as PK. I see. That unique index seems quite useless. Why not j

Re: DROP COLLATION vs pg_collation question

2024-06-18 Thread Adrian Klaver
On 6/18/24 06:32, Karsten Hilbert wrote: Am Tue, Jun 18, 2024 at 03:02:56PM +0200 schrieb Karsten Hilbert: I see, and since any database can be used as a template for more databases, which can be create with an encoding different from the template, Proving myself wrong: root@hermes:~/tmp# s

RE: Restore of a reference database kills the auto analyze processing.

2024-06-18 Thread HORDER Philip
Classified as: {OPEN} Installing 15.7 has indeed fixed the problem. Phil Horder Database Mechanic Thales Land & Air Systems {OPEN} The information contained in this e-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. I

Re: HISTIGNORE in psql

2024-06-18 Thread Adrian Klaver
On 6/17/24 23:45, Wiwwo Staff wrote: Hi! As a big history lover, it would be great to have the HISTIGNORE functionality added to psql. HISTIGNORE is a BASH feature and psql runs in more then the BASH shell. Do you mean you would like a clone of that feature added to psql? Also psql uses eith

Re: set search_path "$owner". And name versus literal for schemas.

2024-06-18 Thread Adrian Klaver
On 6/18/24 01:35, Dominique Devienne wrote: Hi. Two things related to the search_path. First, [the doc][1] mentions one can use a variable like "$user" for the search_path. But setting the search_path is also for FUNCTIONs and PROCEDUREs, and there what I really REALLY would like, is the ability

Seeking Clarification on Function Definitions in PostgreSQL Extensions

2024-06-18 Thread Ayush Vatsa
Hi PostgreSQL community, Recently I am exploring extensions in postgres and got a little confused regarding the function definition present in SQL file. For example consider below three functions: CREATE FUNCTION fun1(integer) RETURNS TABLE( col1 integer, col2 text ) AS 'MODULE_PAT

Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions

2024-06-18 Thread Ron Johnson
fun1 returns a table set just like any other SELECT statement. fun2 puzzles me. Why would you return parameters AND *a single record* (unless it's an error status). fun3 just returns two parameters. Why isn't it a procedure? fun2, returning parameters AND a function value, would have made my Com

Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions

2024-06-18 Thread David G. Johnston
On Tue, Jun 18, 2024 at 9:50 AM Ayush Vatsa wrote: > 1/ I wanted to know what's the difference between the above three > definitions. > As per my understanding, "fun1" and "fun2" look the same, taking one > integer and returning two columns with multiple rows. > Yes. > > Can the above definiti

Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions

2024-06-18 Thread David G. Johnston
On Tue, Jun 18, 2024 at 10:07 AM Ron Johnson wrote: > fun2 puzzles me. Why would you return parameters AND *a single record* > (unless > it's an error status). > You mis-understand what 2 is doing. You should go re-read the docs for create function again. Especially the description of rettyp

Re: HISTIGNORE in psql

2024-06-18 Thread Wiwwo Staff
Hi Adrian, yes, of course, that is what I meant: being able to tell psql to exclude some patterns from being stored in the .psql_history file On Tue, 18 Jun 2024 at 16:12, Adrian Klaver wrote: > On 6/17/24 23:45, Wiwwo Staff wrote: > > Hi! > > As a big history lover, it would be great to have th

fail to install postgresql15 on Alma9

2024-06-18 Thread Dmitry O Litvintsev
Hello, I am foillowing instructions on https://www.postgresql.org/download/linux/redhat/ I select version "15" I select "Red Hat Enterprise, Rocky, AlmaLinux or or Oracle 9" I get this command to run: "dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-re

Re: fail to install postgresql15 on Alma9

2024-06-18 Thread Adrian Klaver
On 6/18/24 10:40 AM, Dmitry O Litvintsev wrote: Hello, I am foillowing instructions on https://www.postgresql.org/download/linux/redhat/ I select version "15" I select "Red Hat Enterprise, Rocky, AlmaLinux or or Oracle 9" I get this command to run: "dnf install -y https://download.postgr

Re: fail to install postgresql15 on Alma9

2024-06-18 Thread Dmitry O Litvintsev
Yes I did. Sorry did not mention that. I ran the dnf -qy module sisable postgresql prior to running. dnf install postgresql15-server (so that did not help) From: Adrian Klaver Sent: Tuesday, June 18, 2024 12:44 PM To: Dmitry O Litvintsev; pgsql-genera

Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions

2024-06-18 Thread Ron Johnson
On Tue, Jun 18, 2024 at 1:16 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Tue, Jun 18, 2024 at 10:07 AM Ron Johnson > wrote: > >> fun2 puzzles me. Why would you return parameters AND *a single record* >> (unless >> it's an error status). >> > > You mis-understand what 2 is doi

Re: fail to install postgresql15 on Alma9

2024-06-18 Thread Dmitry O Litvintsev
dnf -qy module sisable postgresql -> "dnf -qy module disable postgresql". Proper syntax was used. :) From: Dmitry O Litvintsev Sent: Tuesday, June 18, 2024 12:48 PM To: Adrian Klaver; pgsql-generallists.postgresql.org Subject: Re: fail to install postgres

Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions

2024-06-18 Thread David G. Johnston
On Tuesday, June 18, 2024, Ron Johnson wrote: > > But I stand by returning OUT params and records at the same time. > You mean you dislike adding the optional returns clause when output parameters exist? Because the out parameters and the “record” represent the exact same thing. David J.

Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions

2024-06-18 Thread Ron Johnson
On Tue, Jun 18, 2024 at 1:57 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Tuesday, June 18, 2024, Ron Johnson wrote: > >> >> But I stand by returning OUT params and records at the same time. >> > > You mean you dislike adding the optional returns clause when output > parameters

Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions

2024-06-18 Thread David G. Johnston
On Tuesday, June 18, 2024, Ron Johnson wrote: > On Tue, Jun 18, 2024 at 1:57 PM David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> On Tuesday, June 18, 2024, Ron Johnson wrote: >> >>> >>> But I stand by returning OUT params and records at the same time. >>> >> >> You mean you dislike

Re: HISTIGNORE in psql

2024-06-18 Thread Daniel Gustafsson
> On 18 Jun 2024, at 19:28, Wiwwo Staff wrote: > being able to tell psql to exclude some patterns from being stored in the > .psql_history file Off the cuff that sounds like a pretty useful thing to have. -- Daniel Gustafsson

Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions

2024-06-18 Thread Ron Johnson
On Tue, Jun 18, 2024 at 2:37 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Tuesday, June 18, 2024, Ron Johnson wrote: > >> On Tue, Jun 18, 2024 at 1:57 PM David G. Johnston < >> david.g.johns...@gmail.com> wrote: >> >>> On Tuesday, June 18, 2024, Ron Johnson wrote: >>>

Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions

2024-06-18 Thread David G. Johnston
On Tuesday, June 18, 2024, Ron Johnson wrote: > On Tue, Jun 18, 2024 at 2:37 PM David G. Johnston < > david.g.johns...@gmail.com> wrote: > >> On Tuesday, June 18, 2024, Ron Johnson wrote: >> >>> On Tue, Jun 18, 2024 at 1:57 PM David G. Johnston < >>> david.g.johns...@gmail.com> wrote: >>> O

Re: fail to install postgresql15 on Alma9

2024-06-18 Thread Adrian Klaver
On 6/18/24 10:48, Dmitry O Litvintsev wrote: Yes I did. Sorry did not mention that. I ran the dnf -qy module sisable postgresql prior to running. dnf install postgresql15-server (so that did not help) Have you retried the install in case it was just a repo refresh issue? If that does not

Re: Seeking Clarification on Function Definitions in PostgreSQL Extensions

2024-06-18 Thread Tom Lane
"David G. Johnston" writes: > On Tuesday, June 18, 2024, Ron Johnson wrote: >> What's the purpose? Legacy of not having procedures? > So people can have a style guide that says always specify a returns clause > on function definitions. To my mind, the reason we allow RETURNS together with OUT

Re: Restore of a reference database kills the auto analyze processing.

2024-06-18 Thread Peter J. Holzer
On 2024-06-18 14:59:16 +, HORDER Philip wrote: > Classified as: {OPEN} [...] > {OPEN} > The information contained in this e-mail is confidential. It is > intended only for the stated addressee(s) and access to it by any > other person is unauthorised. [...] This is an interesting definition of

Pgpool delegate IP is not reachable from the remote host

2024-06-18 Thread Mukesh Tanuku
Hello everyone. We have a pgpool & postgres setup made as per the given example We haven't configured the *if_up_cmd, if_down_cmd & **arping_cmd* in pgpool.conf (we commented it out on purpose). We enabled the *delegate_ip* and ass

Re: [pgpool-general: 9132] Pgpool delegate IP is not reachable from the remote host

2024-06-18 Thread Bo Peng
Hi, The default value of "if_up_cmd" is: /usr/bin/sudo /sbin/ip addr add $_IP_$/24 dev eth0 label eth0:0 If the network interface "eth0" exists on Pgpool-II servers, the command may run successfully. I think the default value of "if_up_cmd" was executed to bring up the VIP. > Hello everyone.