Re: Convert *GetDatum() and DatumGet*() macros to inline functions

2022-09-12 Thread Julien Rouhaud
Hi, On Mon, Sep 12, 2022 at 05:59:09PM +0200, Peter Eisentraut wrote: > > committed, thanks FTR lapwing is complaining about this commit: https://brekka.postgresql.org/cgi-bin/show_log.pl?nm=lapwing=2022-09-12%2016%3A40%3A18. Snapper is also failing with similar problems:

Re: Support for Rust

2022-09-12 Thread Julien Rouhaud
On Mon, Sep 12, 2022 at 11:29:12AM -0400, Tom Lane wrote: > Lev Kokotov writes: > >> 3. Do we gain anything besides compiler hints? Postgres development is > >> hard due to interference of complex subsystems. It will be even harder if > >> those systems will be implemented in different languages.

Re: pg_stat_statements locking

2022-09-12 Thread Julien Rouhaud
On Mon, Sep 12, 2022 at 05:32:55PM +0500, Andrey Borodin wrote: > > > On 12 Sep 2022, at 13:40, Julien Rouhaud wrote: > > > > I'm not a fan of that patch as it now silently ignores entries if the lwlock > > can't be acquired *immediately*, without any way to avoid tha

Re: pg_stat_statements locking

2022-09-12 Thread Julien Rouhaud
Hi, On Mon, Sep 12, 2022 at 11:52:28AM +0500, Andrey Borodin wrote: > > === How to fix === > pgss uses LWLock to protect hashtable. > When the hashtable is reset or new user query is inserted in pgss_store() - > exclusive lock is used. > When stats are updated for known query or

Re: [PATCH] initdb: do not exit after warn_on_mount_point

2022-09-11 Thread Julien Rouhaud
On Sun, Sep 11, 2022 at 06:22:21PM +, andrey.ara...@nixaid.com wrote: > September 11, 2022 12:18 PM, "Julien Rouhaud" wrote: > > > Hi, > > > > On Sat, Sep 10, 2022 at 07:14:59PM +, andrey.ara...@nixaid.com wrote: > > > >> Have sligh

Re: [PATCH] initdb: do not exit after warn_on_mount_point

2022-09-11 Thread Julien Rouhaud
Hi, On Sat, Sep 10, 2022 at 07:14:59PM +, andrey.ara...@nixaid.com wrote: > > Have slightly improved the logic so that it does not report an error > "directory \"%s\" exists but is not empty" > when it is only supposed to warn the user about the mountpoint, without > exiting. > > To me, my

Re: proposal: possibility to read dumped table's name from file

2022-09-08 Thread Julien Rouhaud
Hi, On Thu, Sep 08, 2022 at 01:38:42PM +0200, Daniel Gustafsson wrote: > > On 8 Sep 2022, at 12:00, Erik Rijkers wrote: > > > > Op 07-09-2022 om 21:45 schreef Daniel Gustafsson: > >> One thing this patchversion currently lacks is refined error messaging, > >> but if > >> we feel that this

Re: [PATCH] Query Jumbling for CALL and SET utility statements

2022-09-08 Thread Julien Rouhaud
Hi, On Thu, Sep 08, 2022 at 11:06:51AM +0200, Drouvot, Bertrand wrote: > Hi, > > On 9/8/22 8:50 AM, Julien Rouhaud wrote: > > Thanks for looking at it! > > > On Thu, Sep 08, 2022 at 02:23:19PM +0900, Michael Paquier wrote: > > > On Wed, Sep 07, 2022 at 06:19:4

Re: small windows psqlrc re-wording

2022-09-08 Thread Julien Rouhaud
On Wed, Sep 07, 2022 at 01:10:11PM -0400, Tom Lane wrote: > After looking at the text more carefully, I thought it could use > a deal more help than Robert has given it. I propose the attached. It looks good to me. - for example ~/.psqlrc-9.2 or - ~/.psqlrc-9.2.5. The most specific +

Re: Schema variables - new implementation for Postgres 15

2022-09-08 Thread Julien Rouhaud
Hi, On Tue, Sep 06, 2022 at 06:23:12PM +0800, Julien Rouhaud wrote: > On Tue, Sep 06, 2022 at 08:43:59AM +0200, Pavel Stehule wrote: > > Hi > > > > After talking with Julian I removed "debug" fields name and nsname from > > SVariable structure. Whe

Re: [PATCH] Query Jumbling for CALL and SET utility statements

2022-09-08 Thread Julien Rouhaud
On Thu, Sep 08, 2022 at 02:23:19PM +0900, Michael Paquier wrote: > On Wed, Sep 07, 2022 at 06:19:42PM -0700, Jeremy Schneider wrote: > > I didn't fully debug yet, but here's the backtrace on my 14.4 build with > > the patch > > What happens on HEAD? That would be the target branch for a new >

Re: Reducing the chunk header sizes on all memory context types

2022-09-07 Thread Julien Rouhaud
Hi, On Thu, Sep 08, 2022 at 12:29:22AM +1200, David Rowley wrote: > > I spent some time looking at our existing usages of > MemoryContextContains() to satisfy myself that we'll only ever pass in > a pointer to memory allocated by a MemoryContext and pushed this > patch. FYI lapwing isn't happy

Re: Modernizing our GUC infrastructure

