Mark all GUC variable as PGDLLIMPORT

2021-08-22 Thread Julien Rouhaud
Hi, I've been pinged many time over the years to either fix Windows compatibility or provide DLL for multiple extensions I'm maintaining. I've finally taken some time to setup a Windows build environment so I could take care of most of the problem, but not all (at least not in a satisfactory way)

Re: Hook for extensible parsing.

2021-08-22 Thread Julien Rouhaud
On Thu, Jul 22, 2021 at 03:04:19PM +0800, Julien Rouhaud wrote: > On Thu, Jul 22, 2021 at 12:01:34PM +0530, vignesh C wrote: > > > > 1) CFBOT showed the following compilation errors in windows: > > Thanks for looking at it. I'm aware of this issue on windows, but as > mentioned > in the thread

Re: Allow parallel DISTINCT

2021-08-22 Thread David Rowley
On Wed, 18 Aug 2021 at 08:50, Zhihong Yu wrote: > The patch is good from my point of view. Thanks for the review. I looked over the patch again and the only thing I adjusted was the order of the RESETs in the regression tests. I left the " if (distinct_rel->pathlist == NIL)" ERROR case check so

Re: Mark all GUC variable as PGDLLIMPORT

2021-08-22 Thread Michael Paquier
On Sun, Aug 22, 2021 at 04:10:33PM +0800, Julien Rouhaud wrote: > This topic has been raised multiple time over the years, and I don't see any > objection to add such an annotation at least for all GUC variables (either the > direct variables or the indirect variables set during the hook execution)

Re: Mark all GUC variable as PGDLLIMPORT

2021-08-22 Thread Julien Rouhaud
On Sun, Aug 22, 2021 at 08:51:26PM +0900, Michael Paquier wrote: > On Sun, Aug 22, 2021 at 04:10:33PM +0800, Julien Rouhaud wrote: > > This topic has been raised multiple time over the years, and I don't see any > > objection to add such an annotation at least for all GUC variables (either > > the

Re: Mark all GUC variable as PGDLLIMPORT

2021-08-22 Thread Pavel Stehule
ne 22. 8. 2021 v 14:08 odesílatel Julien Rouhaud napsal: > On Sun, Aug 22, 2021 at 08:51:26PM +0900, Michael Paquier wrote: > > On Sun, Aug 22, 2021 at 04:10:33PM +0800, Julien Rouhaud wrote: > > > This topic has been raised multiple time over the years, and I don't > see any > > > objection to a

Re: Mark all GUC variable as PGDLLIMPORT

2021-08-22 Thread Julien Rouhaud
On Sun, Aug 22, 2021 at 02:17:16PM +0200, Pavel Stehule wrote: > > Is true, so it increases differences between Windows and Unix, and fixing > these issues is not fun work. On the other hand, maybe direct access to > these variables from extensions is an antipattern, and we should use a > direct f

Spelling change in LLVM 14 API

2021-08-22 Thread Thomas Munro
Hi, After [1], seawasp blew up[2]. I tested the following fix on LLVM 13 and 14 (main branch ~2 days ago). Better ideas welcome. - if (F.getAttributes().hasFnAttribute(llvm::Attribute::NoInline)) +#if LLVM_VERSION_MAJOR < 14 +#define hasFnAttr hasFnAttribute +#endif + + if (F.getAtt

Re: Mark all GUC variable as PGDLLIMPORT

2021-08-22 Thread Tom Lane
Julien Rouhaud writes: > On Sun, Aug 22, 2021 at 08:51:26PM +0900, Michael Paquier wrote: >> ... and on a parameter-basis based >> on requests from extension authors. If you wish to make your >> extensions able to work on Windows, that's a good idea, but I would >> recommend to limit this exercis

Re: Spelling change in LLVM 14 API

