Re: DDL support for logical replication

2019-10-10 Thread Jeremy Finzel
On Thu, Oct 10, 2019 at 3:09 PM Lev Kokotov wrote: > Hi Miles, > > One issue is keeping the subscriber and the publisher schema identical. > Running migrations on both the publisher and subscriber does not seem > atomic to me, therefore I don't have a way to enforce consistency between > the two.

Re: DDL support for logical replication

2019-10-10 Thread Cory Nemelka
Another use case is installations where there is heavy reliance on temporary tables in queries. Since you can't run queries that create temporary tables on servers that are binary replicas, this leaves the master (not horizontally scalable) or logical replicas --cnemelka On Thu, Oct 10, 2019 a

Re: Is my lecturer wrong about PostgreSQL? I think he is!

2019-10-10 Thread Achilleas Mantzios
On 10/10/19 11:31 π.μ., Wim Bertels wrote: 3) Were there ever any problems with BSD? as far as i understand BSD and variants are very solid, so good for server use, not for desktop Desktop software might be a little old, but that does not mean that this is not usable. I run FreeBSD desk

Re: Segmentation fault with PG-12

2019-10-10 Thread Andres Freund
On 2019-10-10 15:32:38 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2019-10-09 10:16:37 -0400, Tom Lane wrote: > >> Well, it shows that the failure is occurring while trying to evaluate > >> a variable in a trigger's WHEN clause during > >> "UPDATE origo_email_delivery SET folder_id=$1, c

Re: DDL support for logical replication

2019-10-10 Thread Lev Kokotov
Hi Miles, One issue is keeping the subscriber and the publisher schema identical. Running migrations on both the publisher and subscriber does not seem atomic to me, therefore I don't have a way to enforce consistency between the two. The use case is simple: schemas change all the time, and keepin

Re: The connection to the server was lost. Attempting reset: Failed.

2019-10-10 Thread Yessica Brinkmann
That is, It worked by changing the code to: if (idxcd == NULL) { elog( INFO, "idxcd IS NULL" ); continue; /* Or is that fatal enough to break instead? */ } if (!idxcd->idxused) continue; Very thanks, Yessica Brinkmann El jue., 10 oct. 2019 a

Re: DDL support for logical replication

2019-10-10 Thread Miles Elam
Hi Lev, While I don't have an answer to your roadmap question, you've raised a different question for me. What are you expecting to get from logical replication of DDL commands that is not served by binary replication? I ask because typically someone would want to use logical replication if they

Re: plpgsql copy import csv double quotes

2019-10-10 Thread pascal . crozet
Hoho 🙄🤔 Don't paid attention to the rest of the conversation that begins with "GRANT and REVOKE trigger on a ddl_command_end " I've forwarded the email without deleting the previous message 😮😕😞 Salutations, Pascal On Thu, Oct 10, 2019 at 9:20 PM +0200, "Adrian Klaver" wrote:

Re: Segmentation fault with PG-12

2019-10-10 Thread Andreas Joseph Krogh
På torsdag 10. oktober 2019 kl. 21:32:38, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Andres Freund writes: > On 2019-10-09 10:16:37 -0400, Tom Lane wrote: >> Well, it shows that the failure is occurring while trying to evaluate >> a variable in a trigger's WHEN clause during >> "UPDATE orig

Re: The connection to the server was lost. Attempting reset: Failed.

2019-10-10 Thread Yessica Brinkmann
Thank you very much for your answer. It helped me. Really now the get_columnnames function is already working and ends cleanly. I have an error in the following function to be executed that generates the same error: The connection to the server was lost. Attempting reset: Failed. I will try to solv

Re: Segmentation fault with PG-12

2019-10-10 Thread Tom Lane
Andres Freund writes: > On 2019-10-09 10:16:37 -0400, Tom Lane wrote: >> Well, it shows that the failure is occurring while trying to evaluate >> a variable in a trigger's WHEN clause during >> "UPDATE origo_email_delivery SET folder_id=$1, created=$2\nWHERE entity_id >> IN ($3)\nRETURNING entity

Re: plpgsql copy import csv double quotes

2019-10-10 Thread Adrian Klaver
On 10/10/19 8:30 AM, PASCAL CROZET wrote: Thanks, As it's write in the page, the file format is more a convention than a standard. With collegues, we've find the solution with a regex in sed sed -e 's/\([^,]\)"\([^,]\)/\1\2/g' -e  's/\(

