Re: pgbench logging broken by time logic changes

2021-06-30 Thread Fabien COELHO
Bonjour Michaël, Okay, I have extracted this part from your patch, and back-patched this fix down to 11. The comments were a good addition, so I have kept them. I have also made the second regex of check_pgbench_logs() pickier with the client ID value expected, as it can only be 0. Attached

Re: Remove page-read callback from XLogReaderState.

2021-06-30 Thread Kyotaro Horiguchi
At Fri, 09 Apr 2021 09:36:59 +0900 (JST), Kyotaro Horiguchi wrote in > I'm surprised to see this pushed this soon. Thanks for pushing this! Then this has been reverted. I'm not sure how to check for the possible defect happens on that platform, but, anyways I reverted the CF item to "Needs Rev

Re: pgbench logging broken by time logic changes

2021-06-30 Thread Michael Paquier
On Wed, Jun 30, 2021 at 09:45:47AM +0200, Fabien COELHO wrote: > Attached the remaining part of the patch to fix known issues on pgbench > logging. > > I've added an entry on the open item on the wiki. I'm unsure about who the > owner should be. There is already an item: "Incorrect time maths in

Re: Use PG_STAT_GET_REPLICATION_SLOT_COLS in pg_stat_get_replication_slot()

2021-06-30 Thread Amit Kapila
On Tue, Jun 29, 2021 at 6:07 PM Amit Kapila wrote: > > On Tue, Jun 29, 2021 at 5:12 PM Masahiko Sawada wrote: > > > > Hi all, > > > > I realized that we use the magic number 10 instead of > > PG_STAT_GET_REPLICATION_SLOT_COLS in pg_stat_get_replication_slot() > > function. It seems an oversight o

Re: [HACKERS] logical decoding of two-phase transactions

2021-06-30 Thread Amit Kapila
On Tue, Jun 29, 2021 at 5:31 PM vignesh C wrote: > > On Tue, Jun 29, 2021 at 12:26 PM Amit Kapila wrote: > > > > On Wed, Jun 23, 2021 at 4:10 PM Ajin Cherian wrote: > > > > > > > The first two patches look mostly good to me. I have combined them > > into one and made some minor changes. (a) Remo

Re: Allow streaming the changes after speculative aborts.

2021-06-30 Thread Amit Kapila
On Wed, Jun 30, 2021 at 9:55 AM Dilip Kumar wrote: > > On Wed, Jun 30, 2021 at 9:29 AM Amit Kapila wrote: > > > > On Tue, Jun 29, 2021 at 12:57 PM Dilip Kumar wrote: > > > > > > On Fri, Jun 25, 2021 at 12:24 PM Amit Kapila > > > wrote: > > > > > > > > Till now, we didn't allow to stream the ch

Re: pgbench logging broken by time logic changes

2021-06-30 Thread Thomas Munro
On Wed, Jun 30, 2021 at 8:05 PM Michael Paquier wrote: > On Wed, Jun 30, 2021 at 09:45:47AM +0200, Fabien COELHO wrote: > > Attached the remaining part of the patch to fix known issues on pgbench > > logging. > > > > I've added an entry on the open item on the wiki. I'm unsure about who the > > ow

Re: ERROR: "ft1" is of the wrong type.

2021-06-30 Thread Ahsan Hadi
On Wed, Jun 30, 2021 at 5:56 AM Kyotaro Horiguchi wrote: > At Tue, 29 Jun 2021 20:13:14 +, ahsan hadi > wrote in > > The following review has been posted through the commitfest application: > > make installcheck-world: tested, passed > > Implements feature: tested, passed > > Spec com

Re: pgbench logging broken by time logic changes

2021-06-30 Thread Fabien COELHO
Hello Thomas, I've added an entry on the open item on the wiki. I'm unsure about who the owner should be. There is already an item: "Incorrect time maths in pgbench". Argh *shoot*, I went over the list too quickly, looking for "log" as a keyword. Fabien, thanks for the updated patch, I

RE: Added schema level support for publication.

2021-06-30 Thread tanghy.f...@fujitsu.com
On Tuesday, June 29, 2021 11:25 AM tanghy.f...@fujitsu.com wrote: > > Thanks for your patch. The warnings are fixed. > > But I found an issue while using your V8 patch, which is similar to [1]. The > case > is as below: > Drop a schema from publication and refresh publication at subscriber, th

Re: pgbench logging broken by time logic changes

2021-06-30 Thread Fabien COELHO
Fabien, thanks for the updated patch, I'm looking at it. After looking at it again, here is an update which ensure 64 bits on epoch_shift computation. -- Fabien.diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 4aeccd93af..7750b5d660 100644 --- a/src/bin/pgbench/pgben

PITR: enhance getRecordTimestamp()

