Re: Effects of REVOKE SELECT ON ALL TABLES IN SCHEMA pg_catalog FROM PUBLIC

2024-09-12 Thread Andreas Joseph Krogh
for them to take. We're probably going down the postgres_fdw route, that seems to do the job. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Re: Effects of REVOKE SELECT ON ALL TABLES IN SCHEMA pg_catalog FROM PUBLIC

2024-09-12 Thread Andreas Joseph Krogh
På torsdag 12. september 2024 kl. 15:05:48, skrev Greg Sabino Mullane < htamf...@gmail.com <mailto:htamf...@gmail.com>>: On Thu, Sep 12, 2024 at 12:52 AM Andreas Joseph Krogh mailto:andr...@visena.com>> wrote: I know PG is not designed for this, but I have this requirement no

Re: Effects of REVOKE SELECT ON ALL TABLES IN SCHEMA pg_catalog FROM PUBLIC

2024-09-11 Thread Andreas Joseph Krogh
like pg_user, pg_shadow, pg_tables etc. will suffice. If read-access (SELECT) on views in public-schema will still works, and pg_dump/restore etc. also works, this sounds like a solution to me. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mai

Effects of REVOKE SELECT ON ALL TABLES IN SCHEMA pg_catalog FROM PUBLIC

2024-09-11 Thread Andreas Joseph Krogh
CHEMA pg_catalog FROM PUBLIC; REVOKE SELECT ON ALL TABLES IN SCHEMA information_schema FROM PUBLIC; Will this affect “normal behaviour”, ie. prevent the planner, or other internal mechanisms, from working properly for sessions logged in with the ‘reporting’-role? Thanks. -- Andreas Joseph Krog

AI for query-planning?

2024-06-22 Thread Andreas Joseph Krogh
Hi, are there any plans for using some kind of AI for query-planning? Can someone with more knowledge about this than I have please explain why it might, or not, be a good idea, and what the challenges are? Thanks. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56

Re: prevent users from SELECT-ing from pg_roles/pg_database

2024-05-27 Thread Andreas Joseph Krogh
På tirsdag 28. mai 2024 kl. 01:48:17, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Laurenz Albe writes: > On Mon, 2024-05-27 at 09:33 +0200, Andreas Joseph Krogh wrote: >> I tried: >> REVOKE SELECT ON pg_catalog.pg_database FROM public; >> But that doesn't pre

Re: prevent users from SELECT-ing from pg_roles/pg_database

2024-05-27 Thread Andreas Joseph Krogh
På mandag 27. mai 2024 kl. 11:10:10, skrev Laurenz Albe < laurenz.a...@cybertec.at <mailto:laurenz.a...@cybertec.at>>: On Mon, 2024-05-27 at 09:33 +0200, Andreas Joseph Krogh wrote: > I tried: > > REVOKE SELECT ON pg_catalog.pg_database FROM public; > > But that do

Re: prevent users from SELECT-ing from pg_roles/pg_database

2024-05-27 Thread Andreas Joseph Krogh
På fredag 24. mai 2024 kl. 19:02:13, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Andreas Joseph Krogh writes: > Hi, is there a way to prevent a user/role from SELECT-ing from certain > system-tables? > I'd like the contents of pg_{user,roles,database} to not be visible

prevent users from SELECT-ing from pg_roles/pg_database

2024-05-24 Thread Andreas Joseph Krogh
Hi, is there a way to prevent a user/role from SELECT-ing from certain system-tables? I'd like the contents of pg_{user,roles,database} to not be visible to all users. Thanks. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mai

RE: Performance degradation after upgrading from 9.5 to 14

2024-04-27 Thread Andreas Joseph Krogh
nd so wonder why this default is on? I can confirm this, even in v16 we've turned JIT off. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Parallel GIN index?

2024-04-06 Thread Andreas Joseph Krogh
Any plans for $subject? -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Sv: Support for dates before 4713 BC

2024-03-04 Thread Andreas Joseph Krogh
to implement it in the near future? https://www.postgresql.org/message-id/flat/ca438ff8331c4e109aa1b75a130948ac%40oeaw.ac.at <https://www.postgresql.org/message-id/flat/ca438ff8331c4e109aa1b75a130948ac%40oeaw.ac.at> -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +

Re: PostgreSQL Read-only mode usage

2024-02-28 Thread Andreas Joseph Krogh
de. Right, we have PowerBI connected to a standby-DB, streaming-replication. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Sv: PostgreSQL Read-only mode usage

2024-02-28 Thread Andreas Joseph Krogh
eports. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Re: Improving pg_dump performance when handling large numbers of LOBs

2024-02-05 Thread Andreas Joseph Krogh
oils down to how badly the ones in charge wants this migration… -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Re: Improving pg_dump performance when handling large numbers of LOBs

2024-02-05 Thread Andreas Joseph Krogh
d agree that use of LOBs for this purpose was not necessary. Well, the data is there nonetheless, is it an option to convert it to bytea before migration? -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www

Re: Daterange question

2024-01-19 Thread Andreas Joseph Krogh
t; have a negator operator that could allow the NOT to be simplified out. Wouldn't drange && daterange(CURRENT_DATE, NULL, '[)') serve the purpose? That should be indexable. regards, tom lane Yes it will, thanks. -- Andreas Joseph Krogh CTO / Partner - Visena AS M

Re: Daterange question

2024-01-19 Thread Andreas Joseph Krogh
NULL::date, '[)'::text))) │ │ Rows Removed by Filter: 1 │ │ Planning Time: 0.077 ms │ │ Execution Time: 0.015 ms │ └─────────────┘ -- Andreas Joseph Krogh CTO / Partner - Vis

Daterange question

2024-01-19 Thread Andreas Joseph Krogh
set in the past, but want to show lines with start-dates in future. This seems to do what I want: NOT (drange << daterange(CURRENT_DATE, NULL, '[)')) But this doesn't use the index. Any idea how to write a query so it uses the index on drange? Thanks. -- And

Re: How to eliminate extra "NOT EXISTS"-query here?

2023-11-25 Thread Andreas Joseph Krogh
På lørdag 25. november 2023 kl. 17:08:28, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Andreas Joseph Krogh writes: > -- This works, but I'd rather not do the extra EXISTS > select * from test t > WHERE (NOT ARRAY ['x', 'y', 'z', 't'

How to eliminate extra "NOT EXISTS"-query here?

2023-11-25 Thread Andreas Joseph Krogh
= t.id) OR NOT EXISTS ( select * from stuff s where s.test_id = t.id ) ) ; So, I want to return all entries in test not having any of ARRAY ['x', 'y', 'z', 't'] referenced in the table stuff, and I'd like to have test.id="d" returned as well, but in order to do that I need to execute the “or not exists”-query. Is it possible to avoid that? -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Sv: Base files compatibility between PG11 and PG15

2023-08-17 Thread Andreas Joseph Krogh
l.org/docs/release/15.0/> They all state the same: “A dump/restore using pg_dumpall or use of pg_upgrade or logical replication is required for those wishing to migrate data from any previous release.” -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@v

Re: PostgreSQL and local HDD

2023-08-16 Thread Andreas Joseph Krogh
På onsdag 16. august 2023 kl. 05:40:40, skrev Ron mailto:ronljohnso...@gmail.com>>: On 8/15/23 02:23, Jason Long wrote: [snip] > Does PostgreSQL have an option to increase speed? Like a Turbo button? It actually has that, but you'll have to sacrifice some safety. -- Andrea

Re: PostgreSQL and GUI management

2023-08-15 Thread Andreas Joseph Krogh
ee dispenser. Things some feel they need in a management tool. If you need these things, I'm sure there's a budget somewhere for investing in available commercial tools, some already mentioned in this thread. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56

Re: PostgreSQL and GUI management

2023-08-15 Thread Andreas Joseph Krogh
use IntelliJ IDEA for development (has syntax highlight, code completion, introspection etc.). IDEA has a PostgreSQL plugin which is only commercially available, and uses the same components as DataGrip, AFAIK. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr..

Re: Delete values from JSON