2022-09-05 Thread Julien Rouhaud
Hi, On Tue, Sep 06, 2022 at 06:32:21AM +0200, Pavel Stehule wrote: > Hi > > út 6. 9. 2022 v 0:28 odesílatel Tom Lane napsal: > > > Attached is a patch series that attempts to modernize our GUC > > infrastructure, in particular removing the performance bottlenecks > > it has when there are lots

Re: Schema variables - new implementation for Postgres 15

2022-09-03 Thread Julien Rouhaud
On Sat, Sep 03, 2022 at 11:00:51PM +0800, Julien Rouhaud wrote: > Hi, > > On Fri, Sep 02, 2022 at 07:42:00AM +0200, Pavel Stehule wrote: > > > > rebased today > > After some off-list discussion with Pavel, I'm sending some proposal patches > (in .txt extension)

Re: Schema variables - new implementation for Postgres 15

2022-09-03 Thread Julien Rouhaud
'm also adding 2 additional patches to fix this corner case and add an additional regression test for the plain table case. >From 43adcd5ed555fd4920061f643c8392c54d8b625e Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Sat, 3 Sep 2022 16:11:03 +0800 Subject: [PATCH 1/3] FIXUP 0001-catalog-

Re: Fix typo function circle_same (src/backend/utils/adt/geo_ops.c)

2022-09-03 Thread Julien Rouhaud
Hi, On Fri, Sep 01, 2022 at 09:55:15PM +0200, Daniel Gustafsson wrote: > > On 2 Sep 2022, at 21:22, Ranier Vilela wrote: > > > > Em sex., 2 de set. de 2022 às 16:15, Daniel Gustafsson > > escreveu: > > > On 2 Sep 2022, at 21:08, Ranier Vilela > >

Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error

2022-09-03 Thread Julien Rouhaud
Hi, On Sat, Sep 03, 2022 at 10:36:37AM +0500, Ibrar Ahmed wrote: > > Hi Kyotaro Horiguchi, Fabien Coelho, Daniel Gustafsson, > > Since you haven't had time to write a review the last many days, the author > replied > with a rebased patch for a long time and never heard. We've taken your name >

Re: win_flex.exe (and likely win_bison.exe) isn't concurrency safe

2022-09-02 Thread Julien Rouhaud
On Sat, Sep 03, 2022 at 10:33:43AM +0530, Amit Kapila wrote: > On Sat, Sep 3, 2022 at 4:13 AM Andres Freund wrote: > > For the meson build it is trivial to "address" this by setting FLEX_TMP_DIR > > to > > a private directory (which we already need to deal with lex.backup), > > something > >

Re: Schema variables - new implementation for Postgres 15

2022-08-29 Thread Julien Rouhaud
fbccc9ca44d7 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Mon, 29 Aug 2022 16:38:52 +0800 Subject: [PATCH] Add isolation test for session variables. --- .../isolation/expected/session-variable.out | 87 +++ src/test/isolation/isolation_schedule | 1 + .../isola

Re: ICU for global collation

2022-08-24 Thread Julien Rouhaud
On Wed, Aug 24, 2022 at 01:38:44PM +0900, Michael Paquier wrote: > On Tue, Aug 23, 2022 at 08:59:02PM +0300, Marina Polyakova wrote: > > My colleague Andrew Bille found another bug in master > > (b4e936859dc441102eb0b6fb7a104f3948c90490) and REL_15_STABLE > >

Re: Schema variables - new implementation for Postgres 15

2022-08-23 Thread Julien Rouhaud
On Tue, Aug 23, 2022 at 11:27:45AM +0200, Pavel Stehule wrote: > út 23. 8. 2022 v 7:56 odesílatel Julien Rouhaud napsal: > > > > > I've been thinking a bit more about the shadowing, and one scenario we > > didn't > > discuss is something like this naive example: >

Re: Schema variables - new implementation for Postgres 15

2022-08-22 Thread Julien Rouhaud
Hi, On Tue, Jan 18, 2022 at 10:01:01PM +0100, Pavel Stehule wrote: > > pá 14. 1. 2022 v 3:44 odesílatel Julien Rouhaud napsal: > > > On Thu, Jan 13, 2022 at 07:32:26PM +0100, Pavel Stehule wrote: > > > čt 13. 1. 2022 v 19:23 odesílatel Dean Rasheed > > > &

Re: Schema variables - new implementation for Postgres 15

2022-08-22 Thread Julien Rouhaud
On Mon, Aug 22, 2022 at 09:13:39PM +0200, Pavel Stehule wrote: > po 22. 8. 2022 v 9:33 odesílatel Julien Rouhaud napsal: > > > > > - you define new AclMode READ and WRITE. Those bits are precious and I > > don't > > think it's ok to consume 2 bits for sessi

Re: Schema variables - new implementation for Postgres 15

