Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-11-23 Thread Michael Paquier
On Sun, Nov 21, 2021 at 08:45:52AM +0530, Bharath Rupireddy wrote: > I don't think we need to go far to contrib/test_decoding/, even if we > add it there we can't test it for the outputs of these functions, so > I've added the tests in misc_functinos.sql itself. +SELECT COUNT(*) >= 0 AS OK FROM pg

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-11-20 Thread Bharath Rupireddy
On Sun, Nov 21, 2021 at 6:58 AM Michael Paquier wrote: > > On Sat, Nov 20, 2021 at 12:29:51AM +, Bossart, Nathan wrote: > > On 11/17/21, 11:39 PM, "Bharath Rupireddy" > > wrote: > >> Please review the attached v2. > > > > LGTM. I've marked this one as ready-for-committer. > > One issue that

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-11-20 Thread Michael Paquier
On Sat, Nov 20, 2021 at 12:29:51AM +, Bossart, Nathan wrote: > On 11/17/21, 11:39 PM, "Bharath Rupireddy" > wrote: >> Please review the attached v2. > > LGTM. I've marked this one as ready-for-committer. One issue that I have with this patch is that there are zero regression tests. Could

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-11-19 Thread Bossart, Nathan
On 11/17/21, 11:39 PM, "Bharath Rupireddy" wrote: > Please review the attached v2. LGTM. I've marked this one as ready-for-committer. Nathan

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-11-17 Thread Bharath Rupireddy
On Thu, Nov 18, 2021 at 12:16 AM Bossart, Nathan wrote: > > On 10/30/21, 2:36 AM, "Bharath Rupireddy" > wrote: > > I've added 3 functions pg_ls_logicalsnapdir, pg_ls_logicalmapdir, > > pg_ls_replslotdir, and attached the patch. The sample output looks > > like [1]. Please review it further. > >

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-11-17 Thread Justin Pryzby
On Wed, Nov 17, 2021 at 06:46:47PM +, Bossart, Nathan wrote: > On 10/30/21, 2:36 AM, "Bharath Rupireddy" > wrote: > > I've added 3 functions pg_ls_logicalsnapdir, pg_ls_logicalmapdir, > > pg_ls_replslotdir, and attached the patch. The sample output looks > > like [1]. Please review it further

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-11-17 Thread Bossart, Nathan
On 10/30/21, 2:36 AM, "Bharath Rupireddy" wrote: > I've added 3 functions pg_ls_logicalsnapdir, pg_ls_logicalmapdir, > pg_ls_replslotdir, and attached the patch. The sample output looks > like [1]. Please review it further. I took a look at the patch. + charpath[MAXPGPATH + 11

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-10-30 Thread Bharath Rupireddy
On Sat, Oct 23, 2021 at 11:10 PM Bharath Rupireddy wrote: > > On Fri, Oct 22, 2021 at 9:26 PM Justin Pryzby wrote: > > I concluded that it's better to add a function to list metadata of an > > arbitrary > > dir, rather than adding more functions to handle specific, hardcoded dirs: > > https://ww

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-10-23 Thread Bharath Rupireddy
On Fri, Oct 22, 2021 at 9:26 PM Justin Pryzby wrote: > I concluded that it's better to add a function to list metadata of an > arbitrary > dir, rather than adding more functions to handle specific, hardcoded dirs: > https://www.postgresql.org/message-id/flat/20191227170220.ge12...@telsasoft.com

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-10-22 Thread Justin Pryzby
On Fri, Oct 22, 2021 at 04:18:04PM +0530, Bharath Rupireddy wrote: > On Fri, Oct 22, 2021 at 3:18 PM Amit Kapila wrote: > > On Fri, Oct 8, 2021 at 4:39 PM Bharath Rupireddy > > wrote: > > > > > > At times, users want to know what are the files (snapshot and mapping > > > files) that are availabl

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-10-22 Thread Bharath Rupireddy
On Fri, Oct 22, 2021 at 3:18 PM Amit Kapila wrote: > > On Fri, Oct 8, 2021 at 4:39 PM Bharath Rupireddy > wrote: > > > > Hi, > > > > At times, users want to know what are the files (snapshot and mapping > > files) that are available under pg_logical directory and also the > > spill files that are

Re: logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-10-22 Thread Amit Kapila
On Fri, Oct 8, 2021 at 4:39 PM Bharath Rupireddy wrote: > > Hi, > > At times, users want to know what are the files (snapshot and mapping > files) that are available under pg_logical directory and also the > spill files that are under pg_replslot directory and how much space > they occupy. > Why

logical decoding/replication: new functions pg_ls_logicaldir and pg_ls_replslotdir

2021-10-08 Thread Bharath Rupireddy
Hi, At times, users want to know what are the files (snapshot and mapping files) that are available under pg_logical directory and also the spill files that are under pg_replslot directory and how much space they occupy. This will help to better know the storage usage pattern of these directories.