2023-03-18 Thread Andreas Joseph Krogh
Excellent! Thanks! På lørdag 18. mars 2023 kl. 14:26:57, skrev Boris Zentner mailto:b...@2bz.de>>: Am 17.03.2023 um 08:56 schrieb Andreas Joseph Krogh : Hi, in PG-14, how do I delete the keys "dunsNumber": "NaN": { "sessionId": "ce6fc9

Re: Delete values from JSON

2023-03-17 Thread Andreas Joseph Krogh
;a"] jsonb #- text[] → jsonb Deletes the field or array element at the specified path, where path elements can be either field keys or array indexes. '["a", {"b":1}]'::jsonb #- '{1,b}' → ["a", {}] Regards I have looked at the docs, but it doesn

Delete values from JSON

2023-03-17 Thread Andreas Joseph Krogh
quot;details": [ { "keyInformation": { "organizationType": "LIMITED_COMPANY" } }, { "keyInformation": { "dunsNumber": "123", "organizationType": "LIMITED_COMPANY" } } ], "nisse": 123 } Thanks. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Sv: PostgreSQL configuration in a VM

2023-02-17 Thread Andreas Joseph Krogh
VM. In other words, disk IO is what you should be worried about as VMs are pretty good at scaling CPU-wise. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Re: How to store "blobs" efficiently for small and large sizes, with random access

2022-10-20 Thread Andreas Joseph Krogh
På torsdag 20. oktober 2022 kl. 10:32:44, skrev Dominique Devienne < ddevie...@gmail.com <mailto:ddevie...@gmail.com>>: On Wed, Oct 19, 2022 at 5:05 PM Laurenz Albe wrote: > On Wed, 2022-10-19 at 12:48 +0200, Dominique Devienne wrote: > > On Wed, Oct 19, 2022 at 12:17 PM

Re: How to store "blobs" efficiently for small and large sizes, with random access

2022-10-19 Thread Andreas Joseph Krogh
På onsdag 19. oktober 2022 kl. 13:21:38, skrev Dominique Devienne < ddevie...@gmail.com <mailto:ddevie...@gmail.com>>: On Wed, Oct 19, 2022 at 1:00 PM Andreas Joseph Krogh wrote: > Ok, just something to think about; Thank you. I do appreciate the feedback. > Will your da

Re: How to store "blobs" efficiently for small and large sizes, with random access

2022-10-19 Thread Andreas Joseph Krogh
På onsdag 19. oktober 2022 kl. 12:48:24, skrev Dominique Devienne < ddevie...@gmail.com <mailto:ddevie...@gmail.com>>: On Wed, Oct 19, 2022 at 12:17 PM Andreas Joseph Krogh mailto:andr...@visena.com>> wrote: First advice, don't do it. We started off storing blobs in

Sv: How to store "blobs" efficiently for small and large sizes, with random access

2022-10-19 Thread Andreas Joseph Krogh
ll projects, maybe not... I.e. with real client-case of 3K projects, that puts an average of only 10GB of lo's per-project (i.e. schema), which could very well be problematic... -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Sv: How can I set up Postgres to use given amount of RAM?

2022-06-26 Thread Andreas Joseph Krogh
org/docs/current/runtime-config-query.html#GUC-EFFECTIVE-CACHE-SIZE> -- Andreas Joseph Krogh

Re: Logical replication of large objects

2022-06-09 Thread Andreas Joseph Krogh
På torsdag 09. juni 2022 kl. 20:24:56, skrev Joshua Drake mailto:j...@commandprompt.com>>: Large objects are largely considered a deprecated feature. Though I like the idea, was there any consensus on -hackers? Nobody seems interested in it… -- Andreas Joseph Krogh CTO / P

Logical replication of large objects

2022-06-05 Thread Andreas Joseph Krogh
com#15cbf1c82be9341e551e60e287264380> We'd be willing to help funding development needed to support Large Object logical replication. Anyone interested? -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.

Max sane value for join_collapse_limit?

2022-06-03 Thread Andreas Joseph Krogh
Hi, I have set join_collapse_limit = 12 in production, but I'm thinking about raising it to 16. On modern HW is there a “sane maximum” for this value? I can easily spare 10ms for extra planning per query on our workload, is 16 too high? Thanks. -- Andreas Joseph Krogh CTO / Pa

Will Barman support restore of single database?

2022-01-28 Thread Andreas Joseph Krogh
b-include> for additional information and caveats. Are there any plans to add support for this to Barman? -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Re: Getting json-value as varchar

2022-01-06 Thread Andreas Joseph Krogh
På torsdag 06. januar 2022 kl. 14:42:21, skrev Pavel Stehule < pavel.steh...@gmail.com <mailto:pavel.steh...@gmail.com>>: Hi čt 6. 1. 2022 v 14:33 odesílatel Andreas Joseph Krogh mailto:andr...@visena.com>> napsal: På torsdag 06. januar 2022 kl. 14:29:12, skrev

Re: Getting json-value as varchar

2022-01-06 Thread Andreas Joseph Krogh
ase. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Re: Getting json-value as varchar

2022-01-06 Thread Andreas Joseph Krogh
På torsdag 06. januar 2022 kl. 14:13:40, skrev David G. Johnston < david.g.johns...@gmail.com <mailto:david.g.johns...@gmail.com>>: On Thursday, January 6, 2022, Andreas Joseph Krogh mailto:andr...@visena.com>> wrote: I think you misread my message. What I want is for the

Sv: Recommended storage hardware

2022-01-06 Thread Andreas Joseph Krogh
nes/9300 ...with software RAID10 on Linux and XFS. Works very well! -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Re: Getting json-value as varchar

2022-01-06 Thread Andreas Joseph Krogh
På torsdag 06. januar 2022 kl. 13:31:19, skrev Thomas Markus < t.mar...@proventis.net <mailto:t.mar...@proventis.net>>: Hi, Am 06.01.22 um 13:28 schrieb Andreas Joseph Krogh: Hi, in PG-14 this query returns "value" (with double-quotes): SELECT ('{&

Getting json-value as varchar

2022-01-06 Thread Andreas Joseph Krogh
SELECT ('{"key":"value"}'::jsonb)->> 'key'; ┌──┐ │ ?column? │ ├──┤ │ value │ └──┘ (1 row) How to I use the subscript syntax and get the result as varchar instead of JSONB, assuming Iknow the JSON-field is a Stri

Re: Best Strategy for Large Number of Images

2021-12-20 Thread Andreas Joseph Krogh
folder, size, filenames etc.) in DB. It has excellent HA and backup mechanisms. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Re: Detecting repeated phrase in a string

2021-12-09 Thread Andreas Joseph Krogh
but just one word. Do you want repeated phrase (list of words) ore repeated words? For repeated words (including unicode-chars) you can do: (\b\p{L}+\b)(?:\s+\1)+ I'm not quite sure how to translate this to PG, but in JAVA it works. -- Andreas Joseph Krogh CTO / Partner - Visena AS

Re: Regex for Word space Word space Word ....

2021-11-23 Thread Andreas Joseph Krogh
e unicode-characters, which [A-Z] approach doesn't handle well. How about: select regexp_matches('Åge is a Man', E'[[:upper:]]\\w+', 'g'); -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:an

Re: Incremental backup

2021-10-28 Thread Andreas Joseph Krogh
plement. Repeating "other databases have it" doesn't change that. -- Andreas Joseph Krogh

Re: PostgreSQL - Ordering Table based of Foreign Key

2021-10-03 Thread Andreas Joseph Krogh
ETEs will be cascaded. Unfortunately, there is no DELETE FROM ... CASCADE option (similar to DROP) There is TRUNCATE ... CASCADE https://www.postgresql.org/docs/14/sql-truncate.html -- Andreas Joseph Krogh

Re: array_cat in PG-14 changed signature breaks my custom aggregate

2021-05-24 Thread Andreas Joseph Krogh
75bd17add66 Ok, thanks. -- Andreas Joseph Krogh

array_cat in PG-14 changed signature breaks my custom aggregate

2021-05-24 Thread Andreas Joseph Krogh
anycompatiblearray, but that doesn't really tell me anything. Do I have to change the signature of my aggregate to take anycompatiblearray as argument? -- Andreas Joseph Krogh

RE: How to keep format of views source code as entered?

2021-01-08 Thread Andreas Joseph Krogh
s on purpose. PG doesn't store queries you feed it either, nor any other command. It stores the resulting structure. SQL-scripts, containing DDL/DML should be versioned using scm like Git, not rely on the DB to store it. -- Andreas Joseph Krogh

Re: How to specify that a trigger should fire when column is NOT in SET-clause?

2020-12-25 Thread Andreas Joseph Krogh
På fredag 25. desember 2020 kl. 17:48:39, skrev Adrian Klaver < adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com>>: On 12/25/20 5:52 AM, Andreas Joseph Krogh wrote: > Hi. > I need to set a value in a trigger if a column is explicitly NOT > specified in UPDATE&

How to specify that a trigger should fire when column is NOT in SET-clause?

2020-12-25 Thread Andreas Joseph Krogh
TE PROCEDURE do_stuff(); I want the trigger to be fired when the column "modified" is NOT specified, is it possible? Or - is it possible to check for this in the trigger-function? -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:a

Re: Hot backup in PostgreSQL

2020-10-22 Thread Andreas Joseph Krogh
s user 92m4,833s sys 2m18,565s Here are the sizes of all: 7,4G pg_backup (directory with -Fd) 32G visena.dmp 5,8G visena.dmp.bz2 -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

RUM and WAL-generation

2020-10-21 Thread Andreas Joseph Krogh
actually run out of WAL-space in production because of this. I see this TODO-entry in RUM: * Improve GENERIC WAL to support shift (PostgreSQL core changes). What is the status on this? -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com

Sv: PostgreSQL transaction aborted on SQL error

2020-08-04 Thread Andreas Joseph Krogh
xecute further statements. The java.sql.Connection is "invalid" after an SQLException and should be rolled back. -- Andreas Joseph Krogh

Re: Postgresql HA Cluster

2020-06-29 Thread Andreas Joseph Krogh
but be warned that it would require non-trivial > changes to your application. not really with BDR3 ;-) Well, BDR, last time I checked, still doesn't support exclusion-constraints, so it's not a drop-in replacement. -- Andreas Joseph Krogh