Re: The connection to the server was lost. Attempting reset: Failed.

2019-10-10 Thread Yessica Brinkmann
Thank you so much for your answer. I will be testing the indicated and then I give you return. Best regards, Yessica Brinkmann El jue., 10 oct. 2019 a las 15:25, Jaime Soler () escribió: > Why don't have a try to gdb ? > https://wiki.postgresql.org/wiki/Developer_FAQ#What_debugging_features_are_a

Re: The connection to the server was lost. Attempting reset: Failed.

2019-10-10 Thread Jaime Soler
Why don't have a try to gdb ? https://wiki.postgresql.org/wiki/Developer_FAQ#What_debugging_features_are_available.3F It might be a extra free memory executions or null pointer accesses .. , gdb could help you. Regards El jue., 10 oct. 2019 a las 20:01, Yessica Brinkmann (< yessica.brinkm...@gma

DDL support for logical replication

2019-10-10 Thread Lev Kokotov
Hello, Is DDL support on a roadmap for logical replication? Thank you. - Lev

Re: The connection to the server was lost. Attempting reset: Failed.

2019-10-10 Thread Yessica Brinkmann
Thank you very much for the reply. Well, really, resetStringInfo () is a function of the StringInfo data structure. What I used at the end was initStringInfo, which is a function of the data structure StringInfoData, which is what I am using, although I don't know if they are equivalent. The code r

Re: SELECT d02name::bytea FROM ... && DBI::Pg

2019-10-10 Thread Matthias Apitz
El día jueves, octubre 10, 2019 a las 06:46:02p. m. +0200, Francisco Olarte escribió: > Matthias: > > On Thu, Oct 10, 2019 at 1:25 PM Matthias Apitz wrote: > > I can SELECT && print a column in hex with: > > pos71=# select d02name::bytea from d02ben where d02bnr = '1048313' ; > > ... > >

Re: SELECT d02name::bytea FROM ... && DBI::Pg

2019-10-10 Thread Francisco Olarte
Matthias: On Thu, Oct 10, 2019 at 1:25 PM Matthias Apitz wrote: > I can SELECT && print a column in hex with: > pos71=# select d02name::bytea from d02ben where d02bnr = '1048313' ; > ... > \x50c3a46461676f67697363686520486f6368736368756c65205765696e67617274656e2020 > ... > > but when I use

Re: The connection to the server was lost. Attempting reset: Failed.

2019-10-10 Thread Yessica Brinkmann
Thank you so much for your answer. I will be testing the indicated and then I give you return. Best regards, Yessica Brinkmann El jue., 10 oct. 2019 a las 13:15, Alban Hertroys () escribió: > > > On 10 Oct 2019, at 17:55, Yessica Brinkmann > wrote: > > > > I really thought a lot, but I don't und

Re: The connection to the server was lost. Attempting reset: Failed.

2019-10-10 Thread Yessica Brinkmann
Thank you so much for your answer. I will be testing the indicated and then I give you return. Best regards, Yessica Brinkmann El jue., 10 oct. 2019 a las 13:14, Tom Lane () escribió: > Yessica Brinkmann writes: > > I really thought a lot, but I don't understand why but the function fails > > af

Re: The connection to the server was lost. Attempting reset: Failed.

2019-10-10 Thread Alban Hertroys
> On 10 Oct 2019, at 17:55, Yessica Brinkmann > wrote: > > I really thought a lot, but I don't understand why but the function fails > after the expression is executed: > appendStringInfo (& cols, "% s a.attnum =% d", (i> 0? "OR": ""), idxcd-> > varattno [i]); > The error appears only to me

Re: The connection to the server was lost. Attempting reset: Failed.

2019-10-10 Thread Tom Lane
Yessica Brinkmann writes: > I really thought a lot, but I don't understand why but the function fails > after the expression is executed: > appendStringInfo (& cols, "% s a.attnum =% d", (i> 0? "OR": ""), idxcd-> > varattno [i]); I think you're probably shooting yourself in the foot here:

The connection to the server was lost. Attempting reset: Failed.

