Re: Rationale for aversion to the central database?

2018-04-09 Thread Peter J. Holzer
ll isn't quite the same as Perl (And I suspect it's the same for Python). hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at | management tools. __/ | http://www.hj

Re: Rationale for aversion to the central database?

2018-04-09 Thread Peter J. Holzer
At least that was the situation 10 years ago. These days much software is offered as a service. If the customer sees only a REST API and doesn't have to host the database on their own servers, they won't care about the RDBMS underneath. hp -- _ | Peter J. Holzer

Re: Rationale for aversion to the central database?

2018-04-27 Thread Peter J. Holzer
On 2018-04-27 22:52:39 +, g...@luxsci.net wrote: > Perhaps I'm extreme. In my ideal world, developers might not even know table > names! I'm kidding ,sorta... If they don't know the table names, how can they write those stored procedures? hp -- _ | Pe

Re: Rationale for aversion to the central database?

2018-04-28 Thread Peter J. Holzer
On 2018-04-28 09:54:27 -0500, Steven Lembark wrote: > On Sat, 28 Apr 2018 08:02:21 +0200 > "Peter J. Holzer" wrote: > > > On 2018-04-27 22:52:39 +, g...@luxsci.net wrote: > > > Perhaps I'm extreme. In my ideal world, developers might not even >

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-10 Thread Peter J. Holzer
23:17:44+00'::timestamptz) will still return 7200, even though I have explicitely specified a UTC timestamp. What your check probably does is to enforce that the client's time zone is set to UTC. hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) |

Re: Domain based on TIMEZONE WITH TIME ZONE