2021-06-30 Thread Simon Riggs
For PITR, getRecordTimestamp() did not include all record types that contain times. Add handling for checkpoints, end of recovery and prepared xact record types. Based on earlier discussions with community members. Also, allow the option of recovery_target_use_origin_time = off (default) | on. Thi

Re: Skipping logical replication transactions on subscriber side

2021-06-30 Thread Amit Kapila
On Mon, Jun 28, 2021 at 10:12 AM Masahiko Sawada wrote: > > On Thu, Jun 17, 2021 at 6:20 PM Masahiko Sawada wrote: > > > > On Thu, Jun 17, 2021 at 3:24 PM Masahiko Sawada > > wrote: > > > > > > > Now, if this function is used by super > > > > users then we can probably trust that they provide t

Re: Use simplehash.h instead of dynahash in SMgr

2021-06-30 Thread David Rowley
On Wed, 23 Jun 2021 at 12:17, Thomas Munro wrote: > > David and I discussed this a bit off-list, and I just wanted to share > how I understand the idea so far in case it helps someone else. There > are essentially three subcomponents working together: Thanks for taking an interest in this. I sta

Re: speed up verifying UTF-8

2021-06-30 Thread Heikki Linnakangas
On 29/06/2021 14:20, John Naylor wrote: I still wasn't quite happy with the churn in the regression tests, so for v13 I gave up on using both the existing utf8 table and my new one for the "padded input" tests, and instead just copied the NUL byte test into the new table. Also added a primary k

Re: Removing unneeded self joins

2021-06-30 Thread Andrey Lepikhov
On 12/3/21 12:05, Hywel Carver wrote: I've built and tested this, and it seems to function correctly to me. One question I have is whether the added "IS NOT NULL" filters can be omitted when they're unnecessary. Some of the resulting plans included an "IS NOT NULL" filter on a non-nullable colu

Re: Use PG_STAT_GET_REPLICATION_SLOT_COLS in pg_stat_get_replication_slot()

2021-06-30 Thread Masahiko Sawada
On Wed, Jun 30, 2021 at 5:12 PM Amit Kapila wrote: > > On Tue, Jun 29, 2021 at 6:07 PM Amit Kapila wrote: > > > > On Tue, Jun 29, 2021 at 5:12 PM Masahiko Sawada > > wrote: > > > > > > Hi all, > > > > > > I realized that we use the magic number 10 instead of > > > PG_STAT_GET_REPLICATION_SLOT_C

Re: Allow streaming the changes after speculative aborts.

2021-06-30 Thread Robert Haas
On Wed, Jun 30, 2021 at 4:15 AM Amit Kapila wrote: > > > Thanks. Now, that the PG-15 branch is created, I think we should > > > commit this to both 15 and 14 as this is a minor change. What do you > > > think? > > > > Yeah, this is a minor improvement so can be pushed to both 15 and 14. > > Thanks

Re: cleaning up PostgresNode.pm

2021-06-30 Thread Andrew Dunstan
On 6/30/21 12:35 AM, Michael Paquier wrote: > On Mon, Jun 28, 2021 at 01:02:37PM -0400, Andrew Dunstan wrote: >> Patch 1 adds back the '-w' flag to pg_ctl in the start() method. It's >> redundant on modern versions of Postgres but it's harmless, and helps >> with subclassing for older versions wh

Re: Allow streaming the changes after speculative aborts.

2021-06-30 Thread Amit Kapila
On Wed, Jun 30, 2021 at 5:38 PM Robert Haas wrote: > > On Wed, Jun 30, 2021 at 4:15 AM Amit Kapila wrote: > > I'm not objecting to the change as such - though someone else may wish > to - but I'm definitely objecting to the timing of the commit. > Okay, I'll wait for more time going forward. Nor

Re: postgres_fdw - should we tighten up batch_size, fetch_size options against non-numeric values?

2021-06-30 Thread Fujii Masao
On 2021/05/20 1:01, Bharath Rupireddy wrote: Thanks for the comments. I added separate messages, changed the error code from ERRCODE_SYNTAX_ERROR to ERRCODE_INVALID_PARAMETER_VALUE and also quoted the option name in the error message. PSA v3 patch. Thanks for updating the patch! +

Re: Use pg_nextpower2_* in a few more places

2021-06-30 Thread David Rowley
On Sun, 13 Jun 2021 at 00:31, David Rowley wrote: > > Back in f0705bb62, we added pg_nextpower2_32 and pg_nextpower2_64 to > efficiently obtain the next power of 2 of a given number using an > intrinsic function to find the left-most 1 bit. > > In d025cf88b and 02a2e8b44, I added some usages of th

Re: Synchronous commit behavior during network outage

2021-06-30 Thread Andrey Borodin
> 29 июня 2021 г., в 23:35, Jeff Davis написал(а): > > On Tue, 2021-06-29 at 11:48 +0500, Andrey Borodin wrote: >>> 29 июня 2021 г., в 03:56, Jeff Davis >>> написал(а): >>> >>> The patch may be somewhat controversial, so I'll wait for feedback >>> before documenting it properly. >> >> The p

