Re: Interesting case of IMMUTABLE significantly hurting performance

2025-04-09 Thread Olleg Samoylov
nner. So this is looked "strange", immutable function marked as immutable function can not be inlined, but exactly the same function marked as volatile do. -- Olleg

Interesting case of IMMUTABLE significantly hurting performance

2025-04-09 Thread Olleg Samoylov
QUERY PLAN -- Function Scan on generate_series i (cost=0.00..262500.00 rows=100 width=32) (actual time=54.888..1537.602 rows=100 loops=1) Planning Time: 0.052 ms Execution Time: 1575.985 ms (3 rows) -- Olleg

"trailing junk after numeric literal at or near ""512"""

2024-12-23 Thread Olleg Samoylov
by file_fdw. I think the correct behavior must be the error log function must mask the wrong bytes by the ESC sequences, so PostgreSQL will be able read such log file with help of file_fdw. -- Olleg

Dependencies on the system view

2024-09-20 Thread Olleg
ersistence WHEN 'p'::"char" THEN 'permanent'::text WHEN 'u'::"char" THEN 'unlogged'::text WHEN 't'::"char" THEN 'temporary'::text WHEN 'c'::"char" THEN 'constant'::text ELSE NULL::text END AS persistence, t.spcname AS tablespace, c.relhasindex AS hasindexes, c.relhasrules AS hasrules, c.relhastriggers AS hastriggers FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace LEFT JOIN pg_tablespace t ON t.oid = c.reltablespace; -- Olleg

Dependencies on the system view

2024-09-20 Thread Olleg
ersistence WHEN 'p'::"char" THEN 'permanent'::text WHEN 'u'::"char" THEN 'unlogged'::text WHEN 't'::"char" THEN 'temporary'::text WHEN 'c'::"char" THEN 'constant'::text ELSE NULL::text END AS persistence, t.spcname AS tablespace, c.relhasindex AS hasindexes, c.relhasrules AS hasrules, c.relhastriggers AS hastriggers FROM pg_class c LEFT JOIN pg_namespace n ON n.oid = c.relnamespace LEFT JOIN pg_tablespace t ON t.oid = c.reltablespace; -- Olleg

Re: Asynchronous Trigger?

2018-04-27 Thread Olleg Samoylov
Try to look at PGQ from SkyTools. On 2018-03-30 01:29, Cory Tucker wrote: Is it possible to have the execution of a trigger (or any function) not block the completion of the statement they are associated with?

Re: Locks analysis after-the-fact

2018-04-27 Thread Olleg Samoylov
On 2018-04-27 10:55, Olivier Macchioni wrote: > Does anyone have an idea on how to process in such a case? > Log statments too. :)

PostgreSQL 10.3 and Ubuntu

2018-03-05 Thread Olleg Samoylov
There is PostgreSQL 10.3 already. I have Ubuntu 17.10 (artful) and there is not a pgdg repository for it. There is PostgreSQL 10.3 in 16.04 LTS (xenial) pgdg repository, but such packages can't be installed on 17.10 (artful) Ubuntu. And there is zesty-pgdg (for 17.04 Ubuntu), works fine for me

Re: Using random() in update produces same random value for all

2018-01-23 Thread Olleg Samoylov
On 2018-01-22 23:15, Tom Lane wrote: > > It is honored as volatile: it will be re-evaluated every time the > sub-select is re-evaluated. It's just that there's no cause to > re-evaluate the sub-select. > > I poked through the SQL standard to see if it spells out the semantics > of uncorrelated sub

Re: Using random() in update produces same random value for all

2018-01-22 Thread Olleg Samoylov
Yep, interesting.  Checked with PostgreSQL 10.1. => select *,random() from generate_series(1,10);  generate_series |  random -+---    1 | 0.308531506918371    2 | 0.126279713585973    3 | 0.984668150078505    4