Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-07-24 Thread Ashutosh Sharma
just thought of sharing it just because something of this sort would probably solve most of the issues related to extensions. -- With Regards, Ashutosh Sharma. v4-0001-Introduce-new-control-file-parameter-protected-to-de.patch Description: Binary data

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-07-17 Thread Ashutosh Sharma
Hi Robert, On Tue, Jul 16, 2024 at 9:40 PM Robert Haas wrote: > > On Tue, Jul 16, 2024 at 1:55 AM Ashutosh Sharma wrote: > > Just to confirm, are you suggesting to remove the protected flag and > > set the default search_path (as $extension_schema,) for all functions >

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-07-15 Thread Ashutosh Sharma
Hi Robert. On Mon, Jul 15, 2024 at 11:15 PM Robert Haas wrote: > > On Mon, Jul 15, 2024 at 8:05 AM Ashutosh Sharma wrote: > > I've added these changes to restrict users from explicitly setting the > > $extension_schema in the search_path. This ensures that > > $ext

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-07-15 Thread Ashutosh Sharma
here? > I've added these changes to restrict users from explicitly setting the $extension_schema in the search_path. This ensures that $extension_schema can only be set implicitly for functions created by the extension when the "protected" flag is enabled. I apologize for not commenting on this change initially. I'll review the patch, add comments where needed, and submit an updated version. -- With Regards, Ashutosh Sharma.

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-25 Thread Ashutosh Sharma
On Tue, Jun 25, 2024 at 12:40 AM Jeff Davis wrote: > > On Wed, 2024-06-19 at 08:53 +0530, Ashutosh Sharma wrote: > > For standalone functions, users can easily adjust the search_path > > settings as needed. However, managing this becomes challenging for > > function

Re: Avoid orphaned objects dependencies, take 3

2024-06-19 Thread Ashutosh Sharma
Hi Robert, On Wed, Jun 19, 2024 at 5:50 PM Robert Haas wrote: > > On Wed, Jun 19, 2024 at 7:49 AM Ashutosh Sharma wrote: > > If the dependency is more, this can hit max_locks_per_transaction > > limit very fast. > > Your experiment doesn't support this conclusion. V

Re: Avoid orphaned objects dependencies, take 3

2024-06-19 Thread Ashutosh Sharma
3 times. Won't that create a problem if many concurrent sessions engage in similar activity? -- With Regards, Ashutosh Sharma.

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-18 Thread Ashutosh Sharma
The main aim here is to enhance security for functions created by extensions by setting search_path at the function level. This ensures precise control over how objects are accessed within each function, making behavior more predictable and minimizing security risks, especially for SECURITY DEFINER functions associated with extensions created by superusers. -- With Regards, Ashutosh Sharma.

Re: Truncation of mapped catalogs (whether local or shared) leads to server crash

2024-06-18 Thread Ashutosh Sharma
Hi, On Tue, Jun 18, 2024 at 8:25 PM Tom Lane wrote: > > Ashutosh Sharma writes: > > On Tue, Jun 18, 2024 at 7:50 PM Tom Lane wrote: > >> I think the assertion you noticed is there because the code path gets > >> traversed during REINDEX, which is an operatio

Re: Truncation of mapped catalogs (whether local or shared) leads to server crash

2024-06-18 Thread Ashutosh Sharma
Hi Robert, Andres, Tom, Thank you for sharing your thoughts. On Tue, Jun 18, 2024 at 8:02 PM Andres Freund wrote: > > Hi, > > On 2024-06-18 19:58:26 +0530, Ashutosh Sharma wrote: > > On Tue, Jun 18, 2024 at 7:50 PM Tom Lane wrote: > > > > > > Robert Haas

Re: Truncation of mapped catalogs (whether local or shared) leads to server crash

2024-06-18 Thread Ashutosh Sharma
Hi, On Tue, Jun 18, 2024 at 7:50 PM Tom Lane wrote: > > Robert Haas writes: > > On Tue, Jun 18, 2024 at 8:10 AM Ashutosh Sharma > > wrote: > >> Executing below commands: > >> -- set allow_system_table_mods TO on; > >> -- truncate table pg_type;

Truncation of mapped catalogs (whether local or shared) leads to server crash

