Re: can stored procedures with computational sql queries improve API performance?

2024-07-10 Thread Peter J. Holzer
significant amount of data which is only needed for constructing further queries but doesn't enter the final report. In this case keeping it in the database might be quite a bit faster than transferring it back and forth between the database and the client. OTOH, temporary tables or CTEs might be

Re: [EXTERNAL] Re: SSPI Feature Request

2024-07-10 Thread Peter J. Holzer
On 2024-07-10 07:27:29 -0700, Ian Harding wrote: > > > On Wed, Jul 10, 2024 at 7:10 AM Peter J. Holzer wrote: > > On 2024-07-09 03:35:33 +, Buoro, John wrote: > > I've dusted off my C books and coded a solution. > [...] > > When using SSP

Re: Dropping column from big table

2024-07-13 Thread Peter J. Holzer
the (former) content of dropped columns, maybe CLUSTER does, too? 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: Dropping column from big table

2024-07-15 Thread Peter J. Holzer
On 2024-07-15 13:53:25 +0200, Laurenz Albe wrote: > On Sun, 2024-07-14 at 00:05 +0200, Peter J. Holzer wrote: > > On 2024-07-11 10:06:47 +0200, Laurenz Albe wrote: > > > Dropping a column is fast, but doesn't reclaim the space. > > > VACUUM won't block

Re: How does this FK constraint error happen?

2024-07-15 Thread Peter J. Holzer
rel_group_user". > ERROR: deleting FISPTAPPGS401DA/TAPd.public.access_user > [snip] Is it possible that some other process created an entry in rel_group_user between these two queries? hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_

Re: Dropping column from big table

2024-07-15 Thread Peter J. Holzer
On 2024-07-16 02:00:27 +0530, sud wrote: > > On Mon, Jul 15, 2024 at 7:58 PM Peter J. Holzer wrote: > > Hm, true. > > > > You can always do > > > >   UPDATE tab SET id = id; > > > > followed by > > >

Re: Windows installation problem at post-install step

2024-08-06 Thread Peter J. Holzer
Program Files\PostgreSQL\15\data" > --locale > "Turkish,Türkiye" -W > XXX debug raw: getopt optarg  = "Turkish,Türkiye" > XXX debug hex: getopt optarg  = { 54 75 72 6b 69 73 68 2c 54 fc 72 6b 69 > 79 > 65 } > XXX debug txt: getopt

Re: Column type modification in big tables

2024-08-13 Thread Peter J. Holzer
need to be postgres or root to do this. Be careful! Watching the access times may be useful, too, but on Linux by default the access time is only updated under some special circumstances, so this may be misleading. hp -- _ | Peter J. Holzer| S

Re: How to validate restore of backup?

2024-08-22 Thread Peter J. Holzer
backup of a database to a > NEW server.   > > Is there a way to ensure the data integrity is in tact, and user ID and > access works liked how it was in the old server? And of course your method doesn't check at all whether "user ID and access works liked how i

Re: How to validate restore of backup?

2024-08-23 Thread Peter J. Holzer
On 2024-08-23 08:13:40 +0200, Peter J. Holzer wrote: > On 2024-08-22 16:09:47 +0500, Muhammad Usman Khan wrote: > > For validation of databases, you can use the following approach > > > > /usr/pgsql-16/bin/pg_dump -d postgres -h localhost -p 5428 | md5sum > > &g

Upgrade Ubuntu 22 -> 24 may break PostgreSQL

2024-08-31 Thread Peter J. Holzer
make sure you have a backup before the upgrade. 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: Upgrade Ubuntu 22 -> 24 may break PostgreSQL

2024-08-31 Thread Peter J. Holzer
On 2024-08-31 10:35:01 -0700, Adrian Klaver wrote: > On 8/31/24 09:54, Peter J. Holzer wrote: > > 'Tis the season again. > > > > Ubuntu 24.04.1 has just been released, so many Ubuntu LTS users will now > > be prompted to upgrade from 22.04 to 24.04. > > Wh