2022-08-22 Thread Julien Rouhaud
Hi Pavel, On Sun, Aug 21, 2022 at 09:54:03AM +0200, Pavel Stehule wrote: > > should be fixed now I started reviewing the patchset, beginning with 0001 (at least the parts that don't substantially change later) and have a few comments. - you define new AclMode READ and WRITE. Those bits are

Re: including pid's for `There are XX other sessions using the database`

2022-08-21 Thread Julien Rouhaud
Hi, On Sat, Aug 20, 2022 at 02:52:29AM -0700, Zhihong Yu wrote: > On Fri, Aug 19, 2022 at 9:31 PM Euler Taveira wrote: > > > > Thanks for responding. > > Since pg_stat_activity shows fewer number of connections compared to the > number revealed in the error message, > I am not sure the above

Re: Schema variables - new implementation for Postgres 15

2022-08-20 Thread Julien Rouhaud
On Sat, Aug 20, 2022 at 08:44:49PM +0200, Erik Rijkers wrote: > Op 20-08-2022 om 20:09 schreef Pavel Stehule: > > Hi > > > > > LET public.svar2 = (10, 20, 30); > > > ALTER TYPE public.svar_test_type DROP ATTRIBUTE b; > > > SELECT public.svar; > > > - svar > > > > > > - (10,) > > >

Re: Schema variables - new implementation for Postgres 15

2022-08-20 Thread Julien Rouhaud
On Sat, Aug 20, 2022 at 03:55:07PM +0200, Erik Rijkers wrote: > > Op 20-08-2022 om 15:41 schreef Pavel Stehule: > > so 20. 8. 2022 v 15:36 odesílatel Erik Rijkers napsal: > > > > > Op 20-08-2022 om 15:32 schreef Erik Rijkers: > > > > Op 19-08-2022 om 17:29 schreef Pavel Stehule: > > > > > > > >

Re: ICU for global collation

2022-08-17 Thread Julien Rouhaud
Hi, On Mon, Aug 15, 2022 at 03:06:32PM +0300, Marina Polyakova wrote: > > 1.1) It looks like there's a bug in the function get_db_infos > (src/bin/pg_upgrade/info.c), where the version of the old cluster is always > checked: > > if (GET_MAJOR_VERSION(old_cluster.major_version) < 1500) >

Re: Expose Parallelism counters planned/execute in pg_stat_statements

2022-08-16 Thread Julien Rouhaud
Hi, On Fri, Jul 29, 2022 at 08:36:44AM -0500, Daymel Bonne Solís wrote: > > We have rewritten the patch and added the necessary columns to have the > number of times a parallel query plan was not executed using parallelism. > > We are investigating how to add more information related to the

Re: Allow file inclusion in pg_hba and pg_ident files

2022-08-16 Thread Julien Rouhaud
Hi, On Sat, Jul 30, 2022 at 04:09:36PM +0800, Julien Rouhaud wrote: > > - 0001: the rule_number / mapping_number addition in the views in a separate > commit > - 0002: the main file inclusion patch. Only a few minor bugfix since > previous version discovered thanks to the te

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-11 Thread Julien Rouhaud
On Thu, Aug 11, 2022 at 08:51:53AM -0300, Ranier Vilela wrote: > Em qui., 11 de ago. de 2022 às 08:48, Alvaro Herrera < > alvhe...@alvh.no-ip.org> escreveu: > > > On 2022-Aug-11, Ranier Vilela wrote: > > > > > According to: > > > https://interrupt.memfault.com/blog/c-struct-padding-initialization

Re: Get the statistics based on the application name and IP address

2022-08-10 Thread Julien Rouhaud
Hi, On Wed, Aug 10, 2022 at 10:42:31PM +0500, Ibrar Ahmed wrote: > On Mon, Aug 8, 2022 at 10:11 PM Julien Rouhaud wrote: > > > First, for now each entry contains its own > > query text in the query file. There can already be some duplication, which > >

Re: Get the statistics based on the application name and IP address

2022-08-08 Thread Julien Rouhaud
Hi, On Mon, Aug 08, 2022 at 08:21:06PM +0500, Ibrar Ahmed wrote: > While working on pg_stat_stements, I got some questions from customers to > have statistics by application and IP address. > [...] > name. I did some POC and had a patch. But before sharing the patch. > > I need to know if there

Re: Allow file inclusion in pg_hba and pg_ident files

2022-08-06 Thread Julien Rouhaud
Hi, On Fri, Aug 05, 2022 at 09:56:29AM +0900, Michael Paquier wrote: > On Tue, Aug 02, 2022 at 07:32:54PM +0900, Michael Paquier wrote: > > As a quick update from my side, I intend to look and apply 0001~0003 > > (not double-checked yet) shortly. > > And a couple of days later, these look fine so

Re: [PATCH] postgresql.conf.sample comment alignment.

2022-08-03 Thread Julien Rouhaud
On Thu, Aug 04, 2022 at 10:09:27AM +0900, Michael Paquier wrote: > On Wed, Aug 03, 2022 at 12:58:04PM +0200, Alvaro Herrera wrote: > > On 2022-Aug-01, Tom Lane wrote: > >> One idea for avoiding confusion is to legislate that we won't > >> use tabs at all in this file (which we could enforce via >

Re: [PATCH] CF app: add "Returned: Needs more interest"

2022-08-03 Thread Julien Rouhaud
Hi, On Wed, Aug 03, 2022 at 08:58:49AM -0700, Jacob Champion wrote: > On Tue, Aug 2, 2022 at 8:00 PM Julien Rouhaud wrote: > > I'm personally fine with the current statutes, as closing a patch with RwF > > explaining that there was no interest is still a feedback, > > Ma

Re: [PATCH] CF app: add "Returned: Needs more interest"

