Re: pg_tablespace_location() failure with allow_in_place_tablespaces

2022-03-03 Thread Kyotaro Horiguchi
At Fri, 04 Mar 2022 16:41:03 +0900 (JST), Kyotaro Horiguchi wrote in > At Fri, 4 Mar 2022 15:44:22 +0900, Michael Paquier > wrote in > > The use may be limited to any automated testing and > > allow_in_place_tablespaces is a developer GUC, still it seems to me > > that there is an argument

Re: pg_tablespace_location() failure with allow_in_place_tablespaces

2022-03-03 Thread Kyotaro Horiguchi
At Fri, 4 Mar 2022 15:44:22 +0900, Michael Paquier wrote in > Hi all, > > While playing with tablespaces and recovery in a TAP test, I have > noticed that retrieving the location of a tablespace created with > allow_in_place_tablespaces enabled fails in pg_tablespace_location(), > because

Re: logical replication empty transactions

2022-03-03 Thread Peter Smith
On Fri, Mar 4, 2022 at 12:41 PM Ajin Cherian wrote: > > I have split the patch into two. I have kept the logic of skipping > streaming changes in the second patch. > I will work on the second patch once we can figure out a solution for > the COMMIT PREPARED after restart problem. > Please see

Re: wal_compression=zstd

2022-03-03 Thread Michael Paquier
On Tue, Feb 22, 2022 at 05:19:48PM -0600, Justin Pryzby wrote: > I am not claiming that zstd is generally better for WAL. Rather, if we're > going to support alternate compression methods, it's nice to give a couple > options (in addition to pglz). Some use cases would certainly suffer from >

Re: Optionally automatically disable logical replication subscriptions on error

2022-03-03 Thread Masahiko Sawada
On Wed, Mar 2, 2022 at 6:38 PM osumi.takami...@fujitsu.com wrote: > > On Wednesday, March 2, 2022 12:47 PM Masahiko Sawada > wrote: > > After more thoughts, should we do both AbortOutOfAnyTransaction() and error > > message handling while holding interrupts? That is, > > > > HOLD_INTERRUPTS();

pg_tablespace_location() failure with allow_in_place_tablespaces

2022-03-03 Thread Michael Paquier
Hi all, While playing with tablespaces and recovery in a TAP test, I have noticed that retrieving the location of a tablespace created with allow_in_place_tablespaces enabled fails in pg_tablespace_location(), because readlink() sees a directory in this case. The use may be limited to any

Re: standby recovery fails (tablespace related) (tentative patch and discussion)

2022-03-03 Thread Kyotaro Horiguchi
Thanks to look this! At Fri, 4 Mar 2022 13:51:12 +0900, Michael Paquier wrote i n > On Fri, Mar 04, 2022 at 09:10:48AM +0900, Kyotaro Horiguchi wrote: > > And same function contained a maybe-should-have-been-removed line > > which makes Windows build unhappy. > > > > This should make all

Re: Add the replication origin name and commit-LSN to logical replication worker errcontext

2022-03-03 Thread Amit Kapila
On Fri, Mar 4, 2022 at 11:45 AM osumi.takami...@fujitsu.com wrote: > > On Friday, March 4, 2022 2:23 PM Masahiko Sawada > wrote: > > I've attached updated patches. > Hi, thank you for updating the patch. > > One comment on v4. > > In v4-0002, we introduce 'commit_lsn' in the

RE: [Proposal] Add foreign-server health checks infrastructure

2022-03-03 Thread kuroda.hay...@fujitsu.com
Hi Hackers, > It's not happy, but I'm not sure about a good solution. I made a timer > reschedule > if connection lost had detected. But if queries in the transaction are quite > short, > catching SIGINT may be fail. Attached uses another way: sets pending flags again if DoingCommandRead is

RE: Add the replication origin name and commit-LSN to logical replication worker errcontext

2022-03-03 Thread osumi.takami...@fujitsu.com
On Friday, March 4, 2022 2:23 PM Masahiko Sawada wrote: > I've attached updated patches. Hi, thank you for updating the patch. One comment on v4. In v4-0002, we introduce 'commit_lsn' in the ApplyErrorCallbackArg. This member is set for prepare, rollback prepared and stream_abort as well. The

Re: Doc about how to set max_wal_senders when setting minimal wal_level

2022-03-03 Thread Kyotaro Horiguchi
At Fri, 04 Mar 2022 12:18:29 +0800, Japin Li wrote in > > On Thu, 03 Mar 2022 at 12:10, Japin Li wrote: > > Attach v3 patch to fix missing close varname tag. +A precondition for using minimal WAL is to disable WAL archiving and +streaming replication by setting +to 0,