Please remove p...@mipta.com from the List

2024-09-04 Thread Peter L Martin
Please remove p...@mipta.com from the List Thank you Peter L Martin MIPTA ABN 74 843 345 087 p...@mipta.com <mailto:p...@mipta.com> Mobile Au: +61 (0)437 414 689 Todays problems will not be solved, if we think the same, as when we created them! - Albert Einstein Information i

Remove from distribution list

2024-09-04 Thread Peter L Martin
Please remove p...@mipta.com from the distribution list thank you Peter L Martin MIPTA ABN 74 843 345 087 p...@mipta.com <mailto:p...@mipta.com> Mobile Au: +61 (0)437 414 689 Todays problems will not be solved, if we think the same, as when we created them! - Albert Ei

Re: Faster data load

2024-09-08 Thread Peter J. Holzer
T was more than twice as fast as 8 parallel COPY operations (and about 8 times as fast as a single COPY). Details will have changed since then (I should rerun that benchmark on a current system), but I'd be surprised if COPY became that much faster relative to INSERT ... SELECT. hp -- _ |

Re: Database schema for "custom fields"

2024-09-10 Thread Peter J. Holzer
now and would probably lean more to your option 1 (let the application add columns to an "extension table"). 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: Manual query vs trigger during data load

2024-09-14 Thread Peter J. Holzer
as ( select substB from cfgB where keyB = :param4 ) insert into target(val1, val2, val3, val4) select :param1, cA.substA, :param3, cB.substB from cA, cB However, I agree with Rob here. It's probably better to do the substitution in Java. hp -- _ | Peter J. Holzer

Re: update faster way

2024-09-14 Thread Peter J. Holzer
ave any method exists > in > postgres (say like forall statement in Oracle) which will do the batch dml. > Can > you please guide me here, how we can do it in postgres. Postgres offers several server side languages. As an Oracle admin you will probably find

Re: Manual query vs trigger during data load

2024-09-15 Thread Peter J. Holzer
On 2024-09-14 21:21:45 +0530, yudhi s wrote: > On Sat, Sep 14, 2024 at 4:17 PM Peter J. Holzer wrote: > On 2024-09-14 00:54:49 +0530, yudhi s wrote: > > As "thiemo" mentioned , it can be done as below method, but if > > we have multiple lookup tables

Re: update faster way

2024-09-15 Thread Peter J. Holzer
On 2024-09-14 20:26:32 +0530, yudhi s wrote: > > > On Sat, Sep 14, 2024 at 4:55 PM Peter J. Holzer wrote: > > > Which in turn means that you want as little overhead as possible per > batch which means finding those 5000 rows should be quick. Which brings &g

Re: Postgres Analog of Oracle APPEND hint

2021-03-05 Thread Peter J. Holzer
s. If you are doing "complicated joins on source tables" that's probably where the bottleneck will be, so you shouldn't worry about the insert speed unless (or until) you notice that the bottleneck is writing the data, not reading it. hp -- _ | Peter J. Holzer

Re: = t1 - t0 but t0 + i <> t1 when t1 and t2 timestamptz values and i is an interval value

2021-04-03 Thread Peter J. Holzer
time”. > > Which are for practical purposes one and the same, otherwise we would not > have leap seconds as a method of syncing the two. I disagree. We have leap seconds exactly because they are not the same. Atomic clock time just counts at at a constant rate - it doesn't care about t

Re: Upgrading from 11 to 13

2021-04-03 Thread Peter J. Holzer
On 2021-04-01 21:56:17 -0400, Bruce Momjian wrote: > On Thu, Apr 1, 2021 at 09:55:28PM -0400, Bruce Momjian wrote: > > Here it is with descriptions: > > Sorry, please ignore. Too late. Now we all know the code names for previous PostgreSQL releases. hp -- _ |

Re: Using indexes through a plpgsql procedure

