Re: Ident authentication failed

2020-03-29 Thread Peter J. Holzer
on 10), > or (if that's not possible) "md5". Actually, for local connections I prefer "peer". I'm already authenticated by the OS, no need for a (second) password. I should add that you shouldn't use "trust" unless * no connection from other hosts is allowed

Re: Why there is 30000 rows is sample

2020-04-04 Thread Peter J. Holzer
e and recompiling, of course - but why would you want to?). The value 100 can be controlled either by changing default_statistics_target or by changing the statistics target of a specific column of a specific table (alter table ... alter column ... set statistics ...) hp -- _ | Peter J.

Re: Mixed Locales and Upgrading

2020-04-08 Thread Peter J. Holzer
ly two possibilities and that's easy to check. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

pg_restore: could not close data file: Success

2020-04-15 Thread Peter J. Holzer
something in the application). Does that sound plausible or should I look somewhere else? A web search returned nothing relevant. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Str

Re: pg_restore: could not close data file: Success

2020-04-15 Thread Peter J. Holzer
On 2020-04-15 12:01:46 +0200, Peter J. Holzer wrote: > I'm trying to restore a backup on a different machine and it terminates > with the not really helpful messages: > > pg_restore: [directory archiver] could not close data file: Success > pg_restore: [parallel archiver] a

Re: how to slow down parts of Pg

2020-04-22 Thread Peter J. Holzer
ve, it needs to run on a router as close to the bottleneck as possible - typically that means either the border router or the firewall. So it is something the customer's network guy should set up. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: How do work tercile, percentile & funcion percentile_cont() ?

2020-04-22 Thread Peter J. Holzer
9.667 and 29*(2/3) = 19.333. These are obviously 10.667 and 20.333 respectively. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www

Re: How to move a 11.4 cluster to another Linux host, but empty?

2020-05-03 Thread Peter J. Holzer
want to preserve that a simple initdb doesn't recreate? Configuration? Users and passwords? Other stuff? If you can answer this question, the solution will probably be simple. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: Thoughts on how to avoid a massive integer update.

2020-05-05 Thread Peter J. Holzer
the tables shouldn't bloat much. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

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

2020-05-06 Thread Peter J. Holzer
words actually used. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: Enforcing uniqueness on [real estate/postal] addresses

2020-05-12 Thread Peter J. Holzer
dentifier_general, street and postcode, but different descriptions? What does that mean? To different properties which happen to be at the same place or two descriptions for the same property? (What is an address_identifier_general, btw?) I agree with the rest of posting. hp --

Re: Column reset all values

2020-05-13 Thread Peter J. Holzer
to drop the index before doing this. You obviously won't need the index afterwards and the database may be able to use HOT updates if there is no index on the column (but that depends on the amount of unused space in each block). hp -- _ | Peter J. Holzer| Stor

Re: Enforcing uniqueness on [real estate/postal] addresses

2020-05-16 Thread Peter J. Holzer
ghe address_identifier_general is unknown. Some bike shed on main street, There might be more than one, so PostgreSQL is correct not to enforce the unique constraint. In the last one there is no street name - it's not unknown, we know that there is none because this is a small village which doesn&#x

Re: Column reset all values

2020-05-16 Thread Peter J. Holzer
skip the table entirely. You can do that with a partial index (WHERE col IS NOT NULL) or maybe even a constraint. So I would drop the full index, update the table and then create a partial index. hp -- _ | Peter J. Holzer| Story must make more sense tha

Re: Inherited an 18TB DB & need to backup

2020-05-16 Thread Peter J. Holzer
ks because you are still evaluating the fancier alternatives. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: Password reset

2020-05-17 Thread Peter J. Holzer
or your database ...). On Linux systems PostgreSQL is usually set up so that the user "postgres" can locally connect without a password. So you would ssh into the server as postgres and then invoke psql and change any passwords. hp -- _ | Peter J. Holzer| Story must ma

Re: Linux Update Experience

2020-05-29 Thread Peter J. Holzer
rently happened here), so being on relevant announce-lists of having the URL of the repo website handy helps. Sometimes you can force installation (althought that will often cause problems later). In some cases I built my own packages. hp -- _ | Peter J. Holzer| Story must mak

Re: Audit Role Connections

2020-05-29 Thread Peter J. Holzer
CEST [13918]: [11-1] user=m***,db=wds,pid=13918 LOG: disconnection: session time: 0:00:00.117 user=m*** database=wds host=143.130.**.** port=54037 (user names and IP addresses censored for privacy reasons) hp -- _ | Peter J. Holzer| Story must m