2018-05-13 Thread Peter J. Holzer
ATATYPE-DATETIME-INPUT > > "For timestamp with time zone, the internally stored value is always in UTC > (Universal Coordinated Time, traditionally known as Greenwich Mean Time, > GMT)" This is not actually true. There is nothing in the storage format which depends on UTC (wel

Re: Out of memory error with PG10.3, 10.4 but not 9.3.19

2018-05-18 Thread Peter J. Holzer
e the query so that it creates several shorter strings instead. hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at | management tools. __/ | http://www.hjp.at/ | -

Re: Renice on Postgresql process

2018-05-24 Thread Peter J. Holzer
bound and what exactly the "nice value" affects. The best way to find out is probably to try it. hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at

Re: case statement within insert

2018-05-28 Thread Peter J. Holzer
27;subjectname'], is_pe_or_nstp,)) A bit more readable, IMHO. Alternatively, import the complete table *unchanged* from MySQL (you can use copy_from() for this which is much faster than individual inserts), and then convert it with a single SQL statement. hp --

Re: execute block like Firebird does

2018-05-30 Thread Peter J. Holzer
ta is the | only way to communicate changes between different WITH sub-statements | and the main query. -- https://www.postgresql.org/docs/10/static/queries-with.html#QUERIES-WITH-MODIFYING In a DO block the statements are processed sequentially and each statement sees the results of the

Inefficient plan on 10.4

2018-07-05 Thread Peter J. Holzer
t;. I can easily get the required partial order in the application. But I'd like to understand what the optimizer is doing here. -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.a

Re: User documentation vs Official Docs

2018-07-19 Thread Peter J. Holzer
allow the user to use a real text editor instead of a text area. hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at | management tools. __/ | http://www.hjp.at/

Re: User documentation vs Official Docs

2018-07-19 Thread Peter J. Holzer
On 2018-07-19 11:43:18 -0600, Rob Sargent wrote: > On 07/19/2018 11:04 AM, Peter J. Holzer wrote: > > On 2018-07-18 08:09:35 +1000, Tim Cross wrote: > > > If using web widgets to author content on the wiki is the main > > > impediment for contributing content, mayb

Re: Connections on cluster not being logged

2018-07-24 Thread Peter J. Holzer
uot;hardware cluster" is. Probably some kind of appliance which packages two nodes, some storage and the HA software.) hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at

Re: Duplicating data folder without tablespace, for read access

2018-08-14 Thread Peter J. Holzer
blspc/* on the release server > - start postgres on both servers If you copy the whole database anyway before deleting the tablespace: Why don't you just drop the 600 GB table on the release server? hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_

Re: PG8.3->10 migration data differences

2018-09-10 Thread Peter J. Holzer
uot; on output while Pg10 prints the more precise (but still not exact) "2.2005". (I would argue that the Pg9.3 output is better, since it represents the same value in fewer digits, but always printing the minimum number of digits necessary is surprisingly difficult.) hp -

Re: Out of Memory

2018-09-29 Thread Peter J. Holzer
ap alone, and you are only overcommitting if you exceeded the size of the sum. The overcommitment in Linux is of a different kind: Linux uses copy on write whereever it can (e.g. when forking processes, but also when mallocing memory), and a CoW page may or may not be written in the future. It only need

Re: How to maintain the csv log files in pg_log directory only for past 30 days

2018-09-30 Thread Peter J. Holzer
if that matters or not. It may or may not. Personally I prefer to use find -mtime (or logrotate, or cleandir, or keepfree, ...) to avoid the irregularities of the Gregorian calendar. hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) |

Re: COPY threads

2018-10-11 Thread Peter J. Holzer
d 4 are about 33 % faster than 2. But there is a still quite a respectable performance boost. hp PS: The script is of course in the same repo, but I didn't include the test data because I don't think I'm allowed to include that. -- _ | Peter J. Holzer| we build

Re: convert real to numeric.

2018-10-18 Thread Peter J. Holzer
uces an error almost 50 times larger. > I'm not really convinced that doing it like this rather than doing the > standard conversion is a good idea. You can't manufacture precision > where there is none It may be that the real value of that number is only known to +/- 0.1. Or

Re: convert real to numeric.

2018-10-20 Thread Peter J. Holzer
On 2018-10-18 18:58:13 -0400, Tom Lane wrote: > "Peter J. Holzer" writes: > > On 2018-10-18 10:15:40 -0400, Tom Lane wrote: > >> You could ju-jitsu the system into duplicating that behavior by casting > >> to text (which invokes float4out) and then to numer

Re: Why does jsonb_set() remove non-mentioned keys?

2019-07-05 Thread Peter J. Holzer
an SQL null is converted to JSON null. Returning SQL null instead of a JSON null breaks that expectation for no discernible reason. It also isn't consistent, since an SQL null in an array or composite is converted to a JSON null, as I would expect. hp -- _ | Peter J. Holzer

Re: Rearchitecting for storage

2019-07-19 Thread Peter J. Holzer
olding information, but not your data tables or indexes. Your 18 TB table will definitely not be duplicated during the upgrade if you can use --link. hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophist

Re: Rearchitecting for storage

2019-07-19 Thread Peter J. Holzer
On 2019-07-19 11:37:52 -0400, Matthew Pounsett wrote: > On Fri, 19 Jul 2019 at 11:25, Peter J. Holzer wrote: > > On 2019-07-19 10:41:31 -0400, Matthew Pounsett wrote: > > Okay.  So I guess the short answer is no, nobody really knows how to > > judge how much spa

Re: How to run a task continuously in the background

2019-07-19 Thread Peter J. Holzer
full (or if they expire). Is this not a problem in your case or did you make sure that this cannot happen? hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at | mana

Re: Default ordering option

2019-07-27 Thread Peter J. Holzer
? If you do the latter, you might be able insert the data in random order. hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at | management tools. __/ | http://www

Re: Why does backend send buffer size hardcoded at 8KB?

2019-07-28 Thread Peter J. Holzer
Gbit to different switches, switches connected by 10 Gbit). The difference between a 1024 byte buffer and a 1460 byte buffer is small but measurable. Anything larger doesn't make a difference. So increasing the buffer beyond 8 kB probably doesn't improve performance on a 1 Gbit LAN. I

Re: Tablespace column value null on select * from pg_tables

2019-07-28 Thread Peter J. Holzer
e database's default tablespace before > using this command. What's the reason for this error? Wouldn't it be simpler to leave relations alone which are already in the correct tablespace? hp -- _ | Peter J. Holzer| we build much bigger, better disasters no

Re: How do I create a Backup Operator account ?

2019-07-31 Thread Peter J. Holzer
g_restore, ! /usr/local/bin/psql > PGBACKUPUSERS backup_host = PGBACKUP This is the wrong way around. It should be something like alice, bob = (pg_backup_username) /usr/local/bin/pg_dump (Apologies if I didn't get the syntax right. Slogging through the sudoes manual reminded me why I wrot

Re: Understanding PostgreSQL installer debug log

2019-08-09 Thread Peter J. Holzer
home/postgres/9.6" "/home/postgres/9.6/data" 5432 DEFAULT: FATAL: >  invalid byte sequence for encoding "UTF8": 0xeb 0x2f 0xdb 0xeb 0x2f 0xdb is indeed not valid UTF-8. So whereever this sequence comes from isn't UTF-8 encoded. In ISO-8859-1 that sequence would be &

Re: How to check if a field exists in NEW in trigger

2019-08-09 Thread Peter J. Holzer
ractice (although I've seen a lot of other problems caused by people who made unwarranted assumptions about email addresses). hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticat

Quoting style (was: Bulk Inserts)

2019-08-11 Thread Peter J. Holzer
think is even worse: If I don't see any original content within the first 100 lines or so I usually skip the rest). hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at

Re: Recomended front ends?

2019-08-11 Thread Peter J. Holzer
orrendously slow. Even if you do know this, you often have to bend over backwards to get reasonable performance. -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at | management tools. __/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/> signature.asc Description: PGP signature

Re: Databases and servers

2019-08-20 Thread Peter J. Holzer
ent production databases interfering with each other. Also, if you have the test and production database on the same host, there are some procedures which you can't safely test (e.g. an OS upgrade). I would think about putting each database in virtual machine or at least a container, though.

Re: Permission for not Django app to do Write and Read

2019-08-25 Thread Peter J. Holzer
the product owner setup a password. You can still access the tables as postgres. Of course you could set up another database instance where you don't have DBA privileges, but then the product owner has to trust the system administrator instead of the DBA. At some point you have to trust

Re: Recomended front ends?

2019-08-28 Thread Peter J. Holzer
a different language" way. -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at | management tools. __/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/

Re: Recomended front ends?

2019-08-28 Thread Peter J. Holzer
On 2019-08-27 08:16:08 -0700, Adrian Klaver wrote: > Django takes Postgres as it's reference database which makes things easier, > especially when you add in > contrib.postgres(https://docs.djangoproject.com/en/2.2/ref/contrib/postgres/) Looks nice. hp -- _ | P

Re: floating point output

2019-09-09 Thread Peter J. Holzer
in Oracle's sqlplus), so that the user can decide to display a specific column (or maybe all float numbers) as (for example) "%8.3f" or ".6e". This is of course already possible by using to_char in the query (e.g. to_char(f, '.999') or to_char(f, '9.9

Permissions on postgresql.conf, psql and patroni

2019-09-09 Thread Peter J. Holzer
ouldn't access files directly, just talk to the server via the socket. hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at | management tools. __/ | http://www.h

Re: Permissions on postgresql.conf, psql and patroni

2019-09-09 Thread Peter J. Holzer
On 2019-09-09 13:29:38 +0200, Daniel Verite wrote: > Peter J. Holzer wrote: > > 2) Why does psql need to read postgresql.conf, and more specifically, > > why does it care about the location of the data directory? It > > shouldn't access files directly, just

Re: Permissions on postgresql.conf, psql and patroni

2019-09-09 Thread Peter J. Holzer
On 2019-09-09 19:15:19 +0200, Peter J. Holzer wrote: > On 2019-09-09 10:03:57 -0400, Tom Lane wrote: > > "Peter J. Holzer" writes: > > > Yesterday I "apt upgrade"d patroni (to version 1.6.0-1.pgdg18.04+1 > > > from http://apt.postgresql.org/pub/rep

Strange Behaviour with multicolumn indexes

2019-09-12 Thread Peter J. Holzer
he index, so the fact the fact that the index is a bit larger shouldn't make a difference. Explain shows that the row estimates are spot on, but the cost for using t_a_b_idx is higher than for t_b_idx (which is in turn higher than for t_b_a_idx). hp -- _ | Peter J. Holzer

Re: Strange Behaviour with multicolumn indexes

2019-09-12 Thread Peter J. Holzer
On 2019-09-12 12:54:55 -0400, Tom Lane wrote: > "Peter J. Holzer" writes: > > we'll consider just three columns, which we unimaginatively call a, b, > > and c. There are also three indexes: > > > t_a_idx btree (a) WHERE a IS NOT NULL > >

Re: Strange Behaviour with multicolumn indexes

2019-09-12 Thread Peter J. Holzer
On 2019-09-12 21:04:25 +0200, Peter J. Holzer wrote: > On 2019-09-12 12:54:55 -0400, Tom Lane wrote: > > It's not taking the partial-index filter into account in that, I > > suspect, which skews the results in this case --- but that would be > > hard to account for accu

Re: Referncing a calculated column in a select?

2019-09-12 Thread Peter J. Holzer
0.333 ║ ║ -2 │ 3 │5 │3 │ 1.67 ║ ║ 3.1415926536 │ 2.71828 │ 0.4233126536 │ 3.1415926536 │ 0.134744602587137 ║ ╚══╧═╧══╧══╧═══╝ (3 rows) No idea whether this is more or less efficient than

Re: Referncing a calculated column in a select?

2019-09-13 Thread Peter J. Holzer
On 2019-09-13 11:49:28 +0900, Kyotaro Horiguchi wrote: > At Thu, 12 Sep 2019 23:16:01 +0200, "Peter J. Holzer" > wrote in <20190912211601.ga3...@hjp.at> > > On 2019-09-12 15:35:56 -0500, Ron wrote: > > > On 9/12/19 2:23 PM, stan wrote: > > > >

Re: Variable constants ?

2019-09-15 Thread Peter J. Holzer
On 2019-08-15 16:56:57 -0400, stan wrote: > bossiness constants On 2019-09-02 13:31:14 -0400, stan wrote: > bossiness plan > bossiness model On 2019-09-13 05:57:33 -0400, stan wrote: > bossiness work I'm starting to think that this is not a typo :-) SCNR, hp --

Re: PostgreSQL License

2019-09-17 Thread Peter J. Holzer
nload themselves for free I don't know). hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) || because we have much more sophisticated | | | h...@hjp.at | management tools. __/ | http://www.hjp.at/ | -- Ross Anderson <https://www.edge.org/> signature.asc Description: PGP signature

Re: Securing records using linux grou permissions

2019-10-19 Thread Peter J. Holzer
won't have to enter their passwords again. But I think this works only if the client and the server are on the same host. And you still have to maintain the groups, although that should be easy to automate. hp -- _ | Peter J. Holzer| we build much bigger, better di

Re: jsonb_set() strictness considered harmful to data

2019-10-22 Thread Peter J. Holzer
Time: 0.924 ms wds=> select replace('steven', 'e', NULL); ╔═╗ ║ replace ║ ╟─╢ ║ (∅) ║ ╚═╝ (1 row) Time: 0.918 ms Throwing an exception for a pure function seems "un-SQLy" to me. In particular, jsonb_set does something similar for json values as replac

Re: jsonb_set() strictness considered harmful to data

2019-10-22 Thread Peter J. Holzer
the JSON object with an SQL NULL (i.e. unknown) which returns SQL NULL: wds=> select jsonb_set('{"a": 1, "b": 2}'::jsonb, '{c}', NULL); ╔═══╗ ║ jsonb_set ║ ╟───╢ ║ (∅) ║ ╚═══╝ (1 row) hp -- _ | Peter

Re: jsonb_set() strictness considered harmful to data

2019-10-22 Thread Peter J. Holzer
on to a few words and "see Section 9.9.x". So you basically have to read the text and not just the table. Maybe that would make sense for the json functions, too? hp -- _ | Peter J. Holzer| we build much bigger, better disasters now |_|_) ||

Re: jsonb_set() strictness considered harmful to data

2019-10-23 Thread Peter J. Holzer
On 2019-10-22 18:06:39 -0700, David G. Johnston wrote: > On Tue, Oct 22, 2019 at 3:55 PM Peter J. Holzer wrote: > On 2019-10-20 13:20:23 -0700, Steven Pousty wrote: > > I would think though that raising an exception is better than a > > default behavior which delete

Re: Is this a bug ?

2019-10-23 Thread Peter J. Holzer
t; although the advantage of it vs using a concat operator is slim. True. However, concatenation of string literals by juxtaposition isn't specific to SQL. Two other well known languages where this works (even without a newline) are C and Python. hp -- _

Re: 11 -> 12 upgrade on Debian Ubuntu

2019-11-07 Thread Peter J. Holzer
on (like directory layout, etc.), so it should be simpler and safer than invoking pg_upgrade yourself (and pg_upgrade is hidden in /usr/lib/postgresql/*/bin to prevent you from invoking it accidentally). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

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

  1   2   3   4   5   6   7   >