Re: pg_stat_replication_slots docs

2021-09-30 Thread Masahiko Sawada
On Thu, Sep 30, 2021 at 3:47 PM Amit Kapila wrote: > > Today, I noticed that we have mentioned pg_stat_replication_slots > under "Dynamic Statistics Views". I think it should be under > "Collected Statistics Views"? Good catch! Agreed and the patch looks good to me. Regards, -- Masahiko Sawad

Re: Logical replication keepalive flood

2021-09-30 Thread Greg Nancarrow
On Thu, Sep 30, 2021 at 1:19 PM Hou, Zhijie/侯 志杰 wrote: > > I tested that patch and can see the keepalive message is reduced and > the patch won't cause the current regression test fail. > Actually, with the patch applied, I find that "make check-world" fails (006_logical_decoding, test 7). Rega

Re: Record a Bitmapset of non-pruned partitions

2021-09-30 Thread Amit Langote
Hi David, On Mon, Aug 2, 2021 at 11:59 AM Amit Langote wrote: > On Sun, Aug 1, 2021 at 9:31 PM David Rowley wrote: > > On Fri, 30 Jul 2021 at 19:10, Amit Langote wrote: > > > interleaved_parts idea looks clever. I wonder if you decided that > > > it's maybe not worth setting that field in the

Re: prevent immature WAL streaming

2021-09-30 Thread Andres Freund
Hi, On 2021-09-29 17:04:48 -0400, Andrew Dunstan wrote: > On 9/29/21 4:33 PM, Tom Lane wrote: > # Second test: a standby that receives WAL via archive/restore commands. > $node = PostgresNode->new('primary2'); > $node->init( >     has_archiving => 1, >     extra => ['--

Re: Logical replication keepalive flood

2021-09-30 Thread Kyotaro Horiguchi
At Thu, 30 Sep 2021 16:21:25 +1000, Greg Nancarrow wrote in > On Thu, Sep 30, 2021 at 3:56 PM Amit Kapila wrote: > > > > It claims to skip sending keepalive if the sleep time is shorter than > > KEEPALIVE_TIMEOUT (a new threshold) but the above code seems to > > suggest it sends in both cases.

RE: Logical replication timeout problem

2021-09-30 Thread Tang , Haiying/唐 海英
On Friday, September 24, 2021 12:04 AM, Fabrice Chapuis mailto:fabrice636...@gmail.com>> wrote: > > Thanks for your patch, we are going to set up a lab in order to debug the > function. Hi I tried to reproduce this timeout problem on version10.18 but failed. In my trial, I inserted large

RE: Failed transaction statistics to measure the logical replication progress

2021-09-30 Thread Osumi , Takamichi/大墨 昂道
On Wednesday, September 29, 2021 7:51 PM Amit Kapila wrote: > On Wed, Sep 29, 2021 at 11:35 AM osumi.takami...@fujitsu.com > wrote: > > Thank you, Amit-san and Sawada-san for the discussion. > > On Tuesday, September 28, 2021 7:05 PM Amit Kapila > wrote: > > > > Another idea could be to have a

RE: Failed transaction statistics to measure the logical replication progress

2021-09-30 Thread Hou , Zhijie/侯 志杰
On Tues, Sep 28, 2021 6:05 PM Amit Kapila wrote: > On Tue, Sep 28, 2021 at 11:35 AM Masahiko Sawada > wrote: > > > > On Tue, Sep 28, 2021 at 1:54 PM Amit Kapila > wrote: > > > > > > > > > > > Then, if, we proceed in this direction, > > > > the place to implement those stats > > > > would be on

RE: Failed transaction statistics to measure the logical replication progress

2021-09-30 Thread Osumi , Takamichi/大墨 昂道
On Thursday, September 30, 2021 11:53 AM Hou, Zhijie/侯 志杰 wrote: > On Tues, Sep 28, 2021 6:05 PM Amit Kapila wrote: > > On Tue, Sep 28, 2021 at 11:35 AM Masahiko Sawada > wrote: > > > > > > On Tue, Sep 28, 2021 at 1:54 PM Amit Kapila > > > > > wrote: > > > > > > > > > > > > > > Then, if, we pr

RE: Failed transaction statistics to measure the logical replication progress

2021-09-30 Thread Osumi , Takamichi/大墨 昂道
On Thursday, September 30, 2021 1:15 PM Amit Kapila wrote: > On Thu, Sep 30, 2021 at 8:22 AM Hou, Zhijie/侯 志杰 > wrote: > > > > On Tues, Sep 28, 2021 6:05 PM Amit Kapila > wrote: > > Adding a new view seems resonalble, but it will bring another > > subscription related view which might be too mu

Re: Logical replication keepalive flood

2021-09-30 Thread Kyotaro Horiguchi
At Thu, 30 Sep 2021 17:21:03 +1000, Greg Nancarrow wrote in > Actually, with the patch applied, I find that "make check-world" fails > (006_logical_decoding, test 7). Mmm.. t/006_logical_decoding.pl .. 4/14 # Failed test 'pg_recvlogical acknowledged changes' # at t/006_logical_decoding.pl

Re: rand48 replacement