Re: Oracle vs. PostgreSQL - a comment

2020-06-01 Thread Peter J. Holzer
ure that I'm missing in PostgreSQL. OTOH, every time I have to deal with one of our legacy Oracle databases I notice quite a few things that PostgreSQL has and Oracle doesn't. But of course that's also not fair. Over the last 6 years I've become quite familiar with PostgreSQL and

Re: Move configuration files with pg_upgrade

2020-06-04 Thread Peter J. Holzer
7;s not a general problem - did you get any error messages or warnings during the upgrade? hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/

Re: Binary encoding of TIMESTAMP WITH TIME ZONE

2020-06-05 Thread Peter J. Holzer
s or a different epoch). That also doesn't include a timezone, so conversion should be straightforward and not require any timezone to be involved. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charl

Re: i am getting issue as FATAL: password authentication failed for user ' postgres' tried

2020-06-20 Thread Peter J. Holzer
; this problem. > > Should have added to previous post: > > Are you sure that you are using the correct password or that the 'postgres' > user has a password? And that the OP is indeed using the 'postgres' user and not the ' postgres' user (as she wr

Definition of REPEATABLE READ

2020-06-21 Thread Peter J. Holzer
p with different ones (it seems to me that G2-item is much stronger that warranted by the wording in the standard)? hp [1] http://pmg.csail.mit.edu/papers/icde00.pdf [2] https://www.microsoft.com/en-us/research/wp-content/uploads/2016/

The backup API and general purpose backup software

2020-06-21 Thread Peter J. Holzer
chived WALs are accessible and start the database hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: The backup API and general purpose backup software

2020-06-21 Thread Peter J. Holzer
On 2020-06-21 10:32:16 -0500, Ron wrote: > On 6/21/20 8:28 AM, Peter J. Holzer wrote: > > To make a full backup with the "new" (non-exclusive) API, a software > > must do the following > > > > 1. open a connection to the database > > > > 2. inv

Re: Netapp SnapCenter

2020-06-22 Thread Peter J. Holzer
from there (that assumes of course that you are archiving WALs continuously, but if you don't, you can't do PITR in general, so if you have that requirement you are doing it). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: The backup API and general purpose backup software

2020-06-22 Thread Peter J. Holzer
On 2020-06-21 17:35:41 -0500, Ron wrote: > On 6/21/20 10:45 AM, Peter J. Holzer wrote: > > On 2020-06-21 10:32:16 -0500, Ron wrote: > > > On 6/21/20 8:28 AM, Peter J. Holzer wrote: > > > > To make a full backup with the "new" (non-exclusive) API,

Re: ERROR: invalid memory alloc request size 18446744073709551613

2020-06-22 Thread Peter J. Holzer
[16987]: [2-1] db=bxs,user=postgres COMANDO:  COPY > public.cham_chamada Does this always happen in conjunction with a COPY command or sometimes with other commands, too? If the former, are you copying into the database or out of it? hp -- _ | Peter

Re: n_distinct off by a factor of 1000

2020-06-24 Thread Peter J. Holzer
an have encountered at most that many different values, which means that it must have encountered each value about 12 or 13 times on average. My guess is that there are relatively few (less than 12) distinct values which make up the bulk (over 90 %) of these tables and a lot (33 million)

Re: Persistent Connections

2020-06-24 Thread Peter J. Holzer
d queries through SSH on the LAN. And maybe some more connections. I can see that this could easily reach 12 connections. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross

Re: Persistent Connections

2020-06-24 Thread Peter J. Holzer
ons to the default and not caring about a few idle connections. What you shouldn't learn from this is that a pooler will make your problems magically go away. Because it won't. jp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: Persistent Connections

2020-06-24 Thread Peter J. Holzer
On 2020-06-24 13:55:00 -0400, Bee.Lists wrote: > On Jun 24, 2020, at 6:47 AM, Peter J. Holzer wrote: > > The default is 100. What was your reason for reducing it to such a low > > value? > > “PostgreSQL 9 High Availability” recommended core count * 3. I suspected somethin

Re: n_distinct off by a factor of 1000

2020-06-24 Thread Peter J. Holzer
calculate. So one would probably have to resort to monte carlo simulation or soemthing like that. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: n_distinct off by a factor of 1000

2020-06-28 Thread Peter J. Holzer
On 2020-06-24 16:27:35 -0600, Michael Lewis wrote: > On Wed, Jun 24, 2020, 2:35 PM Peter J. Holzer wrote: > > Yes, estimating the number of distinct values from a relatively small > sample is hard when you don't know the underlying distribution. It might > be pos

Re: UUID or auto-increment

2020-08-10 Thread Peter J. Holzer
9 seconds. I think that as far as index locality is concerned, this is essentially random for most applications. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Cr

Re: Most effective and fast way to load few Tbyte of data from flat files into postgresql

2020-08-25 Thread Peter J. Holzer
inated by your largest table (or I/O bandwidth). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: ODBC Driver dsplay name

2020-09-05 Thread Peter J. Holzer
e character encoding and therefore the set of characters you can use. Always use PostgreSQL Unicode, unless you have (very old and arguably broken) software which can't handle it. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: PostgreSQL processes use large amount of private memory on Windows

2020-09-17 Thread Peter J. Holzer
size of all postgres processes. Send an alert if one of them is "too large". This should give you a good idea what the processes were doing at the time they allocated that memory, so that you can reproduce the problem. hp -- _ | Peter J. Holzer| Story must make more

Re: Can I get some PostgreSQL developer feedback on these five general issues I have with PostgreSQL and its ecosystem?

2020-10-03 Thread Peter J. Holzer
erve the application for some time (weeks, probably) and adjust parameters (this is something a tool could do, and maybe better than a human, but this is getting into AI territory). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) ||

