Re: type SERIAL in C host-struct

2019-11-09 Thread Peter J. Holzer
ructs per second. May be a problem if client and server are in different datacenters and you want to do hundreds of inserts per second. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Ch

Re: REINDEX VERBOSE unknown option

2019-11-18 Thread Peter J. Holzer
just the opposite of the usual convention. How about this? * Terminals (stuff that has to be typed as shown) in bold. * Non-Terminals (stuff which has to be replaced) in italic. * Meta-characters ([, ], |, ...) in regular type. hp -- _ | Peter J. Holzer| Story must make more sens

Re: mysysconf ?

2019-11-20 Thread Peter J. Holzer
th them). 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: REINDEX VERBOSE unknown option

2019-11-20 Thread Peter J. Holzer
eginning) 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: REINDEX VERBOSE unknown option

2019-11-21 Thread Peter J. Holzer
On 2019-11-21 09:43:26 +, Geoff Winkless wrote: > On Wed, 20 Nov 2019 at 22:48, Peter J. Holzer wrote: > > > > On 2019-11-19 11:37:04 +, Geoff Winkless wrote: > > > Even if you do that you're still requiring the user to parse syntax > > > according

Re: [SPAM] Remote Connection Help

2019-11-21 Thread Peter J. Holzer
try to connect to a port where no server is listening, you get a connection refused message. If something is blocking the connection you may get a timeout. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at

Re: REINDEX VERBOSE unknown option

2019-11-21 Thread Peter J. Holzer
On 2019-11-21 16:48:14 +, Geoff Winkless wrote: > On Thu, 21 Nov 2019 at 15:32, Peter J. Holzer wrote: > > On 2019-11-21 09:43:26 +, Geoff Winkless wrote: > > > It wasn't meant to be insulting, I meant "esoteric" in the strict > > > sense: that yo

Re: Isolation of multiple databse instances provided by a single postgres server

2019-11-21 Thread Peter J. Holzer
e? > > It corresponds not at all. That's not quite true. Each database has a specific directory (per tablespace) to keep its files in. Schemas on the other hand do not correspond to anything on the filesystem. hp -- _ | Peter J. Holzer|

Re: Isolation of multiple databse instances provided by a single postgres server

2019-11-21 Thread Peter J. Holzer
ou try to access a table in a different database you get an error: db2=# select * from db1.public.t1; ERROR: cross-database references are not implemented: "db1.public.t1" LINE 1: select * from db1.public.t1; hp -- _ | Peter J. Holzer| Story must make more sense tha

Re: Logging [RESOLVED]

2019-12-06 Thread Peter J. Holzer
most days. If your log file is empty, logrotate won't rotate it if the option "notifempty" is set (which is probably the case). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- C

Re: CREATE INDEX ON words_moves(length(letters), score) WHERE action = 'play'

2019-12-08 Thread Peter J. Holzer
. A lot of the conditions is fixed. So you might want to move them into the condition of a partial index: create index on words_moves(played) where action = 'play' and LENGTH(hand) = 7 and (LENGTH(letters) = 7 OR score > 90); Th

Re: server will not start (Debian)

2019-12-15 Thread Peter J. Holzer
# systemctl enable postgresql@12-main.service hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!"

Re: Need support on tuning at the time of index creation

2020-01-27 Thread Peter J. Holzer
erting those rows? How are you creating the indexes? Especially: Are you doing things serially or in parallel? Also performance depends a lot on hardware, so faster CPUs (or more cores) and faster disks/ssds might help, too. hp -- _ | Peter J. Holzer| Story must make

Re: Performance Issue after upgrade from 9 to 11

2020-01-29 Thread Peter J. Holzer
dump and restore, you should invoke ANALYZE for each database (I think autovacuum will analyze all tables eventually, but takes its time). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charl

Re: Need support on tuning at the time of index creation

2020-02-01 Thread Peter J. Holzer
ifferent solutions. As already mentioned, the speed of I/O makes a lot of difference. If you don't use SSDs yet, you should. If you do use SSDs, maybe you can get faster ones? You might also investigate putting pgsql_tmp on a RAM disk. You could also try changing synchronous_commit and/o

Re: Restore is failing

2020-02-05 Thread Peter J. Holzer
ess. You need to identify that process and why it crashed. Check the postgres server log. It should contain an error message. You might also want to check the syslog (on Linux or other Unixes) or equivalent for system errors (e.g. out of memory, disk errors, etc.) hp -- _ | Peter

