Re: pg_replslotdata - a tool for displaying replication slot information

2023-04-13 Thread Gurjeet
clusion in Postgres. Best regards, Gurjeet, http://Gurje.et Postgres Contributors Team, https://aws.amazon.com/opensource

Re: Auto explain after query timeout

2022-09-20 Thread Gurjeet
ain.log_min_duration equal to, or less than, statement_timeout. Best regards, Gurjeet http://Gurje.et

Re: Auto explain after query timeout

2022-09-20 Thread Gurjeet
On Tue Sep 20, 2022 at 11:34 AM PDT, James Coleman wrote: > On Tue, Sep 20, 2022 at 2:12 PM Gurjeet wrote: > > > > For someone who would like to achieve this in the field today, I believe > > they can set auto_explain.log_min_duration equal to, or less than, > > statem

Patch: Code comments: why some text-handling functions are leakproof

2022-01-10 Thread Gurjeet Singh
https://www.postgresql.org/message-id/flat/673096.1630006990%40sss.pgh.pa.us#cd378cba4b990fda070c6fa4b51a069c Best regards, -- Gurjeet Singh http://gurjeet.singh.im/ leakproof_comments.patch Description: Binary data

Begin a transaction on a SAVEPOINT that is outside any transaction

2021-11-22 Thread Gurjeet Singh
ocks ROLLBACK TO SAVEPOINT one; ERROR: ROLLBACK TO SAVEPOINT can only be used in transaction blocks RELEASE SAVEPOINT one; ERROR: RELEASE SAVEPOINT can only be used in transaction blocks Best regards, -- Gurjeet Singh http://gurjeet.singh.im/

Fix comment in pgcrypto tests

2019-05-27 Thread Gurjeet Singh
Please see attached the patch that corrects the file-level SQL comment that indicates which submodule of pgcrypto is being tested. Best regards, -- Gurjeet Singh http://gurjeet.singh.im/ pgcrypto-test-comments.patch Description: Binary data

Re: Fix comment in pgcrypto tests

2019-05-28 Thread Gurjeet Singh
:25:37PM -0700, Gurjeet Singh wrote: > > Please see attached the patch that corrects the file-level SQL comment > that > > indicates which submodule of pgcrypto is being tested. > > Thanks, committed. There was a second one in pgp-decrypt.sql. > -- > Michael > -- Gurjeet Singh http://gurjeet.singh.im/

Re: Proposal: :SQL_EXEC_TIME (like :ROW_COUNT) Variable (psql)

2023-02-23 Thread Gurjeet Singh
the timing info will be collected all the time. So do consider evaluating the performance impact this can cause on people's workloads. They may not care for the impact in interactive mode, but in automated scripts, even a moderate performance overhead would be a deal-breaker. [1]: https://git

Named Operators

2023-01-12 Thread Gurjeet Singh
l, a :add_point: '(1,1)' as modified from test; drop operator :add_point:(box, point); Feedback will be much appreciated! [1]: Commit: Don't strip the delimiters https://github.com/gurjeet/postgres/commit/62d11a578e5325c32109bb2a55a624d0d89d4b7e [2]: Git branch named_operat

Re: Named Operators

2023-01-12 Thread Gurjeet Singh
Please see attached a slightly updated patch. There were some comment changes sitting in uncommitted in Git worktree, that were missed. Best regards, Gurjeet http://Gurje.et named_operators_v1.patch Description: Binary data

Re: Named Operators

2023-01-12 Thread Gurjeet Singh
On Thu, Jan 12, 2023 at 1:49 AM Matthias van de Meent wrote: > > On Thu, 12 Jan 2023 at 10:16, Gurjeet Singh wrote: > > > > Technically correct name of this feature would be Readable Names for > > Operators, or Pronounceable Names for Operators. But I'd like t

Re: Named Operators

2023-01-14 Thread Gurjeet Singh
On Thu, Jan 12, 2023 at 5:55 AM Matthias van de Meent wrote: > On Thu, 12 Jan 2023 at 11:59, Gurjeet Singh wrote: > > ... defining an operator > > gives you many additional features that the planner can use to > > optimize your query differently, which it can't do w

Make message strings in fe-connect.c consistent

2023-04-20 Thread Gurjeet Singh
own strings v1-0001-Replace-placeholders-with-known-strings.patch [3]: Make require_auth error message similar to surrounding messages v1-0001-Make-require_auth-error-message-similar-to-surrou.patch Best regards, Gurjeet http://Gurje.et Postgres Contributors Team, http://aws.amazon.com v1-0

Re: Make message strings in fe-connect.c consistent