Re: Add the replication origin name and commit-LSN to logical replication worker errcontext

2022-03-03 Thread Amit Kapila
On Fri, Mar 4, 2022 at 10:53 AM Masahiko Sawada wrote: > > On Fri, Mar 4, 2022 at 11:27 AM osumi.takami...@fujitsu.com > wrote: > > > > (4) one confirmation > > > > We don't have a TAP test of pg_replication_origin_advance() > > for v3, that utilizes this new log in a logical replication setup.

Re: Add the replication origin name and commit-LSN to logical replication worker errcontext

2022-03-03 Thread Amit Kapila
On Fri, Mar 4, 2022 at 6:40 AM Masahiko Sawada wrote: > > Attached updated version patches. > The patch looks mostly good to me. Few minor comments: 1. I think we can have an Assert for errarg->origin_name in apply_error_callback after checking the command as this function assumes that it will

Re: Add the replication origin name and commit-LSN to logical replication worker errcontext

2022-03-03 Thread Masahiko Sawada
On Fri, Mar 4, 2022 at 11:27 AM osumi.takami...@fujitsu.com wrote: > > On Friday, March 4, 2022 10:09 AM Masahiko Sawada > wrote: > > On Thu, Mar 3, 2022 at 10:02 PM Masahiko Sawada > > wrote: > > > > > > > > > I'm updating the patches and will submit them. > > > > Attached updated version

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-03-03 Thread Kyotaro Horiguchi
At Mon, 14 Feb 2022 14:52:15 +0900 (JST), Kyotaro Horiguchi wrote in > In this version , 0001 gets one fix and two comment updates. While the disucssion on back-patching of 0001 proceeding on another branch, the main patch iself gets looks like as if rotten on CF-App. So I rebased v10 on the

Re: Adding CI to our tree (ccache)

2022-03-03 Thread Justin Pryzby
On Sun, Feb 20, 2022 at 12:47:31PM -0800, Andres Freund wrote: > On 2022-02-20 13:36:55 -0600, Justin Pryzby wrote: > > Have you tried to use the yet-to-be-released ccache with MSVC ? > > Yes, it doesn't work, because it requires cl.exe to be used in a specific way > (only a single input file,

Re: standby recovery fails (tablespace related) (tentative patch and discussion)

2022-03-03 Thread Michael Paquier
On Fri, Mar 04, 2022 at 09:10:48AM +0900, Kyotaro Horiguchi wrote: > And same function contained a maybe-should-have-been-removed line > which makes Windows build unhappy. > > This should make all platforms in the CI happy. d6d317d as solved the issue of tablespace paths across multiple nodes

Re: Proposal: Support custom authentication methods using hooks,Re: Proposal: Support custom authentication methods using hooks

2022-03-03 Thread Tatsuo Ishii
>> So, dropping plaintext password authentication support from libpq will >> make it impossible for users to use the former method. > > Yes, just like dropping support for md5 would make it impossible for > users to have their passwords be hashed with md5, which is an altogether > good thing

Re: Doc about how to set max_wal_senders when setting minimal wal_level

2022-03-03 Thread Japin Li
On Thu, 03 Mar 2022 at 12:10, Japin Li wrote: > On Thu, 03 Mar 2022 at 11:25, David G. Johnston > wrote: >> I would suggest a wording more like: >> >> "A precondition for using minimal WAL is to disable WAL archiving and >> streaming replication by setting max_wal_senders to 0, and

Re: PG DOCS - logical replication filtering

2022-03-03 Thread Peter Smith
On Thu, Mar 3, 2022 at 2:15 PM Amit Kapila wrote: > > On Wed, Mar 2, 2022 at 8:00 PM Peter Eisentraut > wrote: > > > > On 02.03.22 05:47, Peter Smith wrote: > > > This patch introduces a new "Filtering" page to give a common place > > > where all kinds of logical replication filtering can be

Re: PG DOCS - logical replication filtering

2022-03-03 Thread Peter Smith
PSA patch v3 to address all comments received so far. -- Kind Regards, Peter Smith. Fujitsu Australia v3-0001-Update-the-documentation-for-logical-replication.patch Description: Binary data

false failure of test_docoding regression test

2022-03-03 Thread Kyotaro Horiguchi
Hello. The CF-CI complained on one of my patch for seemingly a reason unrelated to the patch. https://cirrus-ci.com/task/5544213843542016?logs=test_world#L1666 > diff -U3 > /tmp/cirrus-ci-build/contrib/test_decoding/expected/slot_creation_error.out >

RE: Add the replication origin name and commit-LSN to logical replication worker errcontext