2021-04-07 Thread Peter J. Holzer
can get away by renaming the old and new table: begin; create table ep_new(...); -- populate ep_new here drop table if exists ep_old; alter table ep rename to ep_old; alter table ep_new rename to ep; commit; Partitioning should also work but that feels like a hack. hp

Re: PostgreSQL log query's result size

2021-04-07 Thread Peter J. Holzer
finding queries which returned 0 rows than those that returned many rows. And for "size of the result data" I think the number of rows would generally be more useful than the size in bytes. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: Primary keys and composite unique keys(basic question)

2021-04-08 Thread Peter J. Holzer
). With PostgreSQL I've stopped doing this since the SERIAL type makes it much more convenient to have a separate sequence per table. But of course that means that almost any table will have a row with id 10785 and one with 10875. hp -- _ | Peter J. Holzer| Story must ma

Re: archive_commnad parameter question

2021-04-19 Thread Peter J. Holzer
f" in particular tests whether the argument exists and is a regular file) and the "!" inverts the result. So the whole line checks that the target *doesn't* already exist before attempting to copy over it. hp -- _ | Peter J. Holzer| Story must m

Re: BRIN index on timestamptz

2021-04-26 Thread Peter J. Holzer
your table contains say records from the last year and records are normally only updated after one or two days after being created that would probably still work quite well. If there is a substantial number of records which is still updated after a year, it probably won't work at all.

Re: Invalid byte sequence when importing Oracle BLOB

2021-04-26 Thread Peter J. Holzer
tgresql bytea column. > > Seven times out of about 60M rows, I get this error: > Psql:909242: ERROR:  invalid byte sequence for encoding "UTF8": 0xed 0xaf 0xbf Decoding UTF8 doesn't make sense for a bytea column. How does that data look like in the file generated by ora2

Re: Invalid byte sequence when importing Oracle BLOB

2021-04-26 Thread Peter J. Holzer
On 2021-04-26 07:45:26 -0500, Ron wrote: > On 4/26/21 7:32 AM, Peter J. Holzer wrote: > > On 2021-04-26 06:49:18 -0500, Ron wrote: > > > The destination is an (RDS) Postgresql 12.5 with encoding UTF8, and is > > > being > > > loaded through COPY commands g

Re: PostgreSQL, Asynchronous I/O, Buffered I/O and why did fsync-gate not affect Oracle or MySQL?

2021-05-02 Thread Peter J. Holzer
all four combinations (buffered synchronous, buffered asynchronous, direct synchronous, direct asynchronous) are possible, but some OS's may not implement all of them. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: Is this the future of I/O for the RDBMS?

2021-05-02 Thread Peter J. Holzer
may be worthwhile even if only a few systems (Linux systems where the DBA is willing to set up devices for direct access from user space) benefit from it. If it means rewriting large parts of postgres and then some platforms cannot be supported at all or only at reduced performance, this is not a

Re: idle_in_transaction_session_timeout

2021-05-08 Thread Peter J. Holzer
On 2021-05-08 15:58:27 +0530, Atul Kumar wrote: > ok, But what is the workaround of this parameter in postgres 9.5, ,I > need to increase the time of "idle in transaction" transactions. What makes you think that there is an "idle in transaction" timeout in 9.5?

Re: Question about integer out of range in function

2021-05-21 Thread Peter J. Holzer
_time have been assigned to yet, the in-memory result of the > computation > is only allocated integer bits and if you overflow that you get an error. This is also true in C, btw, except that in C an overflow of a signed int is undefined behaviour while an unsigned int is required to wrap aroun

Re: The contents of the pg_timezone_names view bring some surprises

2021-05-22 Thread Peter J. Holzer
time zone "CET" probably reflects what most countries in that zone do, so it is currently also in DST. Same for Eastern European Time. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at

Re: The contents of the pg_timezone_names view bring some surprises

2021-05-22 Thread Peter J. Holzer
rent time zones may use the same abbreviation. But that isn't what the paragraph is about. > What it is saying that, for example, the timezone America/Los_Angeles has > two timezone abbreviations PDT(what I'm currently in) and PST. If you use an > ab