2023-04-20 Thread Gurjeet Singh
On Thu, Apr 20, 2023 at 9:31 PM Tom Lane wrote: > > Gurjeet Singh writes: > > When reviewing a recently committed patch [1] I noticed the odd usage > > of a format specifier: > > > + libpq_append_conn_error(co

Minor code de-duplication in fe-connect.c

2023-04-20 Thread Gurjeet Singh
regards, Gurjeet https://Gurje.et Postgres Contributors Team, http://aws.amazon.com v0-0001-Reduce-code-duplication-in-fe-connect.c.patch Description: Binary data

Reorder connection markers in libpq TAP tests

2023-04-20 Thread Gurjeet Singh
ngs so that a reader doesn't have to spend extra deciphering why 'connect2' tests appear before 'connect1' tests. Best regards, Gurjeet https://Gurje.et Postgres Contributors Team, http://aws.amazon.com v0-0001-Reorder-connection-markers-in-TAP-tests.patch Description: Binary data

Re: Reorder connection markers in libpq TAP tests

2023-04-20 Thread Gurjeet Singh
On Thu, Apr 20, 2023 at 11:00 PM Gurjeet Singh wrote: > > Commit 7f5b198 introduced TAP tests that use string literals to mark > the presence of a query in server logs. For no explicable reason, the > tests with the marker 'connect2' occur before the tests that use > &

Re: Minor code de-duplication in fe-connect.c

2023-04-21 Thread Gurjeet Singh
e libpq feature. This patch is merely a minor improvement to the code that I think deserves a consideration. It's not a litigation, by any means. Best regards, Gurjeet https://Gurje.et Postgres Contributors Team, http://aws.amazon.com

Re: Correct the documentation for work_mem

2023-04-21 Thread Gurjeet Singh
7;re speaking of the per-hash-table limit or some > (nonexistent) overall limit. How about > > - memory available for hash tables is computed by multiplying > + memory limit for a hash table is computed by multiplying +1 Best regards, Gurjeet https://Gurje.et Postgres Contributors Team, http://aws.amazon.com

Mark a transaction uncommittable

2023-04-22 Thread Gurjeet Singh
]; I'm not yet sure if the COMMIT AND CHAIN command should carry this characteristic to the next transaction. Thoughts? Best regards, Gurjeet https://Gurje.et http://aws.amazon.com

Re: [PATCH] Infinite loop while acquiring new TOAST Oid

2023-04-22 Thread Gurjeet Singh
est regards, Gurjeet http://Gurje.et http://aws.amazon.com

Re: Doc limitation update proposal: include out-of-line OID usage per TOAST-ed columns

2023-04-22 Thread Gurjeet Singh
ed. Please submit a patch. I anticipate that edits to Appendix K Postgres Limits will prompt improving the note in there about the maximum column limit, That note is too wordy, and sometimes confusing, especially for the audience that it's written for: newcomers to Postgres ecosystem. Best regards, Gurjeet https://Gurje.et http://aws.amazon.com

Re: Minor code de-duplication in fe-connect.c

2023-04-24 Thread Gurjeet Singh
On Mon, Apr 24, 2023 at 5:14 AM Daniel Gustafsson wrote: > > On 21 Apr 2023, at 18:38, Gurjeet Singh wrote: > > > > On Fri, Apr 21, 2023 at 7:47 AM Robert Haas > wrote: > >> > >> On Fri, Apr 21, 2023 at 8:25 AM Daniel Gustafsson > wrote: > >>

Postgres Index Advisor status and GSoC (was: Re: Returning to Postgres community work)

2023-05-11 Thread Gurjeet Singh
On Tue, Aug 31, 2021 at 10:02 AM Gurjeet Singh wrote: > On Tue, Aug 31, 2021 at 8:04 AM Alvaro Herrera > wrote: > > > You know what I've heard? That your index advisor module languishes > > unmaintained and that there's no shortage of people wishing to use it. &

Re: Remove extraneous break condition in logical slot advance function

2023-10-21 Thread Gurjeet Singh
ing one (very cheap, in common case) extra call of this macro. Best regards, Gurjeet http://Gurje.et

Replace references to malloc() in libpq documentation with generic language

2023-10-23 Thread Gurjeet Singh
One mention of malloc is left intact, because that mention is unrelated to how the memory is allocated, or how to free it. In passing, slightly improve the language of PQencryptPasswordConn() documentation. Best regards, Gurjeet http://Gurje.et v1-0001-Replace-references-to-malloc-in-

Re: simplehash: preserve consistency in case of OOM