Re: pg_upgrade Python version issue on openSUSE

2020-10-03 Thread Peter J. Holzer
ng (like 10 years) maintenance periods. So in practical terms, Python 2 isn't dead, it just smells funny. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: Restoring a database problem

2020-10-03 Thread Peter J. Holzer
irst and a database guy second. hp [1] Yes, I know that this doesn't affect connections through Unix sockets. -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: Writing WAL files

2020-10-10 Thread Peter J. Holzer
e advantage of providing an end to end check (do I really get the correct value?), not the database's idea of whether replication is working. (The check is written in Go and buried in a svn repo at work, but I could publish it if there is interest) hp --

Re: What's your experience with using Postgres in IoT-contexts?

2020-10-10 Thread Peter J. Holzer
ind seems overkill. I'd simply write them to files. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: How to migrate column type from uuid to serial

2020-10-10 Thread Peter J. Holzer
because 16 * 16 = 256). They could also have used 3 decimal digits (000 - 255) for each byte, but that would have wasted even more space, or they could have used base 32 or 64 for the whole number, but that would make conversion harder. hp -- _ | Peter J. Holzer| Story must make mo

Re: What's your experience with using Postgres in IoT-contexts?

2020-10-10 Thread Peter J. Holzer
On 2020-10-10 11:22:42 +0200, Thorsten Schöning wrote: > Guten Tag Peter J. Holzer, > am Samstag, 10. Oktober 2020 um 10:56 schrieben Sie: > > > Do you plan to move some of that reporting to the IoT devices? (Maybe > > equip them with a display with a dashboard, or somethin

Re: How to migrate column type from uuid to serial

2020-10-10 Thread Peter J. Holzer
On 2020-10-10 11:31:23 +0200, Peter J. Holzer wrote: > On 2020-10-07 20:10:34 +0530, Hemil Ruparel wrote: > > Sorry if this is silly but if it is a 128 bit number, why do we need 32 > > characters to represent it? Isn't 8 bits one byte? > > Yes, 8 bits are 1 byte. But t

Column aliases in GROUP BY and HAVING

2020-10-12 Thread Peter J. Holzer
scussions about the appropriateness of using an SSN as an id. This is a completely made-up example. -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: Column aliases in GROUP BY and HAVING

2020-10-12 Thread Peter J. Holzer
On 2020-10-12 10:40:03 -0400, Tom Lane wrote: > "Peter J. Holzer" writes: > > In the GROUP BY clause I can use the alias year which was defined > > earlier in SELECT. > > This is a pretty unfortunate legacy thing that we support because > backwards compatibili

Re: What's your experience with using Postgres in IoT-contexts?

2020-10-14 Thread Peter J. Holzer
ng term storage also means backup and recovery and I don't think you > have that planned for your IOT. That depends on how valuable those data are. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at

Re: print formated special characteres

2020-10-17 Thread Peter J. Holzer
F-8 sequence occupies on screen is surprisingly hard. I'm not sure what the C standard says about that. But these days I would expect any programming language to get it right at least for the simple cases. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: Attaching database

2020-10-25 Thread Peter J. Holzer
ifically, the foreign data wrapper) which opens that connection. To the client it looks like it's just accessing a normal table within the same database. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at