Re: Fwd: Proposed Chinese Translation of Community Code of Conduct

2021-05-22 Thread Peter J. Holzer
oesn't show 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: The contents of the pg_timezone_names view bring some surprises

2021-05-22 Thread Peter J. Holzer
On 2021-05-22 12:09:23 +0200, Peter J. Holzer wrote: > On 2021-05-19 06:57:13 -0700, Adrian Klaver wrote: > > On 5/18/21 11:31 PM, Bryn Llewellyn wrote: > > > This seems to be at odds with what section “8.5.3. Time Zones” at > > > > > > https://www.

Re: pgbackrest - hiding the encryption password

2021-05-22 Thread Peter J. Holzer
On 2021-05-19 12:49:42 -0500, Ron wrote: > Currently on our RHEL 7.8 system, /etc/pgbackrest.conf is root:root and 633 > perms. Did you mean 644? 633 would be very strange permissions (write and execute but not read for group and others). hp -- _ | Peter J. Holzer| Stor

Re: The contents of the pg_timezone_names view bring some surprises

2021-05-22 Thread Peter J. Holzer
On 2021-05-22 08:26:27 -0700, Adrian Klaver wrote: > On 5/22/21 3:09 AM, Peter J. Holzer wrote: > > On 2021-05-19 06:57:13 -0700, Adrian Klaver wrote: > > > On 5/18/21 11:31 PM, Bryn Llewellyn wrote: > > > > This claims (as I read it) that a time zone abbreviation

Re: The contents of the pg_timezone_names view bring some surprises

2021-05-24 Thread Peter J. Holzer
case you now have a wrong timestamp in your database which you may or may not be able to catch via other QA measures. 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: index unique

2021-06-06 Thread Peter J. Holzer
doesn work: I find that if a natural primary key candidate is so complex, it is usually better to use a surrogate key. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "

Re: index unique

2021-06-07 Thread Peter J. Holzer
On 2021-06-07 10:20:22 -0700, David G. Johnston wrote: > On Sun, Jun 6, 2021 at 11:55 PM Peter J. Holzer wrote: > On 2021-06-03 22:51:55 +0200, Marc Millas wrote: > > postgres 12 with postgis. > > on a table we need a primary key and to get a unique combinaison, we

Re: index unique

2021-06-08 Thread Peter J. Holzer
2720 exceeds maximum 2712 for index "t_pkey1" HINT: Values larger than 1/3 of a buffer page cannot be indexed. Consider a function index of an MD5 hash of the value, or use full text indexing. Time: 58.751 ms Note the difference between the length of the string I was trying to ins

Re: How to pass a parameter in a query to postgreSQL 12

2021-06-10 Thread Peter J. Holzer
ly that it supports the parameter binding of the Python PostgreSQL library in use (most likely psycopg2). That would be %s for unnamed parameters and %(name)s for named parameters. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: bottom / top posting

2021-06-10 Thread Peter J. Holzer
of my time (but if somebody else pays ...) and it is inefficient, as it is very easy to overlook relevant details in that ever-growing mess. I never understood why so many people hated e-mail as a communication medium. Now I do. hp -- _ | Peter J. Holzer| Story must m

Re: bottom / top posting

2021-06-10 Thread Peter J. Holzer
RSE! In business you need the CYA of having the entire discussion > archived, You can archive more than one e-mail per thread, you know :-) hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- C

Re: index unique

2021-06-12 Thread Peter J. Holzer
hat index will be used, and it will be used every time you update, insert, or delete a row - by the logical replication system which has to identify the affected row(s) on the secondary system. hp -- _ | Peter J. Holzer| Story must make more sense tha

Re: Notify When Streaming Replication Failover Occurred (slave promoted to master).

2021-06-13 Thread Peter J. Holzer
ny other action. 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: Notify When Streaming Replication Failover Occurred (slave promoted to master).

2021-06-16 Thread Peter J. Holzer
periodically, AFAIK. 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: clear cache in postgresql

