Re: Are Foreign Key Disabled During Logical Replication Initial Sync?

2021-12-06 Thread Peter Eisentraut
On 06.12.21 15:50, Avi Weinberg wrote: Does it mean that populating each table is done in a single transaction?  If so, when I have tables with foreign keys between them, is it guaranteed that logical replication will populates the tables in the proper order so the foreign key will be enforced?

Re: Are Foreign Key Disabled During Logical Replication Initial Sync?

2021-12-08 Thread Peter Eisentraut
On 07.12.21 08:51, Avi Weinberg wrote: Just to clarify, they are disabled during initial sync only or are always disabled on subscriber side? Are all triggers disabled during initial sync or just foreign keys? All triggers are by default disabled on replicas. See the ALTER TABLE clauses DISA

Re: error connecting to pgbouncer admin console

2021-12-08 Thread Peter Eisentraut
On 07.12.21 17:10, Zwettler Markus (OIZ) wrote: I did a pgbouncer configuration using the following ini file: [databases] * = host=localhost port=5433 auth_user=pgbouncer Using the name "pgbouncer" for auth_user is buggy. Try using a different name.

Re: Packages, inner subprograms, and parameterizable anonymous blocks for PL/pgSQL

2021-12-16 Thread Peter Geoghegan
hen how can you expect it for yourself? -- Peter Geoghegan

Re: Packages, inner subprograms, and parameterizable anonymous blocks for PL/pgSQL

2021-12-16 Thread Peter Geoghegan
communicated with him online, and I've worked on Postgres more or less full time for a full decade now. As far as I'm aware he hasn't ever publicly posting to any of the mailing lists. -- Peter Geoghegan

Re: Packages, inner subprograms, and parameterizable anonymous blocks for PL/pgSQL

2021-12-17 Thread Peter Geoghegan
g because of how they allow an organization to deploy a program in a production environment, complete with version control? Does it have something to do with decoupling the mutable business data stored in tables from the programs contained/run in the same database? -- Peter Geoghegan

Re: PGBouncer logs explanation required

2021-12-20 Thread Peter Eisentraut
On 19.12.21 12:50, Shubham Mittal wrote: 2021-11-25 14:45:45.244 IST [18307] LOG C-0x6ae270: sit/postgres@abcdlogin attempt: db=sit user=postgres tls=no 2021-11-25 14:45:45.299 IST [18307] LOG S-0x6b4f48: sit/postgres@abcd new connection to server (from abcd) 2021-11-25 14:46:17.843 IST [18307]

Re: How to read an external pdf file from postgres?

2022-01-12 Thread Peter Eisentraut
On 12.01.22 12:16, Amine Tengilimoglu wrote:      I want to read an external pdf file from postgres. pdf file will exist on the disk. postgres only know the disk full path as metadata. Is there any software or extension that can be used for this? Or do we have to develop software for it?  Or w

Re: Strange results when casting string to double

2022-02-18 Thread Peter Eisentraut
On 16.02.22 14:27, Carsten Klein wrote: AFAIK, this conversion is done by internal function float8in, which, when called directly, yields the same results: SELECT float8in('1.56'); --> 1.55   (wrong!)   on one server, and --> 1.56   (correct!) on all other servers. fl

Re: Future of PlPython2

2017-12-09 Thread Peter Eisentraut
On 12/9/17 12:15, Boshomi DeWiki wrote: > Python 2.7 will not be maintained past 2020.[1]  > > Python2 is still default for Postgres 10. CREATE EXTENSION PLPYTHONU > results in installation of PLPYTHON2U. > > As of now SUSE does not support PLPYTHON3U. (This will change soon) > > Are there any p

Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?

2017-12-11 Thread Peter Geoghegan
mportant to be *exactly* compatible with EBCDIC order? As long as you're paying for a custom collation, why not just use a collation that is helpful to humans? -- Peter Geoghegan

Re: Is it possible to sort strings in EBCDIC order in PostgreSQL server?

2017-12-12 Thread Peter Geoghegan
On Tue, Dec 12, 2017 at 5:18 AM, John McKown wrote: > On Tue, Dec 12, 2017 at 2:17 AM, Tsunakawa, Takayuki > wrote: >> >> Hi Laurenz, Tom, Peter, >> >> Thanks for your suggestions. The practical solution seems to be to >> override comparison operators of ch

User-defined print format for extension-defined types in psql output

2017-12-14 Thread Peter Devoy
n.com/nihujociga.sql Kind regards Peter