2024-06-18 Thread Ashutosh Sharma
dditionally, is it advisable to restrict truncation of the pg_class table? It's like a kind of circular dependency in case of pg_class which is not applicable in case of other catalog tables. -- With Regards, Ashutosh Sharma.

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-17 Thread Ashutosh Sharma
dalone functions created independently. The difference is that installing extensions typically requires superuser privileges, which is not the case with standalone functions. -- With Regards, Ashutosh Sharma.

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-13 Thread Ashutosh Sharma
Hi, Please find the attached patch addressing all the comments. I kindly request your review and feedback. Your thoughts are greatly appreciated. -- With Regards, Ashutosh Sharma. v3-0001-Introduce-a-new-control-file-flag-called-protected-f.patch Description: Binary data

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-12 Thread Ashutosh Sharma
Also curious what happens if an extension author has search_path > already set in proconfig for a function that doesn't match what's in > the control file. I'm guessing the function one should take > precedence. > Yes, if the author has explicitly set the proconfig

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-11 Thread Ashutosh Sharma
On Wed, Jun 12, 2024 at 9:35 AM Ashutosh Sharma wrote: > > Hi Jeff, > > On Wed, Jun 12, 2024 at 3:07 AM Jeff Davis wrote: > > > > On Tue, 2024-06-11 at 15:24 +0530, Ashutosh Sharma wrote: > > > 3) When the ALTER EXTENSION SET SCHEMA command is executed and if

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-11 Thread Ashutosh Sharma
Hi Jeff, On Wed, Jun 12, 2024 at 3:07 AM Jeff Davis wrote: > > On Tue, 2024-06-11 at 15:24 +0530, Ashutosh Sharma wrote: > > 3) When the ALTER EXTENSION SET SCHEMA command is executed and if the > > function's search_path contains the old schema of the extension, it >

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-11 Thread Ashutosh Sharma
Hi Alexander, On Tue, Jun 11, 2024 at 6:26 PM Alexander Kukushkin wrote: > > Hi, > > On Tue, 11 Jun 2024 at 14:50, Ashutosh Sharma wrote: >> >> If the author has configured the search_path for any desired function, >> using this option with the CREATE EXTENSION co

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-11 Thread Ashutosh Sharma
Hi, On Tue, Jun 11, 2024 at 5:02 PM Jelte Fennema-Nio wrote: > > On Tue, 11 Jun 2024 at 11:54, Ashutosh Sharma wrote: > > 1) Extends the CREATE EXTENSION command to support a new option, SET > > SEARCH_PATH. > > > I don't think it makes sense to add such an opti

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-11 Thread Ashutosh Sharma
On Thu, Jun 6, 2024 at 2:36 AM Jeff Davis wrote: > > On Wed, 2024-06-05 at 14:36 +0530, Ashutosh Sharma wrote: > > Thank you, Ashutosh, for the quick response. I've drafted a patch > > aimed at addressing this issue. The patch attempts to solve this > > issue by co

Re: How about using dirty snapshots to locate dependent objects?

2024-06-06 Thread Ashutosh Sharma
On Fri, Jun 7, 2024 at 10:06 AM Dilip Kumar wrote: > > On Thu, Jun 6, 2024 at 7:39 PM Ashutosh Sharma wrote: > > > > On Thu, Jun 6, 2024 at 6:20 PM Dilip Kumar wrote: > >> > >> On Thu, Jun 6, 2024 at 5:59 PM Ashutosh Sharma > >> wrote: > >

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-06 Thread Ashutosh Sharma
Hi, On Thu, Jun 6, 2024 at 2:36 AM Jeff Davis wrote: > On Wed, 2024-06-05 at 14:36 +0530, Ashutosh Sharma wrote: > > Thank you, Ashutosh, for the quick response. I've drafted a patch > > aimed at addressing this issue. The patch attempts to solve this > > issue by c

Re: How about using dirty snapshots to locate dependent objects?

2024-06-06 Thread Ashutosh Sharma
On Thu, Jun 6, 2024 at 6:57 PM Bertrand Drouvot < bertranddrouvot...@gmail.com> wrote: > On Thu, Jun 06, 2024 at 05:59:00PM +0530, Ashutosh Sharma wrote: > > Hello everyone, > > > > At present, we use MVCC snapshots to identify dependent objects. This > > implies

Re: How about using dirty snapshots to locate dependent objects?

2024-06-06 Thread Ashutosh Sharma
On Thu, Jun 6, 2024 at 6:20 PM Dilip Kumar wrote: > On Thu, Jun 6, 2024 at 5:59 PM Ashutosh Sharma > wrote: > > > > Hello everyone, > > > > At present, we use MVCC snapshots to identify dependent objects. This > implies that if a new dependent object is insert

How about using dirty snapshots to locate dependent objects?

2024-06-06 Thread Ashutosh Sharma
hly tested, but just sharing here to clarify what I am trying to suggest. Please have a look and let me know your thoughts. -- With Regards, Ashutosh Sharma. use-dirty-snapshots-to-find-dependent-objects.patch Description: Binary data

Re: Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-06-05 Thread Ashutosh Sharma
On Fri, May 24, 2024 at 2:25 PM Ashutosh Bapat wrote: > > > On Fri, May 24, 2024 at 12:52 PM Ashutosh Sharma > wrote: > >> Hi All, >> >> We all know that installing an extension typically requires superuser >> privileges, which means the database objects i