Sv: autovacuum failing on pg_largeobject and disk usage of the pg_largeobject growing unchecked

2020-06-16 Thread Andreas Joseph Krogh
om a few hundred milliseconds to 5-10 minutes, after which it is deleted. [...] In my experience vacuumlo, https://www.postgresql.org/docs/12/vacuumlo.html <https://www.postgresql.org/docs/12/vacuumlo.html>, is needed to remove large objects, before vacuum can remove them from pg_largeobject.

Re: Oracle vs. PostgreSQL - a comment

2020-06-03 Thread Andreas Joseph Krogh
nient matter, which other RDBMS-vendors seem to provide. I love PG, have been using it professionally since 6.5, and our company depends on it, but there are things other RDBMS-vendors do better... -- Andreas Joseph Krogh

Re: Oracle vs. PostgreSQL - a comment

2020-06-03 Thread Andreas Joseph Krogh
gree this would be a huge step in the right direction for pg-DBAs. I have absolutely no clue about how much work is required etc., but I think it's kind of strange that no companies have invested in making this happen. -- Andreas Joseph Krogh

Re: Order by lower(column-alias) doesn't work...

2020-05-28 Thread Andreas Joseph Krogh
På torsdag 28. mai 2020 kl. 15:26:42, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Andreas Joseph Krogh writes: > Is there a way to define "sorting-rules" on custom-types so that I can have > ORDER BY and PG will pick my custom odering? You'd have to write your

