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
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 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
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-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-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-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.

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: 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;

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 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: 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: 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: 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: 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: 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

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.

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

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: 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

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-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 > > >

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-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 > > &

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: 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-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
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 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

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: 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,

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-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-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-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: Parallel copy

2020-06-12 Thread Ashutosh Sharma
you. -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com On Fri, Jun 12, 2020 at 11:01 AM vignesh C wrote: > On Thu, Jun 4, 2020 at 12:44 AM Andres Freund wrote > > > > > > Hm. you don't explicitly mention that in your design, but given how >

Re: Parallel copy

2020-06-15 Thread Ashutosh Sharma
, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com On Sat, Jun 13, 2020 at 9:42 AM Amit Kapila wrote: > On Fri, Jun 12, 2020 at 4:57 PM Ashutosh Sharma > wrote: > > > > Hi All, > > > > I've spent little bit of time going through the project discussion th

Re: Parallel copy

2020-06-19 Thread Ashutosh Sharma
er patches as of now. I will do that whenever possible. Thank you. -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com On Fri, Jun 12, 2020 at 11:01 AM vignesh C wrote: > On Thu, Jun 4, 2020 at 12:44 AM Andres Freund wrote > > > > > > Hm. you don't

Re: Parallel copy

2020-07-17 Thread Ashutosh Sharma
ine beaks* which possibly means line breaks. This is applicable for other comments as well where you 7) Is the following checking equivalent to IsWorker()? If so, it would be good to replace it with an IsWorker like macro to increase the readability. (IsParallelCopy() && !IsLeader()) -- With

ON SELECT rule on a table without columns

2019-02-07 Thread Ashutosh Sharma
1 as select from t2; ERROR: view must have at least one column OR, postgres=# create view v1 as select * from t2; ERROR: view must have at least one column Isn't that a bug in create rule command or am i missing something here ? If it is a bug, then, attached is the patch

Re: ON SELECT rule on a table without columns

2019-02-08 Thread Ashutosh Sharma
On Fri, Feb 8, 2019 at 12:48 PM Andres Freund wrote: > > Hi, > > On 2019-02-08 12:18:32 +0530, Ashutosh Sharma wrote: > > When "ON SELECT" rule is created on a table without columns, it > > successfully converts a table into the view. However, when the same is

Re: ON SELECT rule on a table without columns

2019-02-08 Thread Ashutosh Sharma
On Fri, Feb 8, 2019 at 3:05 PM Andres Freund wrote: > > > > On February 8, 2019 10:05:03 AM GMT+01:00, Rushabh Lathia > wrote: > >On Fri, Feb 8, 2019 at 12:48 PM Andres Freund > >wrote: > > > >> Hi, > >> > >> On 2019-02-08 12:18:32 +

Re: ON SELECT rule on a table without columns

2019-02-08 Thread Ashutosh Sharma
ease have a look and let me know your opinion. -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c index 65f4b40..c49ae97 100644 --- a/src/backend/commands/view.c +++ b/src/backend/commands/view.c @@ -11

Re: ON SELECT rule on a table without columns

2019-02-08 Thread Ashutosh Sharma
On Fri, Feb 8, 2019 at 11:32 PM Tom Lane wrote: > > Ashutosh Sharma writes: > > Attached is the patch that allows us to create view on a table without > > columns. I've also added some test-cases for it in create_view.sql. > > Please have a look and let me know your

Re: ON SELECT rule on a table without columns

2019-02-11 Thread Ashutosh Sharma
On Sat, Feb 9, 2019 at 12:20 AM Ashutosh Sharma wrote: > > On Fri, Feb 8, 2019 at 11:32 PM Tom Lane wrote: > > > > Ashutosh Sharma writes: > > > Attached is the patch that allows us to create view on a table without > > > columns. I've also added

Re: ON SELECT rule on a table without columns

2019-02-11 Thread Ashutosh Sharma
Thanks Andres for the quick review. On Mon, Feb 11, 2019 at 3:52 PM Andres Freund wrote: > > Hi, > > On 2019-02-11 15:39:03 +0530, Ashutosh Sharma wrote: > > Andres, Tom, Please have a look into the attached patch and let me > > know if I'm still missing somethin