2022-08-02 Thread Julien Rouhaud
Hi, On Tue, Aug 02, 2022 at 03:55:28PM -0700, Jacob Champion wrote: > [Trying -hackers rather than -www this time, since the impacted users are > here.] > > There are occasionally patches that are dutifully rebased by a > responsive author, all feedback implemented... but there have been no >

Re: [Commitfest 2022-07] is Done!

2022-08-02 Thread Julien Rouhaud
On Tue, Aug 02, 2022 at 08:44:04AM +0200, Alvaro Herrera wrote: > On 2022-Aug-01, Jacob Champion wrote: > > > On Mon, Aug 1, 2022 at 10:34 AM Alvaro Herrera > > wrote: > > > > I hate to suggest even more work, but it would be excellent to have some > > > sort of write-up of what you did here,

Re: COPY TO (FREEZE)?

2022-08-02 Thread Julien Rouhaud
Hi, On Tue, Aug 02, 2022 at 01:30:46PM +0900, Kyotaro Horiguchi wrote: > I noticed that COPY TO accepts FREEZE option but it is pointless. > > Don't we reject that option as the first-attached does? I agree that we should reject it, +1 for the patch. > By the way, most of the invalid option

Re: Add test of pg_prewarm extenion

2022-08-01 Thread Julien Rouhaud
On Mon, Aug 1, 2022 at 5:16 PM Dong Wook Lee wrote: > > > Keep in mind also that the logfile accumulates over stops and > > restarts. As you've coded this test, you don't know which DB start > > emitted the matching line, so the test proves a lot less than it > > ought to. > > > > I wonder also

Re: Schema variables - new implementation for Postgres 15

2022-07-31 Thread Julien Rouhaud
Hi, On Wed, Jul 27, 2022 at 09:59:18PM +0200, Pavel Stehule wrote: > > ne 24. 7. 2022 v 13:12 odesílatel Julien Rouhaud > napsal: > > > Hi, > > > > On Fri, Jul 22, 2022 at 10:58:25AM +0200, Pavel Stehule wrote: > > > > Apparently most of the change

Re: pg_buffercache: add sql test

2022-07-31 Thread Julien Rouhaud
On Sun, Jul 31, 2022 at 3:39 AM Tom Lane wrote: > > * A .gitignore file is needed so that "git status" won't whine after > running the test. This tends to be pretty much boilerplate; I copied > it from another contrib directory. Is there any reason we don't add a .gitignore in the contrib/

Re: Allow file inclusion in pg_hba and pg_ident files

2022-07-31 Thread Julien Rouhaud
On Tue, Jul 26, 2022 at 1:14 PM Michael Paquier wrote: > > On Tue, Jul 26, 2022 at 01:04:02PM +0800, Julien Rouhaud wrote: > > It doesn't have much impact most of the time. The filename is reported if > > there's an IO error while reading the already opened correct file. Th

Re: [PATCH] Add extra statistics to explain for Nested Loop

2022-07-30 Thread Julien Rouhaud
On Sat, Jul 30, 2022 at 08:54:33PM +0800, Julien Rouhaud wrote: > > It turns out that having pg_stat_statements with INSTRUMENT_EXTRA indirectly > requested by INSTRUMENT_ALL adds a ~27% overhead. > > I'm not sure that I actually believe these results, but they're really > co

Re: [PATCH] Add extra statistics to explain for Nested Loop

2022-07-30 Thread Julien Rouhaud
Hi, On Fri, Jun 24, 2022 at 08:16:06PM +0300, Ekaterina Sokolova wrote: > > We started discussion about overheads and how to calculate it correctly. > > Julien Rouhaud wrote: > > Can you give a bit more details on your bench scenario? > > [...] > > Ideally yo

Re: Allow file inclusion in pg_hba and pg_ident files

2022-07-30 Thread Julien Rouhaud
Hi, On Tue, Jul 19, 2022 at 03:13:12PM +0900, Michael Paquier wrote: > On Mon, Jul 18, 2022 at 03:11:51PM +0800, Julien Rouhaud wrote: > > > I'm not really sure what should be done here. The best compromise I can > > think > > of is to split the tests in 3 parts: &

Re: [Commitfest 2022-07] Patch Triage: Needs Review, Part 1

2022-07-29 Thread Julien Rouhaud
Hi Jacob, On Fri, Jul 29, 2022 at 10:08:08AM -0700, Jacob Champion wrote: > > On Thu, Jul 28, 2022 at 11:38 PM Julien Rouhaud wrote: > > > - Add extra statistics to explain for Nested Loop > > > https://commitfest.postgresql.org/38/2765/ > > > > &g

Re: [Commitfest 2022-07] Patch Triage: Needs Review, Part 1

2022-07-29 Thread Julien Rouhaud
Hi, On Thu, Jul 28, 2022 at 02:28:23PM -0700, Jacob Champion wrote: > > = Stalled Patches, Need Help = > [...] > - Add extra statistics to explain for Nested Loop > https://commitfest.postgresql.org/38/2765/ > > I think the author is hoping for help with testing and performance >

Re: small windows psqlrc re-wording

2022-07-28 Thread Julien Rouhaud
On Thu, Jul 28, 2022 at 10:04:12AM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > On Wed, Jul 27, 2022 at 02:42:11PM -0400, Robert Treat wrote: > >> The attached patch tweaks the wording around finding the psqlrc file > >> on windows, with the primary goal of remov