2021-06-16 Thread Peter J. Holzer
f a given operation takes 2 seconds 95 % of the time but 30 seconds 5 % of the time that makes for a poor user experience, expecially if its seemingly at random (because it depends on what other users have done recently). So you may want to investigate those cases, too. hp -- _ |

Re: How to hash a large amount of data within Postgres?

2021-06-23 Thread Peter J. Holzer
oose a convenient chunk size (a few MB is probably ok), read the large object in chunks of this size, computing the hash for each. Concatenate all the hashes and compute the hash of that. Add intermediate levels if the the concatenated hashes are still too large to fit in memory. hp --

Re: Psql wants to use IP6 when connecting to self using tcp...

2021-06-23 Thread Peter J. Holzer
IPv6 address (and then add that to pg_hba.conf). If the address isn't in DNS, check your /etc/hosts. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative wri

Re: Psql wants to use IP6 when connecting to self using tcp...

2021-06-24 Thread Peter J. Holzer
name mymachines (wrapped for readability) So glibc first looks in /etc/hosts, then does an MDNS (Avahi) lookup, then asks systemd-resolved, and only then gets around to do a traditional DNS lookup. (And systemd-resolved does do some magic for the local hostname, so that might indeed

Re: Obsolete or dead serverconnections after reboot

2021-08-03 Thread Peter J. Holzer
quot; is a lie. If this is activated, the system isn't shut down, it just hibernates. So the reason you are seeing connections from "before the shutdown" is that there never really was a shutdown. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: pg_restore (fromuser -> touser)

2021-08-03 Thread Peter J. Holzer
also replace e.g. " schema_a5" with " schema_b.". This is easily fixed (just add a backslash), but more importantly, it will replace that string everywhere, regardless of context. This might lead to syntax errors or data corruption. hp --

Re: use fopen unknown resource

2021-08-28 Thread Peter J. Holzer
t I'm going to say it is filename as described > here: The use of PHP suggests that this is a web application. So most likely the user is supposed to upload the file via an HTML form. I would suggest to the OP to learn how to process file uploads in PHP. Once they've figured that out

Re: Can't locate Ora2Pg.pm while executing export_schema.sh

2021-08-31 Thread Peter J. Holzer
hat's a pretty good indication that either the module wasn't installed properly in the first place or that something changed which makes a reinstall highly advisable (e.g. a perl upgrade). hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: update non-indexed value is slow if some non-related index/fk are enabled

2021-09-09 Thread Peter J. Holzer
pros and cons to both approaches. Personally, I had less problems with PostgreSQL's approach than with Oracle's. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creati

Re: The tragedy of SQL

2021-09-14 Thread Peter J. Holzer
s semantics that people struggle with. hp PS: COBOL is still in use. -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: The tragedy of SQL

2021-09-14 Thread Peter J. Holzer
On 2021-09-14 16:51:39 -0400, Mladen Gogala wrote: > As software engineers, we are very much opposed to poetry, especially > those among us using Perl. When I learned Perl, Perl poetry was a real thing! hp -- _ | Peter J. Holzer| Story must make more sense than r

Re: Azure Postgresql High connection establishment time

2021-09-20 Thread Peter J. Holzer
stance take over hundred milliseconds, so I wouldn't be surprised if that was the culprit. hp PS: a local connection (ident) takes about 3.5 ms on my (not very fast) laptop. -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@h

Re: Re: Timestamp with vs without time zone.

2021-09-21 Thread Peter J. Holzer
So for a date in e.g. 2025 we simply don't know what the timezone offset will be. 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: Re: Timestamp with vs without time zone.

2021-09-21 Thread Peter J. Holzer
mezone" is - how do I put this? - more than just weird. "timestamp without timezone" should be called "local timestamp with unspecified timezone" and "timestamp with timezone" should be called "global timestamp without timezone". However, those aren'

Re: Re: Timestamp with vs without time zone.

2021-09-21 Thread Peter J. Holzer
On 2021-09-21 13:34:21 -0400, Dave Cramer wrote: > On Tue, 21 Sept 2021 at 13:20, Peter J. Holzer wrote: > On 2021-09-21 20:50:44 +1200, Tim Uckun wrote: > > It's just that the phrase "timestamp with time zone" would seem to > > indicate the time

Re: Re: Timestamp with vs without time zone.

2021-09-21 Thread Peter J. Holzer
On 2021-09-21 13:43:46 -0400, Dave Cramer wrote: > > > On Tue, 21 Sept 2021 at 13:40, Peter J. Holzer wrote: > > On 2021-09-21 13:34:21 -0400, Dave Cramer wrote: > > On Tue, 21 Sept 2021 at 13:20, Peter J. Holzer wrote: > >     On 2021-09-21 20:5

Re: Timestamp with vs without time zone.

2021-09-21 Thread Peter J. Holzer
2021, 4:15 am, America/Chicago Now it's a single time, equivalent to 2021-03-01T10:15:00Z. However, if you don't have to store the timezone if you have some other way to unambiguously specify the time, e.g. by always using UTC or by storing seconds since an epoch. hp --

Re: Timestamp with vs without time zone.

2021-09-21 Thread Peter J. Holzer
On 2021-09-21 12:37:49 -0700, Adrian Klaver wrote: > On 9/21/21 11:45 AM, Peter J. Holzer wrote: > > On 2021-09-21 13:43:46 -0400, Dave Cramer wrote: > > > On Tue, 21 Sept 2021 at 13:40, Peter J. Holzer wrote: > > > On 2021-09-21 13:34:21 -0400, Dave Cramer wrot

Re: Timestamp with vs without time zone.

2021-09-21 Thread Peter J. Holzer
On 2021-09-21 12:58:13 -0700, David G. Johnston wrote: > On Tuesday, September 21, 2021, Peter J. Holzer wrote: > These two values are completely indistinguishable. That's good for a > timestamp (they are the same time after all). But they are not a > "timestam

Using a single sequence for all tables

2021-09-29 Thread Peter J. Holzer
ut if in doubt, measure! * Doesn't work with IDENTIY - those columns always use implicit sequences. * currval() is pretty useless with a global sequence. But I basically never use that anyway. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: Using a single sequence for all tables

2021-09-29 Thread Peter J. Holzer
u use 64 bit (do the latter if in doubt). * You only have to monitor a single sequence to see if you are close to an overflow, not dozens of them. * You will probably be more aware that this might be a problem. hp -- _ | Peter J. Holzer| Story must make more sense than reality.

Re: Using a single sequence for all tables

2021-09-30 Thread Peter J. Holzer
fore I retire (even without global ids). One of my databases now has ids in the range of 500E6, and I guess it might reach 2E9 over the next decade or so. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at

Re: Misplaced double quotes in error message

2021-10-07 Thread Peter J. Holzer
t exist Hint: Perhaps you meant to reference the column “t.someColumn”. But that's optically not very different (depends on your font, of course) and your terminal has to support Unicode (or at least a subset which includes those quotes). hp -- _ | Peter J. Holzer| Stor

Re: Duplicate key in UUID primary key index...

2021-10-14 Thread Peter J. Holzer
insert, but when I SELECT the uuid, nothing is returned. Are you perhaps trying to insert the same uuid twice in the same transaction? In this case the second insert would fail causing the whole transaction to fail and you would never see that uuid in another session. hp -- _ | Pet

Re: Wrong sorting on docker image

2021-10-16 Thread Peter J. Holzer
y the glibc maintainers. PostgreSQL can also use the ICU locales instead of those provided by the OS. Have you tried that? hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signature.asc Description: PGP signature

Re: Looking for a doc section that presents the overload selection rules

2021-10-22 Thread Peter J. Holzer
gits after the decimal point so I got them. hjp=> select to_char(34567::int, '999.999'); ╔══╗ ║ to_char ║ ╟──╢ ║ ###.### ║ ╚══╝ (1 row) 34567 doesn't fit into the 3 digits before the point I asked for, so I just get hashes. hp -- _ | P

Re: Incremental backup

2021-10-29 Thread Peter J. Holzer
l incremental backups hard. Both Oracle > and DB2 have database level incremental backups and both have cluster wide WAL > (redo or logs). I was not aware that Oracle even has something equivalent to a Postgres cluster. hp -- _ | Peter J. Holzer| S

Re: Incremental backup

2021-10-29 Thread Peter J. Holzer
On 2021-10-29 08:38:47 -0400, Mladen Gogala wrote: > On 10/29/21 03:30, Peter J. Holzer wrote: > > I was not aware that Oracle even has something equivalent to a Postgres > > cluster. > > It's called "Oracle instance". I don't think that's equiv

Re: Incremental backup

2021-10-29 Thread Peter J. Holzer
On 2021-10-29 09:03:04 -0400, Mladen Gogala wrote: > On 10/29/21 08:49, Peter J. Holzer wrote: > > I don't think that's equivalent. An Oracle instance is a runtime concept > > (the collection of server processes on a single machine serving a single > > database (the

Re: Question: Is it possible to get the new xlog position after query execution?

2021-10-31 Thread Peter J. Holzer
s ...) commit; begin; update counter set c = c + 1 returning c; -- save this as c_current commit; Select c from counter on the replica in a loop until c >= c_current. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_)

Re: Question: Is it possible to get the new xlog position after query execution?

2021-11-06 Thread Peter J. Holzer
On 2021-11-01 00:36:16 -0400, Oleg Serov wrote: > On Sun, Oct 31, 2021 at 4:29 PM Peter J. Holzer wrote: > > On 2021-10-29 13:22:56 -0400, Oleg Serov wrote: > > We are using a master/slave replication system where we perform > > writes on master and use replica

Re: historical log of data records

2021-11-16 Thread Peter J. Holzer
th work, one or the other may be slightly more convenient depending on the use case. Since you mentioned that the purpose is auditing, I'd probably lean towards separate tables in your case. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: Match 2 words and more

2021-11-28 Thread Peter J. Holzer
ble. You want some alphabetic characters followed by a space. So this becomes select name FROM a_table where "STREET_NAME" ~ '^([[:alpha:]]+ )+[[:alpha:]]+$'; hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) |