Addressing SECURITY DEFINER Function Vulnerabilities in PostgreSQL Extensions

2024-05-24 Thread Ashutosh Sharma
his is one possible approach. Another solution could be to categorize extension-created functions to avoid duplication. This might not be an ideal solution, but it's another consideration worth sharing. Thoughts? -- With Regards, Ashutosh Sharma.

Should we represent temp files as unsigned long int instead of signed long int type?

2023-10-25 Thread Ashutosh Sharma
th Regards, Ashutosh Sharma.

Re: Can a role have indirect ADMIN OPTION on another role?

2023-09-07 Thread Ashutosh Sharma
On Thu, Sep 7, 2023 at 3:43 AM David G. Johnston wrote: > > On Wed, Sep 6, 2023 at 1:55 PM Ashutosh Sharma wrote: >> >> But what if roleB doesn't want to give roleA access to >> the certain objects it owns. > > > Not doable - roleA can always pretend t

Re: Can a role have indirect ADMIN OPTION on another role?

2023-09-07 Thread Ashutosh Sharma
On Thu, Sep 7, 2023 at 12:20 AM Robert Haas wrote: > > On Wed, Sep 6, 2023 at 1:33 PM Ashutosh Sharma wrote: > > Actually I have one more question. With this new design, assuming that > > createrole_self_grant is set to 'set, inherit' in postgresql.conf and > &

Re: Can a role have indirect ADMIN OPTION on another role?

2023-09-06 Thread Ashutosh Sharma
On Wed, Sep 6, 2023 at 9:03 PM Robert Haas wrote: > > On Wed, Sep 6, 2023 at 11:14 AM Ashutosh Sharma wrote: > > In PG-16, I see that we have made a lot of changes in the area roles > > and privileges. I have a question related to this and here is my > > question: >

Can a role have indirect ADMIN OPTION on another role?

2023-09-06 Thread Ashutosh Sharma
ter C. But, can A administer C although it has not created C? -- With Regards, Ashutosh Sharma.

Re: Return value of pg_promote()

2023-08-27 Thread Ashutosh Sharma
promotion". > > I have just noticed that we do not have a CF entry for this proposal, > so I have added one with Laurenz as author: > https://commitfest.postgresql.org/44/4504/ > > For now the patch is waiting on author. Could you address my > last review? Thanks for rev

Re: Return value of pg_promote()

2023-06-08 Thread Ashutosh Sharma
On Wed, Jun 7, 2023 at 9:55 PM Fujii Masao wrote: > > > > On 2023/06/07 2:00, Laurenz Albe wrote: > > On Tue, 2023-06-06 at 16:35 +0530, Ashutosh Sharma wrote: > >> At present, pg_promote() returns true to the caller on successful > >> promotion of standby,

Return value of pg_promote()

2023-06-06 Thread Ashutosh Sharma
other scenarios it should just throw an error (FATAL, ERROR ... depending on the type of failure that occurred). Please let me know your thoughts on this change. thanks.! -- With Regards, Ashutosh Sharma.

Re: Minimal logical decoding on standbys

2023-02-15 Thread Ashutosh Sharma
On Wed, Feb 15, 2023 at 11:48 PM Andres Freund wrote: > > Hi, > > On 2023-02-15 18:02:11 +0530, Ashutosh Sharma wrote: > > Thanks Andres. I have one more query (both for you and Bertrand). I > > don't know if this has already been answered somewhere in this mail >

Re: Minimal logical decoding on standbys

2023-02-15 Thread Ashutosh Sharma
On Thu, Jan 12, 2023 at 11:46 PM Andres Freund wrote: > > Hi, > > On 2023-01-12 20:08:55 +0530, Ashutosh Sharma wrote: > > I previously participated in the discussion on "Synchronizing the > > logical replication slots from Primary to Standby" and one of the &

Re: Minimal logical decoding on standbys

2023-01-12 Thread Ashutosh Sharma
82528 | reserved | | f May I know the reason for creating pg_16399_sync_16392_7187728548042694423? -- With Regards, Ashutosh Sharma.

Re: confirmed_flush_lsn shows LSN of the data that has not yet been received by the logical subscriber.

2022-11-04 Thread Ashutosh Sharma
On Fri, Nov 4, 2022 at 3:29 PM Amit Kapila wrote: > > On Thu, Nov 3, 2022 at 4:49 PM Amit Kapila wrote: > > > > On Mon, Sep 19, 2022 at 8:09 PM Ashutosh Sharma > > wrote: > > > > > > Thanks for the clarification. Attached is the patch

Re: Add more docs for pg_surgery?