2023-11-17 Thread Gurjeet Singh
H_ELEMENT_TYPE) * size); > > > > + SH_UPDATE_PARAMETERS(tb, size); > > return tb; > > } > > Maybe add a comment explaining why it's important to update parameters after > allocating? Perhaps something like this: + /* + * Update parameters _after_ allocation succeeds; prevent + * bogus/corrupted state. + */ + SH_UPDATE_PARAMETERS(tb, size); Best regards, Gurjeet http://Gurje.et

Re: Change GUC hashtable to use simplehash?

2023-11-17 Thread Gurjeet Singh
ized implementation * for hash tables that aren't performance or space sensitive. But your argument of a nicer API might make a case for the patch. I Best regards, Gurjeet http://Gurje.et

Re: Document that server will start even if it's unable to open some TCP/IP ports

2023-09-12 Thread Gurjeet Singh
"open a > > port," but otherwise it LGTM. > > Agreed, I never liked the "port" mention. I couldn't figure how to get > "open" out of the warning sentence though. Updated patch attached. LGTM. Best regards, Gurjeet http://Gurje.et

Re: Document that server will start even if it's unable to open some TCP/IP ports

2023-10-01 Thread Gurjeet Singh
arked the CF item [1] as 'Committed', and specified Bruce as the committer. [1]: https://commitfest.postgresql.org/45/4333/ Best regards, Gurjeet http://Gurje.et

Re: [PoC/RFC] Multiple passwords, interval expirations

2023-10-04 Thread Gurjeet Singh
he better mechanism. I realize that allowing for a maximum of 2 passwords goes against the zero-one-infinity rule [1], but I think in the case of password rollovers it's perfectly acceptable to limit the number of active passwords to just 2. If there are use cases, either related to password rollovers, or in its vicinity, that can be better addressed by allowing an arbitrarily many passwords, I would love to learn about them and change this design to accommodate for those use cases, or perhaps revert to pursuing the multiple-passwords feature. [1]: https://en.wikipedia.org/wiki/Zero_one_infinity_rule Best regards, Gurjeet http://Gurje.et

Re: Good News Everyone! + feature proposal