Re: Match 2 words and more

2021-11-28 Thread Peter J. Holzer
On 2021-11-28 00:27:34 +, Shaozhong SHI wrote: > It appears that regex is not robust. It does reliably what you tell it to do. I would agree that after almost 50 years of extending it, the syntax has become a bit of a mess. hp -- _ | Peter J. Holzer| Story must make m

Re: Working with fixed-point calculations in C

2021-12-08 Thread Peter J. Holzer
digit mantissa stored in a variable length format. hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/ | http://www.hjp.at/ | challenge!" signat

Re: performance expectations for table(s) with 2B recs

2021-12-08 Thread Peter J. Holzer
seems to be no good solution. 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: Detecting repeated phrase in a string

2021-12-09 Thread Peter J. Holzer
s repeated in "wikiwiki". bayes=> select regexp_match('fo wikiwi bar', '(.+)\1'); ╔══╗ ║ regexp_match ║ ╟──╢ ║ (∅) ║ ╚══╝ (1 row) nothing is repeated. Adjust the expression within parentheses if you want to match somethig more specific

Re: Detecting repeated phrase in a string

2021-12-09 Thread Peter J. Holzer
-matching.html#POSIX-CONSTRAINT-ESCAPES-TABLE 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: [EXTERNAL] Re: performance expectations for table(s) with 2B recs