2022-09-26 Thread Ashutosh Sharma
> tuples anyway even there are tuple-locks on them? > As the name suggests and as documented, heap_force_kill will "force kill" the tuple, regardless of whether it is visible to another transaction or not. And further it looks like you are doing an experiment on undamaged relation which is not recommended as documented. If the relation would have been damaged, you probably may not be able to access it. -- With Regards, Ashutosh Sharma.

Re: binary version of pg_current_wal_insert_lsn and pg_walfile_name functions

2022-09-22 Thread Ashutosh Sharma
On Fri, Sep 23, 2022 at 12:24 PM Ashutosh Sharma wrote: > > PFA v2 patch. > > Changes in the v2 patch: > > - Reuse the existing get_controlfile function in > src/common/controldata_utils.c instead of adding a new one. > > - Set env variable PGDATA with the data dire

Re: binary version of pg_current_wal_insert_lsn and pg_walfile_name functions

2022-09-22 Thread Ashutosh Sharma
PFA v2 patch. Changes in the v2 patch: - Reuse the existing get_controlfile function in src/common/controldata_utils.c instead of adding a new one. - Set env variable PGDATA with the data directory specified by the user. -- With Regards, Ashutosh Sharma.

Re: binary version of pg_current_wal_insert_lsn and pg_walfile_name functions

2022-09-22 Thread Ashutosh Sharma
On Fri, Sep 23, 2022 at 6:05 AM Bharath Rupireddy wrote: > > On Thu, Sep 22, 2022 at 10:25 PM Ashutosh Sharma > wrote: > > > > PFA that enhances pg_waldump to show the latest LSN and the > > corresponding WAL file when the -l or --lastLSN option is passed an > >

Re: binary version of pg_current_wal_insert_lsn and pg_walfile_name functions

2022-09-22 Thread Ashutosh Sharma
On Thu, Sep 22, 2022 at 7:41 AM Bharath Rupireddy wrote: > > On Wed, Sep 21, 2022 at 9:53 PM Ashutosh Sharma wrote: > > > > Yeah, we can either add this functionality to pg_waldump or maybe add > > a new binary itself that would return this information. > > IMV,

Re: binary version of pg_current_wal_insert_lsn and pg_walfile_name functions

2022-09-21 Thread Ashutosh Sharma
On Tue, Sep 20, 2022 at 5:13 PM Bharath Rupireddy wrote: > > On Mon, Sep 19, 2022 at 8:19 PM Ashutosh Sharma wrote: > > > > Hi All, > > > > Currently, we have pg_current_wal_insert_lsn and pg_walfile_name sql > > functions which gives us information about the

Re: confirmed_flush_lsn shows LSN of the data that has not yet been received by the logical subscriber.

2022-09-21 Thread Ashutosh Sharma
On Wed, Sep 21, 2022 at 7:21 PM Ashutosh Bapat wrote: > > On Mon, Sep 19, 2022 at 8:09 PM Ashutosh Sharma wrote: > > > > On Mon, Sep 19, 2022 at 5:24 PM Ashutosh Bapat > > wrote: > > > > > > On Mon, Sep 19, 2022 at 1:43 PM Ashutosh Sharma > > &

binary version of pg_current_wal_insert_lsn and pg_walfile_name functions

2022-09-19 Thread Ashutosh Sharma
know your thoughts/comments. thank you.! -- With Regards, Ashutosh Sharma.

Re: confirmed_flush_lsn shows LSN of the data that has not yet been received by the logical subscriber.

2022-09-19 Thread Ashutosh Sharma
On Mon, Sep 19, 2022 at 5:24 PM Ashutosh Bapat wrote: > > On Mon, Sep 19, 2022 at 1:43 PM Ashutosh Sharma wrote: > > > > On Fri, Sep 9, 2022 at 5:36 PM Ashutosh Bapat > > wrote: > > > > > > On Thu, Sep 8, 2022 at 8:32 PM Ashutosh Sharma > > >

Re: confirmed_flush_lsn shows LSN of the data that has not yet been received by the logical subscriber.

2022-09-19 Thread Ashutosh Sharma
On Fri, Sep 9, 2022 at 5:36 PM Ashutosh Bapat wrote: > > On Thu, Sep 8, 2022 at 8:32 PM Ashutosh Sharma wrote: > > > > On Thu, Sep 8, 2022 at 6:23 PM Ashutosh Bapat > > wrote: > > > > > > On Thu, Sep 8, 2022 at 4:14 PM Ashutosh Sharma > > >

Re: confirmed_flush_lsn shows LSN of the data that has not yet been received by the logical subscriber.

2022-09-08 Thread Ashutosh Sharma
On Thu, Sep 8, 2022 at 6:23 PM Ashutosh Bapat wrote: > > On Thu, Sep 8, 2022 at 4:14 PM Ashutosh Sharma wrote: > > > > Hi All, > > > > The logically decoded data are sent to the logical subscriber at the time > > of transaction commit, assuming that th