Re: How to see index was rejected for seq scan?

2017-12-16 Thread Peter Eisentraut
e the costs. If the planner still gives you a sequential scan, then the index was not applicable for other reasons. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: User-defined print format for extension-defined types in psql output

2017-12-16 Thread Peter Devoy
Thanks Laurenz.

Re: pg_upgrading to 10.1 corrupts (varchar,varchar) UNIQUE indices

2017-12-22 Thread Peter Geoghegan
st major Linux distributions. See: https://github.com/petergeoghegan/amcheck Note also that only this external version has the "heapallindexed" check. -- Peter Geoghegan

Re: pg_upgrading to 10.1 corrupts (varchar,varchar) UNIQUE indices

2017-12-22 Thread Peter Geoghegan
provider without accounting for pg_upgrade. If so, then that's a bug in the package. This is a total speculation, but makes a certain amount of sense to me. -- Peter Geoghegan (Sent from my phone)

Re: pg_upgrading to 10.1 corrupts (varchar,varchar) UNIQUE indices

2017-12-22 Thread Peter Geoghegan
Please report this as a bug to the freebsd package maintainer. -- Peter Geoghegan (Sent from my phone)

Re: pg_upgrading to 10.1 corrupts (varchar,varchar) UNIQUE indices

2017-12-22 Thread Peter Geoghegan
avioral change in OS collations, even though the OS collation behavior apparently did not change. I'm currently feeling too lazy to check that I guessed right about all of this, but somebody should look into it. -- Peter Geoghegan

Re: Does PostgreSQL check database integrity at startup?

2017-12-26 Thread Peter Geoghegan
Look into amcheck: https://github.com/petergeoghegan/amcheck -- Peter Geoghegan (Sent from my phone)

Re: invalid memory alloc request size 576460752438159360

2017-12-31 Thread Peter Geoghegan
pass "pg_index.indisprimary" as "heapallindexed" argument, while generalizing from the example SQL query for bt_index_check()). This process has a good chance of isolating the problem, especially if you let this list see any errors raised by the tool. -- Peter Geoghegan

Re: invalid memory alloc request size 576460752438159360

2017-12-31 Thread Peter Geoghegan
ot;indisprimary" as the heapallindexed argument. That way, only primary keys would be verified against the heap, which is potentially a lot faster. -- Peter Geoghegan

Re: invalid memory alloc request size 576460752438159360

2017-12-31 Thread Peter Geoghegan
On Sun, Dec 31, 2017 at 1:39 PM, Peter Geoghegan wrote: > SELECT bt_index_check(index => c.oid, heapallindexed => true), > c.relname, > c.relpages > FROM pg_index i > JOIN pg_opclass op ON i.indclass[0] = op.oid > JOIN pg_am am ON op.opc

Re: Slow system due to ReorderBufferGetTupleBuf?

2018-01-01 Thread Peter Geoghegan
org/gitweb/?p=postgresql.git;a=commit;h=a4ccc1cef5a04cc054af83bc4582a045d5232cb3 My guess is that that would make a noticeable difference, once v11 becomes available. Could you test this yourself by building from the master branch? -- Peter Geoghegan

Re: Ideas to deal with table corruption

2018-01-06 Thread Peter Geoghegan
ck on 9.4: https://github.com/petergeoghegan/amcheck#redhatcentossles I would start there. -- Peter Geoghegan

Re: characters converted to ??? in postgres

2018-01-11 Thread Peter Eisentraut
your libedit library. Try running psql with the -n option. If that helps, then look into building psql with libreadline instead. Because libedit is terrible. > - case 2 is fine > - echo -n '≤' |hexdump -C > e2 89 a4 |...| &g

Re: characters converted to ??? in postgres

2018-01-12 Thread Peter Eisentraut
ad conversion happens, in other > words it passes to the backend the ?? characters > Any similar trick I could use on the postgres jdbc driver ? That appears to be a completely separate issue. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Changing locale/charset

2018-01-22 Thread Peter Eisentraut
probably had a locale of xx_XX.utf8, so it had the UTF8 encoding. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Slow alter sequence with PG10.1

2018-01-22 Thread Peter Eisentraut
On 1/22/18 17:11, Michael Krüger wrote: > I do not fully understand the reasoning of making sequences > transactional in the first place. It was sequence DDL that was made transactional. Sequence use is still nontransactional. -- Peter Eisentraut http://www.2ndQuadra

Re: Postgres for hadoop