2023-10-05 Thread Gurjeet Singh
:-) > Jon Erdman (aka StuckMojo on IRC) TIL. I wish there was a directory of IRC identities that pointed to real identities (at least for folks who don't mind this mapping available in the open), so that when we converse in IRC, we have a face to go with the IRC handles. As a human I feel that necessity. Best regards, Gurjeet http://Gurje.et

Re: [PoC/RFC] Multiple passwords, interval expirations

2023-10-05 Thread Gurjeet Singh
On Thu, Oct 5, 2023 at 12:04 PM Nathan Bossart wrote: > > On Wed, Oct 04, 2023 at 10:41:15PM -0700, Gurjeet Singh wrote: > > The patches posted in this thread so far attempt to add the ability to > > allow the user to have an arbitrary number of passwords. I believe > >

Re: [PoC/RFC] Multiple passwords, interval expirations

2023-10-05 Thread Gurjeet Singh
above proposal addresses the use case you describe. > if we allow multiple deprecated passwords, we'd still have to come up > with some way to address them (names, numbers, validity period, > something). But by isolating the problem to deprecated passwords only, > it feels like the system is still being restored to a clean state with > at most one single current password. The awkwardness is contained to > old passwords which will hopefully go away soon anyway and not > represent permanent clutter. +1 Best regards, Gurjeet http://Gurje.et

Re: [PoC/RFC] Multiple passwords, interval expirations

2023-10-08 Thread Gurjeet Singh
g like a tombstone, and the case where the user may want to extend the validity of a password, instead of having to create a new one and change application configuration(s) to specify the new password. Best regards, Gurjeet http://Gurje.et

Re: [PoC/RFC] Multiple passwords, interval expirations

2023-10-08 Thread Gurjeet Singh
ould apply to all passwords, irrespective of which command/feature was used to create a password. Best regards, Gurjeet http://Gurje.et

Re: [PoC/RFC] Multiple passwords, interval expirations

2023-10-08 Thread Gurjeet Singh
On Fri, Oct 6, 2023 at 1:29 PM Jeff Davis wrote: > > On Thu, 2023-10-05 at 14:28 -0700, Gurjeet Singh wrote: > > > This way there's a notion of a 'new' and 'old' passwords. > > IIUC, you are proposing that there are exactly two slots, NEW and OLD. &

Re: [PoC/RFC] Multiple passwords, interval expirations

2023-10-09 Thread Gurjeet Singh
On Sun, Oct 8, 2023 at 1:01 PM Gurjeet Singh wrote: > > On Fri, Oct 6, 2023 at 1:29 PM Jeff Davis wrote: > > > > On Thu, 2023-10-05 at 14:28 -0700, Gurjeet Singh wrote: > > > > > This way there's a notion of a 'new' and 'old' passwords.

Re: [PoC/RFC] Multiple passwords, interval expirations

2023-10-09 Thread Gurjeet Singh
On Mon, Oct 9, 2023 at 2:31 AM Gurjeet Singh wrote: > > Next steps: > - Break the patch into a series of smaller patches. Please see attached the same v3 patch, but now split into 3 separate patches. Each patch in the series depends on the previous patch to have been applied. I have

Minor edit to src/bin/pg_upgrade/IMPLEMENTAION

2023-10-09 Thread Gurjeet Singh
The attached patch adds the word 'databases' to show that template0, template1 and postgres are databases in a default installation. Best regards, Gurjeet http://Gurje.et pg_upgrade.implementation.diff Description: Binary data

Re: pg_reload_conf() synchronously

2022-11-05 Thread Gurjeet Singh
On Sat, Nov 5, 2022 at 11:23 AM Andres Freund wrote: > > As far as I know, Gurjeet has been annoyed only with non-user-settable > > GUCs for one connection (correct me of course), there was nothing > > fancy with isolation tests, yet. Not saying that this is useless for > &g

Re: Named Operators

2023-01-20 Thread Gurjeet Singh
On Sat, Jan 14, 2023 at 6:14 AM Gurjeet Singh wrote: > > I agree that an identifier _surrounded_ by the same token (e.g. #foo#) > or the pairing token (e.g. {foo}) looks better aesthetically, so I am > okay with any of the following variations of the scheme, as well: > > \#foo

Re: Named Operators

2023-01-20 Thread Gurjeet Singh
tifier() does not check if the passed string is shorter than NAMEDATALEN. Best regards, Gurjeet http://Gurje.et named_operators_v4.patch Description: Binary data

Re: generate_series for timestamptz and time zone problem

2023-01-29 Thread Gurjeet Singh
ays ago, since you hadn't responded in a while, and I presumed you're not working on this anymore. I should've consulted with/notified you of my intent before starting to work on it, to avoid duplication of work. Sorry if this submission obviates any work you have in

Re: generate_series for timestamptz and time zone problem

2023-01-30 Thread Gurjeet Singh
On Mon, Jan 30, 2023 at 4:07 PM Tom Lane wrote: > Gurjeet Singh writes: > > [ generate_series_with_timezone.v6.patch ] > > The cfbot isn't terribly happy with this. It looks like UBSan > is detecting some undefined behavior. Possibly an uninitialized > variable? It

Assert fcinfo has enough args before allowing parameter access (was: Re: generate_series for timestamptz and time zone problem)

2023-01-30 Thread Gurjeet Singh
On Mon, Jan 30, 2023 at 11:50 PM Gurjeet Singh wrote: > It was the classical case of out-of-bounds access. > This mistake would've been caught early if there were assertions > preventing access beyond the number of arguments passed to the > function. I'll send the assert_e

pg_reload_conf() synchronously

2022-11-04 Thread Gurjeet Singh
n the past (see [1]) that possibly may be alleviated by this approach of applying config changes synchronously. [1]: https://www.postgresql.org/message-id/2138662.1623460441%40sss.pgh.pa.us [2]: https://github.com/gurjeet/postgres/tree/reload_my_conf Best regards, Gurjeet http:

Automatic notification for top transaction IDs

2021-06-22 Thread Gurjeet Singh
onse at any point in the protocol. Best regards, -- Gurjeet Singh http://gurjeet.singh.im/ notify_xid.patch Description: Binary data

Automatic notification of top transaction IDs

2021-06-30 Thread Gurjeet Singh
email [4] is considered a continuation of a previous thread, _and_ the 'Latest attachment' entry points to a different email, even though my email [4] contained a patch. [4]: https://www.postgresql.org/message-id/CABwTF4VS+HVm11XRE_Yv0vGmG=5kpYdx759RyJEp9F+fiLTU=q...@mail.gmail.com

Re: Automatic notification of top transaction IDs

2021-06-30 Thread Gurjeet Singh
The proposed patch is attached. Best regards, -- Gurjeet Singh http://gurjeet.singh.im/ On Wed, Jun 30, 2021 at 5:56 PM Gurjeet Singh wrote: > > (Re-sending this email, because the Commitfest app mistakenly [3] > considered previous email [4] to be part of the old thread, whereas it

Slightly improve initdb --sync-only option's help message

2021-07-06 Thread Gurjeet Singh
modify any data To match the wording of --sync-only option: write contents of data directory to disk; helpful after --no-sync option Clearly specify the system operation used for the option perform fsync on data directory; helpful after --no-sync option Best regards, -- Gurjeet Singh http

Warn if initdb's --sync-only option is mixed with other options

2021-07-06 Thread Gurjeet Singh
Z5NJQ9rKY9tN82NXM8QH%2BiQ%40mail.gmail.com Best regards, -- Gurjeet Singh http://gurjeet.singh.im/ v1-0001-Warn-if-sync-only-is-used-with-other-options.patch Description: Binary data

Patch: Don't set LoadedSSL unless secure_initialize succeeds

2022-05-21 Thread Gurjeet Singh
n() behave identical to other places (SIGHUP handler, and SubPostmasterMain()) where LoadedSSL is turned on after checking success of secure_initialize() call. Upon failure of secure_initialize(), it now emits a log message, instead of setting LoadedSSL to true. Best regards, Gurjeet http:

Re: Patch: Don't set LoadedSSL unless secure_initialize succeeds

2022-05-25 Thread Gurjeet Singh
On Sun, May 22, 2022 at 12:17 AM Daniel Gustafsson wrote: > > On 22 May 2022, at 08:41, Gurjeet Singh wrote: > > > The initialization in PostmasterMain() blindly turns on LoadedSSL, > > irrespective of the outcome of secure_initialize(). > > This call is invoked with i

Re: Patch: Don't set LoadedSSL unless secure_initialize succeeds

2022-05-25 Thread Gurjeet Singh
On Mon, May 23, 2022 at 8:51 PM Tom Lane wrote: > > Daniel Gustafsson writes: > >> On 22 May 2022, at 08:41, Gurjeet Singh wrote: > >> The initialization in PostmasterMain() blindly turns on LoadedSSL, > >> irrespective of the outcome of secure_initialize()

Re: Patch: Don't set LoadedSSL unless secure_initialize succeeds

2022-05-25 Thread Gurjeet Singh
On Wed, May 25, 2022 at 10:05 PM Gurjeet Singh wrote: > I have added a comment to be_tls_init(), which I hope explains this > difference in treatment of errors. I have also added comments to > be_tls_init(), explaining why we don't destroy/free the global > SSL_context varia

Re: Patch: Don't set LoadedSSL unless secure_initialize succeeds

2022-05-26 Thread Gurjeet Singh
On Thu, May 26, 2022 at 12:16 PM Tom Lane wrote: > Gurjeet Singh writes: > > On Mon, May 23, 2022 at 8:51 PM Tom Lane wrote: > >> The comments for secure_initialize() and be_tls_init() both explain > >> this already. > > > The comments above secure_initia

Re: Patch: Don't set LoadedSSL unless secure_initialize succeeds

2022-05-26 Thread Gurjeet Singh
On Thu, May 26, 2022 at 1:00 PM Robert Haas wrote: > > On Thu, May 26, 2022 at 1:05 AM Gurjeet Singh wrote: > > There's an symmetry, almost a diametric opposition, between how SSL I meant "an asymmetry". > > initialization error is treated when it occurs durin

Re: Patch: Don't set LoadedSSL unless secure_initialize succeeds

2022-05-26 Thread Gurjeet Singh
d in context of: enum InitializationReason { ServerStartup, ServerReload }. In these functions, it's not important to know the distinction of whether the server is starting-up vs. already running (or whatever other states the server may be in) , instead it's important to know the distinction of whether the server is starting-up or being reloaded; other states of the server operation, if any, do not matter here. Best regards, Gurjeet http://Gurje.et

Re: Patch: Don't set LoadedSSL unless secure_initialize succeeds

2022-05-26 Thread Gurjeet Singh
On Thu, May 26, 2022 at 4:13 PM Tom Lane wrote: > Gurjeet Singh writes: > > On Thu, May 26, 2022 at 12:16 PM Tom Lane wrote: > >> so maybe those comments in libpq-be.h > >> should be moved to their respective functions? In any case, I'm not > >> exc

Re: Hardening PostgreSQL via (optional) ban on local file system access

2022-06-24 Thread Gurjeet Singh
versions will not be acceptable (per the project versioning policy [1]), since these changes would be considered new feature. These changes can break installations, if released in a minor version. [1]: https://www.postgresql.org/support/versioning/ Best regards, Gurjeet http://Gurje.et

Re: Hardening PostgreSQL via (optional) ban on local file system access

2022-06-24 Thread Gurjeet Singh
(fixed your top-posting) On Fri, Jun 24, 2022 at 4:59 PM Hannu Krosing wrote: > On Sat, Jun 25, 2022 at 1:46 AM Gurjeet Singh wrote: > > > > On Fri, Jun 24, 2022 at 4:13 PM Andres Freund wrote: > > > On 2022-06-25 00:08:13 +0200, Hannu Krosing wrote: > > > >

Re: [PoC/RFC] Multiple passwords, interval expirations

2022-06-30 Thread Gurjeet Singh
, but since I haven't fully reviewed the (bulky) patch, I'll reserve my proposals until I wrap my head around it. Please expect some activity on this patch towards the end of next week. BCC: Joshua's new work email. Best regards, Gurjeet http://Gurje.et On Wed, Jun 29, 2022 at 2:27 P

Re: generate_series for timestamptz and time zone problem

2022-06-30 Thread Gurjeet Singh
r committers' consideration, though, the submission needs to cross quite a few hurdles. So have prepared a markdown doc [2]. Let's fill in as much detail there as possible, before we mark it 'Ready for Committer' in the CF app. [1]: https://wiki.postgresql.org/wiki/Submitting_a_Patch [2]: https://wiki.postgresql.org/wiki/Patch_Reviews Best regards, Gurjeet http://Gurje.et

Fwd: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS

2022-07-20 Thread Gurjeet Singh
s the original analysis, followed by Noah's analysis. To be able to reproduce it, please note that perl support is required; hence `./configure --with-perl`. The note about 'security concerns around on_plperl_init parameter', below, refers to now-fixed issue, at commit 13d8388151. Best r

Re: Fwd: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS

2022-07-21 Thread Gurjeet Singh
On Thu, Jul 21, 2022 at 2:44 PM Tom Lane wrote: > > Gurjeet Singh writes: > > While poking at plperl's GUC in an internal discussion, I was able to > > induce a crash (or an assertion failure in assert-enabled builds) as > > an unprivileged user. > > My investi

Re: Fwd: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS

2022-07-21 Thread Gurjeet Singh
tations. But since the DefineCustomXVariable() stack does not prevent the callers from doing so, we must still honor the protocol followed for all params with GUC_REPORT. And hence the I think it'd be a good idea to ban the callers of DefineCustomXVariable() from declaring their variable GUC_REPORT, to ensure that only core code can define such variables. Best regards, Gurjeet http://Gurje.et

Re: Fwd: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS

2022-07-21 Thread Gurjeet Singh
On Thu, Jul 21, 2022 at 4:35 PM Gurjeet Singh wrote: > I like the idea of performing library initialization in > InitPostgres(), as it performs the first transaction of the > connection, and because of the libraries' ability to gin up new GUC > variables that might need special h

Re: `make check` doesn't pass on MacOS Catalina

2022-08-06 Thread Gurjeet Singh
# or move make_check() call here With a quick google search I could not find why --delay-check is necessary on Apline linux, as well; can you please elaborate. Best regards, Gurjeet http://Gurje.et

Re: Patch proposal: New hooks in the connection path

2022-08-13 Thread Gurjeet Singh
ss all callbacks. Best regards, Gurjeet http://Gurje.et

Re: Patch proposal: New hooks in the connection path

2022-08-13 Thread Gurjeet Singh
be a strong reason why the signal-handler uses _exit() to bypass all callbacks. Best regards, Gurjeet http://Gurje.et

Returning to Postgres community work

2021-08-30 Thread Gurjeet Singh
stgreSQL, and we're now in a position to contribute back in a tangible way. We're hiring Gurjeet with the explicit goal of working on PostgreSQL community contributions. We're excited to welcome Gurjeet to the team at Supabase. [1]: https://supabase.io/ [2]: https://gurjeet.singh.i

Re: Returning to Postgres community work

2021-08-30 Thread Gurjeet Singh
On Mon, Aug 30, 2021 at 10:53 PM Gurjeet Singh wrote: > PS: Hacker News announcement is at https://news.ycombinator.com/item?id= https://news.ycombinator.com/item?id=28364406 Best regards, -- Gurjeet Singh http://gurjeet.singh.im/

Re: Returning to Postgres community work

2021-08-31 Thread Gurjeet Singh
On Tue, Aug 31, 2021 at 8:04 AM Alvaro Herrera wrote: > > On 2021-Aug-30, Gurjeet Singh wrote: > > > I'm very happy to announce that I now work for Supabase [1]. They > > have hired me so that I can participate in, and contribute to the > > Postgres communit

Re: Slightly improve initdb --sync-only option's help message

2021-07-28 Thread Gurjeet Singh
he true intent of the option, because generally a "write" operation is still limited to dirtying the OS buffers, and does not guarantee sync-to-disk. It'd be better if the help message said, either "flush all database files to disk and exit",or "sync all database fil

Re: Slightly improve initdb --sync-only option's help message

2021-08-16 Thread Gurjeet Singh
tdb > >> help > >> output match the other exiting options in there. Barring objections, I > >> think > >> this is ready. > > > > LGTM. Thanks! > > Pushed to master, thanks! Thank you Daniel and Nathan! Much appreciated. Best regards, -- Gurjeet Singh http://gurjeet.singh.im/

Proposal: Division operator for (interval / interval => double precision)

2024-06-23 Thread Gurjeet Singh
, it would be desirable to also have a remainder operator %. For example, ('365 days'::interval / '5 days'::interval) => 73 ('365 days'::interval % '5 days'::interval) => 0 ('365 days'::interval / '3 days'::interval) => 121 (&

Re: DecodeInterval fixes

2023-07-08 Thread Gurjeet Singh
On Sat, Jul 8, 2023 at 1:33 PM Tom Lane wrote: > > Gurjeet Singh writes: > > On Fri, Jul 7, 2023 at 4:13 PM Tom Lane wrote: > >> The ECPG datetime datatype support code has been basically unmaintained > >> for years, and has diverged quite far at this point from th

Re: BUG #18016: REINDEX TABLE failure

2023-07-10 Thread Gurjeet Singh
EINDEX. The -hackers list feels like a place to discuss such changes. Best regards, Gurjeet http://Gurje.et

Re: BUG #18016: REINDEX TABLE failure

2023-07-11 Thread Gurjeet Singh
e patch does not include any TAP tests. Reliably reproducing the original error message involves restarting the database, and since that can't be done via SQL commands, no sql tests are included, either. The patch also includes minor wordsmithing, and benign whitespace changes in neighboring c

Re: Document that server will start even if it's unable to open some TCP/IP ports

2023-07-11 Thread Gurjeet Singh
t and can't listen on > anything? Yes. For every host listed in listen_addresses, if Postgres fails to open the port on that address, we get a WARNING message in the server log. After the end of processing of a non-empty listen_addresses, if there are zero open TCP/IP connections, the server exits (with a FATAL message, IIRC). Best regards, Gurjeet http://Gurje.et

Re: MERGE ... RETURNING

2023-07-11 Thread Gurjeet Singh
On Fri, Jul 7, 2023 at 3:48 PM Dean Rasheed wrote: > > On Thu, 6 Jul 2023 at 06:13, Gurjeet Singh wrote: > > > > > One minor annoyance is that, due to the way that pg_merge_action() and > > > pg_merge_when_clause() require access to the MergeActionState, they

Re: MERGE ... RETURNING

2023-07-11 Thread Gurjeet Singh
On Tue, Jul 11, 2023 at 1:43 PM Gurjeet Singh wrote: > > In the above hunk, if there's an exception/ERROR, I believe we should > PG_RE_THROW(). If there's a reason to continue, we should at least set > rslot = NULL, otherwise we may be returning an uninitialized value to >

Better help output for pgbench -I init_steps

2023-07-12 Thread Gurjeet Singh
sineog9w%40mail.gmail.com [6] Tristan showing preference for the second variant https://www.postgresql.org/message-id/CTBN5E2K2YSJ.3QYXGZ09JZXIW%40gonk +CC Tristan Partin and Greg Smith, since they were involved in the initial thread. Best regards, Gurjeet http://Gurje.et variant-1-brief-po

Re: Better help output for pgbench -I init_steps

2023-07-12 Thread Gurjeet Singh
On Wed, Jul 12, 2023 at 3:08 AM Peter Eisentraut wrote: > > On 12.07.23 09:42, Gurjeet Singh wrote: > > These two variants show the two extremes; bare minimum vs. everything > > but the kitchen sink. So one may feel the need to find a middle ground > > and provide a "

Re: CommandStatus from insert returning when using a portal.

2023-07-12 Thread Gurjeet Singh
T command behaves like that (resultset followed by CommandStatus), then I'd say the INSERT RETURNING is behaving as expected. Best regards, Gurjeet http://Gurje.et

Re: Duplicated LLVMJitHandle->lljit assignment?

2023-07-12 Thread Gurjeet Singh
ond assignment. I > ran meson test and all tests have pass. -handle->lljit = compile_orc; LGTM. Best regards, Gurjeet http://Gurje.et

Re: MERGE ... RETURNING

2023-07-13 Thread Gurjeet Singh
On Thu, Jul 13, 2023 at 8:38 AM Dean Rasheed wrote: > > On Tue, 11 Jul 2023 at 21:43, Gurjeet Singh wrote: > > { oid => '9499', descr => 'command type of current MERGE action', > > - proname => 'pg_merge_action', provolatile =>

Re: Fix search_path for all maintenance commands

2023-07-13 Thread Gurjeet Singh
On Thu, Jul 13, 2023 at 11:56 AM Jeff Davis wrote: > > The current approach seemed to get support from Noah, Nathan, and Greg > Stark. > > Concerns were raised by Gurjeet, Tom, and Robert in the 16 cycle; but I didn't see Tom's or Robert's concerns raised in this t

Re: Fix search_path for all maintenance commands

2023-07-13 Thread Gurjeet Singh
x27;re referring to here. Best regards, Gurjeet http://Gurje.et

Re: harmonize password reuse in vacuumdb, clusterdb, and reindexdb

2023-07-18 Thread Gurjeet Singh
On Mon, Jul 17, 2023 at 1:47 PM Nathan Bossart wrote: > > Here is a new version of the patch in which I've updated this comment as > proposed. Gurjeet, do you have any other concerns about this patch? With the updated comment, the patch looks good to me. Best regards, Gurjeet http://Gurje.et

Re: There should be a way to use the force flag when restoring databases

2023-07-19 Thread Gurjeet Singh
RCE is not a guarantee, as the DROP DATABASE docs clarify the conditions under which it may fail. Best regards, Gurjeet http://Gurje.et

Re: Issue in _bt_getrootheight

2023-07-19 Thread Gurjeet Singh
an index is hypothetical it can rely on the index adviser's notion of which index is hypothetical. The hook implementer has the opportunity to not only mark the indexOptInfo->hypothetical = true, but also calculate the tree height, if they can. Please see attached the patch that does this.

Re: There should be a way to use the force flag when restoring databases

2023-07-20 Thread Gurjeet Singh
On Thu, Jul 20, 2023 at 2:10 AM Daniel Gustafsson wrote: > > > On 19 Jul 2023, at 19:28, Gurjeet Singh wrote: > > > > The docs for 'pg_restore --create` say "Create the database before > > restoring into it. If --clean is also specified, drop and re

Re: MERGE ... RETURNING

2023-07-20 Thread Gurjeet Singh
hat the old thread could not accomplish a decade ago. > Presumably > something in the planner would turn that into something the executor > could handle, which might just end up being the existing functions > anyway. If the current patch's functions can serve the needs of the SQL syntax variant, that'd be a neat win! Best regards, Gurjeet http://Gurje.et

Re: MERGE ... RETURNING

2023-07-20 Thread Gurjeet Singh
into something the executor > > could handle, which might just end up being the existing functions > > anyway. > > The benefits are: > > 1. It is naturally constrained to the right context. +1 > I'm not sure how much extra complication it would cause, though. If that attempt with UPDATE RETURNING a decade ago is any indication, it's probably a tough one. Best regards, Gurjeet http://Gurje.et

Re: table_open/table_close with different lock mode

2023-07-20 Thread Gurjeet Singh
CommitTransaction() in xact.c, and specifically at the ResourceOwnerRelease() calls in there. Best regards, Gurjeet http://Gurje.et

Re: Issue in _bt_getrootheight

2023-07-24 Thread Gurjeet Singh
On Fri, Jul 21, 2023 at 10:42 AM Tom Lane wrote: > > Gurjeet Singh writes: > > Please see attached the patch that does this. Let me know if this patch > > helps. > > I don't like this patch one bit, because it adds a lot of overhead > (i.e., an extra index_open/c

Re: psql not responding to SIGINT upon db reconnection

2023-07-24 Thread Gurjeet Singh
ports such failures to the community. Best regards, Gurjeet http://Gurje.et

Re: MERGE ... RETURNING

2023-07-25 Thread Gurjeet Singh
_ARGS) +{ ... +relaction = mtstate->mt_merge_action; +if (relaction) +{ .. +} + +PG_RETURN_NULL(); +} Under what circumstances would the relaction be null? Is it okay to return NULL from this function if relaction is null, or is it better to throw an error? These questions apply to the pg_merge_when_clause_number() function as well. [1]: Row pattern recognition https://www.postgresql.org/message-id/flat/20230625.210509.1276733411677577841.t-ishii%40sranhm.sra.co.jp Best regards, Gurjeet http://Gurje.et

  1   2   >