Re: Cluster for an appliance-type deployment

2023-11-07 Thread Christian Ramseyer
But enough about non-Postgres topics on this list :) To go with Postgres, on a hunch I'd try Patroni first: it does a lot of the advanced failover stuff, has a great track record, and supposedly runs on BSD: https://openports.pl/path/databases/patroni Cheers Christian -- Christian Ra

Re: pg_trgm vs. Solr ngram

2023-02-11 Thread Christian Ramseyer (mx04)
On 10.02.23 04:48, Laurenz Albe wrote: On Fri, 2023-02-10 at 03:20 +0100, Chris wrote: In Solr I was using ngrams and customized the TokenizerFactories until more or less only whitespace was as separator, while [.:-_\d] remains part of the ngrams. This allows to search for ".12.255/32" or "xzy-e

Re: PostgreSQL CHECK Constraint

2021-10-03 Thread Christian Ramseyer
> The reported error looks like this: > > postgres@dellstore ERROR: new row for relation "test_customers" > violates check constraint "check_age" .. > > This errors appears in the serverlog which has many format and > forwarding options, you can read about them here: On 03.10.

Re: PostgreSQL CHECK Constraint

2021-10-03 Thread Christian Ramseyer
lastname, age) values ( 'Jimmy', 'Schmoe', 15); This errors appears in the serverlog which has many format and forwarding options, you can read about them here: https://www.postgresql.org/docs/current/runtime-config-logging.html Cheers Christian -- Christian Ramseyer, netnea ag Network Management. Security. OpenSource. https://www.netnea.com

Re: postgresql order lowercase before uppercase

2021-03-19 Thread Christian Ramseyer
on the "andere Marken" uppercase M. Try this: select id, marke.name from marke ORDER BY left(marke.name,1) <> left(lower(marke.name),1), marke.name Fiddle: http://sqlfiddle.com/#!17/d9d83e/9 Cheers Christian -- Christian Ramseyer, netnea ag Network Management. Security. OpenSource. https://www.netnea.com

Re: Slow SELECT

2020-05-26 Thread Christian Ramseyer
e fantastic https://explain.depesz.com/ This will turn the somewhat hard-to-understand explain output into a nice colored structure. If it's not obvious from the orange-reddish boxes where the slowness comes from, please post the link here and somebody will certainly have some advice. Cheers Chri

Re: Removing Last field from CSV string

2020-05-16 Thread Christian Ramseyer
,Class VIII |--| |Class VIIx,Competitive Exam22,Class VIIIabc,Classx |Class VIIx,Competitive Exam22,Class VIIIabc | (I cut some columns at the start to better fi

Re: Lock Postgres account after X number of failed logins?

2020-05-07 Thread Christian Ramseyer
On 06.05.20 13:48, Guillaume Lelarge wrote: > Le mer. 6 mai 2020 à 04:18, Christian Ramseyer <mailto:r...@networkz.ch>> a écrit : > > Here is a quick, rough example with still some blanks to fill in - I put > it on github for readability: > <htt

Re: Encoding conversion: Use replacement character instead of failing query with "ERROR: character with byte sequence 0xd0 0xad in encoding "UTF8" has no equivalent in encoding LATIN1" ?

2020-05-06 Thread Christian Ramseyer
On 06.05.20 02:00, Tom Lane wrote: > Christian Ramseyer writes: >> Can I somehow influence the client:UTF8->server:LATIN1 character set >> conversion so that instead of failing, it inserts an invalid codepoint >> character, the utf8 hex bytes as string, drops the charac

Re: Abnormal Growth of Index Size - Index Size 3x large than table size.

2020-05-06 Thread Christian Ramseyer
ly used etc. But in cases of abnormal growth that gets worse and worse over time, the above is the first thing to try in my experience. Cheers Christian -- Christian Ramseyer, netnea ag Network Management. Security. OpenSource. https://www.netnea.com

Re: Lock Postgres account after X number of failed logins?

2020-05-05 Thread Christian Ramseyer
le xxx nologin", but you might add some features like connecting to the primary server if fail2ban triggered on the standby. Also I'm not sure if setting nologin is the best way to disable an account, but I'm sure somebody on here could tell you. Cheers Christian -- Christian

Encoding conversion: Use replacement character instead of failing query with "ERROR: character with byte sequence 0xd0 0xad in encoding "UTF8" has no equivalent in encoding LATIN1" ?

2020-05-05 Thread Christian Ramseyer
Hello list I'm slowly converting all of our databases from Postgres 9 and LATIN1 to Postgres 12 and UTF8, one by one. I was wondering if there is a solution for this issue: if a database that is still latin1 has a postgres_fdw foreign table onto a converted utf8 database, and somehow a character

Re: Can I tell libpq to connect to the primary?

2020-04-22 Thread Christian Ramseyer
On 22.04.20 21:10, Christian Ramseyer wrote: > > I see that in pgjdbc there are additional options for targetServerType = > any, primary, secondary, preferSlave and preferSecondary[2]. However > this seems to be java-specific and not implemented in libpq? Is there a > way to get th

Can I tell libpq to connect to the primary?

2020-04-22 Thread Christian Ramseyer
Hi I'm setting up a new environment with a primary/hot standby replication pair. For read-only clients, I have found the host=host1,host2 connection string[1] which allows a connection when any one of the servers is up. However I'm unsure how to achieve something similar for read/write clients.