2021-08-22 Thread Tom Lane
Thomas Munro writes: > After [1], seawasp blew up[2]. I tested the following fix on LLVM 13 > and 14 (main branch ~2 days ago). Better ideas welcome. > - if (F.getAttributes().hasFnAttribute(llvm::Attribute::NoInline)) > +#if LLVM_VERSION_MAJOR < 14 > +#define hasFnAttr hasFnAttribute > +

Re: Mark all GUC variable as PGDLLIMPORT

2021-08-22 Thread Julien Rouhaud
On Sun, Aug 22, 2021 at 09:19:42AM -0400, Tom Lane wrote: > > Uh, no, it's exactly *not* clear. There are a lot of GUCs that are only > of interest to particular subsystems. I do not see why being a GUC makes > something automatically more interesting than any other global variable. > Usually, t

Re: Allow parallel DISTINCT

2021-08-22 Thread Tom Lane
David Rowley writes: > I've pushed this to master now. ... and the buildfarm is pushing back, eg https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=hoverfly&dt=2021-08-22%2011%3A31%3A45 diff -U3 /scratch/nm/farm/xlc64v16/HEAD/pgsql.build/src/test/regress/expected/select_distinct.out /sc

Re: Allow parallel DISTINCT

2021-08-22 Thread David Rowley
On Mon, 23 Aug 2021 at 01:58, Tom Lane wrote: > > David Rowley writes: > > I've pushed this to master now. > > ... and the buildfarm is pushing back, eg Thanks. I pushed a fix for that. David

Re: Allow parallel DISTINCT

2021-08-22 Thread Tom Lane
David Rowley writes: > Thanks. I pushed a fix for that. Yeah, I saw your commit just after complaining. Sorry for the noise. regards, tom lane

Queries that should be canceled will get stuck on secure_write function

2021-08-22 Thread 蔡梦娟(玊于)
Hi, all Recently, I got a problem that the startup process of standby is stuck and keeps in a waiting state. The backtrace of startup process shows that it is waiting for a backend process which conflicts with recovery processing to exit, the guc parameters max_standby_streaming_delay and max

Re: Support reset of Shared objects statistics in "pg_stat_reset" function

2021-08-22 Thread Sadhuprasad Patro
> 3) > - dbentry = pgstat_get_db_entry(msg->m_databaseid, false); > + if (!IsSharedRelation(msg->m_objectid)) > + dbentry = pgstat_get_db_entry(msg->m_databaseid, false); > + else > + dbentry = pgstat_get_db_entry(InvalidOid, false); > > We should add s

Re: Support reset of Shared objects statistics in "pg_stat_reset" function

2021-08-22 Thread Sadhuprasad Patro
> On 2021/08/20 11:07, Mahendra Singh Thalor wrote: > > 1) > > Resets statistics for a single table or index in the current > > database > > -to zero. > > +to zero. The input can be a shared table also > > > > I think, above comment should be modified. Maybe, we can modif

Re: proposal: enhancing plpgsql debug API - returns text value of variable content

2021-08-22 Thread Pavel Stehule
Hi st 28. 7. 2021 v 11:01 odesílatel Pavel Stehule napsal: > > > pá 23. 7. 2021 v 10:47 odesílatel Pavel Stehule > napsal: > >> >> >> pá 23. 7. 2021 v 10:30 odesílatel Aleksander Alekseev < >> aleksan...@timescale.com> napsal: >> >>> Hi Pavel, >>> >>> > I know it. Attached patch try to fix this

Re: replay of CREATE TABLESPACE eats data at wal_level=minimal

2021-08-22 Thread Noah Misch
On Wed, Aug 18, 2021 at 10:32:10PM -0700, Noah Misch wrote: > On Wed, Aug 18, 2021 at 10:47:24AM -0400, Robert Haas wrote: > > On Tue, Aug 10, 2021 at 9:35 AM Robert Haas wrote: > > > Oh, yeah, I think that works, actually. I was imagining a few problems > > > here, but I don't think they really e

Improved regular expression error message for backrefs