2021-12-10 Thread Peter J. Holzer
l > >table scan is faster. That can lead to a situation where a query > >normally takes less than a second, but sometimes (seemingly at random) > >it takes several minutes [...] > For Peter I have a question. What exactly causes ‘unstable execution plans’ ?? > > Besides not us

Re: Difference in execution plans pg12 vs pg14

2021-12-11 Thread Peter J. Holzer
look realistic for a completely cold database on a slow rotating hard disk. If this happened only once I suspect that something else interfered (maybe another I/O intensive process, if this is on a VM maybe even on another guest). If it is repeatable, something very weird is going on. hp --

Re: Regular Expression For Duplicate Words

2022-02-03 Thread Peter J. Holzer
gether: select * from t where t ~ '[[:<:]]([[:alpha:]]+)[[:>:]]\W[[:<:]]\1[[:>:]]'; hp -- _ | Peter J. Holzer| Story must make more sense than reality. |_|_) || | | | h...@hjp.at |-- Charles Stross, "Creative writing __/

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Peter J. Holzer
re you really interested in a lower-level interface or do you just want it in-process? I suspect that just adding in-process capability would require a major overhaul. 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: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Peter J. Holzer
On 2022-02-10 18:22:29 +0100, Peter J. Holzer wrote: > On 2022-02-09 21:14:39 -0800, Guyren Howe wrote: > > • SELECT * - b.a_id from a natural join b > > □ let me describe a select list by removing fields from a relation. In > > the example, I get all fields i

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-10 Thread Peter J. Holzer
eries valid which are invalid according to the standard) is an extension. Not sure if this is true for all of Guyren's proposals, although no counter-examples immediatly pop into mind. hp -- _ | Peter J. Holzer| Story must make more sense than reality.

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-11 Thread Peter J. Holzer
On 2022-02-10 16:13:33 -0500, Bruce Momjian wrote: > On Thu, Feb 10, 2022 at 06:25:45PM +0100, Peter J. Holzer wrote: > > On 2022-02-10 18:22:29 +0100, Peter J. Holzer wrote: > > > On 2022-02-09 21:14:39 -0800, Guyren Howe wrote: > > > > • SELECT * - b.a_id from a

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-12 Thread Peter J. Holzer
On 2022-02-12 01:18:04 +0100, Andreas 'ads' Scherbaum wrote: > On 10/02/2022 18:22, Peter J. Holzer wrote: > > On 2022-02-09 21:14:39 -0800, Guyren Howe wrote: > > > Examples of small things Postgres could have: > > > > > >• SELECT * - b.a_id

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-12 Thread Peter J. Holzer
On 2022-02-12 20:50:57 +0100, Peter J. Holzer wrote: > On 2022-02-12 01:18:04 +0100, Andreas 'ads' Scherbaum wrote: > > On 10/02/2022 18:22, Peter J. Holzer wrote: > > > On 2022-02-09 21:14:39 -0800, Guyren Howe wrote: > > > > Exam

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-12 Thread Peter J. Holzer
On 2022-02-12 22:09:25 +0100, Andreas 'ads' Scherbaum wrote: > On 12/02/2022 20:50, Peter J. Holzer wrote: > > On 2022-02-12 01:18:04 +0100, Andreas 'ads' Scherbaum wrote: > > > On 10/02/2022 18:22, Peter J. Holzer wrote: > > > > On 2022-02-09 21:

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-12 Thread Peter J. Holzer
On 2022-02-12 13:23:39 -0800, Adrian Klaver wrote: > On 2/12/22 13:17, Peter J. Holzer wrote: > > A shell could also provide an "expand select list" function using > > explain. > > > > In fact, you can sort of do that manually: > > > > 1) Prefix

Re: Can we go beyond the standard to make Postgres radically better?

2022-02-13 Thread Peter J. Holzer
On 2022-02-13 01:11:16 +0100, Andreas 'ads' Scherbaum wrote: > On 12/02/2022 22:34, Peter J. Holzer wrote: > > On 2022-02-12 22:09:25 +0100, Andreas 'ads' Scherbaum wrote: > > > On 12/02/2022 20:50, Peter J. Holzer wrote: > > > > On 2022-0

<    4   5   6   7   8   9   10   >