Re: small windows psqlrc re-wording

2022-07-28 Thread Julien Rouhaud
Hi, On Wed, Jul 27, 2022 at 02:42:11PM -0400, Robert Treat wrote: > > The attached patch tweaks the wording around finding the psqlrc file > on windows, with the primary goal of removing the generally incorrect > statement that windows has no concept of a home directory. Windows only has a

Re: Official Windows Installer and Documentation

2022-07-27 Thread Julien Rouhaud
On Wed, Jul 27, 2022 at 07:31:35PM -0700, David G. Johnston wrote: > > Ultimately we do our users the best service if when they operate an > installation using defaults that they have documentation showing how to > perform something like an upgrade that works with those defaults. I don't really

Re: Official Windows Installer and Documentation

2022-07-27 Thread Julien Rouhaud
On Wed, Jul 27, 2022 at 07:02:51PM -0700, David G. Johnston wrote: > > In the end the problem is ours and cannot be simply assigned to a > third-party. So let's resolve it here (on this list, whatever the > solution) where representatives from all parties are present. We could amend the

Re: Official Windows Installer and Documentation

2022-07-27 Thread Julien Rouhaud
Hi, On Wed, Jul 27, 2022 at 11:36:11PM +0200, Thomas Kellerer wrote: > David G. Johnston schrieb am 27.07.2022 um 21:21: > > And then there is the issue of file ownership. > > > > Assuming we want better documentation for this specific issue for > > back-patching what would that look like? > >

Re: Allow file inclusion in pg_hba and pg_ident files

2022-07-25 Thread Julien Rouhaud
y visible as the view is reporting the wrong file name. Simple fix attached. I'll add a v15 open item shortly. >From d36010e7fec78b3ea25255767b8a2478f85fd325 Mon Sep 17 00:00:00 2001 From: Julien Rouhaud Date: Tue, 26 Jul 2022 12:52:35 +0800 Subject: [PATCH v1] Fix fill_ident_view incorr

Re: redacting password in SQL statement in server log

2022-07-24 Thread Julien Rouhaud
Hi, On Sun, Jul 24, 2022 at 04:33:59AM -0700, Zhihong Yu wrote: > I am thinking of adding `if not exists` to `CREATE ROLE` statement: > > CREATE ROLE trustworthy if not exists; > > In my previous example, if the user can issue the above command, there > would be no SQL statement logged. It's not

Re: Schema variables - new implementation for Postgres 15

2022-07-24 Thread Julien Rouhaud
Hi, On Fri, Jul 22, 2022 at 10:58:25AM +0200, Pavel Stehule wrote: > > Apparently most of the changes in catalogs.sgml didn't survive the last > > rebase. > > I do see the needed section in v20220709-0012-documentation.patch: > > > > > + > > > + pg_variable > > > [...] > > > > should be fixed

Re: Expose Parallelism counters planned/execute in pg_stat_statements

2022-07-22 Thread Julien Rouhaud
Hi, On Fri, Jul 22, 2022 at 02:11:35PM -0400, Anthony Sotolongo wrote: > > On 22-07-22 12:08, Julien Rouhaud wrote: > > > > With your current patch it only says if the plan and execution had > > parallelism > > enabled, but not if it could actually use with parallel

Re: Expose Parallelism counters planned/execute in pg_stat_statements

2022-07-22 Thread Julien Rouhaud
Hi, On Fri, Jul 22, 2022 at 11:17:52AM -0400, Anthony Sotolongo wrote: > > On 21-07-22 20:35, Justin Pryzby wrote: > > On Thu, Jul 21, 2022 at 06:26:58PM -0400, Anthony Sotolongo wrote: > > > Hi all: > > > Here's a patch to add counters about  planned/executed  for parallelism  > > > to > > >

Re: Schema variables - new implementation for Postgres 15

2022-07-21 Thread Julien Rouhaud
Hi, On Thu, Jul 21, 2022 at 09:09:47AM +0200, Erik Rijkers wrote: > On 7/21/22 08:16, Pavel Stehule wrote: > > Hi > > > > new update of session variable;s implementation > > > > - fresh rebase > > - new possibility to trace execution with DEBUG1 notification > > - new SRF function

Re: pgsql: Default to hidden visibility for extension libraries where possi

2022-07-19 Thread Julien Rouhaud
On Tue, Jul 19, 2022 at 04:28:07PM +0200, Alvaro Herrera wrote: > ... oh, and: > > $ postmaster -c shared_preload_libraries=plugin_debugger > 2022-07-19 16:27:24.006 CEST [742142] FATAL: cannot request additional > shared memory outside shmem_request_hook This has been reported multiple times

Re: Allow file inclusion in pg_hba and pg_ident files

2022-07-18 Thread Julien Rouhaud
Hi, On Mon, Jul 11, 2022 at 10:16:44AM +0900, Michael Paquier wrote: > On Fri, Jul 08, 2022 at 02:57:21PM +0800, Julien Rouhaud wrote: > > My apologies for the late reply. > > > I don't have an extensive knowledge of all the user facing error messages, > > but >

Re: [PROPOSAL] Detecting plan changes with plan_id in pg_stat_activity

2022-07-14 Thread Julien Rouhaud
Hi, On Thu, Jul 14, 2022 at 08:51:24AM +0200, Antonin Houska wrote: > Shouldn't the patch status be set to "Waiting on Author"? > > (I was curious if this is a patch that I can review.) Ah indeed, I just updated the CF entry!