Re: Cannot connect to postgresql-11 from another machine after boot

2020-02-16 Thread Peter J. Holzer
that postgresql is configured to listen on localhost and the IP address of the ethernet interface and is starting before the etherned interface is ready. So it is listening only on localhost (there should be an error message regarding the other address in the log). When he restarts postgresql some

Re: Cannot connect to postgresql-11 from another machine after boot

2020-02-22 Thread Peter J. Holzer
line.target should be correct. However, see https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ for an explanation why "the network is online" is not as simple as it looks and how to ensure that. hp -- _ | Peter J. Holzer| Story must make more sense than rea

Re: DB running out of memory issues after upgrade

2020-02-23 Thread Peter J. Holzer
=0.00..189454.50 > rows=31294900 > width=288)" > " Filter: (((data -> 'info'::text) ->> 'status'::text) = > 'CLOSE'::text)" So: How much memory does that use? It produces a huge number of rows (more than 3 bill

Re: Can I trigger an action from a coalesce ?

2020-02-23 Thread Peter J. Holzer
ou could tell the user "some values were substituted", but not which ones (at least not if the query can return a large number of rows). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |

Re: Is is safe to use SPI in multiple threads?

2020-02-23 Thread Peter J. Holzer
On 2020-02-18 19:07:44 +, Tom Mercha wrote: > On 23/12/2016 13:41, Peter J. Holzer wrote: > > On 2016-12-09 16:52:05 +0800, Qiu Xiafei wrote: > >> I'm new to PG and want to implement my domain-specific system based on PG. > >> I > >> wish to arrange

Re: Can I trigger an action from a coalesce ?

2020-02-24 Thread Peter J. Holzer
wanted to preserve it. 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: Invoice increment

2020-02-26 Thread Peter J. Holzer
't do that every day. The other way is of course to have a table with all the current invoice numbers for each country. Basically sequences implemented in the application. This has a slightly different set of problems, so you have to be careful, too. hp -- _ | Peter J. Holz

Re: How to install check_postgres on CentOS 8?

2020-02-27 Thread Peter J. Holzer
at structure, you may need to configure those repos. There is also EPEL ("Extra Packages for Redhat Linux"), which contains packages from Fedora. Maybe perl-DateTime-Format-DateParse is in EPEL? hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: Need to find the no. of connections for a database

2020-02-27 Thread Peter J. Holzer
se at the start of the transaction, regardless of what other clients are doing in the meantime. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/

Re: trouble making PG use my Perl

2020-02-29 Thread Peter J. Holzer
onfigure turns them on. 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: trouble making PG use my Perl

2020-02-29 Thread Peter J. Holzer
ecause I tried to make it faster. But for production use I've almost always used the system-supplied perl. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "

Re: Restrict user to create only one db with a specific name

2020-03-08 Thread Peter J. Holzer
re running a tests from multiple projects against the same cluster, it might be a good idea to ensure that each job can only create (and drop) their own test database and not those of other jobs (or - worse - the production database). hp -- _ | Peter J. Holzer| Story must make mor

Re: Advice request : simultaneous function/data updates on many databases

2020-03-08 Thread Peter J. Holzer
ands (especially "drop table") took an exclusive lock on the affected table. So you may want to keep transactions which execute such commands very short to prevent them from blocking other transactions for a noticeable amount of time. hp -- _ | Peter J. Hol

Re: Determining the type of an obkect in plperl

2020-03-08 Thread Peter J. Holzer
the columns that return NULL, these are > undefined in the Perl hash, so I have to test for their existence before > attempting the compare. What do you mean by "undefined in the hash"? * The keys exist but the values are undef * The keys don't exist Those are no

Re: Real application clustering in postgres.

2020-03-08 Thread Peter J. Holzer
or because the user/admin made a mistake) will cause the same wrong data to be distributed to all nodes (of course this also applies to RAC). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charle

Re: Table with many NULLS for indexed column yields strange query plan

2020-03-08 Thread Peter J. Holzer
index here to get the entries in the right order for the merge join. It's strange that it thinks this is a good strategy even though it has to visit every row in the table (no index cond). How is the selectivity of "type"? Would an index on that column help? 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: Real application clustering in postgres.

2020-03-10 Thread Peter J. Holzer
On 2020-03-09 09:57:37 +0100, Laurenz Albe wrote: > On Sun, 2020-03-08 at 21:13 +0100, Peter J. Holzer wrote: > > But to be fair, a master/slave setup a la patroni isn't immune against > > "writing junk" either: Not on the hardware level (either of the nodes > &g