Re: Order by lower(column-alias) doesn't work...

2020-05-28 Thread Andreas Joseph Krogh
På torsdag 28. mai 2020 kl. 14:50:54, skrev Geoff Winkless mailto:pgsqlad...@geoff.dj>>: On Thu, 28 May 2020 at 13:14, Andreas Joseph Krogh wrote: > This works: > select p.firstname, p.lastname, p.firstname || p.lastname as fullname from onp_crm_person p order by fullname; &

Order by lower(column-alias) doesn't work...

2020-05-28 Thread Andreas Joseph Krogh
ay" does not exist What bigintvarchar_to_text_value_flatten() does is to take the "varchar"-part out of the BigintVarchar-type and "flatten" the array by that value so that it sorts nicely. Any way round this? -- Andreas Joseph Krogh

Sv: Practical usage of large objects.

2020-05-14 Thread Andreas Joseph Krogh
e[]. With LOs and java.sql.Blob (which the standard pgjdbc-dirver doesn't support ,but pgjdbc-ngdoes) it acutally uses strams and memory is kept down to a minimum. -- Andreas Joseph Krogh

Sv: Triggers and Full Text Search *

2020-04-21 Thread Andreas Joseph Krogh
this, then there’s no point and we can wrap this up. But if not, I will happily post what I have. Thank you. This is too much prose for the regular programmer, show us the code, and point out what doesn't work for you, then we can help:-) -- Andreas Joseph Krogh

Sv: Replacing Apache Solr with Postgre Full Text Search?

2020-03-26 Thread Andreas Joseph Krogh
ot rum) for the exact same reasons as Evergreen (it seems). We have to mix FTS with domain-specific logic/filtering and that is based on relational data in the database. I don't see how we could have done that using an external search-engine. Maybe it's easy, I don't have any expe