2022-03-03 Thread osumi.takami...@fujitsu.com
On Friday, March 4, 2022 10:09 AM Masahiko Sawada wrote: > On Thu, Mar 3, 2022 at 10:02 PM Masahiko Sawada > wrote: > > > > > > I'm updating the patches and will submit them. > > Attached updated version patches. Thank you for sharing the patch v3. Few minor comments. (1) v03-0001,

Re: [PATCH] Expose port->authn_id to extensions and triggers

2022-03-03 Thread Michael Paquier
On Thu, Mar 03, 2022 at 07:16:17PM +, Jacob Champion wrote: > I guess it depends on what we want MyProcPort to look like in a > parallel worker. Are we comfortable having most of it be blank/useless? > Does it need to be filled in? Good question. It depends on the definition of how much

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-03-03 Thread Noah Misch
On Sun, Jan 16, 2022 at 01:02:41PM -0800, Noah Misch wrote: > My next steps: > > - Report a Debian bug for the sparc64+ext4 zeros problem. Reported to Debian, then upstream: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006157 https://marc.info/?t=16453926991 Last week, someone

Re: logical replication empty transactions

2022-03-03 Thread Ajin Cherian
I have split the patch into two. I have kept the logic of skipping streaming changes in the second patch. I will work on the second patch once we can figure out a solution for the COMMIT PREPARED after restart problem. regards, Ajin Cherian

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-03 Thread Kyotaro Horiguchi
At Fri, 4 Mar 2022 10:09:19 +0900, Michael Paquier wrote in > On Thu, Mar 03, 2022 at 04:40:42PM -0500, Tom Lane wrote: > > The point is to make it clear that the macro isn't intended to affect > > code outside the function. Since C lacks block-scoped macros, > > there's no other way to do

Re: Add the replication origin name and commit-LSN to logical replication worker errcontext

2022-03-03 Thread Masahiko Sawada
On Thu, Mar 3, 2022 at 10:02 PM Masahiko Sawada wrote: > > > I'm updating the patches and will submit them. Attached updated version patches. Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/ v3-0002-Add-the-origin-name-and-remote-commit-LSN-to-logi.patch Description: Binary

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-03 Thread Michael Paquier
On Thu, Mar 03, 2022 at 04:40:42PM -0500, Tom Lane wrote: > The point is to make it clear that the macro isn't intended to affect > code outside the function. Since C lacks block-scoped macros, > there's no other way to do that. > > I concede that a lot of our code is pretty sloppy about this,

Re: Make mesage at end-of-recovery less scary.

2022-03-03 Thread Kyotaro Horiguchi
At Thu, 3 Mar 2022 15:39:44 +0530, Ashutosh Sharma wrote in > The new changes made in the patch look good. Thanks to the recent > changes to speed WAL insertion that have helped us catch this bug. Thanks for the quick checking. > One small comment: > > record = (XLogRecord *)

Re: standby recovery fails (tablespace related) (tentative patch and discussion)

2022-03-03 Thread Kyotaro Horiguchi
At Wed, 02 Mar 2022 19:31:24 +0900 (JST), Kyotaro Horiguchi wrote in > A function added to Util.pm used perl2host, which has been removed > recently. And same function contained a maybe-should-have-been-removed line which makes Windows build unhappy. This should make all platforms in the CI

Re: Reducing power consumption on idle servers