confirmed_flush_lsn shows LSN of the data that has not yet been received by the logical subscriber.

2022-09-08 Thread Ashutosh Sharma
e the one representing the transaction begin message, not the LSN of the last decoded data which is yet to be sent. Please let me know if I am missing something here. -- With Regards, Ashutosh Sharma.

Re: Correct comment in RemoveNonParentXlogFiles()

2022-08-04 Thread Ashutosh Sharma
On Thu, Aug 4, 2022 at 11:30 AM Kyotaro Horiguchi wrote: > At Wed, 3 Aug 2022 18:16:33 +0530, Ashutosh Sharma > wrote in > > Following comment in RemoveNonParentXlogFiles() says that we are trying > to > > remove any WAL file whose segment number is >= the segment num

Correct comment in RemoveNonParentXlogFiles()

2022-08-03 Thread Ashutosh Sharma
t with a segment number >= the first segment on the * new timeline. */ if (strncmp(xlde->d_name, switchseg, 8) < 0 && strcmp(xlde->d_name + 8, switchseg + 8) > 0) -- With Regards, Ashutosh Sharma.

Re: making relfilenodes 56 bits

2022-07-29 Thread Ashutosh Sharma
On Fri, Jul 29, 2022 at 6:26 PM Ashutosh Sharma wrote: > On Thu, Jul 28, 2022 at 5:02 PM Dilip Kumar wrote: > > +/* -- > + * RelFileNumber zero is InvalidRelFileNumber. > + * > + * For the system tables (OID < FirstNormalObjectId) the initial storage > &

Re: making relfilenodes 56 bits

2022-07-29 Thread Ashutosh Sharma
ents relfilenode value in pg_class which can hold zero value which actually means it's a mapped relation. I think it would be good to provide some clarity here. -- With Regards, Ashutosh Sharma.

Re: making relfilenodes 56 bits

2022-07-27 Thread Ashutosh Sharma
a user-visible error, I think it would be good to mention relfilenode instead of relfilenumber. Elsewhere (including the user manual) we refer to this as a relfilenode. -- With Regards, Ashutosh Sharma. On Tue, Jul 26, 2022 at 10:36 PM Ashutosh Sharma wrote: > Thanks Dilip. Here are few comme

Re: making relfilenodes 56 bits

2022-07-26 Thread Ashutosh Sharma
if parsing fails, returns false. + */ If parsing is successful, returns true; -- With Regards, Ashutosh Sharma. On Tue, Jul 26, 2022 at 7:33 PM Dilip Kumar wrote: > On Tue, Jul 26, 2022 at 6:06 PM Ashutosh Sharma > wrote: > > Hi, > Note: please avoid top posting. > > > /

Re: making relfilenodes 56 bits

2022-07-26 Thread Ashutosh Sharma
*/ +#define FirstNormalRelFileNumber ((RelFileNumber) 10) == When WAL logging the next object id we have the chosen the xlog threshold value as 8192 whereas for relfilenode it is 512. Any reason for choosing this low arbitrary value in case of relfilenumber? -- With Regards, Ashutosh Sharma. On Tue, Jul

Re: making relfilenodes 56 bits

2022-07-25 Thread Ashutosh Sharma
the point that I am trying to put here is even though we will be able to find the new relfile number by increasing the relfilenumber size but still the commands like above will not execute if the oid value (of 32 bits) has reached the threshold limit. -- With Regards, Ashutosh Sharma. On W

Re: How about renaming XLogFileRead() to XLogFileOpenForRead() and XLogFileOpen() to XLogFileOpenForWrite()?

2022-05-10 Thread Ashutosh Sharma
On Tue, May 10, 2022 at 6:46 PM Bharath Rupireddy wrote: > > On Tue, May 10, 2022 at 6:16 PM Ashutosh Sharma wrote: > > > > Hi All, > > > > Currently, in postgres we have two different functions that are > > specially used to open the WAL files for reading and

How about renaming XLogFileRead() to XLogFileOpenForRead() and XLogFileOpen() to XLogFileOpenForWrite()?

2022-05-10 Thread Ashutosh Sharma
used anywhere in the function, so can we remove it? -- With Regards, Ashutosh Sharma.

Re: orafce: some of the build time generated files are not present in .gitignore and also checked into the repository

2022-04-26 Thread Ashutosh Sharma
Sure, I'll do that. Thanks, Ashutosh On Tue, Apr 26, 2022 at 5:51 PM Daniel Gustafsson wrote: > > > On 26 Apr 2022, at 14:19, Ashutosh Sharma wrote: > > > The below files in orafce contrib module are generated at build time. > > However, these are checked into th