Re: Issue executing query from container

2020-10-30 Thread Peter J. Holzer
m, not the production system as the manual states that auto_explain.log_analyze "can have an extremely negative impact on performance". hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charl

Re: What's the best way to translate MS generated translations of user input to what the user actually typed prior to insert or update into PG backend table ?

2020-10-30 Thread Peter J. Holzer
(or copy/paste) it: select replace('a … string …', '…', '...'); or use the chr() function: select replace('a … string …', chr(8230), '...'); I would prefer the former as it is easier to read (as long as the characters are printable), but the

Re: Another user error? [RESOLVING]

2020-11-01 Thread Peter J. Holzer
't try to find all errors. If it finds an error, it reports it and aborts the query. So if your statement contains more than one error (which is quite likely in a statement over 2000 lines long), fixing one error will just show the next. hp -- _ | Peter J.

Re: database aliasing options ?

2020-11-11 Thread Peter J. Holzer
le tool called vip-manager. Compared to DNS this has the advantage that latency is usually shorter. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: pg_dump - how to force to show timestamps in client log

2020-11-21 Thread Peter J. Holzer
ess=5 -v -Fd -f "$name.$$" $db 2>&1 | ts > log/"$name".$(isodate).log ts is available here: https://github.com/hjp/simple/tree/master/ts hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h..

Re: Set COLLATE on a session level

2020-12-11 Thread Peter J. Holzer
ion parameter. It is language-specific and therefore user-specific if you have international users. (I acknowledge the potential performance problems, but they are the same with an explicit collation clause). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: System (and DB) upgrade problem., "part 2"

2021-01-18 Thread Peter J. Holzer
ge contains a script pg_upgradecluster which knows about the distribution-specific directory layout. You would normally use that script instead pg_upgrade directly. Maybe the Fedora package has something similar? hp -- _ | Peter J. Holzer| Story must make more sense th

Re: Do we need a way to moderate mailing lists?

2021-01-18 Thread Peter J. Holzer
obably because most MUAs displayed only one message at a time. The first MUA I've seen that displayed an entire thread at once was Gmail. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Char

Re: Do we need a way to moderate mailing lists?

2021-01-18 Thread Peter J. Holzer
re is. My rule od thumb is that it should be short enough to read as part of the message. Of course this is very subjective and may even depend on my mood (Sometimes I find a 20 line SQL query too long, sometimes I'm happy to dig through 200 lines of Perl code ...). It also depends very much on

Re: Do we need a way to moderate mailing lists?

2021-01-18 Thread Peter J. Holzer
d prefer to not get an extra copy directly. (but I can live with that). Of course the mailing list server can't filter mails it never sees. Mutt adds a header to indicate the preferences of the sender, but I think that is only recognized by mutt, so it's not a general solution.

Re: Do we need a way to moderate mailing lists?

2021-01-18 Thread Peter J. Holzer
really an image to show a problem, it can be put on > some server and the link could be posted, like this one showing a PANIC > of a system http://www.unixarea.de/fbsd-panic-20210110.jpg That has the disadvantage of not being archived. hp -- _ | Peter J. Holzer| Story must

Re: ransomware

2021-02-02 Thread Peter J. Holzer
appen pretty quickly on a busy database. The question is: Does that help you? At that point the data is already gone (at least partially), and you can only restore it from backup. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: vacuumdb not letting me connect to db

2021-02-07 Thread Peter J. Holzer
s finished. FInally among those where the performance was acceptable choose the value which was fastest. (Note: If you do this on the same database, subsequent runs will benefit from work already done, so the take the results with a grain of salt). hp -- _ | Peter J. Holzer

Re: SV: Insertion time is very high for inserting data in postgres

2021-02-11 Thread Peter J. Holzer
investigate what went wrong than to blindly make some changes to the code. As a first measure I would at least turn on statement logging and/or pg_stat_statements to see which statements are slow, and then investigate the slow statements further. auto_explain might also be useful

Re: Which partition scheme makes sense for my time based IoT-datagrams?

2021-02-11 Thread Peter J. Holzer
andom sample (if devices report at random times) or empty (if they all report at midnight and it isn't just after midnight). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles

Re: Slow index creation

2021-02-19 Thread Peter J. Holzer
that you can probably afford a few messages, even if each function invocation only takes a few milliseconds. So definitely try that if you need to know where your functions spend their time. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: Slow while inserting and retrieval (compared to SQL Server)

2021-02-19 Thread Peter J. Holzer
take this much > time. How much time is "this much time"? Are we talking a few milliseconds here? Less? More? Much more? It's hard to give advice if you don't tell us more than "slower than SQL server". Please be specific. Use actual numbers. hp --

Re: checkpointer and other server processes crashing

2021-02-19 Thread Peter J. Holzer
t did not exist before. Or just more of them. I could imagine that switching from Python/Gunicorn to Go increased the number of queries that could be in-flight at the same time. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | |

Re: checkpointer and other server processes crashing

2021-02-19 Thread Peter J. Holzer
API pretty much guarantuees the existence of a connection pool). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challen

Re: PostgreSQL Replication

2021-02-19 Thread Peter J. Holzer
that's a function of load in general, not the number of applications. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | c

Re: Order by not working

2021-02-19 Thread Peter J. Holzer
ill be able to use it. In reality that doesn't help non-programmers much (it's still a formal language with precise semantics and the computer will do what you say, not what you mean), but makes it harder for programmers. hp -- _ | Peter J. Holzer