Re: How to transfer databases form one server to other

2020-01-26 Thread Andreas Joseph Krogh
for you? Did you dump to "directory format" first, then restore? If so, then that requires quite a bit of temp-space... -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Sv: Why are clobs always "0"

2019-12-01 Thread Andreas Joseph Krogh
.com/impossibl/pgjdbc-ng <https://github.com/impossibl/pgjdbc-ng> We use it with Blobs/Clobs and it's working good. It would help us help you if you mention which IDEs you have tried, and provide configuration-paramteres, error-messages etc. -- Andreas Joseph Krogh CTO / Partne

Sv: DELETE Query Hang

2019-11-12 Thread Andreas Joseph Krogh
row_count; raise notice 'deleted % rows', num_rows; exit when num_rows = 0; end loop; end;$_$; -- Andreas Joseph Krogh

Re: Create a logical and physical replication

2019-11-05 Thread Andreas Joseph Krogh
qv3gesl32%40alap3.anarazel.de <https://www.postgresql.org/message-id/flat/20181212204154.nsxf3gzqv3gesl32%40alap3.anarazel.de> -- Andreas Joseph Krogh

Re: Having more than one constraint trigger on a table

2019-10-24 Thread Andreas Joseph Krogh
På torsdag 24. oktober 2019 kl. 16:59:42, skrev Adrian Klaver < adrian.kla...@aklaver.com <mailto:adrian.kla...@aklaver.com>>: On 10/22/19 8:26 AM, Andreas Joseph Krogh wrote: > På tirsdag 22. oktober 2019 kl. 17:12:59, skrev Adrian Klaver > mailto:adrian.kla...@aklaver.

Re: Having more than one constraint trigger on a table

2019-10-22 Thread Andreas Joseph Krogh
; It might be easier to understand if sketch out a schematic version of what you are trying to achieve. The point is; I want to functions to be called - update_company_fts_tf() - company_parent_no_cycle() , each only once, as constraint-triggers on the same table. So they are called by the "level 1 triggers" which must fire first. Is it clearer now what I'm trying to achieve? -- Andreas Joseph Krogh

Having more than one constraint trigger on a table

2019-10-22 Thread Andreas Joseph Krogh
rrectly? 2. If I need a 3rd "logical trigger", is it enough to add another trigger named accordingly, for instance "trigger_1_someotherstuff", and add it's column to the "UPDATE OF"-list of "trigger_2" (it it uses a column not already listed there)? 3. Is there some easier way to do this? Is it clear what I'm asking about? :-) Thanks. -- Andreas Joseph Krogh

Sv: Postgres Point in time Recovery (PITR),

2019-10-18 Thread Andreas Joseph Krogh
y restore them in order to start the recovered PostgreSQL instance: postgresql.conf pg_hba.conf pg_ident.conf Recovery completed (start time: 2018-12-06 13:14:53.220043, elapsed time: 4 hours, 52 minutes, 47 seconds) Your PostgreSQL server has been successfully prepared for recovery! =

Sv: drop database

2019-10-17 Thread Andreas Joseph Krogh
-- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Sv: drop database