Re: double inclusion of '-p' flex flag

2022-04-26 Thread Ashutosh Sharma
On Tue, Apr 26, 2022 at 5:55 PM John Naylor wrote: > > On Tue, Apr 26, 2022 at 7:16 PM Ashutosh Sharma wrote: > > > > Hi, > > > > I see that we have included '-p' flex flag twice in the commands used > > to generate the scanner files. See

orafce: some of the build time generated files are not present in .gitignore and also checked into the repository

2022-04-26 Thread Ashutosh Sharma
With Regards, Ashutosh Sharma.

double inclusion of '-p' flex flag

2022-04-26 Thread Ashutosh Sharma
ra -p flag be removed? -- With Regards, Ashutosh Sharma.

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-16 Thread Ashutosh Sharma
record info? AFAIU, end lsn is the lsn pointer where you need to stop reading the WAL data. If that is true, then there exists no valid WAL record between the start and end lsn in this particular case. -- With Regards, Ashutosh Sharma. On Wed, Mar 16, 2022 at 7:56 PM Stephen Frost wrote: > >

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-15 Thread Ashutosh Sharma
On Tue, Mar 15, 2022 at 10:17 PM Robert Haas wrote: > > On Tue, Mar 15, 2022 at 12:30 PM Ashutosh Sharma > wrote: > > > > Few comments on the latest patch: > > > > - /* We need to construct the pathname for this database */ > > -

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-15 Thread Ashutosh Sharma
rctbid, Oid srcdbid, char *srcpath); I think we can shorten these function names to probably ScanSourceDBPgClassRel(), ScanSourceDBPgClassTuple() and likewise? -- With Regards, Ashutosh Sharma. On Tue, Mar 15, 2022 at 3:24 PM Dilip Kumar wrote: > > On Mon, Mar 14, 2022 at 10:04 PM Robert Haas

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-11 Thread Ashutosh Sharma
On Fri, Mar 11, 2022 at 8:21 PM Robert Haas wrote: > > On Fri, Mar 11, 2022 at 12:15 AM Ashutosh Sharma > wrote: > > Looks better, but why do you want to pass elevel to the > > load_relmap_file()? Are we calling this function from somewhere other > > than read_relmap

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-11 Thread Ashutosh Sharma
at it will display all the output columns. Also you may shorten the gap between start and end lsn to reduce the output size. == Any reason for not specifying author name in the .sgml file. Do you want me to add my name to the author? :) Ashutosh Sharma ashu.coe...@gmail.com -- With Rega

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-11 Thread Ashutosh Sharma
s and other cosmetic stuff. -- With Regards, Ashutosh Sharma. On Fri, Mar 11, 2022 at 3:51 PM Dilip Kumar wrote: > > On Fri, Mar 11, 2022 at 11:52 AM Dilip Kumar wrote: > > > > On Thu, Mar 10, 2022 at 10:18 PM Robert Haas wrote: > > > > > > On Thu, Mar 10, 2022

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-11 Thread Ashutosh Sharma
show a record when there' no record in the > specfied LSN range. But I don't think there's no usefulness of the > behavior. > So, do you want the pg_get_wal_record_info function to be removed as we can use pg_get_wal_records_info() to achieve what it does? -- With Regards, Ashutosh Sharma.

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-11 Thread Ashutosh Sharma
ointer so we assume the default end pointer is end-of-WAL. > but this doesn't > pg_get_wal_records_info('0/1000000', '0/100'); > > ERROR: WAL start LSN must be less than end LSN > I think this behaviour is fine. We cannot have the same start and end lsn pointers. > And the following shows no records. > pg_get_wal_records_info('0/100', '0/101'); > pg_get_wal_records_info('0/100', '0/128'); > I think we should be erroring out here saying - couldn't find any valid WAL record between given start and end lsn because there exists no valid wal records between the specified start and end lsn pointers. -- With Regards, Ashutosh Sharma.

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-10 Thread Ashutosh Sharma
do we have any plans to call this function directly bypassing read_relmap_file for any upcoming patch? -- With Regards, Ashutosh Sharma.

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-10 Thread Ashutosh Sharma
Thanks Dilip for working on the review comments. I'll take a look at the new version of patch and let you know my comments, if any. -- With Regards, Ashutosh Sharma. On Thu, Mar 10, 2022 at 8:38 PM Dilip Kumar wrote: > > On Thu, Mar 10, 2022 at 7:22 PM Ashutosh Sharma wrote: >

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-10 Thread Ashutosh Sharma
og each copied block. Otherwise, if FILE_COPY I think we need to mention the default strategy in the documentation page. -- With Regards, Ashutosh Sharma. On Thu, Mar 10, 2022 at 4:32 PM Dilip Kumar wrote: > > On Wed, Mar 9, 2022 at 6:44 PM Robert Haas wrote: > > > > > Right, inf

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-03-09 Thread Ashutosh Sharma
ld show matching data but the way it is shown doesn't need to be the same. In fact it is not in most of the cases. > I have taken care of the rest of the comments in v5 patch for which > there was clarity. > Thank you very much. Will take a look at it later. -- With Regards, Ashutosh Sharma.

