How to handle postgres redefinition of std::snprintf to pg_snprintf in C++ code

2024-01-18 Thread Vicky Vergara
Hi all I am the pgRouting extension main developer, and I came with an interesting problem. We use boost::graph intensively on the C++ code Currently, getting the data from the data base is done on the C code I am working on moving code that reads data from postgres: code on a C function to a

Re: What should I expect when creating many logical replication slots?

2024-01-18 Thread Antonin Bas
Hi Jim. Thanks for taking the time to reply. Please see below. Le mar. 16 janv. 2024 à 10:51, Jim Nasby a écrit : > On 1/11/24 6:17 PM, Antonin Bas wrote: > > Hi all, > > > > I have a use case for which I am considering using Postgres Logical > > Replication, but I would like to scale up to 100

Re: undefined symbol when installing pgcrypto on 16.1

2024-01-18 Thread Michael Nolan
On Thu, Jan 18, 2024 at 9:51 AM Tom Lane wrote: > > Looks like we have aarch64 and ppc64 machines running Alma 8 and 9. > No x86 though, which might matter for such a low-level failure > as this. So I guess that'll be on the list to add to the build farm at some point? (My Xanthian 'talent' of f

Re: Tips on troubleshooting slow DELETE (suspect cascades)

2024-01-18 Thread Martin Ritchie
Add an index to parent_id. What is likely happening is each time a row is deleted, it has to scan the entire table to make sure it is not referenced by any parent_id records. On Thu, Jan 18, 2024 at 12:04 PM Jim Vanns wrote: > After dropping the constraint entirely the DELETE completes in 4 > m

Re: Explain and filter over subplans

2024-01-18 Thread Tom Lane
Chantal Keller writes: > I would like "explain" to output formulas for filtering over > subplans. Is it possible? No, and that's been a to-do item for a long time. Currently, EXPLAIN just ignores the "testexpr" field of SubPlan nodes, which is what you are after. We could print it, if we could

Re: Tips on troubleshooting slow DELETE (suspect cascades)

2024-01-18 Thread Jim Vanns
After dropping the constraint entirely the DELETE completes in 4 minutes (the same time as the dry-run using SELECT against the function instead of a DELETE). A marked improvement on 3 hours followed by a pg_cancel_backend()! Jim On Thu, 18 Jan 2024 at 16:37, Jim Vanns wrote: > > Hi Tom/Adrian.

Re: Tips on troubleshooting slow DELETE (suspect cascades)

2024-01-18 Thread Tom Lane
Jim Vanns writes: > I should have already stated I did begin with EXPLAIN but given they > don't easily work with (the internals) stored/procedures, it wasn't > useful in this case. auto_explain with nested statements enabled might help? regards, tom lane

Re: Tips on troubleshooting slow DELETE (suspect cascades)

2024-01-18 Thread Rob Sargent
> On Jan 18, 2024, at 9:46 AM, Adrian Klaver wrote: > > On 1/18/24 08:37, Jim Vanns wrote: >> Hi Tom/Adrian. >> I should have already stated I did begin with EXPLAIN but given they >> don't easily work with (the internals) stored/procedures, it wasn't >> useful in this case. Also, I keep havi

Explain and filter over subplans

2024-01-18 Thread Chantal Keller
Hi I would like "explain" to output formulas for filtering over subplans. Is it possible? Here is a minimal example. Consider the queries: create table t(a int); explain (format xml, verbose true) select * from t where a >= all (select * from t); I put the result of the second query at the end

Re: Tips on troubleshooting slow DELETE (suspect cascades)

2024-01-18 Thread Adrian Klaver
On 1/18/24 08:37, Jim Vanns wrote: Hi Tom/Adrian. I should have already stated I did begin with EXPLAIN but given they don't easily work with (the internals) stored/procedures, it wasn't useful in this case. Also, I keep having to terminate the statement because it never runs to completion and p

Re: Postgresql database help