2021-09-30 Thread Fabien COELHO
Attached v15 also does call srandom if it is there, and fixes yet another remaining random call. I think that I have now removed all references to "random" from pg source. However, the test still fails on windows, because the linker does not find a global variable when compiling extensions,

Re: On login trigger: take three

2021-09-30 Thread Daniel Gustafsson
> On 30 Sep 2021, at 04:15, Greg Nancarrow wrote: > > On Wed, Sep 29, 2021 at 10:14 PM Teodor Sigaev wrote: >> >> Nice feature, but, sorry, I see some design problem in suggested feature. >> AFAIK, >> there is two use cases for this feature: >> 1 A permission / prohibition to login some users

Re: rand48 replacement

2021-09-30 Thread Thomas Munro
On Thu, Sep 30, 2021 at 9:23 PM Fabien COELHO wrote: > The missing symbol is really defined in common/pg_prng.c which AFAICT is > linked with postgres. > > If someone experienced with the windows compilation chain could give a > hint of what is needed, I'd appreciate it! I guess the declaration n

Re: Logical replication keepalive flood

2021-09-30 Thread Greg Nancarrow
On Thu, Sep 30, 2021 at 6:08 PM Kyotaro Horiguchi wrote: > > At Thu, 30 Sep 2021 17:21:03 +1000, Greg Nancarrow > wrote in > > Actually, with the patch applied, I find that "make check-world" fails > > (006_logical_decoding, test 7). > > Mmm.. > > t/006_logical_decoding.pl .. 4/14 > # Failed t

Add ETIMEDOUT to ALL_CONNECTION_FAILURE_ERRNOS

2021-09-30 Thread Jelte Fennema
Previously successfully opened TCP connections can still fail on reads with ETIMEDOUT. This should be considered a connection failure, so that the connection in libpq is marked as CONNECTION_BAD. The reason I got an ETIMEDOUT was, because I had set a low tcp_user_timeout in the connection string. H

non-superusers are allowed to drop the replication user, but are not allowed to alter or even create them, is that ok?

2021-09-30 Thread Ashutosh Sharma
Hi All, While working on one of the internal projects I noticed that currently in Postgres, we do not allow normal users to alter attributes of the replication user. However we do allow normal users to drop replication users or to even rename it using the alter command. Is that behaviour ok? If ye

Re: pgsql: Document XLOG_INCLUDE_XID a little better

2021-09-30 Thread Amit Kapila
On Wed, Sep 29, 2021 at 8:50 PM Robert Haas wrote: > > On Tue, Sep 21, 2021 at 6:48 PM Alvaro Herrera > wrote: > > Document XLOG_INCLUDE_XID a little better > > > > I noticed that commit 0bead9af484c left this flag undocumented in > > XLogSetRecordFlags, which led me to discover that the flag do

Re: Logical replication keepalive flood

2021-09-30 Thread Kyotaro Horiguchi
At Thu, 30 Sep 2021 17:08:35 +0900 (JST), Kyotaro Horiguchi wrote in > At Thu, 30 Sep 2021 17:21:03 +1000, Greg Nancarrow > wrote in > > Actually, with the patch applied, I find that "make check-world" fails > > (006_logical_decoding, test 7). > > Mmm.. > > t/006_logical_decoding.pl .. 4/14

Re: Added schema level support for publication.

