Re: alter function/procedure depends on extension

2022-02-18 Thread David G. Johnston
On Fri, Feb 18, 2022 at 6:16 PM Bryn Llewellyn wrote: > > (4) The clue to the whole thing is the semantics of the LoV for > "pg_depend. deptype" (see below) — but you all kept this a secret from me! > I didn't even think to look at the system catalogs for guidance in this kind of thing. The cat

Re: alter function/procedure depends on extension

2022-02-18 Thread Bryn Llewellyn
> david.g.johns...@gmail.com wrote: > > It's not a member though; there's a different syntax for that (ALTER > EXTENSION name ADD member_object). The differences are a bit subtle, but for > example making the function an extension member would change how pg_dump > treats it. I read, and re-re

Re: pg_upgrade from Postgresql-12 to Postgresql-13 fails with "Creating dump of database schemas postgres *failure*"

2022-02-18 Thread Jeff Janes
On Fri, Feb 18, 2022 at 8:35 AM Yoong S. Chow wrote: > > Here are the logs: pg_upgrade_server.log , > pg_upgrade_dump_13427.log and > tail_postgresql-12-2022-02-16_190344.log . > >From that last log fil

Re: pg_upgrade from Postgresql-12 to Postgresql-13 fails with "Creating dump of database schemas postgres *failure*"