2019-10-17 Thread Andreas Joseph Krogh
BASE Time: 280,355 ms -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Sv: Conflict between autovacuum and backup restoration

2019-10-17 Thread Andreas Joseph Krogh
m"-messages when restoring a database, just ignore them. If it bothers you, just turn autovacuum off by setting this in postgresql.conf: autovacuum = off and reload the config (SIGHUP) -- Andreas Joseph Krogh

Re: Segmentation fault with PG-12

2019-10-12 Thread Andreas Joseph Krogh
a Andreas sent off-list) on the predecessor of > that commit, but on that commit it's fine. Cool, and thanks for checking. No crashes in production after deploying the fix. -- Andreas Joseph Krogh

Re: Segmentation fault with PG-12

2019-10-10 Thread Andreas Joseph Krogh
tch if you're in a position to build from source ... regards, tom lane Yes, we've built a new .deb-package from f224c7c11ea7be2751e3342e11317070ffb5622d in REL_12_STABLE which we'll deploy tonight. Thanks! -- Andreas Joseph Krogh

Re: Segmentation fault with PG-12

2019-10-10 Thread Andreas Joseph Krogh
We had another crash today, and it appears to be the same: #0 slot_deform_heap_tuple (natts=26, offp=0x5598eba0b968, tuple=, slot=0x5598eba0b920) at ./build/../src/backend/executor/execTuples.c:895 -- Andreas Joseph Krogh

Re: Segmentation fault with PG-12

2019-10-10 Thread Andreas Joseph Krogh
På torsdag 10. oktober 2019 kl. 07:25:26, skrev Andres Freund < and...@anarazel.de <mailto:and...@anarazel.de>>: On 2019-10-09 10:16:37 -0400, Tom Lane wrote: > Andreas Joseph Krogh writes: > > Attached is output from "bt full". Is this helpful? > &g

Re: Segmentation fault with PG-12

2019-10-09 Thread Andreas Joseph Krogh
På onsdag 09. oktober 2019 kl. 16:16:37, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Andreas Joseph Krogh writes: > Attached is output from "bt full". Is this helpful? Well, it shows that the failure is occurring while trying to evaluate a variable in a trigger's WHE

Re: Segmentation fault with PG-12

2019-10-09 Thread Andreas Joseph Krogh
På tirsdag 08. oktober 2019 kl. 17:24:21, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Andreas Joseph Krogh writes: > Will running a debug-enabled build slow things noticably down? gcc promises that the generated code is the same with or without debug. I think clang does too. W

Re: Segmentation fault with PG-12

2019-10-08 Thread Andreas Joseph Krogh
På tirsdag 08. oktober 2019 kl. 17:24:21, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Andreas Joseph Krogh writes: > Will running a debug-enabled build slow things noticably down? gcc promises that the generated code is the same with or without debug. I think clang does too. W

Segmentation fault with PG-12

2019-10-08 Thread Andreas Joseph Krogh
-10-08 15:45:29.654 CEST [8829-78] LOG: terminating any other active server processes Will running a debug-enabled build slow things noticably down? Is there a way to make it dump a stack-trace (or back-trace in C-land?) on sig11? -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909

Logical replicatino from standby

2019-09-26 Thread Andreas Joseph Krogh
to do logical replication from standby like I'm looking for in this thread: https://www.postgresql.org/message-id/VisenaEmail.15.9f118cec79ac2589.1621cfd8405%40tc7-visena <https://www.postgresql.org/message-id/VisenaEmail.15.9f118cec79ac2589.1621cfd8405%40tc7-visena> ? Thanks. -- Andreas

Re: lc_numeric and negative-prefix

2019-09-25 Thread Andreas Joseph Krogh
På torsdag 26. september 2019 kl. 00:53:28, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Andreas Joseph Krogh writes: > Can anybody shed som light > on when negative-prefix is supposed to be respected by PG's > formatting-functions? In lc_numeric='nb_NO.UTF-8'

lc_numeric and negative-prefix

2019-09-25 Thread Andreas Joseph Krogh
8' negative-prefix is '−'(8722), not '-'(45), at least in the JAVA-world, but it seems the JDBC-driver must use lc_numeric='C' when parsing server output. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto

Re: Installed PostgreSQL-11 in Ubuntu 18.04.02 Server Edition: No existing local cluster is suitable as a default target

2019-09-18 Thread Andreas Joseph Krogh
ot;logfile" in your command) in CWD (/home/macro). Specify absolute path to somewhere writable for user "postgres". -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Re: Installed PostgreSQL-11 in Ubuntu 18.04.02 Server Edition: No existing local cluster is suitable as a default target

2019-09-18 Thread Andreas Joseph Krogh
e start waiting for server to start/bin/sh: 1: cannot create logfile: Permission denied stopped waiting pg_ctl: could not start server Examine the log output. postgres@pc:/home/marco$ Start pg_ctl as postgres user, no need to sudo. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47

Re: PostgreSQL License

2019-09-17 Thread Andreas Joseph Krogh
På onsdag 18. september 2019 kl. 01:07:41, skrev Rob Sargent < robjsarg...@gmail.com <mailto:robjsarg...@gmail.com>>: On Sep 17, 2019, at 4:18 PM, Andreas Joseph Krogh mailto:andr...@visena.com>> wrote: På tirsdag 17. september 2019 kl. 22:55:02, skrev Peter J. Holzer

Re: PostgreSQL License

2019-09-17 Thread Andreas Joseph Krogh
#x27;t say that you can't charge a fee for distributing (although why anybody would pay you for something they can download themselves for free I don't know). hp A rule of thumb is - you can do anything you want with it (the PG software inc. its source), except claim you wrote it, as lon

Re: pg full text search very slow for Chinese characters

2019-09-10 Thread Andreas Joseph Krogh
rather than an inherent Postgres issue. regards, tom lane We experienced quite awful performance when we hosted the DB on virtual servers (~5 years ago) and it turned out we hit the write-cache limit (then 8GB), which resulted in ~1MB/s IO thruput. Running iozone might help tracing down IO-problems. -- Andreas Joseph Krogh

RE: Primary Key Update issue ?

2019-09-06 Thread Andreas Joseph Krogh
ere a single statement until I saw the Compatibility Remark in documentation :Also, PostgreSQL checks non-deferrable uniqueness constraints immediately, not at end of statement as the standard would suggest. FWIW - PostgreSQL behaves like Oracle in this regard. -- Andreas Joseph Krogh CTO / Part

Sv: Primary Key Update issue ?

2019-09-06 Thread Andreas Joseph Krogh
al]:5432 11.5 test=# INSERT INTO Test( pKey, Val ) VALUES ( 2, 2 ); INSERT 0 1 andreak@[local]:5432 11.5 test=# UPDATE Test SET pKey = pKey + 1; UPDATE 2 -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena

Re: Uninstall postgres

2019-09-05 Thread Andreas Joseph Krogh
På torsdag 05. september 2019 kl. 11:01:25, skrev Sonam Sharma < sonams1...@gmail.com <mailto:sonams1...@gmail.com>>: It's saying gmake *** No rule to make Target uninstall. On Thu, Sep 5, 2019, 2:27 PM Andreas Joseph Krogh mailto:andr...@visena.com>> wrote: På torsdag 05.

Sv: Uninstall postgres

2019-09-05 Thread Andreas Joseph Krogh
the postgres now. The installation was done as postgres user. make uninstall -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com <mailto:andr...@visena.com> www.visena.com <https://www.visena.com> <https://www.visena.com>

Sv: Two Postgres master process are showing - one is on and off

2019-08-20 Thread Andreas Joseph Krogh
n logs. [...] postgres 33438 1 0 12:41 ? 00:00:03 /u01/postgres/9.5/bin/postgres -D /u02/pgdata01/9.5/data [...] postgres 110181 33438 0 15:30 ? 00:00:00 /u01/postgres/9.5/bin/postgres -D /u02/pgdata01/9.5/data Strange, the second is a child of the first... -- Andreas Joseph Krogh

Sv: RE: Transactions

2019-04-09 Thread Andreas Joseph Krogh
turn off logging again by setting it to 'none' and reload settings (no need to restart). You can also only log modifications by setting log_statement = 'mod' Also watch out for triggers modifying stuff. -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 9

  1   2   >