Re: cleaning up PostgresNode.pm

2021-06-30 Thread Alvaro Herrera
On 2021-Jun-30, Andrew Dunstan wrote: > On 6/30/21 12:35 AM, Michael Paquier wrote: > > On Mon, Jun 28, 2021 at 01:02:37PM -0400, Andrew Dunstan wrote: > > skip_equals is not used. The only caller of adjust_conf is > > PostgresNode itself. > > Well, nothing is using it right now :-) It's intend

Re: Remove redundant initializations

2021-06-30 Thread David Rowley
On Tue, 29 Jun 2021 at 02:15, Tom Lane wrote: > The primary case where I personally rely on that style is when adding a > new field to a struct. Currently it's possible to grep for some existing > field and add the new one beside it. Leaving out initializations by > relying on side-effects of ma

Re: Merging statistics from children instead of re-sampling everything

2021-06-30 Thread Andrey Lepikhov
Sorry, I forgot to send CC into pgsql-hackers. On 29/6/21 13:23, Tomas Vondra wrote: Because sampling is fairly expensive, especially if you have to do it for large number of child relations. And you'd have to do that every time *any* child triggers autovacuum, pretty much. Merging the stats is

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Alvaro Herrera
On 2021-Jun-29, Tom Lane wrote: > Alvaro Herrera writes: > > Ah, I nm'd all files in src/interfaces/libpq and got no hits for abort. > > But I did get one in libpgport_shlib.a: > > > path_shlib.o: > > U abort > > Yeah, there is one in get_progname(). But path.o shouldn't be ge

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Alvaro Herrera
On 2021-Jun-30, Alvaro Herrera wrote: > On 2021-Jun-29, Tom Lane wrote: > > > Alvaro Herrera writes: > > > Ah, I nm'd all files in src/interfaces/libpq and got no hits for abort. > > > But I did get one in libpgport_shlib.a: > > > > > path_shlib.o: > > > U abort > > > > Yeah,

Re: Remove redundant initializations

2021-06-30 Thread Tom Lane
David Rowley writes: > On Tue, 29 Jun 2021 at 02:15, Tom Lane wrote: >> The primary case where I personally rely on that style is when adding a >> new field to a struct. Currently it's possible to grep for some existing >> field and add the new one beside it. Leaving out initializations by >> r

Re: cleaning up PostgresNode.pm

2021-06-30 Thread Andrew Dunstan
On 6/30/21 8:30 AM, Alvaro Herrera wrote: > On 2021-Jun-30, Andrew Dunstan wrote: > >> On 6/30/21 12:35 AM, Michael Paquier wrote: >>> On Mon, Jun 28, 2021 at 01:02:37PM -0400, Andrew Dunstan wrote: >>> skip_equals is not used. The only caller of adjust_conf is >>> PostgresNode itself. >> Well,

Commit fest manager

2021-06-30 Thread vignesh C
Hi all, The next commit fest is going to begin soon. I would like to volunteer as commit fest manager for 2021-07 if the role is not filled and there are no objections. Regards, Vignesh

Re: Commit fest manager

2021-06-30 Thread Daniel Gustafsson
> On 30 Jun 2021, at 15:31, vignesh C wrote: > The next commit fest is going to begin soon. > I would like to volunteer as commit fest manager for 2021-07 if the > role is not filled and there are no objections. Ibrar Ahmed has already volunteered since a while back, so let's see if he is still

ExecRTCheckPerms() and many prunable partitions

2021-06-30 Thread Amit Langote
Hi, Last year in [1], I had briefly mentioned $subject. I'm starting this thread to propose a small patch to alleviate the inefficiency of that case. As also mentioned in [1], when running -Mprepared benchmarks (plan_cache_mode = force_generic_plan) using partitioned tables, ExecRTCheckPerms() t

Re: What is "wraparound failure", really?

2021-06-30 Thread Robert Haas
On Mon, Jun 28, 2021 at 8:52 AM Andrew Dunstan wrote: > But if you're really worried about people setting > autovacuum_freeze_max_age too high, then maybe we should be talking > about capping it at a lower level rather than adjusting the docs that > most users don't read. The problem is that the

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Alvaro Herrera
On 2021-Jun-30, Alvaro Herrera wrote: > If I remove -fprofile-arcs from CFLAGS, then abort is no longer present, > but we still get a fail because of __gcov_exit. I suppose if you'd add > an exception for __cxa_atexit, the same place could use one for > __gcov_exit. I tried the attached patch, a

Record a Bitmapset of non-pruned partitions

2021-06-30 Thread David Rowley
Back when working on 959d00e9d, to allow ordered partition scans for LIST and RANGE partitioned tables, I mentioned [1] that if we had a field that recorded a Bitmapset of the non-pruned partitions, we could use that to do a more thorough check to see if ordered scans are possible. At the moment t

Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options