2024-01-18 Thread Adrian Klaver
On 1/18/24 05:10, ankit.si...@nest-is2.com wrote: I need help on another issue now. I have two Linux servers with Postgresql version 14 on both servers. One of the server databases has data from 1^st December to 23rd December and in another server, database has data from 10 December to 31^st D

Re: Tips on troubleshooting slow DELETE (suspect cascades)

2024-01-18 Thread Jim Vanns
Hi Tom/Adrian. I should have already stated I did begin with EXPLAIN but given they don't easily work with (the internals) stored/procedures, it wasn't useful in this case. Also, I keep having to terminate the statement because it never runs to completion and produces the plan (at least in ANALYZE

Re: Initiate backup from routine?

2024-01-18 Thread Stephen Frost
Greetings, * Ron Johnson (ronljohnso...@gmail.com) wrote: > On Wed, Jan 17, 2024 at 9:41 AM Troels Arvin wrote: > > I would like to allow a co-worker to perform a backup of a database, such > > that the backup is saved to the database server itself. One use case is > > that (s)he would like an ex

Re: undefined symbol when installing pgcrypto on 16.1

2024-01-18 Thread Tom Lane
Michael Nolan writes: > Would I be correct to assume the postgresql build farm doesn't include > AlmaLinux 9 to test it. No, you wouldn't: https://buildfarm.postgresql.org/cgi-bin/show_status.pl Looks like we have aarch64 and ppc64 machines running Alma 8 and 9. No x86 though, which might matte

Re: undefined symbol when installing pgcrypto on 16.1

2024-01-18 Thread Michael Nolan
On Thu, Jan 18, 2024 at 5:03 AM Daniel Gustafsson wrote: > > > On 18 Jan 2024, at 00:59, Michael Nolan wrote: > > On Wed, Jan 17, 2024 at 5:32 PM Daniel Gustafsson wrote: > >> > > That's surprising, I expected that it would require the legacy provider be > loaded, not the other way around. Open

Re: Obtaining printed copies of the PostgreSQL manual

2024-01-18 Thread Daniel Gustafsson
> On 18 Jan 2024, at 15:02, Ben Hancock wrote: > My question is: Are these copies legit and actually made available by > the PostgreSQL project? It appears so, but I'd like ensure my purchase > goes toward supporting the project in some small way. It's made by the project in the sense that we a

Obtaining printed copies of the PostgreSQL manual

2024-01-18 Thread Ben Hancock
Hi Postgres fans, I would like to obtain a printed copy of the PostgreSQL manual. It appears that the manual is available on Amazon at the link below, split into six volumes. https://www.amazon.com/dp/B0CQTMLZ5Y?binding=paperback My question is: Are these copies legit and actually made avai

Re: Nested-Internal Functions

2024-01-18 Thread Pavel Stehule
Hi čt 18. 1. 2024 v 13:31 odesílatel Rossana Ocampos napsal: > Effectively I had to create the function externally, I am in the process > of migrating from Oracle to Postgresql and I have many cases of > encapsulated functions and transactions. > Thank you very much for the return. > Rossana Oca

AW: Nested-Internal Functions

2024-01-18 Thread Rossana Ocampos
Effectively I had to create the function externally, I am in the process of migrating from Oracle to Postgresql and I have many cases of encapsulated functions and transactions. Thank you very much for the return. Rossana Ocampos -Ursprüngliche Nachricht- Von: Laurenz Albe [mailto:lauren

Re: undefined symbol when installing pgcrypto on 16.1

2024-01-18 Thread Daniel Gustafsson
> On 18 Jan 2024, at 00:59, Michael Nolan wrote: > On Wed, Jan 17, 2024 at 5:32 PM Daniel Gustafsson wrote: >> >>> On 18 Jan 2024, at 00:24, Michael Nolan wrote: >>> I reinstalled the devel package, still get the same unresolved symbol error. >> >> My memory is failing me, but isn't CAST5 onl