Re: ON SELECT rule on a table without columns

2019-02-17 Thread Ashutosh Sharma
On Sun, Feb 17, 2019 at 11:10 PM Tom Lane wrote: > > Ashutosh Sharma writes: > > [ allow-create-view-on-table-without-columns-v3.patch ] > > Pushed. I revised the test cases a bit --- notably, I wanted to be > sure we exercised pg_dump's createDummyViewAsClause fo

Support for CALL statement in ecpg

2019-07-18 Thread Ashutosh Sharma
call stored procedures with different type of parameters. Please have a look and let me know your thoughts. Thank you. -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com diff --git a/src/interfaces/ecpg/preproc/ecpg.addons b/src/interfaces/ecpg/preproc/ecpg.addons index 4e

Re: Support for CALL statement in ecpg

2019-07-19 Thread Ashutosh Sharma
t in ecpg application would be like this: EXEC SQL CALL(:hv1, :hv2) INTO :ret1, ret2; EXEC SQL CALL(:hv1, :hv2) INTO :ret1 :ind1, :ret2, :ind2; In case if INTO clause is not used with the CALL statement then the ecpg compiler would fail with a parse error: "INTO clause is required with CALL

Utilisation of get_page_from_raw() in pageinspect

2018-06-27 Thread Ashutosh Sharma
n the pageinspect functions for btree and heap as well for safety purpose. Thoughts? -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com

Test-cases for deferred constraints in plpgsql_transaction.sql

2018-07-02 Thread Ashutosh Sharma
AINTS statements with deferrable constraints inside DO blocks. Please let me know your opinion on this. Thanks. -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com

Re: Test-cases for deferred constraints in plpgsql_transaction.sql

2018-07-02 Thread Ashutosh Sharma
On Mon, Jul 2, 2018 at 3:30 PM, Peter Eisentraut wrote: > On 02.07.18 11:46, Ashutosh Sharma wrote: >> Currently, I could see only one test-case for deferred constraints in >> plpgsql_transaction.sql file which tests if the constraint checking is >> happening during commit

Re: Test-cases for deferred constraints in plpgsql_transaction.sql

2018-07-02 Thread Ashutosh Sharma
On Mon, Jul 2, 2018 at 7:07 PM, Tom Lane wrote: > Ashutosh Sharma writes: >> On Mon, Jul 2, 2018 at 3:30 PM, Peter Eisentraut >> wrote: >>> I won't say we don't need more tests, but I don't see a particular >>> testing gap in this area. > &g

Inconsistent error message in bt_page_items_bytea().