Re: Synchronizing slots from primary to standby

2022-03-09 Thread Ashutosh Sharma
andby goes down, the logical subscribers will stop receiving new changes from the primary as per the design of this patch OR if standby lags behind the primary for whatever reason, it will have a direct impact on logical subscribers as well. -- With Regards, Ashutosh Sharma. On Sat, Feb 19, 2022

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-04 Thread Ashutosh Sharma
gards, Ashutosh Sharma. On Fri, Mar 4, 2022 at 3:54 PM Bharath Rupireddy wrote: > > On Thu, Mar 3, 2022 at 10:05 PM Robert Haas wrote: > > > > On Fri, Feb 25, 2022 at 6:03 AM Bharath Rupireddy > > wrote: > > > Added a new function that returns the first and last valid WA

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-03-04 Thread Ashutosh Sharma
s on our review comments. -- With Regards, Ashutosh Sharma. On Fri, Mar 4, 2022 at 4:59 PM Nitin Jadhav wrote: > > Thanks for reviewing. > > > 6) How about shutdown and end-of-recovery checkpoint? Are you planning > > to have an ereport_startup_progress mechanism as 0002? > >

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-03 Thread Ashutosh Sharma
I think we should also see if we can allow end users to input timeline information with the pg_walinspect functions. This will help the end users to get information about WAL records from previous timeline which can be helpful in case of restored servers. -- With Regards, Ashutosh Sharma. On Thu

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-03-03 Thread Ashutosh Sharma
people would find it useful to know how much time is being taken by the checkpoint in I/O operation phase. thoughts? -- With Regards, Ashutosh Sharma. On Wed, Mar 2, 2022 at 4:45 PM Nitin Jadhav wrote: > > Thanks for reviewing. > > > > > I suggested upthread to store t

Re: Make mesage at end-of-recovery less scary.

2022-03-03 Thread Ashutosh Sharma
On Wed, Mar 2, 2022 at 7:47 AM Kyotaro Horiguchi wrote: > > At Sat, 19 Feb 2022 09:31:33 +0530, Ashutosh Sharma > wrote in > > The changes looks good. thanks.! > > Thanks! > > Some recent core change changed WAL insertion speed during the TAP > test and revealed

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-02 Thread Ashutosh Sharma
On Wed, Mar 2, 2022 at 10:37 PM Bharath Rupireddy wrote: > > On Wed, Mar 2, 2022 at 8:12 PM Ashutosh Sharma wrote: > > > > Some review comments on v5 patch (v5-0001-pg_walinspect.patch) > > Thanks for reviewing. > > > +-- > > +-- pg_get_wal_reco

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-02 Thread Ashutosh Sharma
n't we make use of an existing WAL reader function - read_local_xlog_page()? -- With Regards, Ashutosh Sharma. On Fri, Feb 25, 2022 at 4:33 PM Bharath Rupireddy wrote: > > On Wed, Feb 16, 2022 at 9:04 AM Ashutosh Sharma wrote: > > I don't think that's the use

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-02-23 Thread Ashutosh Sharma
} Any specific reason for recording the timelineID in checkpoint stats table? Will this ever change in our case? -- With Regards, Ashutosh Sharma. On Wed, Feb 23, 2022 at 6:59 PM Nitin Jadhav wrote: > > > I will make use of pgstat_progress_update_multi_param() in the next > >

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-02-22 Thread Ashutosh Sharma
I'm not sure about the current status, but found it while playing around with the latest changes a bit, so thought of sharing it here. + + strategy + + + This is used for copying the database directory. Currently, we have + two strategies the WAL_LOG_BLO

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-02-22 Thread Ashutosh Sharma
POINT_KIND_FORCE); + else + checkpoint_progress_update_param(flags, PROGRESS_CHECKPOINT_KIND, + PROGRESS_CHECKPOINT_KIND_UNKNOWN); + } +} -- With Regards, Ashutosh Sharma. On Thu, Feb 10, 2022 at 12:23 PM Nitin Jadhav wrote: > >

Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

2022-02-18 Thread Ashutosh Sharma
On Sat, Feb 19, 2022 at 2:24 AM Nathan Bossart wrote: > > On Fri, Feb 18, 2022 at 10:48:10PM +0530, Ashutosh Sharma wrote: > > Some review comments on the latest version: > > Thanks for the feedback! Before I start spending more time on this one, I > should probably ask if t