Re: Please help to improve SELECT JOIN performance, EXPLAIN ANALYZE attached

2021-02-20 Thread Peter J. Holzer
quite small by default so you might want to increase it. The usual recommendation is to start with 25% of the memory (that would be 16 GB in your case) and then see if it gets better if decrease or increase it. hp -- _ | Peter J. Holzer| Story must make more sense than rea

Re: Please help to improve SELECT JOIN performance, EXPLAIN ANALYZE attached

2021-02-20 Thread Peter J. Holzer
photo, ...) try to cache that in the application. That probably doesn't change very often and doesn't have to be retrieved from the database every time. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.a

Re: Please help to improve SELECT JOIN performance, EXPLAIN ANALYZE attached

2021-02-20 Thread Peter J. Holzer
ave experience with trying this in a real-world workload? (I was never brave enough) hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http:

Re: Please help to improve SELECT JOIN performance, EXPLAIN ANALYZE attached

2021-02-21 Thread Peter J. Holzer
On 2021-02-21 10:14:04 -0700, Michael Lewis wrote: > No issues for us. We have used a low sample rate of 1% or so and gotten some > very useful data. Oh, somehow I never noticed the auto_explain.sample_rate parameter in the docs. Good to know. hp -- _ | Peter J. Holzer|

Re: Streaming replication between different OS

2021-02-22 Thread Peter J. Holzer
trings, though, Especially if they are known to cause trouble. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: Streaming replication between different OS

2021-02-22 Thread Peter J. Holzer
poken in Germany ("DE"). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: Leading comments and client applications

2022-03-25 Thread Peter J. Holzer
foo('x*'); ╔═╗ ║ foo ║ ╟─╢ ║ x* ║ ╚═╝ (1 row) Time: 1.296 ms hjp=> \q So like others I suspect that SQLAlchemy is doing something weird here. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: support for DIN SPEC 91379 encoding

2022-03-27 Thread Peter J. Holzer
might have additional reasons not to be in compliance. I don't > read German unfortunately. It defines minimal character set that IT systems which process personal and company names in the EU must accept. Basically Latin, Greek and Cyrillic letters, digits and some symbols and interpunc

Re: psql -f and PAGER

2022-03-29 Thread Peter J. Holzer
(echo 'select * from pg_class;') < /dev/null psql -f <(echo 'select * from pg_class;') > /dev/null But psql -f <(echo 'select * from pg_class;') does, since both stdin and stdout are a terminal. hp -- _ | Peter J. Holzer|

Re: Select .... where id not in (....) returns 0 incorrectly

2022-04-05 Thread Peter J. Holzer
dexes in Oracle don't store NULL values (bitmap indexes do store NULL values, though - are they still an enterprise feature?). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stros

Re: Resources on modeling ordered hierachies?

2022-04-07 Thread Peter J. Holzer
und that by using float8 or even numeric instead of int. Chances are that there is a free number between you numbers. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "C

Re: Help with large delete

2022-04-16 Thread Peter J. Holzer
is the execution plan? * How long does it take? hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: Replication with Patroni not working after killing secondary and starting again

2022-04-27 Thread Peter J. Holzer
nformation, so I could be wrong) that you haven't configured a replication slot and you haven't enough WAL segments to last through the downtime naturally. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || |

Re: Replication with Patroni not working after killing secondary and starting again

2022-04-29 Thread Peter J. Holzer
93 EDT [14755] STATEMENT:  START_REPLICATION SLOT > "xyzd3riardb05" 0/700 TIMELINE 18 ... > and after some time such errors stop to appear. So the replication slot is probably created after some time and then replication starts to work. I think that replication slot is managed

Re: External psql editor

2022-05-02 Thread Peter J. Holzer
ties by > installing rlwrap and performing the following command: While rlwrap is useful sometimes, I suggest reading the manual for libedit might be a better option. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: Replication with Patroni not working after killing secondary and starting again

2022-05-04 Thread Peter J. Holzer
On 2022-05-04 10:21:56 +0200, Zb B wrote: > Apparently there is something wrong with my cluster. How to debug i?. > Do I need to configure anything so the replication is synchronous? Does https://patroni.readthedocs.io/en/latest/replication_modes.html help? hp -- _ | P

Re: PLPGSQL - extra column existence in trigger

2022-05-10 Thread Peter J. Holzer
;t you update both at the same time? hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: newbie db design question

2022-06-11 Thread Peter J. Holzer
simpler: create table products ( product_id serial primary key, description text, supplier_id integer references supplier ); (You need to create supplier before doing that, of course.) hp PS: I noticed that "products" is plural and "s

ISBN (was: '{"x": 42, "y": null}'::jsonb != '{"x": 42}'::jsonb ... Really?)

2022-06-17 Thread Peter J. Holzer
book. For example, "Mastering PostgreSQL 9.6" has the ISBN 978-1-78355-535-2. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://ww

Re: ERROR: failed to find conversion function from key_vals_nn to record[]

2022-06-17 Thread Peter J. Holzer
│ (∅) ║ ╚═╧══╝ (4 rows) Now, if title actually had a type which didn't include a null value, this wouldn't be possible. Either the database would have to lie (declare the column with a type but store a value which is impossible in

Re:

2022-06-18 Thread Peter J. Holzer
s itself. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: Tuning a query with ORDER BY and LIMIT

2022-06-22 Thread Peter J. Holzer
the table. That should be faster since the index contains only 4 of 28 (if I counted correctly) columns and should be quite a bit smaller. It's possible that Oracle does this. But I'm not sure whether you could tell that from the execution plan. hp -- _ | Peter J. Holzer|

Re: Tuning a query with ORDER BY and LIMIT

2022-06-22 Thread Peter J. Holzer
compared to single values. So the you can just jump to the first matching index and then get the next 50 entries. > Is Postgres unable to optimize the query similar to Oracle? Is it possible > this is possible but we are running on too old of a version? PostgreSQL 10 is quite old, so t

Re: Tuning a query with ORDER BY and LIMIT

2022-06-22 Thread Peter J. Holzer
On 2022-06-22 23:48:37 +0200, Peter J. Holzer wrote: > On 2022-06-22 19:39:33 +, Dirschel, Steve wrote: > > Posrgres version 10.11 > > > > Here is the DDL for the index the query is using: > > > > create index workflow_execution_initial_ui_tabs > >

Re: Tuning a query with ORDER BY and LIMIT

2022-06-22 Thread Peter J. Holzer
On 2022-06-23 00:19:19 +0200, Peter J. Holzer wrote: > On 2022-06-22 23:48:37 +0200, Peter J. Holzer wrote: > > The index cannot be used for sorting, since the column used for sorting > > isn't in the first position in the index. > > compared to a single value ^

Re: Tuning a query with ORDER BY and LIMIT

2022-06-25 Thread Peter J. Holzer
On 2022-06-22 23:10:25 -0400, Jeff Janes wrote: > On Wed, Jun 22, 2022 at 6:19 PM Peter J. Holzer wrote: > >That's just how btree indexes work and Oracle will have the same > >limitation. What would be possible is to use an index only scan > >(returning

Re: lifetime of the old CTID

2022-07-06 Thread Peter J. Holzer
t isn't unique it is *not* a key. If your tables don't have a primary key you should seriously rethink the data model. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, &qu

Re: Seems to be impossible to set a NULL search_path

2022-07-08 Thread Peter J. Holzer
is wrong you would have to point at something within the PostgreSQL documentation (ideally an entry in the glossary) or some really wide-spread convention and the absence of a local definition. > Questions show many programmers are confused about the difference. Which might be a hint that no wid

<    1   2   3   4   5   6   7   >