2022-03-03 Thread Tom Lane
Jim Nasby writes: > I'm wondering if it'd be worth linking autovac wakeup from a truly idle > state to the stats collector. If there's no stats messages coming in > clearly there's nothing new for autovac. That seems pretty scary in the current system design, where the stats collector is

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-03 Thread Tom Lane
Chapman Flack writes: > On 03/03/22 16:40, Tom Lane wrote: >> The point is to make it clear that the macro isn't intended to affect >> code outside the function. Since C lacks block-scoped macros, >> there's no other way to do that. > Would the > Datum values[3]; > bool nulls[

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-03 Thread Chapman Flack
On 03/03/22 16:40, Tom Lane wrote: > The point is to make it clear that the macro isn't intended to affect > code outside the function. Since C lacks block-scoped macros, > there's no other way to do that. > > I concede that a lot of our code is pretty sloppy about this, but > that doesn't make

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Tom Lane
Andres Freund writes: > The message says: > src/backend/utils/adt/tid.c:112:16: runtime error: left shift of 65535 by 16 > places cannot be represented in type 'int' > Afaics that means bi_hi is 65535. So either we're dealing with a very large > relation or BlockIdGetBlockNumber() is getting

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-03 Thread Tom Lane
Robert Haas writes: > On Wed, Mar 2, 2022 at 9:35 AM Tom Lane wrote: >> I've not read the whole patch, but this snippet seems fine to me >> if there's also an #undef at the end of the function. >> From later emails, it sounds like that's not the common practice in > similar cases, and I don't

Re: [Proposal] Global temporary tables

2022-03-03 Thread Andres Freund
Hi, On 2022-03-03 16:07:37 -0500, Robert Haas wrote: > On Thu, Mar 3, 2022 at 3:29 PM Greg Stark wrote: > > I'm still hopeful we get to advance this early in 16 because I think > > everyone agrees the feature would be great. > > I'm not saying this patch can't make progress, but I think the

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Zhihong Yu
On Thu, Mar 3, 2022 at 1:11 PM Andres Freund wrote: > Hi, > > On 2022-03-03 15:31:51 -0500, Tom Lane wrote: > > Andres Freund writes: > > > On 2022-03-03 14:00:14 -0500, Tom Lane wrote: > > > For the buildfarm, I could enable it on flaviventris? That runs an > > > experimental gcc, without

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Andres Freund
Hi, On 2022-03-03 15:31:51 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2022-03-03 14:00:14 -0500, Tom Lane wrote: > > For the buildfarm, I could enable it on flaviventris? That runs an > > experimental gcc, without optimization (whereas serinus runs with > > optimization). Which seems

Re: pg_stop_backup() v2 incorrectly marked as proretset

2022-03-03 Thread Robert Haas
On Wed, Mar 2, 2022 at 9:35 AM Tom Lane wrote: > Yeah, there's plenty of precedent for that coding if you look around. > I've not read the whole patch, but this snippet seems fine to me > if there's also an #undef at the end of the function. >From later emails, it sounds like that's not the

Re: [Proposal] Global temporary tables

2022-03-03 Thread Robert Haas
On Thu, Mar 3, 2022 at 3:29 PM Greg Stark wrote: > I'm still hopeful we get to advance this early in 16 because I think > everyone agrees the feature would be great. I'm not saying this patch can't make progress, but I think the chances of this being ready to commit any time in the v16 release

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Tom Lane
Andres Freund writes: > On 2022-03-03 14:00:14 -0500, Tom Lane wrote: >> I'm not sure whether to back-patch --- looking through the >> git logs, it seems we've back-patched some fixes like these >> and not others. Thoughts? > It'd be easier to run a BF animal if we fixed it everywhere. Fair

Re: [Proposal] Global temporary tables

2022-03-03 Thread Greg Stark
It doesn't look like this is going to get committed this release cycle. I understand more feedback could be valuable, especially on the overall design, but as this is the last commitfest of the release we should focus on other patches for now and spend that time in the next release cycle. I'm

Re: row filtering for logical replication

2022-03-03 Thread Euler Taveira
On Thu, Mar 3, 2022, at 7:47 AM, Amit Kapila wrote: > LGTM. I'll push this tomorrow unless Tomas or Euler feels otherwise. Sounds good to me. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Andres Freund
Hi, On 2022-03-03 14:00:14 -0500, Tom Lane wrote: > The attached is enough to get through check-world with > "-fsanitize=undefined" using RHEL8's clang 12.0.1. Cool. > I'm not sure whether to back-patch --- looking through the > git logs, it seems we've back-patched some fixes like these > and

Re: [PATCH] Expose port->authn_id to extensions and triggers

2022-03-03 Thread Jacob Champion
On Thu, 2022-03-03 at 16:45 +0900, Michael Paquier wrote: > Anyway, FixedParallelState > includes some authentication data passed down by the leader when > spawning a worker. So, if we were to pass down the authn, we are > going to need a new PARALLEL_KEY_* to serialize and restore the data >

Re: [PATCH] Expose port->authn_id to extensions and triggers

2022-03-03 Thread Jacob Champion
On Wed, 2022-03-02 at 09:18 +0100, Peter Eisentraut wrote: > On 01.03.22 23:05, Jacob Champion wrote: > > On Tue, 2022-03-01 at 19:56 +0100, Peter Eisentraut wrote: > > > This patch contains no documentation. I'm having a hard time > > > understanding what the name "session_authn_id" is supposed

Re: Commitfest 2022-03 Patch Triage Part 1b

2022-03-03 Thread Greg Stark
Just FYI. Better to follow up to the thread for the patch that's already in the CF. Otherwise your patch will missed by someone who looks at the CF entry to see the latest patch.

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Tom Lane
I wrote: > Andres Freund writes: >> We should fix these passing-null-pointer cases... > Yeah, working on that now. The attached is enough to get through check-world with "-fsanitize=undefined" using RHEL8's clang 12.0.1. Most of it is the same old null-pointer-with-zero-count business, but the

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-03-03 Thread Robert Haas
On Thu, Mar 3, 2022 at 1:28 PM Andres Freund wrote: > > I can't remember that verify() is the one that accesses conflict.db large > > while cause_eviction() is the one that accesses postgres.replace_sb for more > > than like 15 seconds. > > For more than 15seconds? The whole test runs in a few

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-03-03 Thread Andres Freund
Hi, On 2022-03-03 13:11:17 -0500, Robert Haas wrote: > On Wed, Mar 2, 2022 at 3:00 PM Andres Freund wrote: > > On 2022-03-02 14:52:01 -0500, Robert Haas wrote: > > > - I am having some trouble understanding clearly what 0001 is doing. > > > I'll try to study it further. > > > > It tests for the

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-03-03 Thread Julien Rouhaud
On Wed, Mar 2, 2022 at 7:15 PM Nitin Jadhav wrote: > > > > > As mentioned upthread, there can be multiple backends that request a > > > > checkpoint, so unless we want to store an array of pid we should store > > > > a number > > > > of backend that are waiting for a new checkpoint. > > It's a

Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To:

2022-03-03 Thread Robert Haas
On Wed, Mar 2, 2022 at 3:00 PM Andres Freund wrote: > On 2022-03-02 14:52:01 -0500, Robert Haas wrote: > > - I am having some trouble understanding clearly what 0001 is doing. > > I'll try to study it further. > > It tests for the various scenarios I could think of that could lead to FD > reuse,

Re: Proposal: Support custom authentication methods using hooks

2022-03-03 Thread Bruce Momjian
On Thu, Mar 3, 2022 at 12:38:32PM -0500, Jonathan Katz wrote: > On 3/3/22 12:23 PM, Bruce Momjian wrote: > > On Thu, Mar 3, 2022 at 10:45:42AM +0100, Peter Eisentraut wrote: > > > On 02.03.22 16:45, Jonathan S. Katz wrote: > > > > By that argument, we should have kept "password" (plain) as an >

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Andres Freund
Hi, On 2022-03-03 12:45:22 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2022-03-03 12:13:40 -0500, Tom Lane wrote: > >> Hmph. I tried enabling -fsanitize=undefined here, and I get some > >> complaints about passing null pointers to memcmp and the like, but > >> nothing about this shift

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Tom Lane
Andres Freund writes: > On 2022-03-03 12:13:40 -0500, Tom Lane wrote: >> Hmph. I tried enabling -fsanitize=undefined here, and I get some >> complaints about passing null pointers to memcmp and the like, but >> nothing about this shift (tested with clang 12.0.1 on RHEL8 as well >> as clang

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Stephen Frost
Greetings, * Pavel Borisov (pashkin.e...@gmail.com) wrote: > > On Thu, 3 Mar 2022 at 13:28, Pavel Borisov wrote: > >> The mail system doesn't have the capability to apply different moderation > >>> rules for people in that way I'm afraid. > >>> > >> Maybe then 2MB for everyone? Otherwise it's

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Stephen Frost
Greetings, * Aleksander Alekseev (aleksan...@timescale.com) wrote: > My last email to pgsql-jobs@ was moderated in a similar fashion. To my > knowledge that mailing list is not pre-moderated. So it may have the same > problem, and not only with patches. (We use regular Google Workspace.) -jobs

Re: Proposal: Support custom authentication methods using hooks

2022-03-03 Thread Stephen Frost
Greetings, * Peter Eisentraut (peter.eisentr...@enterprisedb.com) wrote: > On 02.03.22 21:49, samay sharma wrote: > >I think we are discussing two topics in this thread which in my opinion > >are orthogonal. > > > >(a) Should we make authentication methods pluggable by exposing these > >hooks? -

Re: Proposal: Support custom authentication methods using hooks

2022-03-03 Thread Jonathan S. Katz
On 3/3/22 12:23 PM, Bruce Momjian wrote: On Thu, Mar 3, 2022 at 10:45:42AM +0100, Peter Eisentraut wrote: On 02.03.22 16:45, Jonathan S. Katz wrote: By that argument, we should have kept "password" (plain) as an authentication method. For comparison, the time between adding md5 and removing

Re: Proposal: Support custom authentication methods using hooks

2022-03-03 Thread Stephen Frost
Greetings, * Tatsuo Ishii (is...@sraoss.co.jp) wrote: > > Yes, really, it's a known-broken system which suffers from such an old > > and well known attack that it's been given a name: pass-the-hash. As > > was discussed on this thread even, just the fact that it's not trivial > > to break on the

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Andres Freund
Hi, On 2022-03-03 12:13:40 -0500, Tom Lane wrote: > Zhihong Yu writes: > > On Thu, Mar 3, 2022 at 8:24 AM Tom Lane wrote: > >> Oh, I misread this as a compile-time warning, but it must be from ASAN. > >> Was the test case one of your own, or just our normal regression tests? > > > The Jenkins

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Zhihong Yu
On Thu, Mar 3, 2022 at 9:13 AM Tom Lane wrote: > Zhihong Yu writes: > > On Thu, Mar 3, 2022 at 8:24 AM Tom Lane wrote: > >> Oh, I misread this as a compile-time warning, but it must be from ASAN. > >> Was the test case one of your own, or just our normal regression tests? > > > The Jenkins

Re: Proposal: Support custom authentication methods using hooks

2022-03-03 Thread Bruce Momjian
On Thu, Mar 3, 2022 at 10:45:42AM +0100, Peter Eisentraut wrote: > On 02.03.22 16:45, Jonathan S. Katz wrote: > > By that argument, we should have kept "password" (plain) as an > > authentication method. > > For comparison, the time between adding md5 and removing password was 16 > years. It

Re: Proposal: Support custom authentication methods using hooks,Re: Proposal: Support custom authentication methods using hooks

2022-03-03 Thread Stephen Frost
Greetings, * Tatsuo Ishii (is...@sraoss.co.jp) wrote: > > On 2/25/22 12:39 PM, Tom Lane wrote: > >> Jeff Davis writes: > >>> On Thu, 2022-02-24 at 20:47 -0500, Tom Lane wrote: > ... and, since we can't readily enforce that the client only sends > those cleartext passwords over

Re: Add 64-bit XIDs into PostgreSQL 15

2022-03-03 Thread Stephen Frost
Greetings, * Pavel Borisov (pashkin.e...@gmail.com) wrote: > > > BTW messages with patches in this thread are always invoke manual spam > > moderation and we need to wait for ~3 hours before the message with patch > > becomes visible in the hackers thread. Now when I've already answered > >

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Tom Lane
Zhihong Yu writes: > On Thu, Mar 3, 2022 at 8:24 AM Tom Lane wrote: >> Oh, I misread this as a compile-time warning, but it must be from ASAN. >> Was the test case one of your own, or just our normal regression tests? > The Jenkins test is ported from contrib/postgres_fdw/sql/postgres_fdw.sql -

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-03 Thread Robert Haas
On Fri, Feb 25, 2022 at 6:03 AM Bharath Rupireddy wrote: > Added a new function that returns the first and last valid WAL record > LSN of a given WAL file. Sounds like fuzzy thinking to me. WAL records can cross file boundaries, and forgetting about that leads to all sorts of problems. Just give

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Zhihong Yu
On Thu, Mar 3, 2022 at 8:24 AM Tom Lane wrote: > Zhihong Yu writes: > > On Thu, Mar 3, 2022 at 7:44 AM Tom Lane wrote: > >> Zhihong Yu writes: > >>> In test output, I saw: > >>> src/backend/utils/adt/tid.c:112:16: runtime error: left shift of 65535 > by > >>> 16 places cannot be represented

Re: [PATCH v2] use has_privs_for_role for predefined roles

2022-03-03 Thread Joshua Brindle
On Thu, Feb 10, 2022 at 2:37 PM Joe Conway wrote: > > On 2/10/22 14:28, Nathan Bossart wrote: > > On Wed, Feb 09, 2022 at 04:39:11PM -0500, Joe Conway wrote: > >> On 2/9/22 13:13, Nathan Bossart wrote: > >>> I do wonder if users find the differences between predefined roles and > >>> role > >>>

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Tom Lane
Zhihong Yu writes: > On Thu, Mar 3, 2022 at 7:44 AM Tom Lane wrote: >> Zhihong Yu writes: >>> In test output, I saw: >>> src/backend/utils/adt/tid.c:112:16: runtime error: left shift of 65535 by >>> 16 places cannot be represented in type 'int' > Jenkins build is alma8-clang12-asan Oh, I

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2022-03-03 Thread Dilip Kumar
On Tue, Mar 1, 2022 at 5:15 PM Dilip Kumar wrote: > On Tue, Feb 22, 2022 at 8:27 PM Ashutosh Sharma > wrote: > >> I'm not sure about the current status, but found it while playing >> around with the latest changes a bit, so thought of sharing it here. >> >> + >> + strategy >> +

Re: [Proposal] Global temporary tables

2022-03-03 Thread Robert Haas
On Wed, Mar 2, 2022 at 4:18 PM Andres Freund wrote: > I think there's just no way that it can be merged with anything close to the > current design - it's unmaintainable. The need for the feature doesn't change > that. I don't know whether the design is right or wrong, but I agree that a bad

Re: Proposal: Support custom authentication methods using hooks

2022-03-03 Thread Joshua Brindle
On Thu, Mar 3, 2022 at 4:45 AM Peter Eisentraut wrote: > > On 02.03.22 16:45, Jonathan S. Katz wrote: > > By that argument, we should have kept "password" (plain) as an > > authentication method. > > For comparison, the time between adding md5 and removing password was 16 > years. It has been 5

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Zhihong Yu
On Thu, Mar 3, 2022 at 7:44 AM Tom Lane wrote: > Zhihong Yu writes: > > In test output, I saw: > > src/backend/utils/adt/tid.c:112:16: runtime error: left shift of 65535 by > > 16 places cannot be represented in type 'int' > > What compiler is that? > > regards, tom lane

Re: casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Tom Lane
Zhihong Yu writes: > In test output, I saw: > src/backend/utils/adt/tid.c:112:16: runtime error: left shift of 65535 by > 16 places cannot be represented in type 'int' What compiler is that? regards, tom lane

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Julien Rouhaud
On Thu, Mar 03, 2022 at 10:17:06AM -0500, Tom Lane wrote: > Pavel Borisov writes: > >> The mail system doesn't have the capability to apply different moderation > >> rules for people in that way I'm afraid. > > > Maybe then 2MB for everyone? > > Maybe your patch needs to be split up? You're

casting operand to proper type in BlockIdGetBlockNumber

2022-03-03 Thread Zhihong Yu
Hi, In test output, I saw: src/backend/utils/adt/tid.c:112:16: runtime error: left shift of 65535 by 16 places cannot be represented in type 'int' I think this was due to the left shift in BlockIdGetBlockNumber not properly casting its operand. Please see the proposed change in patch. Thanks

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Tom Lane
Pavel Borisov writes: >> The mail system doesn't have the capability to apply different moderation >> rules for people in that way I'm afraid. > Maybe then 2MB for everyone? Maybe your patch needs to be split up? You're going to have a hard time finding people who want to review or commit such

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-03 Thread Ashutosh Sharma
I think we should also see if we can allow end users to input timeline information with the pg_walinspect functions. This will help the end users to get information about WAL records from previous timeline which can be helpful in case of restored servers. -- With Regards, Ashutosh Sharma. On

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2022-03-03 Thread Ashutosh Sharma
Here are some of my review comments on the latest patch: + + + type text + + + Type of checkpoint. See . + + + + + + kind text + + + Kind of checkpoint. See . + + This looks a bit confusing. Two columns,

Re: pg_walinspect - a new extension to get raw WAL data and WAL stats

2022-03-03 Thread Nitin Jadhav
Here are a few comments. 1) > > > == > > > > > > +-- > > > +-- pg_get_wal_records_info_till_end_of_wal() > > > +-- > > > +CREATE FUNCTION pg_get_wal_records_info_till_end_of_wal(IN start_lsn > > > pg_lsn, > > > +OUT lsn pg_lsn, > > > +OUT prev_lsn pg_lsn, > > > +OUT xid xid, > > > >

Re: Add id's to various elements in protocol.sgml

2022-03-03 Thread Brar Piening
On 02.03.2022 at 18:54, Chapman Flack wrote: Perhaps there are a bunch of variablelists where no one cares about linking to any of the entries. So maybe a useful non-terminating message to add eventually would be one that identifies any varlistentry lacking an id, with a variablelist where at

Re: Allow parallel plan for referential integrity checks?

2022-03-03 Thread Frédéric Yhuel
Hello, sorry for the late reply. On 2/14/22 15:33, Robert Haas wrote: On Mon, Feb 7, 2022 at 5:26 AM Frédéric Yhuel wrote: I noticed that referential integrity checks aren't currently parallelized. Is it on purpose? It's not 100% clear to me that it is safe. But on the other hand, it's also

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Aleksander Alekseev
Hi again, > Any chance we could include the reason in the message? I foresee that > otherwise such kinds of questions will be asked over and over again. A link to the list of common reasons should work too. -- Best regards, Aleksander Alekseev

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Pavel Borisov
> > On Thu, 3 Mar 2022 at 13:28, Pavel Borisov wrote: > >> The mail system doesn't have the capability to apply different moderation >>> rules for people in that way I'm afraid. >>> >> Maybe then 2MB for everyone? Otherwise it's not so convenient. Lead to >> answers before the questions in the

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Julien Rouhaud
On Thu, Mar 03, 2022 at 01:37:35PM +, Dave Page wrote: > > Then someone will complain if their patch is 2.1MB! How often are messages > legitimately over 1MB anyway, even with a patch? I don't usually moderate > -hackers, so I don't know if this is a common thing or not. It's not common, most

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Aleksander Alekseev
Hi Dave, > Then someone will complain if their patch is 2.1MB! How often are messages > legitimately over 1MB anyway, even with a patch? I don't usually moderate > -hackers, so I don't know if this is a common thing or not. > > I'll ping a message across to the sysadmin team anyway; I can't

Re: Add 64-bit XIDs into PostgreSQL 15

2022-03-03 Thread Pavel Borisov
> > > BTW messages with patches in this thread are always invoke manual spam > moderation and we need to wait for ~3 hours before the message with patch > becomes visible in the hackers thread. Now when I've already answered > Alexander's letter with v10 patch the very message (and a patch) I've >

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Dave Page
On Thu, 3 Mar 2022 at 13:28, Pavel Borisov wrote: > The mail system doesn't have the capability to apply different moderation >> rules for people in that way I'm afraid. >> > Maybe then 2MB for everyone? Otherwise it's not so convenient. Lead to > answers before the questions in the thread [1],

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Pavel Borisov
> > There's a FAQ link on the cfbot main page that answers this kind of > questions. > Good to know! I'll try [.gz] next time then. Thanks!

Re: Add 64-bit XIDs into PostgreSQL 15

2022-03-03 Thread Alexander Korotkov
Hi Pavel! On Thu, Mar 3, 2022 at 2:35 PM Pavel Borisov wrote: > BTW messages with patches in this thread are always invoke manual spam > moderation and we need to wait for ~3 hours before the message with patch > becomes visible in the hackers thread. Now when I've already answered >

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Julien Rouhaud
On Thu, Mar 03, 2022 at 04:24:03PM +0300, Aleksander Alekseev wrote: > > Thanks! Does anyone know if cfbot understands .patch.gz and/or .tgz ? There's a FAQ link on the cfbot main page that answers this kind of questions.

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Pavel Borisov
> > The mail system doesn't have the capability to apply different moderation > rules for people in that way I'm afraid. > Maybe then 2MB for everyone? Otherwise it's not so convenient. Lead to answers before the questions in the thread [1], seems weird. [1]

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Dave Page
On Thu, 3 Mar 2022 at 13:22, Pavel Borisov wrote: > Message to list pgsql-hackers held for moderation due to 'Size 1MB >> (1061796 bytes) is larger than threshold 1000KB (1024000 bytes)', notice >> queued for 2 moderators >> > Could you make this limit 2MB at least for authorized commitfest

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Aleksander Alekseev
Hi Dave, > Message to list pgsql-hackers held for moderation due to 'Size 1MB (1061796 > bytes) is larger than threshold 1000KB (1024000 bytes)', notice queued for 2 > moderators Thanks! Does anyone know if cfbot understands .patch.gz and/or .tgz ? -- Best regards, Aleksander Alekseev

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Pavel Borisov
> > Message to list pgsql-hackers held for moderation due to 'Size 1MB > (1061796 bytes) is larger than threshold 1000KB (1024000 bytes)', notice > queued for 2 moderators > Could you make this limit 2MB at least for authorized commitfest members? Thanks! -- Best regards, Pavel Borisov Postgres

Re: Problem with moderation of messages with patched attached.

2022-03-03 Thread Dave Page
Hi On Thu, 3 Mar 2022 at 12:31, Pavel Borisov wrote: > Hi, hackers! > > Around 2 months ago I've noticed a problem that messages containing > patches in the thread [1] were always processed with manual moderation. > They appear in hackers' thread hours after posting None of them are from > new

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

2022-03-03 Thread Andrew Dunstan
On 3/3/22 00:03, Michael Paquier wrote: >>> +if ( (defined($ENV{olddump}) && !defined($ENV{oldinstall})) >>> + || (!defined($ENV{olddump}) && defined($ENV{oldinstall}))) >> Odd indentation. Spaces between parens? > Well, perltidy tells me that this is right. > > Yeah, I haven't found a way

Re: Add the replication origin name and commit-LSN to logical replication worker errcontext

2022-03-03 Thread Masahiko Sawada
On Thu, Mar 3, 2022 at 3:37 PM Amit Kapila wrote: > > On Wed, Mar 2, 2022 at 1:05 PM Masahiko Sawada wrote: > > > > On Wed, Mar 2, 2022 at 4:14 PM Amit Kapila wrote: > > > > I've attached updated patches. > > > > The first patch LGTM. Some comments on the second patch: > > 1. > @@ -3499,6

  1   2   >