2021-06-30 Thread Bharath Rupireddy
On Wed, Jun 30, 2021 at 10:52 AM Amit Kapila wrote: > > On Tue, Jun 29, 2021 at 9:41 PM Alvaro Herrera > wrote: > > > > On 2021-Jun-29, Bharath Rupireddy wrote: > > > > > On Tue, Jun 29, 2021 at 4:37 PM Amit Kapila > > > wrote: > > > > Few comments: > > > > === > > > > 1. > > > > +

Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options

2021-06-30 Thread Bharath Rupireddy
On Wed, Jun 30, 2021 at 11:11 AM Amit Kapila wrote: > > On Tue, Jun 29, 2021 at 8:56 PM Bharath Rupireddy > wrote: > > > > On Tue, Jun 29, 2021 at 4:37 PM Amit Kapila wrote: > > > Few comments: > > > === > > > > > 2. > > > +parse_subscription_options(List *stmt_options, SubOpts *opts

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Tom Lane
Alvaro Herrera writes: > Maybe there's something about the linker flags being used. > ... ah yeah, if I configure with coverage enabled on my machine, it fails in > the same way. Ah-hah, yeah, I see it too if I enable profiling. I can confirm that it's not from the abort() call in path.c, becau

Re: Enhanced error message to include hint messages for redundant options error

2021-06-30 Thread vignesh C
On Thu, May 13, 2021 at 8:09 PM vignesh C wrote: > > On Thu, May 13, 2021 at 4:58 AM Alvaro Herrera > wrote: > > > > Thanks for the comments, Attached patch has the changes for the same. > The Patch was not applying on Head, the attached patch is rebased on top of Head. Regards, Vignesh From f

Partitioned index can be not dumped

2021-06-30 Thread Alexander Pyhalov
Hi. I've seen the following effect on PostgreSQL 14 stable branch. Index, created on partitioned table, disappears from pg_dump or psql \d output. This seems to begin after analyze. Partitoned relation relhasindex pg_class field suddenly becomes false. The issue happens after commit 0e69f705

Re: postgres_fdw - should we tighten up batch_size, fetch_size options against non-numeric values?

2021-06-30 Thread Bharath Rupireddy
On Wed, Jun 30, 2021 at 5:53 PM Fujii Masao wrote: > > On 2021/05/20 1:01, Bharath Rupireddy wrote: > > Thanks for the comments. I added separate messages, changed the error > > code from ERRCODE_SYNTAX_ERROR to ERRCODE_INVALID_PARAMETER_VALUE and > > also quoted the option name in the error messa

Re: Partitioned index can be not dumped

2021-06-30 Thread Alexander Pyhalov
Alexander Pyhalov писал 2021-06-30 17:26: Hi. Sorry, test had an issue. -- Best regards, Alexander Pyhalov, Postgres ProfessionalFrom 2aabf5e8e86d222e6a73b25ccc652fe645e12fc4 Mon Sep 17 00:00:00 2001 From: Alexander Pyhalov Date: Wed, 30 Jun 2021 17:22:37 +0300 Subject: [PATCH] Set relhasin

Re: ExecRTCheckPerms() and many prunable partitions

2021-06-30 Thread David Rowley
On Thu, 1 Jul 2021 at 01:34, Amit Langote wrote: > For now, I have implemented the idea 2 as the attached patch. I only just had a fleeting glance at the patch. Aren't you accidentally missing the 0th RTE here? + while ((rti = bms_next_member(checkPermRels, rti)) > 0) { - RangeTblEntry *rte =

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Alvaro Herrera
On 2021-Jun-30, Tom Lane wrote: > Alvaro Herrera writes: > > Maybe there's something about the linker flags being used. > > ... ah yeah, if I configure with coverage enabled on my machine, it fails > > in the same way. > > Ah-hah, yeah, I see it too if I enable profiling. I can confirm > that

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Tom Lane
Alvaro Herrera writes: > On 2021-Jun-30, Tom Lane wrote: >> You mentioned __gcov_exit, but I'm not sure if we need an >> exception for that. I see it referenced by the individual .o >> files, but the completed .so has no such reference, so at least >> on RHEL8 it's apparently satisfied during .so

Re: Partitioned index can be not dumped

2021-06-30 Thread Álvaro Herrera
On 2021-Jun-30, Alexander Pyhalov wrote: > Hi. > > I've seen the following effect on PostgreSQL 14 stable branch. > Index, created on partitioned table, disappears from pg_dump or psql \d > output. > This seems to begin after analyze. Partitoned relation relhasindex pg_class > field suddenly beco

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Alvaro Herrera
On 2021-Jun-30, Tom Lane wrote: > OK, thanks, will push a fix momentarily. (BTW since the _eprintf.o stuff comes from _abort, I suppose you're going to remove that grep -v too?) -- Álvaro Herrera39°49'30"S 73°17'W https://www.Enterprise

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Tom Lane
Alvaro Herrera writes: > (BTW since the _eprintf.o stuff comes from _abort, I suppose you're > going to remove that grep -v too?) Right, I did that. regards, tom lane

Re: Identify missing publications from publisher while create/alter subscription.

2021-06-30 Thread vignesh C
On Sun, Jun 6, 2021 at 11:55 AM vignesh C wrote: > > On Fri, May 7, 2021 at 6:44 PM vignesh C wrote: > > > > Thanks for the comments, the attached patch has the fix for the same. > > The patch was not applying on the head, attached patch which is rebased on > HEAD. The patch was not applying on

Re: ExecRTCheckPerms() and many prunable partitions

2021-06-30 Thread Amit Langote
On Wed, Jun 30, 2021 at 23:34 David Rowley wrote: > On Thu, 1 Jul 2021 at 01:34, Amit Langote wrote: > > For now, I have implemented the idea 2 as the attached patch. > > I only just had a fleeting glance at the patch. Aren't you > accidentally missing the 0th RTE here? > > + while ((rti = bms_n

Re: Dependency to logging in jsonapi.c

2021-06-30 Thread Tom Lane
Michael Paquier writes: > Attached is a suggestion of patch to rework that a bit. Some extra > elog()s could be added for the backend, as well as a new error code to > use as default of report_parse_error(), but that does not seem to gain > much. And this item looks independent of switching this

Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors

2021-06-30 Thread Yugo NAGATA
Hello Fabien, On Sat, 26 Jun 2021 12:15:38 +0200 (CEST) Fabien COELHO wrote: > > Hello Yugo-san, > > # About v12.2 > > ## Compilation > > Patch seems to apply cleanly with "git apply", but does not compile on my > host: "undefined reference to `conditional_stack_reset'". > > However it wor

Re: Merging statistics from children instead of re-sampling everything

2021-06-30 Thread Tomas Vondra
On 6/30/21 2:55 PM, Andrey Lepikhov wrote: Sorry, I forgot to send CC into pgsql-hackers. On 29/6/21 13:23, Tomas Vondra wrote: Because sampling is fairly expensive, especially if you have to do it for large number of child relations. And you'd have to do that every time *any* child triggers au

trivial improvement to system_or_bail

2021-06-30 Thread Alvaro Herrera
When PostgresNode::system_or_bail() fails, it's quite opaque as to what is happening. This patch improves things by printing some detail, as suggested in Perl's doc for system(). -- Álvaro Herrera39°49'30"S 73°17'W https://www.Enterprise

Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors

2021-06-30 Thread Fabien COELHO
Hello Yugo-san, Thanks for the update! Patch seems to apply cleanly with "git apply", but does not compile on my host: "undefined reference to `conditional_stack_reset'". However it works better when using the "patch". I'm wondering why git apply fails silently… Hmm, I don't know why your c

Re: trivial improvement to system_or_bail

2021-06-30 Thread Daniel Gustafsson
> On 30 Jun 2021, at 17:24, Alvaro Herrera wrote: > > When PostgresNode::system_or_bail() fails, it's quite opaque as to what > is happening. This patch improves things by printing some detail, as > suggested in Perl's doc for system(). +1 on this from reading the patch. +

Re: trivial improvement to system_or_bail

2021-06-30 Thread Tom Lane
Alvaro Herrera writes: > When PostgresNode::system_or_bail() fails, it's quite opaque as to what > is happening. This patch improves things by printing some detail, as > suggested in Perl's doc for system(). +1 for adding the extra details, but another thing that I've always found very confusing

Re: Dependency to logging in jsonapi.c

2021-06-30 Thread Jacob Champion
On Wed, 2021-06-30 at 11:03 -0400, Tom Lane wrote: > It does not look to me like json_errdetail can sensibly be used in > frontend, since it returns palloc'd strings in some paths and > constants in others. There'd be no way to avoid a memory leak > in a frontend usage. So I think the dependency

Re: Removing unneeded self joins

2021-06-30 Thread Laurenz Albe
On Wed, 2021-06-30 at 14:21 +0300, Andrey Lepikhov wrote: > I think, here we could ask more general question: do we want to remove a > 'IS NOT NULL' clause from the clause list if the rest of the list > implicitly implies it? > > EXPLAIN (ANALYZE, VERBOSE) > SELECT * > FROM a WHERE (X IS NOT N

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Tom Lane
I wrote: > OK, thanks, will push a fix momentarily. Did so, and look what popped up on wrasse [1]: ! nm -A -g -u libpq.so.5.15 2>/dev/null | grep -v __cxa_atexit | grep exit libpq.so.5.15: [765]| 232544| 248|FUNC |GLOB |3|14 |PQexitPipelineMode This make

Re: Replication protocol doc fix

2021-06-30 Thread Robert Haas
On Thu, Jun 17, 2021 at 7:37 PM Jeff Davis wrote: > What if we simply mandate that a Sync must be sent before the server > will respond with CopyInResponse/CopyBothResponse, and the client must > send another Sync after CopyDone/CopyFail (or after receiving an > ErrorResponse, if the client isn't

Re: Have I found an interval arithmetic bug?

2021-06-30 Thread Bruce Momjian
On Tue, Jun 29, 2021 at 06:49:45PM +0200, Daniel Gustafsson wrote: > > On 29 Jun 2021, at 18:50, Zhihong Yu wrote: > > > Now that PG 15 is open for commit, do you think the patch can land ? > > Adding it to the commitfest patch tracker is a good way to ensure it's not > forgotten about: > >

[PATCH] pgbench: add multiconnect option

2021-06-30 Thread David Christensen
-hackers, This patch adds the concept of "multiconnect" to pgbench (better terminology welcome). The basic idea here is to allow connections made with pgbench to use different auth values or connect to multiple databases. We implement this using a user-provided PGSERVICEFILE and choosing a PGSERV

Re: speed up verifying UTF-8

2021-06-30 Thread John Naylor
On Wed, Jun 30, 2021 at 7:18 AM Heikki Linnakangas wrote: > Hmm, there's one more simple trick we can do: We can have a separate > fast-path version of the loop when there are at least 8 bytes of input > left, skipping all the length checks. With that: Good idea, and the numbers look good on Pow

Re: [PATCH] Make jsonapi usable from libpq

2021-06-30 Thread Peter Eisentraut
On 26.06.21 19:43, Tom Lane wrote: I spent some time looking for other undesirable symbol dependencies in libpq, and soon found a couple. PGTHREAD_ERROR potentially calls abort(), which seems even worse than exit-on-OOM, although I don't think we've ever heard a report of that being hit. Also,

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Peter Eisentraut
On 26.06.21 23:29, Tom Lane wrote: After some thought I propose that what we really want is to prevent any calls of abort() or exit() from inside libpq. Attached is a draft patch to do that. Could we set this rule up a little bit differently so that it is only run when the library is built.

Re: POC: Cleaning up orphaned files using undo logs

2021-06-30 Thread Antonin Houska
Antonin Houska wrote: > tsunakawa.ta...@fujitsu.com wrote: > > > I'm crawling like a snail to read the patch set. Below are my first set of > > review comments, which are all minor. > > Thanks. I've added the patch to the upcoming CF [1], so it possibly gets more review and makes some progr

Re: What is "wraparound failure", really?

2021-06-30 Thread Peter Geoghegan
On Wed, Jun 30, 2021 at 6:46 AM Robert Haas wrote: > The problem is that the setting is measuring something that is a > pretty poor proxy for the thing we actually care about. It's measuring > the XID age at which we're going to start forcing vacuums on tables > that don't otherwise need to be vac

Re: SSL/TLS instead of SSL in docs

2021-06-30 Thread Peter Eisentraut
On 15.06.21 15:59, Daniel Gustafsson wrote: Looking at the docs it turns out that we have a mix of SSL (with one ssl), SSL/TLS and TLS for referring to the same thing. The attached changes the documentation to consistently use SSL/TLS when referring to an encrypted connection using a TLS protoco

Re: SSL/TLS instead of SSL in docs

2021-06-30 Thread Jacob Champion
On Wed, 2021-06-30 at 20:20 +0200, Peter Eisentraut wrote: > I note that popular places such as the Apache and nginx SSL/TLS modules > just use SSL in their documentation, and they are probably under much > more scrutiny in this area. For Apache, that's not strictly true [1, 2]. mod_ssl and its

Re: Partitioned index can be not dumped

2021-06-30 Thread Álvaro Herrera
On 2021-Jun-30, Alexander Pyhalov wrote: > I've seen the following effect on PostgreSQL 14 stable branch. > Index, created on partitioned table, disappears from pg_dump or psql \d > output. > This seems to begin after analyze. Partitoned relation relhasindex pg_class > field suddenly becomes false

Re: Partitioned index can be not dumped

2021-06-30 Thread Zhihong Yu
On Wed, Jun 30, 2021 at 11:54 AM Álvaro Herrera wrote: > On 2021-Jun-30, Alexander Pyhalov wrote: > > > I've seen the following effect on PostgreSQL 14 stable branch. > > Index, created on partitioned table, disappears from pg_dump or psql \d > > output. > > This seems to begin after analyze. Par

Re: Commit fest manager

2021-06-30 Thread Ibrar Ahmed
Hi, Yes, I want to do that for sure. On Wed, Jun 30, 2021 at 6:33 PM Daniel Gustafsson wrote: > > On 30 Jun 2021, at 15:31, vignesh C wrote: > > > The next commit fest is going to begin soon. > > I would like to volunteer as commit fest manager for 2021-07 if the > > role is not filled and the

Re: Partitioned index can be not dumped

2021-06-30 Thread Alexander Pyhalov
Álvaro Herrera писал 2021-06-30 21:54: On 2021-Jun-30, Alexander Pyhalov wrote: I've seen the following effect on PostgreSQL 14 stable branch. Index, created on partitioned table, disappears from pg_dump or psql \d output. This seems to begin after analyze. Partitoned relation relhasindex pg

Column Filtering in Logical Replication

2021-06-30 Thread Rahila Syed
Hi, Filtering of columns at the publisher node will allow for selective replication of data between publisher and subscriber. In case the updates on the publisher are targeted only towards specific columns, the user will have an option to reduce network consumption by not sending the data corresp

Re: [PATCH] Make jsonapi usable from libpq

2021-06-30 Thread Tom Lane
Peter Eisentraut writes: > On 26.06.21 19:43, Tom Lane wrote: >> fe-print.c's handling of OOM isn't nice at all: >> fprintf(stderr, libpq_gettext("out of memory\n")); >> abort(); >> Although fe-print.c is semi-deprecated, it still seems like it'd >> be a good idea to clean that up. > Th

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Tom Lane
Peter Eisentraut writes: > Could we set this rule up a little bit differently so that it is only > run when the library is built. > Right now, make world on a built tree makes 17 calls to this "nm" line, > and make check-world calls it 81 times. I think once would be enough. ;-) Hmm, didn't re

Re: Multiple pg_waldump --rmgr options

2021-06-30 Thread Heikki Linnakangas
On 28/06/2021 13:34, Daniel Gustafsson wrote: On 18 May 2021, at 15:50, Heikki Linnakangas wrote: The reason is that if you specify multiple --rmgr options, only the last one takes effect. That's in line with how options are handled for most binaries, so this will go against that. That be

New committers: Daniel Gustafsson and John Naylor

2021-06-30 Thread Tom Lane
The Core Team would like to extend our congratulations to Daniel Gustafsson and John Naylor, who have accepted invitations to become our newest Postgres committers. Please join me in wishing them much success and few bugs. regards, tom lane

Re: SSL/TLS instead of SSL in docs

2021-06-30 Thread Daniel Gustafsson
> On 30 Jun 2021, at 20:20, Peter Eisentraut > wrote: > I am not in favor of this direction. I think it just adds tediousness and > doesn't really help anyone. If we are worried about correct terminology, > then we should just change everything to TLS. I actually think SSL/TLS has won the d

Re: Multiple pg_waldump --rmgr options

2021-06-30 Thread Daniel Gustafsson
> On 30 Jun 2021, at 22:39, Heikki Linnakangas wrote: > In general, I think it's weird that the latest option wins. If you specify > the same option multiple times, and it's not something like --rmgr or --table > where it makes sense, it's most likely user error. Printing an error would be > n

Re: Partitioned index can be not dumped

2021-06-30 Thread Álvaro Herrera
On 2021-Jun-30, Zhihong Yu wrote: > Hi, > nit: > - if (hasindex) > + if (nindexes > 0) > > It seems hasindex is no longer needed since nindexes is checked. It's still used to call vac_update_relstats(). We want nindexes to be 0 for partitioned tables, but still pass true when there

Re: New committers: Daniel Gustafsson and John Naylor

2021-06-30 Thread Michael Paquier
On Wed, Jun 30, 2021 at 04:43:58PM -0400, Tom Lane wrote: > The Core Team would like to extend our congratulations to > Daniel Gustafsson and John Naylor, who have accepted invitations > to become our newest Postgres committers. > > Please join me in wishing them much success and few bugs. Congra

Re: Partitioned index can be not dumped

2021-06-30 Thread Zhihong Yu
On Wed, Jun 30, 2021 at 2:32 PM Álvaro Herrera wrote: > On 2021-Jun-30, Zhihong Yu wrote: > > > Hi, > > nit: > > - if (hasindex) > > + if (nindexes > 0) > > > > It seems hasindex is no longer needed since nindexes is checked. > > It's still used to call vac_update_relstats(). We want

Re: Partitioned index can be not dumped

2021-06-30 Thread Álvaro Herrera
On 2021-Jun-30, Zhihong Yu wrote: > Hi, > In that case, I wonder whether nindexes can be negated following the call > to vac_open_indexes(). > > vac_open_indexes(onerel, AccessShareLock, &nindexes, &Irel); > + nindexes = -nindexes; > > That way, hasindex can be dropped. > vac_updat

Re: PG 14 release notes, first draft

2021-06-30 Thread Bruce Momjian
On Tue, Jun 29, 2021 at 07:36:47PM +0100, Simon Riggs wrote: > Perhaps we should also add this text from the commit message to ensure > the importance is understood: > "This is extremely useful in cases where CIC/RC can run for a very long > time, because that used to be a significant headache

Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors

2021-06-30 Thread Tatsuo Ishii
> I attached the patch updated according with your suggestion. v13 patches gave a compiler warning... $ make >/dev/null pgbench.c: In function ‘commandError’: pgbench.c:3071:17: warning: unused variable ‘command’ [-Wunused-variable] const Command *command = sql_script[st->use_file].commands[st-

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Tom Lane
I wrote: > Peter Eisentraut writes: >> Could we set this rule up a little bit differently so that it is only >> run when the library is built. >> Right now, make world on a built tree makes 17 calls to this "nm" line, >> and make check-world calls it 81 times. I think once would be enough. ;-)

Re: [PATCH] Pull general SASL framework out of SCRAM

2021-06-30 Thread Jacob Champion
On Sat, 2021-06-26 at 09:47 +0900, Michael Paquier wrote: > On Fri, Jun 25, 2021 at 11:40:33PM +, Jacob Champion wrote: > > I can definitely move it (into, say, auth-sasl.c?). I'll probably do > > that in a second commit, though, since keeping it in place during the > > refactor makes the revie

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Jacob Champion
On Wed, 2021-06-30 at 18:29 -0400, Tom Lane wrote: > I wrote: > > Peter Eisentraut writes: > > > Could we set this rule up a little bit differently so that it is only > > > run when the library is built. > > > Right now, make world on a built tree makes 17 calls to this "nm" line, > > > and make

Re: Dependency to logging in jsonapi.c

2021-06-30 Thread Michael Paquier
On Wed, Jun 30, 2021 at 03:47:19PM +, Jacob Champion wrote: > On Wed, 2021-06-30 at 11:03 -0400, Tom Lane wrote: >> It does not look to me like json_errdetail can sensibly be used in >> frontend, since it returns palloc'd strings in some paths and >> constants in others. There'd be no way to a

Re: New committers: Daniel Gustafsson and John Naylor

2021-06-30 Thread David Rowley
On Thu, 1 Jul 2021 at 09:48, Michael Paquier wrote: > Congratulations to Daniel and John! +1. Well deserved! David

Re: ExecRTCheckPerms() and many prunable partitions

2021-06-30 Thread David Rowley
On Thu, 1 Jul 2021 at 02:58, Amit Langote wrote: > > On Wed, Jun 30, 2021 at 23:34 David Rowley wrote: >> + while ((rti = bms_next_member(checkPermRels, rti)) > 0) >> { >> - RangeTblEntry *rte = (RangeTblEntry *) lfirst(l); >> + RangeTblEntry *rte = (RangeTblEntry *) list_nth(rangeTable, rti -

Re: Small clean up in nodeAgg.c

2021-06-30 Thread David Rowley
On Sat, 12 Jun 2021 at 23:03, David Rowley wrote: > I've rebased this and I'd like to propose this small cleanup for pg15. Now that the pg15 branch is open, does anyone have any objections to this patch? David

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Tom Lane
Jacob Champion writes: > On Wed, 2021-06-30 at 18:29 -0400, Tom Lane wrote: >> Looks like we'd have to make use of a dummy stamp-file, more or less >> as attached. Any objections? > Spitballing -- if you don't like the stamp file, you could add the > check to the end of the $(shlib) rule, surrou

Re: Preventing abort() and exit() calls in libpq

2021-06-30 Thread Jacob Champion
On Wed, 2021-06-30 at 18:56 -0400, Tom Lane wrote: > Jacob Champion writes: > > On Wed, 2021-06-30 at 18:29 -0400, Tom Lane wrote: > > > Looks like we'd have to make use of a dummy stamp-file, more or less > > > as attached. Any objections? > > Spitballing -- if you don't like the stamp file, you

Re: Dependency to logging in jsonapi.c

2021-06-30 Thread Tom Lane
Michael Paquier writes: > On Wed, Jun 30, 2021 at 03:47:19PM +, Jacob Champion wrote: >> But until/unless that is changed, an #ifndef seems like a good way to >> prevent issues for the current code. > Sounds sensible to do that as well for 14 before the release. Any > thoughts about that? I

Re: Small clean up in nodeAgg.c

2021-06-30 Thread Tom Lane
David Rowley writes: > Now that the pg15 branch is open, does anyone have any objections to this > patch? Just reading it over quickly, I noticed a comment mentioning "aggcombinedfn" which I suppose should be "aggcombinefn". No particular opinion on whether this is a net reduction of logical co

Re: New committers: Daniel Gustafsson and John Naylor

2021-06-30 Thread Alexander Korotkov
On Wed, Jun 30, 2021 at 11:44 PM Tom Lane wrote: > > The Core Team would like to extend our congratulations to > Daniel Gustafsson and John Naylor, who have accepted invitations > to become our newest Postgres committers. > > Please join me in wishing them much success and few bugs. Congratulatio

  1   2   >