Re: Local postgres manual

2023-11-03 Thread Bruce Momjian
On Fri, Nov 3, 2023 at 03:58:05PM -0400, Tom Lane wrote: > Ben Hancock writes: > > I will say that, as the manual is quite large, a local GNU Info version > > would be great to be able to traverse different sections, etc, more > > easily. If that doesn't exist already, I wonder if a tool like `

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: Indexing fragments of a column's value ?

2023-11-03 Thread Tom Lane
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 up the input values in the way you want though. A less diffi

Re: Local postgres manual

2023-11-03 Thread Tom Lane
Ben Hancock writes: > I will say that, as the manual is quite large, a local GNU Info version > would be great to be able to traverse different sections, etc, more > easily. If that doesn't exist already, I wonder if a tool like `pandoc` > could be employed to generate that. That's exactly wha

Indexing fragments of a column's value ?

2023-11-03 Thread David Gauthier
I'm asking about the possibility of indexing portions of a column's value where the column has a static field format. Example, a char(8) which contains all hex values (basically a hex number that's always 8 chars wide, leading zeros if needed). Someone might want to select all recs where the first

Re: Local postgres manual

2023-11-03 Thread Ben Hancock
On 11/3/23 06:33, Bruce Momjian wrote: But sometimes it may be convenient to view the the manual for the version of Postgres that is on the system, right there. Does one exist? Well, that's a good question, and a new question for me. I poked though the doc makefile and it turns out that:

Re: [EXT] Re: How to tell which statement is being executed

2023-11-03 Thread Garfield Lewis
> It might not be any of those. But if what you want is the most closely > nested SQL action, inspecting the ActivePortal might help (see > function_parse_error_transpose, which I think is the only in-core user). Thx, Tom… will see if this ActivePortal helps… > No. How would you even define "af

Re: Finding execution plan

2023-11-03 Thread shashidhar Reddy
Thank you Adrian fir the reply, I am looking for something like complete execution plan of the function just like EXPLAIN does. On Fri, 3 Nov, 2023, 11:15 pm Adrian Klaver, wrote: > > On 11/3/23 10:44 AM, Adrian Klaver wrote: > > > On 11/3/23 10:40 AM, shashidhar Reddy wrote: > > Hello All, > >

Re: Finding execution plan

2023-11-03 Thread Adrian Klaver
On 11/3/23 10:54 AM, Bruce Momjian wrote: On Fri, Nov 3, 2023 at 10:44:12AM -0700, Adrian Klaver wrote: On 11/3/23 10:40 AM, shashidhar Reddy wrote: Hello All, I have a Postgresql function scheduled to run on the database, some tines it is taking too long than usual time, is

Re: Finding execution plan

2023-11-03 Thread Bruce Momjian
On Fri, Nov 3, 2023 at 10:44:12AM -0700, Adrian Klaver wrote: > > On 11/3/23 10:40 AM, shashidhar Reddy wrote: > > Hello All, > > I have a Postgresql function scheduled to run on the database, some tines > it is taking too long than usual time, is it possible to get the execution >

Re: Finding execution plan

2023-11-03 Thread Adrian Klaver
On 11/3/23 10:44 AM, Adrian Klaver wrote: On 11/3/23 10:40 AM, shashidhar Reddy wrote: Hello All, I have a Postgresql function scheduled to run on the database, some tines it is taking too long than usual time, is it possible to get the execution plan of this function or any other way to t

Re: Finding execution plan

2023-11-03 Thread Adrian Klaver
On 11/3/23 10:40 AM, shashidhar Reddy wrote: Hello All, I have a Postgresql function scheduled to run on the database, some tines it is taking too long than usual time, is it possible to get the execution plan of this function or any other way to troubleshoot You might to take a look at th

Finding execution plan

2023-11-03 Thread shashidhar Reddy
Hello All, I have a Postgresql function scheduled to run on the database, some tines it is taking too long than usual time, is it possible to get the execution plan of this function or any other way to troubleshoot

Re: How to tell which statement is being executed

2023-11-03 Thread Tom Lane
Garfield Lewis writes: > If I create a C function, is there a way from within that function for me to: > 1. know whether it is being triggered by an INSERT or UPDATE statement It might not be any of those. But if what you want is the most closely nested SQL action, inspecting the ActivePortal

How to tell which statement is being executed

2023-11-03 Thread Garfield Lewis
Hi All, If I create a C function, is there a way from within that function for me to: 1. know whether it is being triggered by an INSERT or UPDATE statement * I’ve done some digging and it seems you can get this information if you provide a Planner hook, however, I need to know this m

Re: Local postgres manual

2023-11-03 Thread Philip Semanchuk
> On Nov 3, 2023, at 9:45 AM, Bruce Momjian wrote: > > On Fri, Nov 3, 2023 at 09:39:46AM -0400, Philip Semanchuk wrote: >> >> In addition to Bruce Momjian’s suggestion, I’ll add that you can make an >> HTML version of the manual from the source code. This is what I use and it >> works grea

Re: Local postgres manual

2023-11-03 Thread jian he
i think Ben Hancock want something like https://en.cppreference.com/w/Cppreference:Archives

Re: Local postgres manual

2023-11-03 Thread Bruce Momjian
On Fri, Nov 3, 2023 at 09:39:46AM -0400, Philip Semanchuk wrote: > > > > On Nov 3, 2023, at 9:18 AM, Ben Hancock wrote: > > > > Hi all: > > > > Does Postgres come with a local, full version of the manual installed > > by default anywhere (i.e. akin to what is available on the website, but > >

Re: Local postgres manual

2023-11-03 Thread Philip Semanchuk
> On Nov 3, 2023, at 9:18 AM, Ben Hancock wrote: > > Hi all: > > Does Postgres come with a local, full version of the manual installed > by default anywhere (i.e. akin to what is available on the website, but > in man, info, or plain-text format)? When I invoke `man postgres`, I do > get a ve

Re: Local postgres manual

2023-11-03 Thread Bruce Momjian
On Fri, Nov 3, 2023 at 06:18:19AM -0700, Ben Hancock wrote: > Hi all: > > Does Postgres come with a local, full version of the manual installed > by default anywhere (i.e. akin to what is available on the website, but > in man, info, or plain-text format)? When I invoke `man postgres`, I do > get

Re: pg_dump/pg_restore --jobs practical limit?

2023-11-03 Thread Ron
On 11/3/23 05:09, Marc Millas wrote: Marc MILLAS Senior Architect +33607850334 www.mokadb.com Testing pg_restore with different --jobs= values will be easier.   pg_dump is what's going to be reading from a constantly varying system. Hello, each time I do

Local postgres manual

2023-11-03 Thread Ben Hancock
Hi all: Does Postgres come with a local, full version of the manual installed by default anywhere (i.e. akin to what is available on the website, but in man, info, or plain-text format)? When I invoke `man postgres`, I do get a very useful - but limited - manual page, which has references to cha

Re: pg_dump/pg_restore --jobs practical limit?

2023-11-03 Thread Marc Millas
Marc MILLAS Senior Architect +33607850334 www.mokadb.com Testing pg_restore with different --jobs= values will be easier. pg_dump > is what's going to be reading from a constantly varying system. > > Hello, > each time I do a replatforming of this kind, with DB up to 2 TB, I did create the targ

Re: Regarding HA, Failover and Load Balancing

2023-11-03 Thread Inzamam Shafiq
Hi, You can use combination of patroni, pgbouncer, and HAProxy. patroni will work for auto failover, pgbouncer is for connection pooling and HAProxy can be used for load balancing. These all tools are open source. Regards, Inzamam Shafiq From: Arif Hussain Sent

Regarding HA, Failover and Load Balancing

2023-11-03 Thread Arif Hussain
Hello, Could anyone please help to implement High availability, replication and failover for postgresql. - We are using postgreSQL 14 on VMs (planning to upgrade soon). - We have a single server and planning to achieve: i) High availability (1st priority) ii) Automatic Failove