2018-01-25 Thread Peter Eisentraut
traut.org/blog/2015/08/14/have-problems-with-postgresql-try-using-hive/ -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: PostgreSQL 9.6: view based on sequence

2018-01-25 Thread Peter Eisentraut
a system table, then you'll get whatever types the system table uses. There is nothing from with that. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: pg10 logical replication set schema

2018-01-30 Thread Peter Eisentraut
ld use the table > some_schema.test_table_replication instead of > public.test_table_replication? No. > I can't find any reference in the docs > about tables or schemas in subscriptions. Here: https://www.postgresql.org/docs/10/static/logical-replication-subscription.html --

Re: session_replication_role meaning?

2018-01-30 Thread Peter Eisentraut
changes, e.g., https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/replication/logical/worker.c;h=eedc3a8816bc2f157e62a664bcc57b5f87530be9;hb=958fe549884928cd3bdf009993e9a05df5fd6cee#l1521 -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: PostgreSQL Kerberos Authentication

2018-01-30 Thread Peter Eisentraut
found in Kerberos database Check that your DNS resolves everything correctly. You can find some ideas about this error in the internet. It's not a problem specific to PostgreSQL. It looks like you have things set up correctly. -- Peter Eisentraut http://www.2ndQuadrant.com/

Re: Unexpected ErrorMessage reply to SSLRequest

2018-02-02 Thread Peter Eisentraut
lso says that you should handle it nonetheless. ;-) -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Ensure extension exists

2018-02-02 Thread Peter Eisentraut
t up in a way that it blows away your database on each run. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Documentation section F

2018-02-07 Thread Peter Eisentraut
ut the modules themselves are still extensions that you need to install into the databases. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Index Partition Size Double of its Table Partition?

2024-10-30 Thread Peter Geoghegan
sistently: https://www.youtube.com/watch?v=p5RaATILoiE&t=2079s https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=f21668f3 Of course, this is only a guess. I vaguely recall a complaint that sounded vaguely like yours, also involving partitioning. -- Peter Geoghegan

Re: Index Partition Size Double of its Table Partition?

2024-10-30 Thread Peter Geoghegan
On Wed, Oct 30, 2024 at 11:39 AM Don Seiler wrote: > Thanks Peter, I'll look into that shortly. It sounds like you have no updates and deletes. Right? So the only thing that could be different is the way that the pages are being split (aside from variations in the width of index tuple

Re: Index Partition Size Double of its Table Partition?

2024-10-30 Thread Peter Geoghegan
ind by fillfactor in each case. In general page splits tend to come in distinct "waves" after CREATE INDEX is run. -- Peter Geoghegan

Re: Duplicate key error

2024-11-11 Thread Peter Geoghegan
tually make any promises about not getting unique violations. Only ON CONFLICT DO UPDATE (and ON CONFLICT DO NOTHING) make such a promise. That's the main reason why Postgres supports both. -- Peter Geoghegan

Re: Duplicate key error

2024-11-12 Thread Peter Geoghegan
NFLICT DO UPDATE. -- Peter Geoghegan

Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20

2024-12-01 Thread Peter Kleiner
Seems too easy but have you tried psql -p 6432 -h localhost words_de ? On Sun, Dec 1, 2024 at 3:59 PM Alexander Farber wrote: > My problem is related to > https://github.com/docker-library/postgres/pull/440/files > > But I am yet not sure how to enable listening at localhost again >

Re: Upsert error "column reference is ambiguous"

2025-04-28 Thread Peter Geoghegan
es with a generic table name alias? -- Peter Geoghegan

Re: Another documentation issue

2025-04-24 Thread Peter Eisentraut
On 23.04.25 11:14, Daniel Gustafsson wrote: On 23 Apr 2025, at 09:16, Laurenz Albe wrote: On Wed, 2025-04-23 at 00:21 -0500, Igor Korot wrote: However, this page https://www.postgresql.org/docs/current/runtime-config-resource.html#GUC-EFFECTIVE-IO-CONCURRENCY describes both default and mn/max

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
ys the same", our test was green 99% of the time, so we > discarded it as flaky. > > Fuzzy testing could be an option, but this would go too far, as for > Peter extension suggestion. We have huge existing codebase with more > than 10K tests, and I do not want to modify our whole

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
On 2019-08-24 13:22:38 +0200, Luca Ferrari wrote: > On Sat, Aug 24, 2019 at 11:53 AM Peter Wainaina wrote: > > > > Thanks much for the response. This is what I mean am a database ^ > > administrator for a produ

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. |_|_) |

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