Re: Duplicate key error

2021-03-03 Thread Ron
On 3/4/21 12:14 AM, Andrus wrote: Hi! says something else is inserting/updating using that key value. So obviously your script is not catching all the conflicts. > At this point your best bet is to monitor the Postgres log and see what else is happening at the time of the error. I'm guessing

Re: Duplicate key error

2021-03-03 Thread Andrus
Hi! says something else is inserting/updating using that key value. So obviously your script is not catching all the conflicts. > At this point your best bet is to monitor the Postgres log and see what else is happening at the time of the error. I'm guessing you will find another process work

Re: Code of Conduct: Russian Translation for Review

2021-03-03 Thread Stacey Haysler
All of the comments are forwarded to the original translation team for review. We really appreciate how many people are offering ideas for this translation! Regards, Stacey Stacey Haysler Chair PostgreSQL Community Code of Conduct Committee On Mar 3, 2021, at 2:09 PM, Valeria Kaplan wrote: Hi

Re: Code of Conduct: Russian Translation for Review

2021-03-03 Thread Stacey Haysler
Hi, Boris - A redline or similar mark up in a standard document format (.odt, .pages, .doc, etc.) is the most common method. As long as it is readable by a human and the edits are easy to see, we can probably work with it. Thank you! Regards, Stacey Stacey Haysler Chair PostgreSQL Community Co

Re: Schema in trigger in logical replication

2021-03-03 Thread Adrian Klaver
On 3/3/21 2:35 PM, Fontana Daniel C. (Desartec S.R.L.) wrote: Using postgres 12.5 in DBA schema, this trigger is executed when the table is updated through a logical replication. Why is it necessary to name the schema for it to work? Because the search_path does include the schema? When I upd

Schema in trigger in logical replication

2021-03-03 Thread Fontana Daniel C. (Desartec S.R.L.)
Using postgres 12.5 in DBA schema, this trigger is executed when the table is updated through a logical replication. Why is it necessary to name the schema for it to work? When I update the table manually, if it Works. Example. This trigger function does not work CREATE FUNCTION dba.ft_pos_sync_

Re: Code of Conduct: Russian Translation for Review

2021-03-03 Thread Valeria Kaplan
Hi Alexander, Attached. Overall I agree with most of your comments. Perhaps, whoever did the initial translation could take a look and finalise it. It's quite hard to review it in this format with so many comments. Thanks, Valeria On Wed, Mar 3, 2021 at 7:22 PM Alexander Lakhin wrote: > Hello

Re: Duplicate key error

2021-03-03 Thread Adrian Klaver
On 3/3/21 11:59 AM, Andrus wrote: Hi! And if that name already exists there would be a duplicate key error. Name cannot exist:  First delete deletes its value. Tables are not changed by external process during transaction. As double insurance, insert perfoms additional existence check and a

Re: Duplicate key error

2021-03-03 Thread Andrus
Hi! >It sounds like this should be re-written as 'insert on conflict do update' statement. It should work in Postgres 9 also. on confilct is not available in postgres 9. This code does not insert duplicate key valuse ? Why it throws error ? You can create testcase to run this code from mul

Re: Duplicate key error

2021-03-03 Thread Andrus
Hi! And if that name already exists there would be a duplicate key error. Name cannot exist:  First delete deletes its value. Tables are not changed by external process during transaction. As double insurance, insert perfoms additional existence check and adds only if key does not exist.

Re: Code of Conduct: Russian Translation for Review

2021-03-03 Thread Boris Epstein
Hello Stacey, I took a quick look and it looks OK overall. I could go over it in more detail - but before I do, is there a code control procedure I need to follow to offer edits, etc? Thanks. Regards, Boris. On Fri, Feb 26, 2021 at 7:51 PM Stacey Haysler wrote: > The PostgreSQL Community Co

Re: Code of Conduct: Russian Translation for Review