2018-07-27 Thread Ashutosh Sharma
opy paste error which got transferred from bt_page_items (the function that doesn't deal with raw page). Attached is the patch with the correct error message. -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com diff --git a/contrib/pageinspect/btreefuncs.c b/contrib/pageinsp

Re: recovering from "found xmin ... from before relfrozenxid ..."

2020-09-14 Thread Ashutosh Sharma
ng some delay just before "-- now create an unused line pointer" and use the delay to start a new session either with repeatable read or serializable transaction isolation level and run some query on the test table. To fix this, as you suggested I've converted the test table to th

Re: recovering from "found xmin ... from before relfrozenxid ..."

2020-09-15 Thread Ashutosh Sharma
On Wed, Sep 16, 2020 at 1:25 AM Tom Lane wrote: > > Robert Haas writes: > > On Mon, Sep 14, 2020 at 6:26 AM Ashutosh Sharma > > wrote: > >> Thanks for reporting. I'm able to reproduce the issue by creating some > >> delay just before "--

Re: recovering from "found xmin ... from before relfrozenxid ..."

2020-09-15 Thread Ashutosh Sharma
On Wed, Sep 16, 2020 at 9:14 AM Tom Lane wrote: > > Ashutosh Sharma writes: > > On Wed, Sep 16, 2020 at 1:25 AM Tom Lane wrote: > >> * Should any of the other tables in the test be converted to temp? > > > Are you trying to say that we can achieve the things being

Re: recovering from "found xmin ... from before relfrozenxid ..."

2020-09-15 Thread Ashutosh Sharma
On Wed, Sep 16, 2020 at 10:40 AM Ashutosh Sharma wrote: > > On Wed, Sep 16, 2020 at 9:14 AM Tom Lane wrote: > > > > Ashutosh Sharma writes: > > > On Wed, Sep 16, 2020 at 1:25 AM Tom Lane wrote: > > >> * Should any of the other tables in the test be conv

Re: Parallel copy

2020-09-16 Thread Ashutosh Sharma
e. + */ +#define WORKER_CHUNK_COUNT 50 You may see these kinds of errors at other places as well if you scan through your patch. -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com On Wed, Aug 19, 2020 at 11:51 AM vignesh C wrote: > > Thanks Greg for reviewing the

Re: recovering from "found xmin ... from before relfrozenxid ..."

2020-09-16 Thread Ashutosh Sharma
e. > Looks good to me too. Thanks, -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com

Re: recovering from "found xmin ... from before relfrozenxid ..."

2020-09-20 Thread Ashutosh Sharma
ase let me know if I am missing something here. Thank you. > BTW, attached is a quick-hack patch to allow automated testing > of this scenario, along the lines I sketched yesterday. This > test passes if you run the two scripts serially, but not when > you run them in parallel. I'm not proposing this for commit; > it's a hack and its timing behavior is probably not stable enough > for the buildfarm. But it's pretty useful for poking at these > issues. > Yeah, understood, thanks for sharing this. -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com

Logical replication from PG v13 and below to PG v14 (devel version) is not working.

2020-09-21 Thread Ashutosh Sharma
table (i.e. no data replication happens) -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com

Re: Logical replication from PG v13 and below to PG v14 (devel version) is not working.

2020-09-21 Thread Ashutosh Sharma
ly support protocol %d or lower", data->protocol_version, LOGICALREP_PROTO_VERSION_NUM))); Other than this, I don't have any comments. On Mon, Sep 21, 2020 at 5:34 PM Dilip Kumar wrote: > > On Mon, Sep 21, 2020 at 4:15 PM Dilip Kumar wrote: > > > > On Mon

Re: Logical replication from PG v13 and below to PG v14 (devel version) is not working.

2020-09-21 Thread Ashutosh Sharma
On Mon, Sep 21, 2020 at 6:58 PM Amit Kapila wrote: > > On Mon, Sep 21, 2020 at 6:27 PM Ashutosh Sharma wrote: > > > > Thanks Dilip for the patch. AFAIU, the fix looks good. One small comment: > > > > Thanks Ashutosh and Dilip for working on this. I'll look i

Re: Logical replication from PG v13 and below to PG v14 (devel version) is not working.

2020-09-21 Thread Ashutosh Sharma
On Tue, Sep 22, 2020 at 12:02 PM Amit Kapila wrote: > > On Tue, Sep 22, 2020 at 8:34 AM Ashutosh Sharma wrote: > > > > On Mon, Sep 21, 2020 at 6:58 PM Amit Kapila wrote: > > > > > > On Mon, Sep 21, 2020 at 6:27 PM Ashutosh Sharma > > > wrote: >

Re: Logical replication from PG v13 and below to PG v14 (devel version) is not working.

2020-09-21 Thread Ashutosh Sharma
On Tue, Sep 22, 2020 at 12:22 PM Ashutosh Sharma wrote: > > On Tue, Sep 22, 2020 at 12:02 PM Amit Kapila wrote: > > > > On Tue, Sep 22, 2020 at 8:34 AM Ashutosh Sharma > > wrote: > > > > > > On Mon, Sep 21, 2020 at 6:58 PM Amit Kapila > > >

Re: Logical replication from PG v13 and below to PG v14 (devel version) is not working.

2020-09-24 Thread Ashutosh Sharma
will start streaming changes for the in-progress transactions even if the streaming was disabled while creating the subscription, won't it? Please let me know if I am missing something here. Thanks, -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com

Re: Parallel copy

2020-09-24 Thread Ashutosh Sharma
F-8. > Thanks Bharath for the testing. The results look impressive. -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com

Re: Logical replication from PG v13 and below to PG v14 (devel version) is not working.

2020-09-24 Thread Ashutosh Sharma
On Fri, Sep 25, 2020 at 8:12 AM Amit Kapila wrote: > > On Thu, Sep 24, 2020 at 6:33 PM Ashutosh Sharma wrote: > > > > Hi Amit, > > > > > Here, I think instead of using MySubscription->stream, we should use > > > server/walrecv version number as we use

Re: Parallel copy

2020-09-28 Thread Ashutosh Sharma
On Mon, Sep 28, 2020 at 3:01 PM Amit Kapila wrote: > > On Tue, Sep 22, 2020 at 2:44 PM vignesh C wrote: > > > > Thanks Ashutosh for your comments. > > > > On Wed, Sep 16, 2020 at 6:36 PM Ashutosh Sharma > > wrote: > > > > > > Hi Vignesh,

Re: Parallel copy

2020-10-23 Thread Ashutosh Sharma
e in copyparallel.c file. For reference, please see how a brief description about parallel vacuum has been added in the vacuumlazy.c file. * Lazy vacuum supports parallel execution with parallel worker processes. In * a parallel vacuum, we perform both index vacuum and index cleanup with

Re: Parallel copy

2020-10-23 Thread Ashutosh Sharma
On Fri, Oct 23, 2020 at 5:42 PM Ashutosh Sharma wrote: > > Hi Vignesh, > > Thanks for the updated patches. Here are some more comments that I can > find after reviewing your latest patches: > > +/* > + * This structure helps in storing the common data from CopyStateData th

Re: New committers announced at PGCon 2018

2018-06-01 Thread Ashutosh Sharma
Congrats everyone and special congratulations to Amit for becoming the first Indian PostgreSQL committer !! On Sat, Jun 2, 2018 at 9:40 AM, Nikolay Samokhvalov wrote: > сб, 2 июня 2018 г. в 1:10, Teodor Sigaev : > >> >> > Etsuro Fujita >> > Peter Geoghegan >> > Amit Kapila >> > Alexander Korotko

Re: install doesn't work on HEAD

2018-06-05 Thread Ashutosh Sharma
from Install.pm's lcopy function Commit 3a7cc727c was a little over eager about adding an explicit return to this function, whose value is checked in most call sites. This change reverses that and returns the expected value explicitly. It also adds a check to the one call site lacking one. -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com > > > -- > With Regards, > Amit Kapila. > EnterpriseDB: http://www.enterprisedb.com

Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query

2018-06-21 Thread Ashutosh Sharma
ting to me. But, as Euler Taveira mentioned, can't we extend an existing function pg_stat_statements_reset() instead of adding a new one and update the documentation for it. Also, in the test-case it would be good to display the output of pg_stat_statements before and after deleting the query. Than

Re: Incorrect errno used with %m for backend code

2018-06-22 Thread Ashutosh Sharma
Hi, It seems like in case of few system calls for e.g. write system call, errno is not set even if the number of bytes written is smaller than the bytes requested and for such cases we explicitly set an errno to ENOSPC. Something like this, /* * if write didn't se

Re: Incorrect errno used with %m for backend code

2018-06-22 Thread Ashutosh Sharma
On Fri, Jun 22, 2018 at 2:44 PM, Michael Paquier wrote: > On Fri, Jun 22, 2018 at 01:00:45PM +0530, Ashutosh Sharma wrote: >> It seems like in case of few system calls for e.g. write system call, >> errno is not set even if the number of bytes written is smaller than >> th

Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query

2018-06-22 Thread Ashutosh Sharma
On Sat, Jun 23, 2018 at 7:36 AM, Haribabu Kommi wrote: > On Sat, Jun 23, 2018 at 5:45 AM Euler Taveira wrote: >> >> 2018-06-22 12:06 GMT-03:00 Robert Haas : >> > On Wed, Jun 20, 2018 at 10:19 AM, Euler Taveira >> > wrote: >> >> 2018-06-20 4:30 GMT-03:00 Haribabu Kommi : >> >>> Attached is a simp

Re: Incorrect errno used with %m for backend code

2018-06-23 Thread Ashutosh Sharma
On Sat, Jun 23, 2018 at 6:43 PM, Michael Paquier wrote: > On Fri, Jun 22, 2018 at 03:45:33PM +0530, Ashutosh Sharma wrote: >> Okay, thanks for the confirmation. Few of them are also there in >> origin.c and snapbuild.c files. > > Thanks Ashutosh. I have been reviewing the w

test_session_hooks--1.0.sql file in 'test_session_hooks' needs correction

2017-11-16 Thread Ashutosh Sharma
to load this file. \quit Note : Please ignore this mail if it has already been reported by someone. -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com

Re: test_session_hooks--1.0.sql file in 'test_session_hooks' needs correction

2017-11-16 Thread Ashutosh Sharma
On Thu, Nov 16, 2017 at 6:47 PM, Michael Paquier wrote: > On Thu, Nov 16, 2017 at 7:49 PM, Ashutosh Sharma > wrote: > > The test_session_hooks--1.0.sql file in the newly added > 'test_session_hooks' > > module suggests to load the extension named &

Re: pgsql: Disable installcheck tests for test_session_hooks

2017-11-16 Thread Ashutosh Sharma
TRAP: BadState("!(((bool) ((CurrentUserId) != ((Oid) 0", File: "miscinit.c", Line: 286) 2017-11-16 19:06:22.090 IST [65378] LOG: background worker "logical replication launcher" (PID 65387) exited with exit code 1 2017-11-16 19:06:22.337 IST [6537

Re: [HACKERS] [PATCH] A hook for session start

2017-11-16 Thread Ashutosh Sharma
. [1] - https://www.postgresql.org/message-id/CAE9k0P%3DtX_egPEX9NzPrroumXt5%3DbOQBiP98CaLzHOyXk7%2Bq7Q%40mail.gmail.com -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com > https://www.postgresql.org/message-id/flat/30479.1510800078%40sss.pgh.pa.us#30479.1510800...@sss

Reference link for applicable_roles view is missing in the documentation of enabled_roles

2018-08-24 Thread Ashutosh Sharma
, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com diff --git a/doc/src/sgml/information_schema.sgml b/doc/src/sgml/information_schema.sgml index 09ef282..6d1a38e 100644 --- a/doc/src/sgml/information_schema.sgml +++ b/doc/src/sgml/information_schema.sgml @@ -2621,8 +2621,9 @@ ORDER BY

table_privileges view under information_schema doesn't show privileges on materialized views

2018-08-24 Thread Ashutosh Sharma
cs/devel/static/infoschema-table-privileges.html -- With Regards, Ashutosh Sharma EnterpriseDB:http://www.enterprisedb.com From 1c456ad6ee6377743b764bd16c87c435d6f2d63f Mon Sep 17 00:00:00 2001 From: ashu Date: Thu, 23 Aug 2018 14:45:51 +0530 Subject: [PATCH] Allow table_privileges view in informatio

Re: table_privileges view under information_schema doesn't show privileges on materialized views

2018-08-24 Thread Ashutosh Sharma
On Fri, Aug 24, 2018 at 9:06 PM, Tom Lane wrote: > Ashutosh Sharma writes: >> Currently, table_privileges view in information_schema.sql doesn't >> show privileges on materialized views for currently enabled roles. As >> per the documentation-[1], it should be

Re: table_privileges view under information_schema doesn't show privileges on materialized views

2018-08-27 Thread Ashutosh Sharma
On Fri, Aug 24, 2018 at 9:06 PM, Tom Lane wrote: > Ashutosh Sharma writes: >> Currently, table_privileges view in information_schema.sql doesn't >> show privileges on materialized views for currently enabled roles. As >> per the documentation-[1], it should be

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-02-11 Thread Ashutosh Sharma
Hi Robert, On Tue, Feb 4, 2025 at 10:54 PM Robert Haas wrote: > > On Thu, Jan 30, 2025 at 8:45 AM Ashutosh Sharma wrote: > > Imagine a superuser creates role u1. Since the superuser is creating > > u1, it won't have membership in any role. Now, suppose u1 creates a &g

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-01-30 Thread Ashutosh Sharma
Hi All, On Fri, Jan 24, 2025 at 9:34 PM Ashutosh Sharma wrote: > > On Fri, Jan 24, 2025 at 8:23 PM Andrew Dunstan wrote: > > > > > > On 2025-01-23 Th 4:06 PM, Robert Haas wrote: > > > On Thu, Jan 23, 2025 at 3:51 PM Andres Freund wrote: > > >> I wo

Orphaned users in PG16 and above can only be managed by Superusers

2025-01-08 Thread Ashutosh Sharma
e the authority to administer userC (the orphaned user in this case), which may not be feasible for cloud environments where superuser access is restricted. -- With Regards, Ashutosh Sharma.

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-01-21 Thread Ashutosh Sharma
Hi All, On Thu, Jan 9, 2025 at 11:01 AM Ashutosh Sharma wrote: > > Hi All, > > Starting from PG16, it seems that orphaned users can only be managed > by superusers. For example, if userA creates userB, and userB creates > userC, then both userB (the parent of userC) and userA

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-01-22 Thread Ashutosh Sharma
Hi Robert, On Tue, Jan 21, 2025 at 10:22 PM Robert Haas wrote: > > On Thu, Jan 9, 2025 at 12:31 AM Ashutosh Sharma wrote: > > Starting from PG16, it seems that orphaned users can only be managed > > by superusers. For example, if userA creates userB, and userB creates > >

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-01-24 Thread Ashutosh Sharma
dminister any other role should be different than > > dropping one that does. > > > > That seems reasonable and consistent with what we do elsewhere, as > Andres noted. > Thank you all for your valuable inputs and suggestions. Based on the consensus, we will move forward with this solution. I'll start working on the coding part and share the patch for review by next week. -- With Regards, Ashutosh Sharma.

Re: New committer: Jacob Champion

2025-04-13 Thread Ashutosh Sharma
Many Congratulations, Jacob. On Mon, Apr 14, 2025 at 11:00 AM Kashif Zeeshan wrote: > > Congrats Jacob. > > On Mon, Apr 14, 2025 at 8:32 AM Ashutosh Bapat > wrote: >> >> Hearty congratulations Jacob. >> >> On Mon, Apr 14, 2025 at 6:55 AM Richard Guo wrote: >> > >> > On Sat, Apr 12, 2025 at 5:2

Orphaned Files in PostgreSQL

2025-02-18 Thread Ashutosh Sharma
ld be grateful if you could point me to the relevant discussion thread so I can follow the progress and contribute if needed. Thank you for your time and assistance. -- With Regards, Ashutosh Sharma.

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-02-18 Thread Ashutosh Sharma
Hi Robert, On Tue, Feb 11, 2025 at 9:48 PM Ashutosh Sharma wrote: > > Hi Robert, > > On Tue, Feb 4, 2025 at 10:54 PM Robert Haas wrote: > > > > On Thu, Jan 30, 2025 at 8:45 AM Ashutosh Sharma > > wrote: > > > Imagine a superuser creates role u1. Since

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-02-28 Thread Ashutosh Sharma
Added a commitfest entry for this here: https://commitfest.postgresql.org/patch/5608/ -- With Regards, Ashutosh Sharma. On Tue, Feb 18, 2025 at 2:54 PM Ashutosh Sharma wrote: > > Hi Robert, > > On Tue, Feb 11, 2025 at 9:48 PM Ashutosh Sharma wrote: > > > > Hi Rober

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-03-05 Thread Ashutosh Sharma
t; drop completes? > I believe it is; I may need to adjust the location from where I'm calling check_drop_role_dependency() to take care of this. I'll address this in the next patch version. Thanks for bringing up this concern. -- With Regards, Ashutosh Sharma.

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-03-05 Thread Ashutosh Sharma
troduce any race conditions? For example, is it possible for > > the new check to pass and then for a dependency to be added before the > > drop completes? > > This is a serious concern for me as well. > This too will be taken care of in the next patch. -- With Regards, Ashutosh Sharma.

Re: Orphaned users in PG16 and above can only be managed by Superusers

2025-03-06 Thread Ashutosh Sharma
role drop is completed, addressing comments from Nathan and Robert. 3) Improved the error message to display the role dependencies in detail, addressing feedback from Robert. Please have a look and let me know for any further comments. Thanks. -- With Regards, Ashutosh Sharma. v2-0001-Add

<    1   2   3   4   >