Re: Is pg_basebackup Performance Limited by Files Page Cache?

2025-03-26 Thread Alexandru Lazarev
In my case culprit is Linux Kernel (Oracle Linux 9.2: RHCK 5.14 - issue exists, after switched to UEK 5.15 Kernel issue disappears). I did various tests with PG container and rsync too and even out of container (launched rsync into a CgroupV2). So now I guess it is a question to Linux Kernel commu

Re: Q on SELECT column list pushdown from view to table

2025-03-26 Thread Karsten Hilbert
Am Wed, Mar 26, 2025 at 04:36:55PM -0400 schrieb Tom Lane: > It is intentional that this happens even if the reference to > private_col is subsequently optimized away. To do otherwise > would make implementation artifacts in the optimizer far too > visible, and there's also a very strong case tha

Trying to dynamically create a procedure

2025-03-26 Thread Dirschel, Steve
Hi, I have the need to dynamically create a procedure. Here is a simple procedure: create or replace procedure junk.test_proc() LANGUAGE plpgsql AS $$ declare v_cnt integer := 0; begin raise notice 'v_cnt is %', v_cnt; end $$; That creates and runs fine. Here I’m trying to create i

Re: Trying to dynamically create a procedure

2025-03-26 Thread Christophe Pettus
> On Mar 26, 2025, at 13:27, Dirschel, Steve > wrote: > > I think the problem has to do with having AS $$ and END $$ with the 2 $’s. PostgreSQL's multiline-string syntax is quite flexible. You can do things like: DO $doblock$ ... $doblock$ LANGUAGE plpgsql; I tend to put the name of th

Re: Q on SELECT column list pushdown from view to table

2025-03-26 Thread Karsten Hilbert
Am Wed, Mar 26, 2025 at 06:24:14PM +0100 schrieb Karsten Hilbert: > > Works fine if you don't mess with the view's security_invoker > > status. > > I know but doing so was kind of the point. > > The views are created by a "database owner" role having > access to all tables. Therefore, roles using

Re: Q on SELECT column list pushdown from view to table

2025-03-26 Thread Karsten Hilbert
Am Tue, Mar 25, 2025 at 06:55:34PM -0400 schrieb Tom Lane: > Karsten Hilbert writes: > > I expected this: > > > set role "restricted-role"; > > -- this works: > > select public_col from t_partially_private; > > -- this fails: with "permission denied on table t_partially_private" >

Re: Replication slot WAL reservation

2025-03-26 Thread Phillip Diffley
> You're looking for Standby Status Update Awesome! I completely missed that. > Transactions are always presented to the output plugin in commit order Ok great. I think that is what I needed to know. Just to confirm, it sounds like the order messages are sent from the output plugin is what matt

Re: Replication slot WAL reservation

2025-03-26 Thread Christophe Pettus
> On Mar 26, 2025, at 07:55, Phillip Diffley wrote: > Just to confirm, it sounds like the order messages are sent from the output > plugin is what matters here. When you update confirmed_flush_lsn to LSN "A", > any messages that were sent by the output plugin after the message with LSN > "A"

Re: Confusion on Assert() definition

2025-03-26 Thread Tom Lane
=?UTF-8?B?0JXQs9C+0YAg0JHRg9C00Y7QutC40L0=?= writes: > There's something about the definition of Assert() in postgres that I > don't really understand. Asserts are meant to be used for "can't happen" cases that would represent programming bugs. As such, they are made to do something in debug bu

Confusion on Assert() definition

2025-03-26 Thread Егор Будюкин
Hi all! There's something about the definition of Assert() in postgres that I don't really understand. Refering to src/include/c.h, if USE_ASSERT_CHECKING is not defined, Assert() is defined to be always true regardless of FRONTEND? Additionally, I lack understanding of why Assert() is meant to on

Re: How to pass a list of locations (longitude, latitude) to a PostgreSQL/PostGIS stored function?

2025-03-26 Thread Alexander Farber
Thank you all. I would like to use a geometry type, but will it work well with the Npgsql C# packages? >