Re: Make mesage at end-of-recovery less scary.

2022-02-18 Thread Ashutosh Sharma
On Thu, Feb 17, 2022 at 1:20 PM Kyotaro Horiguchi wrote: > > At Tue, 15 Feb 2022 20:17:20 +0530, Ashutosh Sharma > wrote in > > OK. The v13 patch looks good. I have marked it as ready to commit. > > Thank you for working on all my review comments. > > Thaks! But th

Re: Postgres restart in the middle of exclusive backup and the presence of backup_label file

2022-02-18 Thread Ashutosh Sharma
gdata/backup_label"); + Why do we need this additional change? Earlier this was not required. -- With Regards, Ashutosh Sharma. On Thu, Feb 17, 2022 at 6:41 AM Nathan Bossart wrote: > > Here is a rebased patch. > > -- > Nathan Bossart > Amazon Web Services: https://aws.amazon.com

Re: Make mesage at end-of-recovery less scary.

2022-02-17 Thread Ashutosh Sharma
On Thu, Feb 17, 2022 at 1:20 PM Kyotaro Horiguchi wrote: > > At Tue, 15 Feb 2022 20:17:20 +0530, Ashutosh Sharma > wrote in > > OK. The v13 patch looks good. I have marked it as ready to commit. > > Thank you for working on all my review comments. > > Thaks! But th

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-02-15 Thread Ashutosh Sharma
On Wed, Feb 16, 2022 at 1:01 AM Bharath Rupireddy wrote: > > On Mon, Feb 14, 2022 at 8:32 PM Ashutosh Sharma wrote: > > > > Here are few comments: > > Thanks for reviewing the patches. > > > +/* > > + * Verify the authenticity of the gi

Re: Identify missing publications from publisher while create/alter subscription.

2022-02-15 Thread Ashutosh Sharma
Thanks for working on the review comments. The changes in the new patch look good to me. I am marking it as ready to commit. -- With Regards, Ashutosh Sharma. On Sun, Feb 13, 2022 at 7:34 PM vignesh C wrote: > > On Fri, Feb 11, 2022 at 7:14 PM Ashutosh Sharma wrote: > > >

Re: Make mesage at end-of-recovery less scary.

2022-02-15 Thread Ashutosh Sharma
On Tue, Feb 15, 2022 at 7:52 AM Kyotaro Horiguchi wrote: > > At Mon, 14 Feb 2022 20:14:11 +0530, Ashutosh Sharma > wrote in > > No, I haven't tried to compare archive recovery to PITR or vice versa, > > instead I was trying to compare crash recovery with PITR. The m

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-02-14 Thread Ashutosh Sharma
o statements: UPDATE 70% of the tuple in the base table (dirty 70% of the shared buffers) && CREATE database using template DB (Actual test target). Just wanted to know if it can exceed the max_wal_size of 64GB. Also, is it possible to try with minimal wal_level? Sorry for asking you this, I could try it myself but I don't have any high level system to try it. -- With Regards, Ashutosh Sharma.

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-02-14 Thread Ashutosh Sharma
pg_waldump as possible so that if any changes happens in the pg_waldump in future it gets applied here as well and additionally it will also reduce the code duplication. I haven't yet looked into the code in detail. I will have a look at it asap. thanks. -- With Regards, Ashutosh Sharma. On Sat, F

Re: Identify missing publications from publisher while create/alter subscription.

2022-02-14 Thread Ashutosh Sharma
now my feedback. -- With Regards, Ashutosh Sharma. On Sun, Feb 13, 2022 at 7:34 PM vignesh C wrote: > > On Fri, Feb 11, 2022 at 7:14 PM Ashutosh Sharma wrote: > > > > I have spent little time looking at the latest patch. The patch looks > > to be in good shape as it h

Re: Identify missing publications from publisher while create/alter subscription.

2022-02-14 Thread Ashutosh Sharma
On Sun, Feb 13, 2022 at 7:32 PM vignesh C wrote: > > On Thu, Feb 10, 2022 at 3:15 PM Ashutosh Sharma wrote: > > > > On Wed, Feb 9, 2022 at 11:53 PM Euler Taveira wrote: > > > > > > On Wed, Feb 9, 2022, at 12:06 PM, Ashutosh Sharma wrote: > > > > &

Re: Make mesage at end-of-recovery less scary.

2022-02-14 Thread Ashutosh Sharma
Hi, On Thu, Feb 10, 2022 at 11:47 AM Kyotaro Horiguchi wrote: > > At Wed, 9 Feb 2022 17:31:02 +0530, Ashutosh Sharma > wrote in > > On Wed, Feb 9, 2022 at 1:14 PM Kyotaro Horiguchi > > wrote: > > > This means archive-recovery is requested but not started

  1   2   3   >