Re: strange locks on PG 11 with Golang programs

2020-03-11 Thread Peter J. Holzer
m DB unless there is a specific need for a | continuous single database connection. All tutorials I've seen follow this recommendation, so a Go programmer might not even be aware that connections exist. hp -- _ | Peter J. Holzer| Story must make more se

Re: PostgreSQL10.x client Vs. PostgreSQL 11.x server

2020-03-13 Thread Peter J. Holzer
r-side enhancements. Also, client programs (e.g. psql) may also have some enhancements. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http:/

Formatting output (was: Order by and timestamp)

2020-03-16 Thread Peter J. Holzer
ible to read, so I have to save the mail to a file and manually undo the line breaks to read it. I rarely bother to do that. * ASCII graphics which only line up in a certain proportional font * text/plain messages with very long lines which really should be paragraphs. hp --

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-20 Thread Peter J. Holzer
ould work. But that effectively serializes your transactions and may cause some to be aborted to prevent deadlocks. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative w

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-20 Thread Peter J. Holzer
On 2020-03-20 17:11:42 -0600, Rob Sargent wrote: > On Mar 20, 2020, at 4:59 PM, Peter J. Holzer wrote: > > On 2020-03-19 16:48:19 -0700, David G. Johnston wrote: > >> First, it sounds like you care about there being no gaps in the records > >> you end > >>

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-21 Thread Peter J. Holzer
On 2020-03-20 17:53:11 -0700, Adrian Klaver wrote: > On 3/20/20 4:29 PM, Peter J. Holzer wrote: > > On 2020-03-20 17:11:42 -0600, Rob Sargent wrote: > > > On Mar 20, 2020, at 4:59 PM, Peter J. Holzer wrote: > > > > On 2020-03-19 16:48:19 -0700, David G. Johnston wro

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-21 Thread Peter J. Holzer
, the social security number contains the birth date. Invoice numbers, project numbers or court case numbers often contain the year. That's because they are used by *people*, and people like their identifiers to make some kind of sense. The computer doesn't care. hp --

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread Peter J. Holzer
On 2020-03-21 14:51:35 -0600, Rob Sargent wrote: > > On Mar 21, 2020, at 1:13 PM, Peter J. Holzer wrote: > > > > On 2020-03-21 12:55:33 -0600, Rob Sargent wrote: > >> To me the description of the ID smacks of database-in-the-name folly. I > >> recognize that

Re: Could postgres12 support millions of sequences? (like 10 million)

2020-03-22 Thread Peter J. Holzer
On 2020-03-21 13:45:54 -0700, pabloa98 wrote: > On Sat, Mar 21, 2020 at 12:08 PM Peter J. Holzer wrote: > And I think that "care about gaps -> sequence doesn't work" is a > knee-jerk reaction. It's similar to "can't parse HTML with regexps"

Re: Loading 500m json files to database

2020-03-24 Thread Peter J. Holzer
t in this case. Splitting the work int batches and executing several batches in parallel probably helps. 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: core. files inside base directory

2020-03-26 Thread Peter J. Holzer
(SYSV), SVR4-style, from 'sleep 120', real uid: ... execfn: '/bin/sleep' ... for each file. (Of course the program won't be "sleep" in your case. To analyze the coredumps further you would have to use a debugger (e.g. gdb). hp -- _ | Peter J. Holz

Idle sessions keep deleted files open

2020-03-29 Thread Peter J. Holzer
zing large tables, keep an eye on idle sessions - they may keep deleted files around for quite some time. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writi

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
On 2020-05-12 10:49:22 +1000, Tim Cross wrote: > Peter Devoy writes: > > I need to store addresses for properties (as in real estate) so in my > > naivety I created a unique constraint like this: > > > > ALTER TABLE properties > > ADD CONSTRAINT

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
On 2020-05-12 21:55:56 +0100, Peter Devoy wrote: > >Is is possible to have two entries which have the same > >address_identifier_general, street and postcode, but different > >descriptions? > > Unfortunately, yes. The data comes from gov't systems to > regula

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
This is inspired by the thread with the subject "Something else about Redo Logs disappearing", but since that thread is already quite long, since I have lost track what exactly "Peter"'s problem is and since his somewhat belligerent tone makes it unappealing to reread the

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

<    1   2   3   4   5   6   7   8   9   10   >