invoker function security issues

2022-06-08 Thread Virender Singla
I believe functions in Postgres follow a late binding approach and hence nested function dependencies are resolved using search_path at run time. This way a user can override nested functions in its schema and change the behaviour of wrapper functions. However, a more serious issue is when

Re: TOAST - why separate visibility map

2021-11-25 Thread Virender Singla
"Given the size of toasted data, the overhead is unlikely to be a significant overhead. It's much more an issue for the main table, where narrow rows are common." Completely agree, row size should not be a big concern for toast tables. However write amplification will happen with vacuum freeze

Re: TOAST - why separate visibility map

2021-11-19 Thread Virender Singla
Another point that currently manual VACUUM job does cleanup/freeze on primary table first and then toast table. It looks easy pick to possibly have a configurable parameter to run it on both the tables in parallel. On Sat, Nov 20, 2021 at 12:15 AM Virender Singla wrote: > Why do Toast tab

TOAST - why separate visibility map

2021-11-19 Thread Virender Singla
Why do Toast tables have it's own visibility map and xmin, xmax columns etc? Isn't it increasing row size in a toast table and adding more complexity? Ideally all the vacuum cleanup on a TOAST can be done based on Primary table xmin,xmax and VM info. Yes, that makes any cleanup on TOAST to be

Re: vacuum freeze - possible improvements

2021-04-13 Thread Virender Singla
uum freeze. On Tue, Apr 13, 2021 at 6:02 PM Masahiko Sawada wrote: > On Tue, Apr 13, 2021 at 1:51 PM Virender Singla > wrote: > > > > Thanks Masahiko for the response. > > > > "What is > > the use case where users want to freeze fewer transactio

Re: vacuum freeze - possible improvements

2021-04-13 Thread Virender Singla
transactions because currently there is no way to know what block/tuple contains which transaction id. If there is a way then it would be easier to directly freeze those tuples quickly and advance the relfrozenxid for the table. On Tue, Apr 13, 2021 at 7:52 AM Masahiko Sawada wrote: > On Mon,

vacuum freeze - possible improvements

2021-04-12 Thread Virender Singla
Hi Postgres Community, Regarding anti wraparound vacuums (to freeze tuples), I see it has to scan all the pages which are not frozen-all (looking at visibility map). That means even if we want to freeze less transactions only (For ex - by increasing parameter vacuum_freeze_min_age to 1B), still

Re: Postgres default FILLFACTOR value

2020-05-17 Thread Virender Singla
t | index | postgres | test | 282 MB | On Fri, May 8, 2020 at 1:50 PM Virender Singla wrote: > Why Postgres default FILLFACTOR for table is 100 and for Index is 90. > > Although Oracle is having completely different MVCC architecture, it uses > default 90 for table and 100 for Index (

Postgres default FILLFACTOR value

2020-05-08 Thread Virender Singla
Why Postgres default FILLFACTOR for table is 100 and for Index is 90. Although Oracle is having completely different MVCC architecture, it uses default 90 for table and 100 for Index (exact reverse of Postgres) Postgres blocks needed more spaces for row update compares to Oracle (because Oracle

Re: vacuum on table1 skips rows because of a query on table2

2019-10-26 Thread Virender Singla
2019 at 10:16 PM Tom Lane wrote: > Virender Singla writes: > > Currently I see the vacuum behavior for a table is that, even if a long > > running query on a different table is executing in another read committed > > transaction. > > That vacuum in the 1st transaction

vacuum on table1 skips rows because of a query on table2

2019-10-25 Thread Virender Singla
Currently I see the vacuum behavior for a table is that, even if a long running query on a different table is executing in another read committed transaction. That vacuum in the 1st transaction skips the dead rows until the long running query finishes. Why that is the case, On same table long