2022-02-18 Thread Laurenz Albe
On Fri, 2022-02-18 at 13:17 +0800, Yoong S. Chow wrote: > I was trying to perform `pg_upgrade` from Postgresql-12 to Postgresql-13 > (after being advised that upgrading from Postgresql-12 to Postgresql-14 > is biting off much more than I could chew... ). That was bad advice. > The `pg_upgrade --c

Re: Strange results when casting string to double

2022-02-18 Thread Tom Lane
"Peter J. Holzer" writes: > Another idea: It could be the case that something (maybe a bug in > postgres, maybe an extension, maybe even a random bit flip in memory) > changed the FP rounding mode within the postgres process, which would > affect all FP computations until the rounding mode is rese

Re: Strange results when casting string to double

2022-02-18 Thread Peter J. Holzer
On 2022-02-18 18:07:35 +0100, Carsten Klein wrote: > both PostgreSQL and my C program are linked to the same libc.so.6. Same > path, same MD5 sum. Since libc is a Shared Object (so), both processes > should really run the identical code. Am I missing something? I've written > and compiled the small

Re: Strange results when casting string to double

2022-02-18 Thread Tom Lane
Carsten Klein writes: > So, you're not aware of any ways this behavior could be achieved from > within PostgreSQL? Something like a custom cast (actually, there is > none) or something that could intercept string to double conversion? Well, you asserted that these installations are all alike .

Re: Strange results when casting string to double

2022-02-18 Thread Carsten Klein
On 18.02.2022 16:32, Tom Lane wrote: Yeah, you said that upthread, which makes the whole thing pretty baffling. One possible explanation is that your small program got linked against a different version of libc than what the Postgres backend is using ("ldd" would help you check that, but giv

Re: 2 phase commit with FDW

2022-02-18 Thread Pavel Stehule
Hi pá 18. 2. 2022 v 14:24 odesílatel Mladen Gogala napsal: > On 2/17/22 13:10, Mladen Gogala wrote: > > Hi! > > I am getting the following error when trying to PREPARE transaction which > updates both local and foreign table: > > 2/17/22 > 12:48:00:657 EST] 0128 RegisteredRes E WTRN0046E:

Re: Strange results when casting string to double

2022-02-18 Thread Tom Lane
Carsten Klein writes: > On 18.02.2022 13:28, Peter Eisentraut wrote: >> float8in() really just calls the operating system's strtod() function. I >> would test that one directly with a small C program. > That's what I did. Here's my small C program: (nicht lachen *g*) Yeah, you said that upthrea

Re: UUID type question

2022-02-18 Thread Laura Smith
Sent with ProtonMail Secure Email. --- Original Message --- On Friday, February 18th, 2022 at 14:25, Dominique Devienne wrote: > > You might also be interested in KSUID, e.g. https://github.com/segmentio/ksuid I love KSUID. I use it in all new projects. ;-)

Re: UUID type question

2022-02-18 Thread Dominique Devienne
On Fri, Feb 18, 2022 at 3:24 PM Dominique Devienne wrote: > On Fri, Feb 18, 2022 at 3:06 PM Laura Smith > wrote: > > Is there anything inherently "special" about the UUID type ? i.e. if I > > store a UUID in a text is it "worse" ? > > uuid is stored as 16 binary bytes. > Store it as text, and th

Re: UUID type question

2022-02-18 Thread Dominique Devienne
On Fri, Feb 18, 2022 at 3:06 PM Laura Smith wrote: > Is there anything inherently "special" about the UUID type ? i.e. if I store > a UUID in a text is it "worse" ? uuid is stored as 16 binary bytes. Store it as text, and that's 36 chars (assuming UTF-8, double-that in UTF-16, if that's possible

UUID type question

2022-02-18 Thread Laura Smith
I'm *sure* I've seen this discussed on here before - infact I'm worried it might even have been me who asked the question ! But I've searched the archives without luck, so here goes : Is there anything inherently "special" about the UUID type ? i.e. if I store a UUID in a text is it "worse" ?

Re: Strange results when casting string to double

2022-02-18 Thread Carsten Klein
On 18.02.2022 13:28, Peter Eisentraut wrote: float8in() really just calls the operating system's strtod() function. I would test that one directly with a small C program. It's also possible that different compiler options lead to different optimizations. That's what I did. Here's my sma

pg_upgrade from Postgresql-12 to Postgresql-13 fails with "Creating dump of database schemas postgres *failure*"

2022-02-18 Thread Yoong S. Chow
Hi I hope I send this to the right mailing list and able to get some help. I was trying to perform `pg_upgrade` from Postgresql-12 to Postgresql-13 (after being advised that upgrading from Postgresql-12 to Postgresql-14 is biting off much more than I could chew... ). The `pg_upgrade --check` wen

Re: 2 phase commit with FDW

2022-02-18 Thread Mladen Gogala
On 2/17/22 13:10, Mladen Gogala wrote: Hi! I am getting the following error when trying to PREPARE transaction which updates both local and foreign table: 2/17/22 12:48:00:657 EST] 0128 RegisteredRes E   WTRN0046E: An attempt by the transaction manager to call prepare on a transactional

Re: Max_connection

2022-02-18 Thread Daulat
On Fri, Feb 18, 2022 at 2:39 PM Daulat wrote: > As I know, each PostgreSQL connection consumes RAM for managing the > connection or the client using it. The more connections, the more RAM. > I have a machine having 124 GB RAM and 16 CPU with SSD storage. > Currently, 1200 connections are set but

Re: Strange results when casting string to double

2022-02-18 Thread Peter Eisentraut
On 16.02.22 14:27, Carsten Klein wrote: AFAIK, this conversion is done by internal function float8in, which, when called directly, yields the same results: SELECT float8in('1.56'); --> 1.55   (wrong!)   on one server, and --> 1.56   (correct!) on all other servers. fl

Re: PostgreSQL's Max Identifier Length in Amazon RDS

2022-02-18 Thread Michael Lewis
Also- https://www.postgresql.org/docs/10/runtime-config-preset.html "The following “parameters” are read-only, and are determined when PostgreSQL is compiled or when it is installed." >

Re: PostgreSQL's Max Identifier Length in Amazon RDS

2022-02-18 Thread Michael Lewis
I believe that would not be possible. One quick read- https://til.hashrocket.com/posts/8f87c65a0a-postgresqls-max-identifier-length-is-63-bytes With it being RDS, changing source and recompiling is not an option.

PostgreSQL's Max Identifier Length in Amazon RDS

2022-02-18 Thread Atul Kumar
Hi, Could someone help me in telling : how to increase Max Identifier Length in amazon RDS.running instance on postgres 10 ? I couldn't find the blog related to it so far, So kindly suggest. Regards, Atul