2021-08-22 Thread Mark Dilger
Hackers, Please find attached an improvement to the error messages given for invalid backreference usage: select 'xyz' ~ '(.)(.)\3'; ERROR: invalid regular expression: invalid backreference number select 'xyz' ~ '(.)(.)(?=\2)'; -ERROR: invalid regular expression: invalid backreference numbe

Re: Showing I/O timings spent reading/writing temp buffers in EXPLAIN

2021-08-22 Thread Masahiko Sawada
On Thu, Aug 19, 2021 at 10:52 PM Ranier Vilela wrote: > > Em qui., 19 de ago. de 2021 às 09:21, Masahiko Sawada > escreveu: >> >> Hi all , >> >> It's reported on pgsql-bugs[1] that I/O timings in EXPLAIN don't show >> the one for temp files. I think it's not a bug but could be an item >> for PG1

Re: .ready and .done files considered harmful

2021-08-22 Thread Bossart, Nathan
On 8/21/21, 9:29 PM, "Bossart, Nathan" wrote: > I was curious about this, so I wrote a patch (attached) to store > multiple files per directory scan and tested it against the latest > patch in this thread (v9) [0]. Specifically, I set archive_command to > 'false', created ~20K WAL segments, then

Re: Improved regular expression error message for backrefs

2021-08-22 Thread Tom Lane
Mark Dilger writes: > The patch defines a new error code REG_ENOBREF in regex/regex.h right next to > REG_ESUBREG from which it is split out, rather than at the end of the list. > Is there a project preference to add it at the end? Certainly, that would > give a shorter git diff. > Are there

Re: Is it worth pushing conditions to sublink/subplan?

2021-08-22 Thread li jie
Indeed, this may be useful for partition pruning. I am also curious about why this has not been achieved. Wenjing 于2021年8月23日周一 上午10:46写道: > Hi Hackers, > > Recently, a issue has been bothering me, This is about conditional > push-down in SQL. > I use cases from regression testing as an example.

Re: Skipping logical replication transactions on subscriber side

2021-08-22 Thread Masahiko Sawada
On Fri, Aug 20, 2021 at 6:14 PM tanghy.f...@fujitsu.com wrote: > > > On Thursday, August 19, 2021 9:53 AM Masahiko Sawada > > wrote: > > > > Thank you for reporting the issue! This issue must be fixed in the > > latest (v9) patches I've just submitted[1]. > > > > Thanks for your patch. > I've co

Re: Improved regular expression error message for backrefs

2021-08-22 Thread Mark Dilger
> On Aug 22, 2021, at 7:47 PM, Tom Lane wrote: > > Yeah: the POSIX standard says what the error codes from regcomp() are. I'm not sure how to interpret them. The language "The implementation may define additional macros or constants using names beginning with REG_" at the bottom of the doc

RE: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o

2021-08-22 Thread houzj.f...@fujitsu.com
On Sat, Aug 21, 2021 8:38 PM Dilip Kumar wrote: > On Wed, Aug 18, 2021 at 3:45 PM Dilip Kumar wrote: > > I was looking into this, so if we want to do that I think the outline > > will look like this > > > > - There will be a fileset.c and fileset.h files, and we will expose a > > new structure Fi

Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o

2021-08-22 Thread Dilip Kumar
On Mon, Aug 23, 2021 at 9:11 AM houzj.f...@fujitsu.com wrote: > 4) > -extern File SharedFileSetCreate(SharedFileSet *fileset, const char *name); > -extern File SharedFileSetOpen(SharedFileSet *fileset, const char *name, > - int mode); > -ext

Re: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2021-08-22 Thread Amit Kapila
On Sat, Aug 7, 2021 at 6:53 PM houzj.f...@fujitsu.com wrote: > > Personally, I also think it will be better to make the behavior consistent. > Attach the new version patch make both ADD and DROP behave the same as SET > PUBLICATION > which refresh all the publications. > I think we can have test