2021-03-03 Thread Alexander Lakhin
Hello Valeria, 03.03.2021 20:23, Valeria Kaplan wrote: > > attached are my comments (I used Alexander's file for ease of review). > Thanks for your comments! Please look at my responses. I hope we'll finalize the translation soon. Best regards, Alexander PostgreSQL Code of Conduct - Russian Tra

Re: Duplicate key error

2021-03-03 Thread Michael Lewis
It sounds like this should be re-written as 'insert on conflict do update' statement.

Re: Code of Conduct: Russian Translation for Review

2021-03-03 Thread Valeria Kaplan
Hi All, attached are my comments (I used Alexander's file for ease of review). thank you, Valeria On Mon, Mar 1, 2021 at 2:26 PM Alexander Lakhin wrote: > Hello, > > 27.02.2021 03:51, Stacey Haysler wrote: > > The PostgreSQL Community Code of Conduct Committee has received a draft of > the Rus

Re: permission denied for pg_temp_XX when vacuuming

2021-03-03 Thread Tom Lane
Tobias Lott writes: > There were no crashes of the instance, but some issues with the connected > application, resulting in 'could not receive data from client: Connection > reset by peer' and 'unexpected EOF on client connection with an open > transaction'. No, that sort of thing would still all

Re: Duplicate key error

2021-03-03 Thread Adrian Klaver
On 3/3/21 8:08 AM, Andrus wrote: Hi! There is no other process inserting  to this table? There may be other processes in this server trying to insert same primary key value (server name). And if that name already exists there would be a duplicate key error. Last inserted row data should

Re: permission denied for pg_temp_XX when vacuuming

2021-03-03 Thread Tom Lane
Tobias Lott writes: > Yes that's strange. A lot of pg_XX tables are skipped, but some of these > pg_temp schemas cause errors. > Could it be connected to a migration of the database (from an instance > running PostgreSQL 9.6 to an instance running PostgreSQL 12) done a few > weeks ago? I wouldn't

Re: Duplicate key error

2021-03-03 Thread Andrus
Hi! There is no other process inserting  to this table? There may be other processes in this server trying to insert same primary key value (server name). Last inserted row data should remain. Andrus.

Re: Duplicate key error

2021-03-03 Thread Adrian Klaver
On 3/3/21 7:23 AM, Andrus wrote: Hi! Sometimes duplicate key error     duplicate key value violates unique constraint "session_pkey"     Key (workplace)=(WIN-N9BSKUNKBC8 ) already exists. occurs in script:     delete from session where workplace='WIN-N9BSKUNKBC8' ;     INSERT INTO session

Duplicate key error

2021-03-03 Thread Andrus
Hi! Sometimes duplicate key error     duplicate key value violates unique constraint "session_pkey"     Key (workplace)=(WIN-N9BSKUNKBC8 ) already exists. occurs in script:     delete from session where workplace='WIN-N9BSKUNKBC8' ;     INSERT INTO session (workplace,ipaddress,logintime,logged

Re: permission denied for pg_temp_XX when vacuuming

2021-03-03 Thread Tom Lane
Laurenz Albe writes: > On Wed, 2021-03-03 at 09:58 +0100, Tobias Lott wrote: >> I have a database in a PostgreSQL 12 instance. >> When running vacuumdb -z on the database with the user set as owner of the >> DB, I sometimes, not always, get errors such as: >> error: vacuuming of table "pg_temp_93

Re: problems with my community account on www.postgresql.org

2021-03-03 Thread Magnus Hagander
On Wed, Mar 3, 2021 at 12:23 PM Mathias Zarick wrote: > > Hi there, > > > > I created a community account some weeks ago, mainly to be able to subscribe > to this email lists. > > Now I want to edit my subscriptions but I am unable to login. I chose Twitter > to be used for authentication. > > W

Re: permission denied for pg_temp_XX when vacuuming

2021-03-03 Thread Tobias Lott
Hi Laurenz, good to know, thank you very much! Best regards, Tobias On Wed, 3 Mar 2021 at 12:10, Laurenz Albe wrote: > On Wed, 2021-03-03 at 09:58 +0100, Tobias Lott wrote: > > I have a database in a PostgreSQL 12 instance. > > When running vacuumdb -z on the database with the user set as owne

problems with my community account on www.postgresql.org

2021-03-03 Thread Mathias Zarick
Hi there, I created a community account some weeks ago, mainly to be able to subscribe to this email lists. Now I want to edit my subscriptions but I am unable to login. I chose Twitter to be used for authentication. When I do this again, and click on "Sign in with Twitter" I get into an infini

Re: permission denied for pg_temp_XX when vacuuming

2021-03-03 Thread Laurenz Albe
On Wed, 2021-03-03 at 09:58 +0100, Tobias Lott wrote: > I have a database in a PostgreSQL 12 instance. > When running vacuumdb -z on the database with the user set as owner of the > DB, I sometimes, not always, get errors such as: > error: vacuuming of table "pg_temp_93.vacuum_l" in database "1005

Re: self-made certs not quite right

2021-03-03 Thread Tiemen Ruiten
Hello Rob, With root.crt in ~/.postgresql, testing the jdbc connection from a > tomcat server generates this failure (again either localhost or > $(hostname)) > Blow out on db connection to jdbc:postgresql://localhost:5432/postgres; > SSL error: PKIX path building failed: > sun.security.provider.c

Re: Locks in creating a partition in CREATE TABLE vs ALTER TABLE

2021-03-03 Thread Asaf Flescher
Right, I see I was unclear - I did know it was a new feature in Postgres 12, I just thought it applied to both cases, since the documentation makes no such distinction. Wanted to make sure I wasn't missing something basic before using the ALTER TABLE thing as a workaround. Thanks! On Tue, Mar 2,

permission denied for pg_temp_XX when vacuuming

2021-03-03 Thread Tobias Lott
Hi, I have a database in a PostgreSQL 12 instance. When running vacuumdb -z on the database with the user set as owner of the DB, I sometimes, not always, get errors such as: error: vacuuming of table "pg_temp_93.vacuum_l" in database "10050" failed: ERROR: permission denied for schema pg_temp_93

Re: Localizing stored functions by replacing placeholders in their body

2021-03-03 Thread Alexander Farber
Thanks for your input Actually, yes, that is what I have right now a translate() like stored function, with format %s sometimes. But that is "at runtime" and I would like to have a "at compile time"/"deploy once and forget" solution, that is why I have asked about approaches for modifying the bod