Re: Add function to return backup_label and tablespace_map

2022-07-08 Thread Julien Rouhaud
On Fri, Jul 8, 2022 at 7:42 PM David Steele wrote: > > On 7/7/22 12:43, Fujii Masao wrote: > > > Since an exclusive backup method was dropped in v15, in v15 or later, we > > need to create backup_label and tablespace_map files from the result of > > pg_backup_stop() when taking a base backup

Re: Allow file inclusion in pg_hba and pg_ident files

2022-07-08 Thread Julien Rouhaud
Hi, On Thu, Jun 02, 2022 at 10:08:15AM +0900, Michael Paquier wrote: > On Thu, May 26, 2022 at 03:26:57PM +0800, Julien Rouhaud wrote: > > > After a bit more digging, I think that this comes from the fact that > > there's no > > "official" name for this file.

Re: Schema variables - new implementation for Postgres 15

2022-07-05 Thread Julien Rouhaud
Hi Pavel, On Tue, Jul 05, 2022 at 08:42:09AM +0200, Pavel Stehule wrote: > Hi > > fresh rebase + type check. Before returning any value, the related type is > checked if it is valid still Great news, thanks a lot for keeping working on it! I'm still in PTO since last Friday, but I'm planning to

Re: pg15b2: large objects lost on upgrade

2022-07-02 Thread Julien Rouhaud
On Sat, Jul 02, 2022 at 08:34:04AM -0400, Robert Haas wrote: > On Fri, Jul 1, 2022 at 7:14 PM Justin Pryzby wrote: > > I noticed this during beta1, but dismissed the issue when it wasn't easily > > reproducible. Now, I saw the same problem while upgrading from beta1 to > > beta2, > > so

Re: Separate the attribute physical order from logical order

2022-06-28 Thread Julien Rouhaud
Hi, On Tue, Jun 28, 2022 at 08:38:56AM -0500, Justin Pryzby wrote: > On Tue, Jun 28, 2022 at 04:32:30PM +0800, Julien Rouhaud wrote: > > psql displays a table columns information using the logical order rather the > > physical order, and if verbose emits an addition "Ph

Re: Separate the attribute physical order from logical order