Re: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2021-08-22 Thread Amit Kapila
On Wed, Aug 18, 2021 at 7:54 PM Peter Eisentraut wrote: > > On 10.08.21 05:22, Amit Kapila wrote: > > Yeah, unless we change design drastically we might not be able to do a > > refresh for dropped publications, for add it is possible. It seems > > most of the people responded on this thread that w

Re: proposal: enhancing plpgsql debug API - returns text value of variable content

2021-08-22 Thread Pavel Stehule
ne 22. 8. 2021 v 19:38 odesílatel Pavel Stehule napsal: > Hi > > st 28. 7. 2021 v 11:01 odesílatel Pavel Stehule > napsal: > >> >> >> pá 23. 7. 2021 v 10:47 odesílatel Pavel Stehule >> napsal: >> >>> >>> >>> pá 23. 7. 2021 v 10:30 odesílatel Aleksander Alekseev < >>> aleksan...@timescale.com> n

Re: [BUG] wrong refresh when ALTER SUBSCRIPTION ADD/DROP PUBLICATION

2021-08-22 Thread Masahiko Sawada
On Mon, Aug 23, 2021 at 1:59 PM Amit Kapila wrote: > > On Sat, Aug 7, 2021 at 6:53 PM houzj.f...@fujitsu.com > wrote: > > > > Personally, I also think it will be better to make the behavior consistent. > > Attach the new version patch make both ADD and DROP behave the same as SET > > PUBLICATION

Separate out FileSet from SharedFileSet (was Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o)

2021-08-22 Thread Amit Kapila
On Mon, Aug 23, 2021 at 9:53 AM Dilip Kumar wrote: > > On Mon, Aug 23, 2021 at 9:11 AM houzj.f...@fujitsu.com > wrote: > > > 4) > > -extern File SharedFileSetCreate(SharedFileSet *fileset, const char *name); > > -extern File SharedFileSetOpen(SharedFileSet *fileset, const char *name, > > -

Re: Some leftovers of recent message cleanup?

2021-08-22 Thread Kyotaro Horiguchi
At Fri, 20 Aug 2021 19:36:02 +0900, Fujii Masao wrote in > > > On 2021/08/20 11:53, Kyotaro Horiguchi wrote: > > At Thu, 19 Aug 2021 20:29:42 +0900, Fujii Masao > > wrote in > >> On 2021/08/19 17:03, Kyotaro Horiguchi wrote: > >>> Hello. > >>> While I was examining message translation for PG1

Re: pg_veryfybackup can fail with a valid backup for TLI > 1

2021-08-22 Thread Michael Paquier
On Fri, Aug 20, 2021 at 04:47:15PM +0900, Kyotaro Horiguchi wrote: > Yes, backup_label looks correct. > > backup_label (extract): > START WAL LOCATION: 0/528 (file 00020005) > CHECKPOINT LOCATION: 0/560 > START TIMELINE: 2 Okay. I have worked on that today, did more manua

Re: Mark all GUC variable as PGDLLIMPORT

2021-08-22 Thread Julien Rouhaud
On Sun, Aug 22, 2021 at 09:29:01PM +0800, Julien Rouhaud wrote: > On Sun, Aug 22, 2021 at 09:19:42AM -0400, Tom Lane wrote: > > > > Uh, no, it's exactly *not* clear. There are a lot of GUCs that are only > > of interest to particular subsystems. I do not see why being a GUC makes > > something a

Re: Proposal: More structured logging

2021-08-22 Thread Ronan Dunklau
Le vendredi 20 août 2021, 11:31:21 CEST Ronan Dunklau a écrit : > Le jeudi 19 août 2021, 15:04:30 CEST Alvaro Herrera a écrit : > > On 2021-Aug-13, Ronan Dunklau wrote: > > > ereport(NOTICE, > > > > > > (errmsg("My log message")), > > > (errtag("EMITTER", "MYEXTENSION")), > > > (errtag("MSG-ID"