2021-09-30 Thread vignesh C
On Wed, Sep 29, 2021 at 9:07 AM houzj.f...@fujitsu.com wrote: > > On Tues, Sep 28, 2021 10:46 PM vignesh C wrote: > > Attached v34 patch has the changes for the same. > > Thanks for updating the patch. > Here are a few comments. > > 1) > + * ALL TABLES IN SCHEMA schema [[, ...] > > [[

Re: Added schema level support for publication.

2021-09-30 Thread vignesh C
On Wed, Sep 29, 2021 at 10:46 AM Amit Kapila wrote: > > On Tue, Sep 28, 2021 at 8:15 PM vignesh C wrote: > > > > On Mon, Sep 27, 2021 at 12:15 PM houzj.f...@fujitsu.com > > wrote: > > > > Attached v34 patch has the changes for the same. > > > > Few comments on v34-0001-Added-schema-level-support

Re: Added schema level support for publication.

2021-09-30 Thread vignesh C
On Wed, Sep 29, 2021 at 11:49 AM Greg Nancarrow wrote: > > On Wed, Sep 29, 2021 at 3:16 PM Amit Kapila wrote: > > > > 4. > > + /* > > + * Check if setting the relation to a different schema will result in the > > + * publication having schema and same schema's table in the publication. > > + */ >

Re: Make relfile tombstone files conditional on WAL level

2021-09-30 Thread Thomas Munro
On Wed, Sep 29, 2021 at 4:07 PM Thomas Munro wrote: > Hmm, on closer inspection, isn't the lack of real interlocking with > checkpoints a bit suspect already? What stops bgwriter from writing > to the previous relfilenode generation's fd, if a relfilenode is > recycled while BgBufferSync() is run

Re: rand48 replacement

2021-09-30 Thread Fabien COELHO
I guess the declaration needs PGDLLIMPORT. Indeed, thanks! Attached v16 adds that. -- Fabien.diff --git a/contrib/amcheck/verify_nbtree.c b/contrib/amcheck/verify_nbtree.c index d19f73127c..b250ae912b 100644 --- a/contrib/amcheck/verify_nbtree.c +++ b/contrib/amcheck/verify_nbtree.c @@ -32,6

Re: Column Filtering in Logical Replication

2021-09-30 Thread Amit Kapila
On Wed, Sep 29, 2021 at 6:49 PM Alvaro Herrera wrote: > > On 2021-Sep-28, Amit Kapila wrote: > > > But it is not allowed to create schema or table with the name > > CURRENT_SCHEMA, so not sure if we need to do anything special for it. > > Oh? You certainly can. > > alvherre=# create schema "CURRE

Re: Failed transaction statistics to measure the logical replication progress

2021-09-30 Thread Amit Kapila
On Thu, Sep 30, 2021 at 1:02 PM Osumi, Takamichi/大墨 昂道 wrote: > > On Thursday, September 30, 2021 1:15 PM Amit Kapila > wrote: > > On Thu, Sep 30, 2021 at 8:22 AM Hou, Zhijie/侯 志杰 > > wrote: > > > > > > On Tues, Sep 28, 2021 6:05 PM Amit Kapila > > wrote: > > > Adding a new view seems resonalb

Re: pgcrypto support for bcrypt $2b$ hashes

2021-09-30 Thread Andreas Karlsson
On 9/28/21 11:58 PM, Daniel Fone wrote: On 29/09/2021, at 2:33 AM, Daniel Gustafsson wrote: I don't see why not, the best first patches are those scratching an itch. If you feel up for it then give it a go, I - and the rest of pgsql-hackers - can help if you need to bounce ideas. I’m glad you

Re: Logical replication keepalive flood

2021-09-30 Thread Amit Kapila
On Thu, Sep 30, 2021 at 1:26 PM Kyotaro Horiguchi wrote: > > At Thu, 30 Sep 2021 16:21:25 +1000, Greg Nancarrow > wrote in > > On Thu, Sep 30, 2021 at 3:56 PM Amit Kapila wrote: > > > > > > > Also, more to the point this special keep_alive seems to be sent for > > > synchronous replication and

Re: Logical replication keepalive flood

2021-09-30 Thread Amit Kapila
On Thu, Sep 30, 2021 at 3:41 PM Kyotaro Horiguchi wrote: > > At Thu, 30 Sep 2021 17:08:35 +0900 (JST), Kyotaro Horiguchi > wrote in > > At Thu, 30 Sep 2021 17:21:03 +1000, Greg Nancarrow > > wrote in > > > Actually, with the patch applied, I find that "make check-world" fails > > > (006_logica

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-30 Thread Amul Sul
On Fri, Sep 24, 2021 at 5:07 PM Amul Sul wrote: > > On Thu, Sep 23, 2021 at 11:56 PM Robert Haas wrote: > > > > On Mon, Sep 20, 2021 at 11:20 AM Amul Sul wrote: > > > Ok, understood, I have separated my changes into 0001 and 0002 patch, > > > and the refactoring patches start from 0003. > > > >

Re: prevent immature WAL streaming

2021-09-30 Thread Alvaro Herrera
Hello On 2021-Sep-30, Andres Freund wrote: > FWIW, with that fixed I see the test hanging (e.g. [1]): > > can't unlink > c:/cirrus/src/test/recovery/tmp_check/t_026_overwrite_contrecord_primary2_data/archives/00010008.fail: > Permission denied at t/026_overwrite_contrecord.pl l

Re: pg_stat_statements and "IN" conditions

2021-09-30 Thread Dmitry Dolgov
>On Wed, Jun 16, 2021 at 04:02:12PM +0200, Dmitry Dolgov wrote: > > > I've prepared a new rebased version to deal with the new way of > > computing query id, but as always there is one tricky part. From what I > > understand, now an external module can provide custom implementation for > > query id

Re: Add ETIMEDOUT to ALL_CONNECTION_FAILURE_ERRNOS

2021-09-30 Thread Tom Lane
Jelte Fennema writes: > Previously successfully opened TCP connections can still fail on reads > with ETIMEDOUT. This should be considered a connection failure, so that > the connection in libpq is marked as CONNECTION_BAD. The reason I got an > ETIMEDOUT was, because I had set a low tcp_user_time

Re: non-superusers are allowed to drop the replication user, but are not allowed to alter or even create them, is that ok?

2021-09-30 Thread Bharath Rupireddy
On Thu, Sep 30, 2021 at 3:37 PM Ashutosh Sharma wrote: > > Hi All, > > While working on one of the internal projects I noticed that currently in > Postgres, we do not allow normal users to alter attributes of the replication > user. However we do allow normal users to drop replication users or t

Re: prevent immature WAL streaming

2021-09-30 Thread Andrew Dunstan
On 9/29/21 5:29 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 9/29/21 4:33 PM, Tom Lane wrote: >>> which looks like a pretty straightforward bogus-connection-configuration >>> problem, except why wouldn't other BF members show it? >> This: >> ... >> doesn't have "allows_streaming => 1". > O

Re: prevent immature WAL streaming

2021-09-30 Thread Tom Lane
Andrew Dunstan writes: > Regardless of this problem, I think we should simply call > set_replication_conf unconditionally in init().  Replication connections > are now allowed by default on Unix, this would just bring Windows nodes > into line with that. Yeah, I was thinking along the same lines

Re: prevent immature WAL streaming

2021-09-30 Thread Alvaro Herrera
On 2021-Sep-30, Tom Lane wrote: > Andrew Dunstan writes: > > Regardless of this problem, I think we should simply call > > set_replication_conf unconditionally in init().  Replication connections > > are now allowed by default on Unix, this would just bring Windows nodes > > into line with that.

PQcancel does not use tcp_user_timeout, connect_timeout and keepalive settings

2021-09-30 Thread Jelte Fennema
The new connection made by PQcancel does not use the tcp_user_timeout, connect_timeout or any of the keepalive settings that are provided in the connection string. This means that a call to PQcancel can block for a much longer time than intended if there are network issues. This can be especiall

Re: PQcancel does not use tcp_user_timeout, connect_timeout and keepalive settings

2021-09-30 Thread Zhihong Yu
On Thu, Sep 30, 2021 at 7:45 AM Jelte Fennema wrote: > The new connection made by PQcancel does not use the tcp_user_timeout, > connect_timeout or any of the keepalive settings that are provided in the > connection string. This means that a call to PQcancel can block for a much > longer time than

Re: [EXTERNAL] Re: Add ETIMEDOUT to ALL_CONNECTION_FAILURE_ERRNOS

2021-09-30 Thread Jelte Fennema
Attached is a new patch that I think addresses your concerns. From: Tom Lane Sent: Thursday, September 30, 2021 16:04 To: Jelte Fennema Cc: pgsql-hack...@postgresql.org Subject: [EXTERNAL] Re: Add ETIMEDOUT to ALL_CONNECTION_FAILURE_ERRNOS Jelte Fennema writes:

Re: pg_stat_statements and "IN" conditions

2021-09-30 Thread Zhihong Yu
On Thu, Sep 30, 2021 at 6:49 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > >On Wed, Jun 16, 2021 at 04:02:12PM +0200, Dmitry Dolgov wrote: > > > > > I've prepared a new rebased version to deal with the new way of > > > computing query id, but as always there is one tricky part. From what I > >

Re: pg_stat_statements and "IN" conditions

2021-09-30 Thread Dmitry Dolgov
> On Thu, Sep 30, 2021 at 08:03:16AM -0700, Zhihong Yu wrote: > On Thu, Sep 30, 2021 at 6:49 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > >On Wed, Jun 16, 2021 at 04:02:12PM +0200, Dmitry Dolgov wrote: > > > > > > > I've prepared a new rebased version to deal with the new way of > > > > co

Re: non-superusers are allowed to drop the replication user, but are not allowed to alter or even create them, is that ok?

2021-09-30 Thread Mark Dilger
> On Sep 30, 2021, at 3:07 AM, Ashutosh Sharma wrote: > > While working on one of the internal projects I noticed that currently in > Postgres, we do not allow normal users to alter attributes of the replication > user. However we do allow normal users to drop replication users or to even >

Re: Support for NSS as a libpq TLS backend

2021-09-30 Thread Jacob Champion
On Thu, 2021-09-30 at 14:17 +0200, Daniel Gustafsson wrote: > The libpq libnss implementation doesn't call either of these, and neither does > libnss. I thought the refs check only searched for direct symbol dependencies; is that piece of NSPR being statically included somehow? > I'm not entirely

Re: prevent immature WAL streaming

2021-09-30 Thread Tom Lane
Alvaro Herrera writes: > On 2021-Sep-30, Tom Lane wrote: >> There's still the issue of these tests overriding postgresql.conf >> entries made by init(), but maybe we can live with that? > I vote to at least have has_archiving=>1 set wal_level=replica, and > potentially max_wal_senders=2 too (allo

Re: Diagnostic comment in LogicalIncreaseXminForSlot

2021-09-30 Thread Jaime Casanova
On Tue, Sep 07, 2021 at 11:14:23AM +0530, Amit Kapila wrote: > On Mon, Sep 6, 2021 at 5:29 PM Ashutosh Bapat > wrote: > > > > Yeah, I agree. Sorry for missing that. > > > > The updated patch looks good to me. > > > > Pushed! > This patch is still on "Needs review"! Should we change it to Commit

Re: [BUG] failed assertion in EnsurePortalSnapshotExists()

2021-09-30 Thread Tom Lane
"Drouvot, Bertrand" writes: > [ v2-0003-EnsurePortalSnapshotExists-failed-assertion.patch ] Looking through this, I think you were overenthusiastic about applying PushActiveSnapshotWithLevel. We don't really need to use it except in the places where we're setting portalSnapshot, because other th

Re: Numeric x^y for negative x

2021-09-30 Thread Jaime Casanova
On Mon, Sep 13, 2021 at 07:29:13PM +0100, Dean Rasheed wrote: > On Mon, 13 Sept 2021 at 17:51, Alvaro Herrera wrote: > > > > I came here just to opine that there should be a comment about there not > > being a clamp to the maximum scale. For example, log_var says "Set the > > scales .. so that th

Re: Document spaces in .pgpass need to be escaped

2021-09-30 Thread James Coleman
On Wed, Sep 29, 2021 at 12:13 PM Tom Lane wrote: > > James Coleman writes: > > A coworker has a space in a Postgres password and noticed .pgpass > > didn't work; escaping it fixed the issue. That requirement wasn't > > documented (despite other escaping requirements being documented), so > > I've

Re: [EXTERNAL] Re: Add ETIMEDOUT to ALL_CONNECTION_FAILURE_ERRNOS

2021-09-30 Thread Tom Lane
Jelte Fennema writes: > Attached is a new patch that I think addresses your concerns. You missed TranslateSocketError ... Pushed to HEAD only with that fix. regards, tom lane

Re: [BUG] failed assertion in EnsurePortalSnapshotExists()

2021-09-30 Thread Tom Lane
"Drouvot, Bertrand" writes: > On 9/30/21 7:16 PM, Tom Lane wrote: >> PS: Memo to self: in the back branches, the new field has to be >> added at the end of struct Portal. > out of curiosity, why? Sticking it into the middle would create an ABI break for any extension code that's looking at struc

Re: FETCH FIRST clause PERCENT option

2021-09-30 Thread Jaime Casanova
On Tue, Jan 26, 2021 at 07:29:11PM +0300, Surafel Temesgen wrote: > On Mon, Jan 25, 2021 at 2:39 PM Kyotaro Horiguchi > wrote: > > > Sorry for the dealy. I started to look this. > > > > > Hi kyotaro, > Thanks for looking into this but did we agree to proceed > on this approach? I fear that it wil

Re: Empty string in lexeme for tsvector

2021-09-30 Thread Jean-Christophe Arnu
Thank you Tom for your review. Le mer. 29 sept. 2021 à 21:36, Tom Lane a écrit : > Jean-Christophe Arnu writes: > > [ empty_string_in_tsvector_v4.patch ] > > I looked through this patch a bit. I don't agree with adding > these new error conditions to tsvector_setweight_by_filter and > tsvector

002_types.pl fails on some timezones on windows

2021-09-30 Thread Andres Freund
Hi, CI showed me a failure in 002_types.pl on windows. I only just now noticed that because the subscription tests aren't run by any of the vcregress.pl steps :( It turns out to be dependant on the current timezone. I have just about zero understanding how timezones work on windows, so I can't re

Re: when the startup process doesn't (logging startup delays)

2021-09-30 Thread Robert Haas
On Wed, Sep 29, 2021 at 5:12 PM Tom Lane wrote: > I didn't claim there are any other places that could use the feature > *today*. But once we've got one, it seems like there could be more > tomorrow. In any case, I dislike keeping timeout state data outside > timeout.c, because it's so likely to

Re: prevent immature WAL streaming

2021-09-30 Thread Tom Lane
Just when you thought it was safe to go back in the water: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prairiedog&dt=2021-09-29%2022%3A05%3A44 which is complaining that the (misspelled, BTW) log message 'sucessfully skipped missing contrecord at' doesn't show up. This machine is old,

Re: pgsql: Document XLOG_INCLUDE_XID a little better

2021-09-30 Thread Robert Haas
On Thu, Sep 30, 2021 at 6:08 AM Amit Kapila wrote: > I think we can do better than using XLOG_INCLUDE_XID flag in the > record being inserted. We need this flag so that we can mark > SubTransaction assigned after XLogInsertRecord() is successful. We > can instead output a flag (say sub_xact_assig

Re: when the startup process doesn't (logging startup delays)

2021-09-30 Thread Tom Lane
Robert Haas writes: > ... When I say I want my handler to be > fired in 3 s, I don't mean that I want it to be fired when the system > time is 3 seconds greater than it is right now. I mean I want it to be > fired in 3 actual seconds, regardless of what dumb thing the system > clock may choose to

Re: 002_types.pl fails on some timezones on windows

2021-09-30 Thread Tom Lane
Andres Freund writes: > It turns out to be dependant on the current timezone. I have just about zero > understanding how timezones work on windows, so I can't really interpret why > that causes a problem on windows, but apparently not on linux. Weird. Unless you're using --with-system-tzdata, I

Re: 002_types.pl fails on some timezones on windows

2021-09-30 Thread Andrew Dunstan
On 9/30/21 2:36 PM, Andres Freund wrote: > Hi, > > CI showed me a failure in 002_types.pl on windows. I only just now noticed > that because the subscription tests aren't run by any of the vcregress.pl > steps :( We have windows buildfarm animals running the subscription tests, e.g.

Re: 002_types.pl fails on some timezones on windows

2021-09-30 Thread Tom Lane
Andrew Dunstan writes: > On 9/30/21 2:36 PM, Andres Freund wrote: >> CI showed me a failure in 002_types.pl on windows. I only just now noticed >> that because the subscription tests aren't run by any of the vcregress.pl >> steps :( > We have windows buildfarm animals running the subscription tes

Re: 002_types.pl fails on some timezones on windows

2021-09-30 Thread Tom Lane
I wrote: > ... sure enough, 002_types.pl > falls over with TZ=Africa/Casablanca on my Linux machine, too. Independently of whether Africa/Casablanca is a sane translation of that Windows zone name, it'd be nice if 002_types.pl weren't so sensitive to the prevailing zone. I looked into exactly why

Re: prevent immature WAL streaming

2021-09-30 Thread Alvaro Herrera
On 2021-Sep-30, Tom Lane wrote: > Just when you thought it was safe to go back in the water: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prairiedog&dt=2021-09-29%2022%3A05%3A44 > > which is complaining that the (misspelled, BTW) Ah, the case of the missing juxtaposed consonants.

Re: Skipping logical replication transactions on subscriber side

2021-09-30 Thread Peter Eisentraut
On 30.09.21 07:45, Masahiko Sawada wrote: I've attached updated patches that incorporate all comments I got so far. Please review them. I'm uneasy about the way the xids-to-be-skipped are presented as subscriptions options, similar to settings such as "binary". I see how that is convenient,

Re: 002_types.pl fails on some timezones on windows

2021-09-30 Thread Andres Freund
Hi, On 2021-09-30 15:19:30 -0400, Andrew Dunstan wrote: > On 9/30/21 2:36 PM, Andres Freund wrote: > > Hi, > > > > CI showed me a failure in 002_types.pl on windows. I only just now noticed > > that because the subscription tests aren't run by any of the vcregress.pl > > steps :( > We have window

Re: 002_types.pl fails on some timezones on windows

2021-09-30 Thread Thomas Munro
On Fri, Oct 1, 2021 at 8:38 AM Tom Lane wrote: > But the option of "Greenwich Daylight Time" suggests that Windows thinks > this means UK civil time, not UTC. Yes, it's been a while but IIRC Windows in the UK uses confusing terminology here even in user interfaces, so that in summer it appears to

Re: prevent immature WAL streaming

2021-09-30 Thread Tom Lane
Alvaro Herrera writes: > Hmm. Well, as I said, maybe this part of the test isn't worth much > anyway. Rather than spending time trying to figure out why isn't this > triggering the WAL overwriting, I compared the coverage report for > running only the first test to the coverage report of running

Re: 002_types.pl fails on some timezones on windows

2021-09-30 Thread Tom Lane
Andres Freund writes: > It turns out to be dependant on the current timezone. I have just about zero > understanding how timezones work on windows, so I can't really interpret why > that causes a problem on windows, but apparently not on linux. As of 20f8671ef, "TZ=Africa/Casablanca make check-wo

Re: 002_types.pl fails on some timezones on windows

2021-09-30 Thread Andres Freund
Hi, On 2021-09-30 16:03:15 -0400, Tom Lane wrote: > I wrote: > > ... sure enough, 002_types.pl > > falls over with TZ=Africa/Casablanca on my Linux machine, too. > > Independently of whether Africa/Casablanca is a sane translation of > that Windows zone name, it'd be nice if 002_types.pl weren't

Re: Atomic rename feature for Windows.

2021-09-30 Thread Victor Spirin
Thank you, Fixed FILE_RENAME_INFO structure I prepared 2 versions of the patch: 1) with manifest and IsWindows10OrGreater() function 2) without manifest and RtlGetVersion function from ntdll.dll What's better? Victor Spirin Postgres Professional:http://www.postgrespro.com The Russian Postgres

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-30 Thread Robert Haas
On Thu, Sep 30, 2021 at 7:59 AM Amul Sul wrote: > To find the value of InRecovery after we clear it, patch still uses > ControlFile's DBState, but now the check condition changed to a more > specific one which is less confusing. > > In casual off-list discussion, the point was made to check > Shar

Re: Atomic rename feature for Windows.

2021-09-30 Thread Victor Spirin
Thanks. IsWindowsVersionOrGreater(10,0,1607) always returns false Only IsWindowsVersionOrGreater(10,0,0) is a valid call. (There are no service packs in Windows 10.) I haven't found a way to determine the Windows 10 release ID. The RtlGetVersion function returns dwBuildNumber = 19042 on my Wi

Re: 002_types.pl fails on some timezones on windows

2021-09-30 Thread Andres Freund
Hi, On 2021-09-30 16:31:33 -0400, Tom Lane wrote: > Andres Freund writes: > > It turns out to be dependant on the current timezone. I have just about zero > > understanding how timezones work on windows, so I can't really interpret why > > that causes a problem on windows, but apparently not on l

Re: when the startup process doesn't (logging startup delays)

2021-09-30 Thread Robert Haas
On Thu, Sep 30, 2021 at 3:10 PM Tom Lane wrote: > That would be lovely, certainly. But aren't you moving the goalposts > rather far? I don't think we make any promises about such things > today, so why has the issue suddenly gotten more pressing? Yeah, perhaps it's best to not to worry about it

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2021-09-30 Thread Melanie Plageman
On Wed, Sep 29, 2021 at 4:46 PM Melanie Plageman wrote: > > On Mon, Sep 27, 2021 at 2:58 PM Melanie Plageman > wrote: > > > > On Fri, Sep 24, 2021 at 5:58 PM Melanie Plageman > > wrote: > > > > > > On Thu, Sep 23, 2021 at 5:05 PM Melanie Plageman > > > wrote: > > > The only remaining TODOs are

PATH manipulation in 001_libpq_pipeline.pl fails on windows

2021-09-30 Thread Andres Freund
Hi, For me 001_libpq_pipeline.pl doesn't reliably work on windows, because it tries to add something to PATH, using unix syntax (vs ; used on windows). $ENV{PATH} = "$ENV{TESTDIR}:$ENV{PATH}"; If the first two elements in PATH are something needed, this can cause the test to fail... I'm surprise

Reserve prefixes for loaded libraries proposal

2021-09-30 Thread Florin Irion
Hello, If we set a parameter in the postgresql.conf that the loaded library doesn't recognize at startup, it throws a warning. For example if one sets `plpgsql.no_such_setting` for plpgsql: ``` WARNING: unrecognized configuration parameter "plpgsql.no_such_setting" ``` We could also help users g

Re: Record a Bitmapset of non-pruned partitions

2021-09-30 Thread David Rowley
On Thu, 30 Sept 2021 at 20:25, Amit Langote wrote: > Related to the above, I noticed while looking at > build_merged_partition_bounds() that db632fbca3 missed adding a line > to that function to set interleaved_parts to NULL. Because the > PartitionBoundInfo is only palloc'd (not palloc0'd), inte

Re: Reserve prefixes for loaded libraries proposal

2021-09-30 Thread Chapman Flack
On 09/30/21 17:54, Florin Irion wrote: > We could also help users get a warning if they set a parameter with the > `SET` command. This is funny. For years I have been so confident I knew how this worked that I, obviously, hadn't tried it. :) My first setting of a made-up variable gets no warning

Re: Enabling deduplication with system catalog indexes

2021-09-30 Thread Peter Geoghegan
On Wed, Sep 29, 2021 at 3:32 PM Peter Geoghegan wrote: > I decided to run a simple experiment, to give us some idea of what > benefits my proposal gives users: I ran "make installcheck" on a newly > initdb'd database (master branch), and then with the attached patch > (which enables deduplication

Re: Parallel Full Hash Join

2021-09-30 Thread Thomas Munro
On Tue, Sep 21, 2021 at 9:29 AM Jaime Casanova wrote: > Do you intend to commit 0001 soon? Specially if this apply to 14 should > be committed in the next days. Thanks for the reminder. Yes, I'm looking at this now, and looking into the crash of this patch set on CI: https://cirrus-ci.com/task/

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2021-09-30 Thread Alvaro Herrera
Can you say more about 0001? -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Use it up, wear it out, make it do, or do without"

Re: 002_types.pl fails on some timezones on windows

2021-09-30 Thread Tom Lane
Thomas Munro writes: > Yes, it's been a while but IIRC Windows in the UK uses confusing > terminology here even in user interfaces, so that in summer it appears > to be wrong, which is annoying to anyone brought up on Eggert's > system. The CLDR windowsZones.xml file shows this. Oh, thanks for t

Re: Support for NSS as a libpq TLS backend

2021-09-30 Thread Jacob Champion
On Thu, 2021-09-30 at 16:04 +, Jacob Champion wrote: > On Thu, 2021-09-30 at 14:17 +0200, Daniel Gustafsson wrote: > > The libpq libnss implementation doesn't call either of these, and neither > > does > > libnss. > > I thought the refs check only searched for direct symbol dependencies; > is

Re: Record a Bitmapset of non-pruned partitions

2021-09-30 Thread Amit Langote
On Fri, Oct 1, 2021 at 7:07 AM David Rowley wrote: > On Thu, 30 Sept 2021 at 20:25, Amit Langote wrote: > > Related to the above, I noticed while looking at > > build_merged_partition_bounds() that db632fbca3 missed adding a line > > to that function to set interleaved_parts to NULL. Because the

Re: Skipping logical replication transactions on subscriber side

2021-09-30 Thread Masahiko Sawada
On Fri, Oct 1, 2021 at 5:05 AM Peter Eisentraut wrote: > > On 30.09.21 07:45, Masahiko Sawada wrote: > > I've attached updated patches that incorporate all comments I got so > > far. Please review them. > > I'm uneasy about the way the xids-to-be-skipped are presented as > subscriptions options, s

Re: Diagnostic comment in LogicalIncreaseXminForSlot

2021-09-30 Thread Masahiko Sawada
On Fri, Oct 1, 2021 at 1:45 AM Jaime Casanova wrote: > > On Tue, Sep 07, 2021 at 11:14:23AM +0530, Amit Kapila wrote: > > On Mon, Sep 6, 2021 at 5:29 PM Ashutosh Bapat > > wrote: > > > > > > Yeah, I agree. Sorry for missing that. > > > > > > The updated patch looks good to me. > > > > > > > Pushe

Re: Addition of authenticated ID to pg_stat_activity

2021-09-30 Thread Michael Paquier
On Wed, Jul 21, 2021 at 01:21:17PM +0900, Michael Paquier wrote: > The authenticated ID could be a SSL DN longer than the default of > 128kB that this patch is proposing. I think that it is a good idea to > provide some way to the user to be able to control that without a > recompilation. I got t

Re: Record a Bitmapset of non-pruned partitions

2021-09-30 Thread David Rowley
On Fri, 1 Oct 2021 at 13:37, Amit Langote wrote: > > I've attached a patch that updates the comments to mention this. > > Looks good to me. Thanks. Thanks. Pushed. David

Re: Allow escape in application_name

2021-09-30 Thread Kyotaro Horiguchi
At Mon, 27 Sep 2021 04:10:50 +, "kuroda.hay...@fujitsu.com" wrote in > I'm sorry for sending a bad patch... Thank you for the new version, and sorry for making the discussion go back and forth:p > > + * Note: StringInfo datatype cannot be accepted > > + * because elog.h should not include

minor gripe about lax reloptions parsing for views

2021-09-30 Thread Mark Dilger
Does this bother anyone else: CREATE INDEX uses an amoptions parser specific for the index type and, at least for btree, rejects relation options from the "toast" namespace: +-- Bad reloption for index draws an error +CREATE INDEX idx ON test_tbl USING btree (i) WITH (toast.nonsense=insanity); +

Re: Diagnostic comment in LogicalIncreaseXminForSlot

2021-09-30 Thread Amit Kapila
On Fri, Oct 1, 2021 at 6:36 AM Masahiko Sawada wrote: > > On Fri, Oct 1, 2021 at 1:45 AM Jaime Casanova > wrote: > > > > On Tue, Sep 07, 2021 at 11:14:23AM +0530, Amit Kapila wrote: > > > On Mon, Sep 6, 2021 at 5:29 PM Ashutosh Bapat > > > wrote: > > > > > > > > Yeah, I agree. Sorry for missing

Re: non-superusers are allowed to drop the replication user, but are not allowed to alter or even create them, is that ok?

2021-09-30 Thread Ashutosh Sharma
On Thu, Sep 30, 2021 at 8:40 PM Mark Dilger wrote: > > > > On Sep 30, 2021, at 3:07 AM, Ashutosh Sharma > wrote: > > > > While working on one of the internal projects I noticed that currently > in Postgres, we do not allow normal users to alter attributes of the > replication user. However we do

Re: Reserve prefixes for loaded libraries proposal

2021-09-30 Thread Laurenz Albe
On Thu, 2021-09-30 at 18:26 -0400, Chapman Flack wrote: > On 09/30/21 17:54, Florin Irion wrote: > > We could also help users get a warning if they set a parameter with the > > `SET` command. > > So I am in favor of patching this. +1 on the idea. Yours, Laurenz Albe

Re: non-superusers are allowed to drop the replication user, but are not allowed to alter or even create them, is that ok?

2021-09-30 Thread Ashutosh Sharma
On Thu, Sep 30, 2021 at 7:45 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > On Thu, Sep 30, 2021 at 3:37 PM Ashutosh Sharma > wrote: > > > > Hi All, > > > > While working on one of the internal projects I noticed that currently > in Postgres, we do not allow normal users

Re: pgsql: Document XLOG_INCLUDE_XID a little better

2021-09-30 Thread Amit Kapila
On Fri, Oct 1, 2021 at 12:32 AM Robert Haas wrote: > > On Thu, Sep 30, 2021 at 6:08 AM Amit Kapila wrote: > > I think we can do better than using XLOG_INCLUDE_XID flag in the > > record being inserted. We need this flag so that we can mark > > SubTransaction assigned after XLogInsertRecord() is

Re: Incorrect snapshots while promoting hot standby node when 2PC is used

2021-09-30 Thread Michael Paquier
On Mon, May 31, 2021 at 09:37:17PM +0900, Michael Paquier wrote: > I have been looking at all that for the last couple of days, and > checked the code to make sure that relying on RecoveryInProgress() as > the tipping point is logically correct in terms of virtual XID, > snapshot build and KnownAss

Re: Skipping logical replication transactions on subscriber side

2021-09-30 Thread Amit Kapila
On Fri, Oct 1, 2021 at 6:30 AM Masahiko Sawada wrote: > > On Fri, Oct 1, 2021 at 5:05 AM Peter Eisentraut > wrote: > > > > Also, what happens when you forget to reset the xid after it has passed? > > Will it get skipped again after wraparound? > > Yes. > Aren't we resetting the skip_xid once w

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2021-09-30 Thread Michael Paquier
On Thu, May 20, 2021 at 03:07:56PM +0900, Michael Paquier wrote: > This stuff still needs to be expanded depending on how PostgresNode is > made backward-compatible, but I'll wait for that to happen before > going further down here. I have also spent some time testing all that > with MSVC, and the

Re: when the startup process doesn't (logging startup delays)

2021-09-30 Thread Michael Paquier
On Thu, Sep 30, 2021 at 05:08:17PM -0400, Robert Haas wrote: > It's certainly less of an issue than it used to be back in my day. > > Any thoughts on the patch I attached? I don't know. Anyway, this is actively worked on, so I have taken the liberty to move that to the next CF. -- Michael sign

  1   2   >