2022-06-28 Thread Julien Rouhaud
Hi, On Tue, Jun 28, 2022 at 09:00:05AM -0400, Isaac Morland wrote: > On Tue, 28 Jun 2022 at 05:32, Julien Rouhaud wrote: > > > I think that supporting at least a way to specify the logical order during > > the > > table creation should be easy to implement (there shoul

Re: Separate the attribute physical order from logical order

2022-06-28 Thread Julien Rouhaud
Hi, On Tue, Jun 28, 2022 at 10:53:14AM +0200, Alvaro Herrera wrote: > On 2022-Jun-28, Julien Rouhaud wrote: > > > So, assuming that the current JOIN expansion order shouldn't be > > changed, I implemented the last approach I mentioned. > > Yeah, I'm not sure that this

Re: Making the subquery alias optional in the FROM clause

2022-06-27 Thread Julien Rouhaud
Hi, On Mon, Jun 27, 2022 at 12:03:20PM -0400, Isaac Morland wrote: > On Mon, 27 Jun 2022 at 11:12, Julien Rouhaud wrote: > > > More generally, I'm -0.5 on the feature. > > I prefer to force using SQL-compliant queries, and also not take bad > > habits. > > > >

Re: NAMEDATALEN increase because of non-latin languages

2022-06-27 Thread Julien Rouhaud
On Sat, Jun 25, 2022 at 08:00:04PM -0700, Andres Freund wrote: > > On 2022-06-26 10:48:24 +0800, Julien Rouhaud wrote: > > Anyway, per the nearby discussions I don't see much interest, especially > > not in > > the context of varlena identifiers (I should have started

Re: Emit postgres log messages that have security or PII with special flags/error code/elevel

2022-06-27 Thread Julien Rouhaud
Hi, On Mon, Jun 27, 2022 at 06:41:21PM +0530, Bharath Rupireddy wrote: > > Here's an idea - what if postgres can emit log messages that have sensitive > information with special error codes or flags? The emit_log_hook > implementers will then just need to look for those special error codes or >

Re: Making the subquery alias optional in the FROM clause

2022-06-27 Thread Julien Rouhaud
On Mon, Jun 27, 2022 at 9:49 PM Dean Rasheed wrote: > > This was discussed previously in [1], and there seemed to be general > consensus in favour of it, but no new patch emerged. > > Attached is a patch that takes the approach of not generating an alias > at all, which seems to be neater and

Re: ICU for global collation

2022-06-25 Thread Julien Rouhaud
Hi, On Sat, Jun 25, 2022 at 10:19:30AM -0500, Justin Pryzby wrote: > commit f2553d43060edb210b36c63187d52a632448e1d2 says >=1500 in a few places, > but in pg_upgrade says <=1500, which looks wrong for upgrades from v15. > I think it should say <= 1400. > > On Wed, Feb 02, 2022 at 02:01:23PM

Re: NAMEDATALEN increase because of non-latin languages

2022-06-25 Thread Julien Rouhaud
On Thu, Jun 23, 2022 at 10:19:44AM -0400, Robert Haas wrote: > On Thu, Jun 23, 2022 at 6:13 AM Julien Rouhaud wrote: > > > And should record_in / record_out use the logical position, as in: > > SELECT ab::text FROM ab / SELECT (a, b)::ab; > > > > I would think

Re: Add header support to text format and matching feature

2022-06-22 Thread Julien Rouhaud
On Thu, Jun 23, 2022 at 01:26:29PM +0900, Michael Paquier wrote: > On Wed, Jun 22, 2022 at 08:00:15PM +0900, Michael Paquier wrote: > > OK. As this is originally a feature you have committed, I originally > > thought that you would take care of it, even if I sent a patch. I'll > > handle that

Re: [PROPOSAL] Detecting plan changes with plan_id in pg_stat_activity

2022-06-22 Thread Julien Rouhaud
On Wed, Jun 22, 2022 at 11:05:54PM +, Imseih (AWS), Sami wrote: > >Can you describe how it's kept in sync, and how it makes sure that the > > property > >is maintained over restart / gc? I don't see any change in the code for > > the > >2nd part so I don't see how it could work

Re: [PROPOSAL] Detecting plan changes with plan_id in pg_stat_activity

2022-06-21 Thread Julien Rouhaud
Hi, On Tue, Jun 21, 2022 at 08:04:01PM +, Imseih (AWS), Sami wrote: > > I separated the pg_stat_statements patch. The patch > Introduces a secondary hash that tracks locations of > A query ( by queryid ) in the external file. I still think that's wrong. > The hash > remains in lockstep with

Re: [PROPOSAL] Detecting plan changes with plan_id in pg_stat_activity

2022-06-15 Thread Julien Rouhaud
Hi, On Wed, Jun 15, 2022 at 06:45:38PM +, Imseih (AWS), Sami wrote: > Adding a plan_id to pg_stat_activity allows users > to determine if a plan for a particular statement > has changed and if the new plan is performing better > or worse for a particular statement. > [...] > Attached is a POC

Re: Add header support to text format and matching feature

2022-06-14 Thread Julien Rouhaud
On Mon, Jun 13, 2022 at 04:46:46PM +0900, Michael Paquier wrote: > > Some nits. I would suggest to reword this error message, like "cannot > use \"match\" with HEADER in COPY TO". Agreed. > There is no need for the extra > comment, and the error code should be ERRCODE_FEATURE_NOT_SUPPORTED.

Re: Add header support to text format and matching feature

2022-06-12 Thread Julien Rouhaud
Hi, On Sun, Jun 12, 2022 at 09:36:13AM -0400, Andrew Dunstan wrote: > > On 2022-06-07 Tu 11:47, Julien Rouhaud wrote: > > > > First, probably nitpicking, the HEADER MATCH is allowed for COPY TO, is that > > expected? The documentation isn't really explicit about it,

Re: Add header support to text format and matching feature

2022-06-07 Thread Julien Rouhaud
Hi, On Wed, Mar 30, 2022 at 09:11:09AM +0200, Peter Eisentraut wrote: > > Committed, after some further refinements as discussed. While working on nearby code, I found some problems with this feature. First, probably nitpicking, the HEADER MATCH is allowed for COPY TO, is that expected? The

Re: Allow file inclusion in pg_hba and pg_ident files

2022-05-26 Thread Julien Rouhaud
On Tue, May 24, 2022 at 10:44:05AM +0900, Michael Paquier wrote: > On Mon, May 23, 2022 at 07:43:08PM +0800, Julien Rouhaud wrote: > > That being said, I'd gladly drop that enum and only handle a single error > > message, as the rest of the error context (including the o

Re: Allow file inclusion in pg_hba and pg_ident files

2022-05-23 Thread Julien Rouhaud
Hi, On Mon, May 23, 2022 at 03:53:06PM +0900, Michael Paquier wrote: > > + switch (kind) > + { > + case SecondaryAuthFile: > + msglog = "could not open secondary authentication file > \"@%s\" as \"%s\": %m"; > + msgview = "could not open

Re: CPU time for pg_stat_statement

2022-05-21 Thread Julien Rouhaud
Hi, On Sat, May 21, 2022 at 12:21:49AM +0300, Michail Nikolaev wrote: > > > This might be interesting: > > https://github.com/powa-team/pg_stat_kcache > > Oh, nice, looks like it could help me to reduce CPU and test my > assumption (using exec_user_time and exec_system_time). > > BWT, do you know

Re: Allow file inclusion in pg_hba and pg_ident files

2022-05-18 Thread Julien Rouhaud
Hi, On Tue, Mar 29, 2022 at 04:14:54PM +0800, Julien Rouhaud wrote: > > I'm attaching a rebase of the rest of the patchset. Note that I also added > support for an "include_dir" directive, as it's also something that would be > quite helpful (and very welcome for my $work

Re: make MaxBackends available in _PG_init

2022-05-15 Thread Julien Rouhaud
On Fri, May 13, 2022 at 09:49:54AM -0400, Robert Haas wrote: > > Committed. Thanks! For the record I submitted patches or pull requests this weekend for all repositories I was aware of to fix the compatibility with this patch, hoping that it will save some time to the packagers when they will

Re: [EXTERNAL] Re: pg_stat_statements

2022-05-05 Thread Julien Rouhaud
On Thu, May 05, 2022 at 12:21:41PM +, Godfrin, Philippe E wrote: > > Thanks very much for looking closely at this. To answer your questions: > I misspoke the query file at the time of the queries above was around 1GB. Ah, that's clearly big enough to lead to some slowdown. > I don't believe

Re: pg_stat_statements

2022-05-04 Thread Julien Rouhaud
Hi, On Tue, May 03, 2022 at 01:30:32PM +, Godfrin, Philippe E wrote: > > I wasn't exactly clear about the queries. The values clauses themselves are > not long - > We are using repeated values clauses: > > INSERT INTO timeseries.dvc_104 (tag_id, event_ts, bool_val, float_val, > int_val,

Re: Unfiltered server logs routing via a new elog hook or existing emit_log_hook bypassing log_min_message check

2022-05-02 Thread Julien Rouhaud
On Mon, May 02, 2022 at 07:24:04PM +0530, Bharath Rupireddy wrote: > On Mon, May 2, 2022 at 6:44 PM Julien Rouhaud wrote: > > > > I know. What I said you could do is configure log_min_message to DEBUGX, so > > your extension sees everything you want it to see. And *in you

Re: limiting collected query text length in pg_stat_statements

2022-05-02 Thread Julien Rouhaud
Hi, On Mon, May 02, 2022 at 12:45:28PM +, Godfrin, Philippe E wrote: > Greetings, > > I want to limit the query text that gets captured in pg_stat_statements. We > have sql statements with thousands of values clauses (upwards of 10,000) that > run at a 1 second interval. When just a handful

Re: Unfiltered server logs routing via a new elog hook or existing emit_log_hook bypassing log_min_message check

2022-05-02 Thread Julien Rouhaud
On Mon, May 02, 2022 at 06:40:05PM +0530, Bharath Rupireddy wrote: > On Mon, May 2, 2022 at 6:32 PM Julien Rouhaud wrote: > > > > Unless I'm missing something you can already do all of that with the current > > hook, since as mentioned in the comment above the hook can disa

Re: Unfiltered server logs routing via a new elog hook or existing emit_log_hook bypassing log_min_message check

2022-05-02 Thread Julien Rouhaud
Hi, On Mon, May 02, 2022 at 05:11:34PM +0530, Bharath Rupireddy wrote: > > Currently the emit_log_hook gets called only for the log messages of > type <= log_min_message i.e when edata->output_to_server is true [1], > which means that I can't use an implementation of emit_log_hook to > just

Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.

2022-04-27 Thread Julien Rouhaud
On Wed, Apr 27, 2022 at 03:04:23PM +, Wilm Hoyer wrote: > > I used the following hack to get the "real" Major and Minor Version of > Windows - it's in C# (.Net) and needs to be adjusted (you can compile as x64 > and use a long-long as return value ) to return the Service Number too and >

Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.

2022-04-27 Thread Julien Rouhaud
On Wed, Apr 27, 2022 at 05:13:12PM +0900, Michael Paquier wrote: > On Tue, Apr 26, 2022 at 12:54:35PM +0800, Julien Rouhaud wrote: > > so I'm still on the opinion that we should > > unconditionally use the FILE_MAP_LARGE_PAGES flag if it's defined and call > > it a >

Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.

2022-04-25 Thread Julien Rouhaud
Hi, Please keep the list in copy, especially if that's about Windows specific as I'm definitely not very knowledgeable about it. On Fri, Apr 01, 2022 at 09:18:03AM +, Wilm Hoyer wrote: > > If you don't wanna go the manifest way, maybe the RtlGetVersion function is > the one you need: >

Re: make MaxBackends available in _PG_init

2022-04-19 Thread Julien Rouhaud
Hi, On Mon, Apr 18, 2022 at 08:17:04PM -0400, Tom Lane wrote: > Nathan Bossart writes: > > I'm looking for a clean way to ERROR if someone attempts to call > > RequestAddinShmemSpace() or RequestNamedLWLockTranche() outside of the > > hook. Currently, we are using static variables in ipci.c and

Re: make MaxBackends available in _PG_init

2022-04-13 Thread Julien Rouhaud
On Wed, Apr 13, 2022 at 11:30:40AM -0700, Nathan Bossart wrote: > On Wed, Apr 13, 2022 at 12:05:08PM -0400, Tom Lane wrote: > > Robert Haas writes: > >> It may be too much to hope that we're going to completely get rid of > >> process_shared_preload_libraries_in_progress tests. > > > > Perhaps,

Re: VPath Build Errors

2022-04-13 Thread Julien Rouhaud
On Wed, Apr 13, 2022 at 05:48:49PM -0700, David G. Johnston wrote: > On Wed, Apr 13, 2022 at 5:44 PM Tom Lane wrote: > > > "David G. Johnston" writes: > > > The attached log is result of (while in the versioned directory, a > > sibling > > > of the git repo) > > > `../postgresql/configure` > >

Re: Unable to connect to Postgres13 server from psql client built on master

2022-04-12 Thread Julien Rouhaud
Hi, On Tue, Apr 12, 2022 at 12:47:54AM -0700, sirisha chamarthi wrote: > > I am unable to connect to my Postgres server (version 13 running) in Azure > Postgres from the PSQL client built on the latest master. However, I am > able to connect to the Postgres 15 server running locally on the

<    1   2   3   4   5   6   7   8   9   10   >