2019-10-10 Thread Yessica Brinkmann
Good afternoon, I am doing a thesis from the University. My thesis is the modification of the Gurjeet Index Adviser, to add some features. At the moment I am modifying one of the .c files and adding a function called get_columnames that returns the names of the columns of a table, passing it the nu

Re: Case Insensitive Comparison with Postgres 12

2019-10-10 Thread Igal @ Lucee.org
Thomas, On 10/10/2019 6:22 AM, Thomas Kellerer wrote: Igal @ Lucee.org schrieb am 10.10.2019 um 14:41: Thank you all for replying. I tried to use the locale suggested by both Laurenz and Pavel, en-US-u-ks-level2, but I'm still getting false for a simple comparison of 'Abc' = 'abc'. I tried t

RE: plpgsql copy import csv double quotes

2019-10-10 Thread PASCAL CROZET
Thanks, As it's write in the page, the file format is more a convention than a standard. With collegues, we've find the solution with a regex in sed sed -e 's/\([^,]\)"\([^,]\)/\1\2/g' -e 's/\([^,]\)"\([^,]\)/\1\2/g' Because file contains

Re: Minimum privilege for Backup and replication

2019-10-10 Thread Stephen Frost
Greetings, * Timmy Siu (timmy@aol.com) wrote: > Now, my question is - > What is the Minimum Privilege of a pgsql Backup or Replication user? To perform a file-level backup of PostgreSQL, your OS user will need read access to all of the files in the data directory (you can use group privileges

Re: Event Triggers and GRANT/REVOKE

2019-10-10 Thread Adrian Klaver
On 10/9/19 3:20 PM, Miles Elam wrote: Using my example below from another thread, GRANTs and REVOKEs leave all fields NULL except for command_tag (set to 'GRANT' or 'REVOKE'), object_type (set to upper case target like 'TABLE'), and in_extension (set to whatever is appropriate, but typically fa

Re: SOLVED Re: Recovering disk space

2019-10-10 Thread Melvin Davidson
>OOK, after a period of time, I recovered my disk space. Stan, for those of us that have lost the ability to long distance mind read, would you please inform us of the steps you took to solve the problem? It might be helpful in the future to someone else in the same situation. It might also be us

Re: psql \copy hanging

2019-10-10 Thread Adrian Klaver
On 10/10/19 12:00 AM, Arnaud L. wrote: Le 08/10/2019 à 16:59, Arnaud L. a écrit : Yes, I already did that, and unfortunately there's no activy. There is absolutely no activity in procmon using psql.exe as a filter. process-xp is not giving more information, processor usage is 0%. My apologies,

Re: Is my lecturer wrong about PostgreSQL? I think he is!

2019-10-10 Thread Stephen Frost
Greetings, * Pól Ua Laoínecháin (lineh...@tcd.ie) wrote: > > > 1) Is my lecturer full of it or does he really have a point? > > > He's full of it, as far as I can tell anyway, based on what you've > > shared with us. Just look at the committers and the commit history to > > PostgreSQL, and look

websearch_to_tsquery() and handling of ampersand characters inside double quotes

2019-10-10 Thread Alastair McKinley
Hi all, I have recently discovered an unexpected difference in behaviour using websearch_to_tsquery() with quoted strings containing ampersands. These two queries are equivalent without surrounding double quotes select websearch_to_tsquery('something and another') = websearch_to_tsquery('somet

Re: websearch_to_tsquery() and apostrophe inside double quotes

2019-10-10 Thread Alastair McKinley
Hi Tom, Thank you for looking at this. You are right I couldn't find anything in the docs that would explain this. I can't think of any rationale for producing a query like this so it does look like a bug. Best regards, Alastair From: Tom Lane Sent: 10 O

Re: syntax error with v12

2019-10-10 Thread Adrian Klaver
On 10/10/19 5:51 AM, Ivan Kabaivanov wrote: Hi, everyone. First time poster here. This snippet (from ovirt-engine-dwh) used to work fine with postgresql-11.x, but emits a syntax error with postgresql-12.0: CREATETABLEhistory_configuration ( var_name VARCHAR(50) NOTNULL, var_value VARCHAR(255

Re: syntax error with v12

2019-10-10 Thread Ivan Kabaivanov
Thanks! ivanK. On Thu, Oct 10, 2019 at 3:56 PM Félix GERZAGUET wrote: > Hi, > > On Thu, Oct 10, 2019 at 2:51 PM Ivan Kabaivanov > wrote: > >> psql:/usr/share/ovirt-engine-dwh/dbscripts/create_tables.sql:7: ERROR: >> syntax error at or near "OIDS" >> LINE 7: ) WITH OIDS; >> > > Indeed, OID wer

Re: websearch_to_tsquery() and apostrophe inside double quotes

2019-10-10 Thread Tom Lane
Alastair McKinley writes: > I am a little confused about what us being generated by > websearch_to_tsquery() in the case of an apostrophe inside double quotes. > ... > select websearch_to_tsquery('"peter o''toole"'); > websearch_to_tsquery > -- > 'peter' <-> ( '

Re: Case Insensitive Comparison with Postgres 12

2019-10-10 Thread Thomas Kellerer
Igal @ Lucee.org schrieb am 10.10.2019 um 14:41: > Thank you all for replying. I tried to use the locale suggested by > both Laurenz and Pavel, en-US-u-ks-level2, but I'm still getting > false for a simple comparison of 'Abc' = 'abc'. I tried the locale > both as a 'string' and as an "identifier"

Re: logical replication - negative bitmapset member not allowed

2019-10-10 Thread Jehan-Guillaume de Rorthais
Hello, On Thu, 4 Apr 2019 23:37:04 +0200 Peter Eisentraut wrote: > On 2019-04-01 23:43, Alvaro Herrera wrote: > > Maybe the replica identity of a table got set to a unique index on oid? > > Or something else involving system columns? (If replication is > > otherwise working, the I suppose there

Re: syntax error with v12

2019-10-10 Thread Félix GERZAGUET
Hi, On Thu, Oct 10, 2019 at 2:51 PM Ivan Kabaivanov wrote: > psql:/usr/share/ovirt-engine-dwh/dbscripts/create_tables.sql:7: ERROR: > syntax error at or near "OIDS" > LINE 7: ) WITH OIDS; > Indeed, OID were removed from 12 release as described in: https://www.postgresql.org/docs/release/12.0/

Re: syntax error with v12

2019-10-10 Thread Josef Šimánek
Hello, I think this change is mentioned in release notes https://www.postgresql.org/docs/release/12.0/. čt 10. 10. 2019 v 14:51 odesílatel Ivan Kabaivanov < ivan.kabaiva...@gmail.com> napsal: > Hi, everyone. > > First time poster here. > > This snippet (from ovirt-engine-dwh) used to work fine wi

syntax error with v12

2019-10-10 Thread Ivan Kabaivanov
Hi, everyone. First time poster here. This snippet (from ovirt-engine-dwh) used to work fine with postgresql-11.x, but emits a syntax error with postgresql-12.0: CREATE TABLE history_configuration ( var_name VARCHAR(50) NOT NULL, var_value VARCHAR(255), var_datetime TIMESTAMP WITH TIME ZONE, CON

Re: Case Insensitive Comparison with Postgres 12

2019-10-10 Thread Igal @ Lucee.org
On 10/9/2019 12:34 AM, Laurenz Albe wrote: Igal Sapir wrote: I am trying to test a simple case insensitive comparison. Most likely the collation that I chose is wrong, but I'm not sure how to choose the correct one (for English/US?). Here is my snippet: create collation case_insensitive(

Re: Minimum privilege for Backup and replication

2019-10-10 Thread Luca Ferrari
On Thu, Oct 10, 2019 at 1:26 PM Timmy Siu wrote: > Now, my question is - > What is the Minimum Privilege of a pgsql Backup or Replication user? It is not clear what your question really is. If you are thinking about a "database user with backup grant", there is no thing like that in PostgreSQL. I

websearch_to_tsquery() and apostrophe inside double quotes

2019-10-10 Thread Alastair McKinley
Hi all, I am a little confused about what us being generated by websearch_to_tsquery() in the case of an apostrophe inside double quotes. Here is an example of searching for a name containing an apostrophe. The following works as expected: select to_tsvector('peter o''toole') @@ websearch_to_t

Minimum privilege for Backup and replication

2019-10-10 Thread Timmy Siu
Dear All Postgresql Users, I am new to pgsql. I have an installation on my Ubuntu 18.04. Now, my question is - What is the Minimum Privilege of a pgsql Backup or Replication user? I know how to do it for mysql but not pgsql.?? I begin to switch to pgsql v11 from mysql v5.7 after knowing it many

SELECT d02name::bytea FROM ... && DBI::Pg

2019-10-10 Thread Matthias Apitz
Hello, I can SELECT && print a column in hex with: pos71=# select d02name::bytea from d02ben where d02bnr = '1048313' ; ... \x50c3a46461676f67697363686520486f6368736368756c65205765696e67617274656e2020 ... but when I use the same in Perl DBI::Pg with: ... $sth=$dbh->prepare( "select d02n

Re: Is my lecturer wrong about PostgreSQL? I think he is!

2019-10-10 Thread Simon Riggs
On Wed, 9 Oct 2019 at 20:06, Pól Ua Laoínecháin wrote: > One of my courses is "Advanced Databases" - yummy I thought - it's not > even compulsory for me but I just *_had_* to take this module. The > lecturer is a bit of an Oracle fan-boy (ACE director no less... > hmmm...) and I want(ed) - becom

Re: Segmentation fault with PG-12

2019-10-10 Thread Andreas Joseph Krogh
We had another crash today, and it appears to be the same: #0 slot_deform_heap_tuple (natts=26, offp=0x5598eba0b968, tuple=, slot=0x5598eba0b920) at ./build/../src/backend/executor/execTuples.c:895 -- Andreas Joseph Krogh

Re: Is my lecturer wrong about PostgreSQL? I think he is!

2019-10-10 Thread Geoff Winkless
On Thu, 10 Oct 2019 at 09:31, Wim Bertels wrote: > sometimes people are really a fan of certain product, > sometimes in combination with the thought that all other products are > bad; i don't know if this is the case, you could compare it with > soccer, a barcalona fan will never become a real mad

Re: Version 10.7 of postgres

2019-10-10 Thread Magnus Hagander
On Thu, Oct 10, 2019 at 6:52 AM Shankar Bhaskaran wrote: > Hi , > > We are planning to use postgres 10.7 version as that is the latest > version supported on Aurora DB. Since we have an on premise installation > also , i was trying to download the same version of postgres for windows > and linux.

Re: Is my lecturer wrong about PostgreSQL? I think he is!

2019-10-10 Thread Wim Bertels
> > Now, I have four questions: > > 1) Is my lecturer full of it or does he really have a point? Hallo Pol, i don't know, a also teaching a databases, personally i never experienced this sometimes people are really a fan of certain product, sometimes in combination with the thought that all

SOLVED Re: Recovering disk space

2019-10-10 Thread stan
OOK, after a period of time, I recovered my disk space. On Thu, Oct 10, 2019 at 03:57:00AM -0400, stan wrote: > Sorry to repeat this, I am still in trouble on it. > > I made the mistake of trying to import the mouse gnome database in an > effort to do some testing with very large data sets. > >

Recovering disk space

2019-10-10 Thread stan
Sorry to repeat this, I am still in trouble on it. I made the mistake of trying to import the mouse gnome database in an effort to do some testing with very large data sets. This import failed, probably because I ran out of disk space. I deleted the dump file, and a few other things, and now I h

Re: Segmentation fault with PG-12

2019-10-10 Thread Andres Freund
On 2019-10-10 09:05:06 +0200, Andreas Joseph Krogh wrote: > (Tom: This mail is only viewable as text/html, to if you're reading the > text/plain version it will seem "hashed") I'm totally not ok with that btw.

Re: Segmentation fault with PG-12

2019-10-10 Thread Andreas Joseph Krogh
På torsdag 10. oktober 2019 kl. 07:25:26, skrev Andres Freund < and...@anarazel.de >: On 2019-10-09 10:16:37 -0400, Tom Lane wrote: > Andreas Joseph Krogh writes: > > Attached is output from "bt full". Is this helpful? > > Well, it shows that the failure is occurrin

Re: psql \copy hanging

2019-10-10 Thread Arnaud L.
Le 08/10/2019 à 16:59, Arnaud L. a écrit : Yes, I already did that, and unfortunately there's no activy. There is absolutely no activity in procmon using psql.exe as a filter. process-xp is not giving more information, processor usage is 0%. My apologies, I obviously did something wrong last ti