Re: backup manifests and contemporaneous buildfarm failures

2020-04-07 Thread Andrew Dunstan
On Tue, Apr 7, 2020 at 12:37 AM Tom Lane wrote: > > Robert Haas writes: > > Taking stock of the situation this morning, most of the buildfarm is > > now green. There are three failures, on eelpout (6 hours ago), > > fairywren (17 hours ago), and hyrax (3 days, 7 hours ago). > > fairywren has now

Re: proposal \gcsv

2020-04-07 Thread Pavel Stehule
út 7. 4. 2020 v 12:49 odesílatel Isaac Morland napsal: > On Tue, 7 Apr 2020 at 03:30, Pavel Stehule > wrote: > > >> your patch supports syntax >> >> (option1=value option2=value) >> >> It looks little bit inconsistent and unusual >> >>> > It's the same as a connection string. Actually, maybe

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Jonathan S. Katz
On 4/7/20 8:15 AM, Andres Freund wrote: > I think this is pretty close to being committable. > > > But: This patch came in very late for v13, and it took me much longer to > polish it up than I had hoped (partially distraction due to various bugs > I found (in particular snapshot_too_old),

Re: proposal \gcsv

2020-04-07 Thread Tom Lane
Isaac Morland writes: > On Tue, 7 Apr 2020 at 03:30, Pavel Stehule wrote: >> your patch supports syntax >> (option1=value option2=value) >> It looks little bit inconsistent and unusual > It's the same as a connection string. Yeah, I didn't exactly invent that out of nowhere. There are a

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-07 Thread Tomas Vondra
On Tue, Apr 07, 2020 at 08:40:30AM -0400, James Coleman wrote: On Tue, Apr 7, 2020 at 12:25 AM Justin Pryzby wrote: On Mon, Apr 06, 2020 at 09:57:22PM +0200, Tomas Vondra wrote: > I've pushed the fist part of this patch series - I've reorganized it a I scanned through this again post-commit.

Re: Parallel copy

2020-04-07 Thread Ants Aasma
On Tue, 7 Apr 2020 at 08:24, vignesh C wrote: > Leader will create a circular queue > and share it across the workers. The circular queue will be present in > DSM. Leader will be using a fixed size queue to share the contents > between the leader and the workers. Currently we will have 100 >

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-07 Thread Justin Pryzby
On Tue, Apr 07, 2020 at 08:40:30AM -0400, James Coleman wrote: > On Tue, Apr 7, 2020 at 12:25 AM Justin Pryzby wrote: > > On Mon, Apr 06, 2020 at 09:57:22PM +0200, Tomas Vondra wrote: > > > I've pushed the fist part of this patch series - I've reorganized it a > > > > I scanned through this again

Re: PG compilation error with Visual Studio 2015/2017/2019

2020-04-07 Thread Juan José Santamaría Flecha
On Tue, Apr 7, 2020 at 7:44 AM davinder singh wrote: > > You need to enable NLS support in the config file. Let me know if that > answers your question. > Yes, I can see where this is coming from now, thanks. Currently, it is using _create_locale it behaves similarly to > GetLocaleInfoEx i.e.

Re: A bug when use get_bit() function for a long bytea string

2020-04-07 Thread Tom Lane
"movead...@highgo.ca" writes: > After several patch change by hacker's proposal, I think it's ready to > commit, can we commit it before doing the code freeze for pg-13? It would be easier to get this done if you had addressed any of the objections to the patch as given. Integer-overflow

Re: [patch] Fix pg_checksums to allow checking of offline base backup directories

2020-04-07 Thread Michael Banck
Hi, Am Dienstag, den 07.04.2020, 17:07 +0900 schrieb Michael Paquier: > On Mon, Apr 06, 2020 at 01:26:17PM +0200, Michael Banck wrote: > > I think we can allow checking of base backups if we make sure > > backup_label exists in the data directory or am I missing something? > > I think we need to

Re: WAL usage calculation patch

2020-04-07 Thread Julien Rouhaud
On Tue, Apr 7, 2020 at 4:36 AM Amit Kapila wrote: > > On Mon, Apr 6, 2020 at 7:58 PM Euler Taveira > wrote: > > > > On Mon, 6 Apr 2020 at 10:37, Julien Rouhaud wrote: > >> > >> On Mon, Apr 06, 2020 at 10:12:55AM -0300, Euler Taveira wrote: > >> > On Mon, 6 Apr 2020 at 00:25, Amit Kapila wrote:

[bug] Wrong bool value parameter

2020-04-07 Thread 曾文旌
Do we allow such a bool parameter value? This seems puzzling to me.postgres=# create table t1(c1 int) with(autovacuum_enabled ='tr');CREATE TABLEpostgres=# create table t2(c1 int) with(autovacuum_enabled ='fa');CREATE TABLEpostgres=# \d+ t1                                    Table "public.t1" 

Re: pg_stat_statements issue with parallel maintenance (Was Re: WAL usage calculation patch)

2020-04-07 Thread Masahiko Sawada
On Tue, 7 Apr 2020 at 17:42, Amit Kapila wrote: > > On Tue, Apr 7, 2020 at 1:30 PM Masahiko Sawada > wrote: > > > > Buffer usage statistics seem correct. The small differences would be > > catalog lookups Peter mentioned. > > > > Agreed, but can you check which part of code does that lookup? I

Re: WAL usage calculation patch

2020-04-07 Thread Peter Eisentraut
On 2020-04-07 04:12, Amit Kapila wrote: On Mon, Apr 6, 2020 at 10:01 PM Justin Pryzby wrote: On Mon, Apr 06, 2020 at 05:01:30PM +0200, Peter Eisentraut wrote: I noticed in some of the screenshots that were tweeted that for example in WAL: records=1 bytes=56 there are two spaces

Re: [Proposal] Global temporary tables

2020-04-07 Thread Prabhat Sahu
> > Thanks for review. > This parameter should support all types of writing of the bool type like > parameter autovacuum_enabled. > So I fixed in global_temporary_table_v24-pg13.patch. > Thank you Wenjing for the new patch with the fix and the "VACUUM FULL GTT" support. I have verified the above

Re: [Proposal] Global temporary tables

2020-04-07 Thread tushar
On 4/7/20 2:27 PM, 曾文旌 wrote: Vacuum full GTT, cluster GTT is already supported in global_temporary_table_v24-pg13.patch. Here , it is skipping GTT postgres=# \c foo You are now connected to database "foo" as user "tushar". foo=# create global temporary table  g123( c1 int) ; CREATE TABLE

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-07 Thread Alexander Korotkov
On Tue, Apr 7, 2020 at 3:07 PM Anna Akenteva wrote: > On 2017-10-31 12:42:56, Ants Aasma wrote: > > For lack of a better proposal I would like something along the lines > > of: > > WAIT FOR state_id[, state_id] [ OPTIONS (..)] > > As for giving up waiting for multiple events: we can only wait for

Re: Use compiler intrinsics for bit ops in hash

2020-04-07 Thread John Naylor
On Tue, Apr 7, 2020 at 7:41 PM David Rowley wrote: > I've attached an updated patch. It includes the modifications > mentioned above to pre-check for a power of 2 number with the bit > masking hack mentioned above. I also renamed the functions to be more > aligned to the other functions in

Re: Use compiler intrinsics for bit ops in hash

2020-04-07 Thread John Naylor
On Tue, Apr 7, 2020 at 8:26 PM David Rowley wrote: > > Hi John, > > Thanks for having a look at this. > > On Wed, 8 Apr 2020 at 00:16, John Naylor wrote: > > Overall looks good to me. Just a couple things I see: > > > > It seems _hash_log2 is still in the tree, but has no callers? > > Yeah, I

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-07 Thread Amit Kapila
On Tue, Apr 7, 2020 at 5:37 PM Anna Akenteva wrote: > > On 2020-04-07 13:32, Amit Kapila wrote: > > First, I don't > > think we have a consensus on the syntax being used in the patch > > (various people didn't agree to LSN specific syntax). They wanted a > > more generic syntax and I see that we

Re: WAL usage calculation patch

2020-04-07 Thread Julien Rouhaud
On Tue, Apr 7, 2020 at 12:00 PM Peter Eisentraut wrote: > > On 2020-04-07 04:12, Amit Kapila wrote: > > On Mon, Apr 6, 2020 at 10:01 PM Justin Pryzby wrote: > >> > >> On Mon, Apr 06, 2020 at 05:01:30PM +0200, Peter Eisentraut wrote: > >>> I noticed in some of the screenshots that were tweeted

Re: proposal \gcsv

2020-04-07 Thread Pavel Stehule
út 7. 4. 2020 v 16:28 odesílatel Tom Lane napsal: > Isaac Morland writes: > > On Tue, 7 Apr 2020 at 03:30, Pavel Stehule > wrote: > >> your patch supports syntax > >> (option1=value option2=value) > >> It looks little bit inconsistent and unusual > > > It's the same as a connection string. > >

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2020-04-07 Thread Tomas Vondra
On Mon, Apr 06, 2020 at 05:28:52PM +0900, Etsuro Fujita wrote: On Sat, Apr 4, 2020 at 12:15 AM Etsuro Fujita wrote: Attached is the original patch (0001) and one patch (0002) with changes including those by Tomas and Ashutosh. I merged the patches into one and rebased it against HEAD.

Re: adding partitioned tables to publications

2020-04-07 Thread Peter Eisentraut
On 2020-04-07 08:44, Amit Langote wrote: I updated the patch to make the following changes: * Rewrote the tests to match in style with those committed yesterday * Renamed all variables that had pubasroot in it to have pubviaroot instead to match the publication parameter * Updated

Re: pgsql: Generate backup manifests for base backups, and validate them.

2020-04-07 Thread Peter Eisentraut
On 2020-04-03 21:07, Robert Haas wrote: A new tool called pg_validatebackup can validate a backup against the manifest. In software engineering, "verify" and "validate" have standardized distinct meanings. I'm not going to try to explain them here, but you can easily find them online. I

Re: Use compiler intrinsics for bit ops in hash

2020-04-07 Thread David Rowley
Hi John, Thanks for having a look at this. On Wed, 8 Apr 2020 at 00:16, John Naylor wrote: > Overall looks good to me. Just a couple things I see: > > It seems _hash_log2 is still in the tree, but has no callers? Yeah, I left it in there since it was an external function. Perhaps we could rip

Re: Using the rr debugging tool to debug Postgres

2020-04-07 Thread Jehan-Guillaume de Rorthais
On Mon, 6 Apr 2020 10:38:31 -0700 Peter Geoghegan wrote: > rr is a tool that makes gdb much more useful by supporting recording > and replaying of the program being debugged. I highly recommend trying > rr if you're somebody that regularly uses gdb to debug Postgres. rr > implements a gdbserver

Re: SLRU statistics

2020-04-07 Thread Kuntal Ghosh
Hello Tomas, On Thu, Apr 2, 2020 at 5:59 PM Tomas Vondra wrote: > Thank you for the patch, pushed. > In SimpleLruReadPage_ReadOnly, we first try to find the SLRU page in shared buffer under shared lock, then conditionally visit SimpleLruReadPage if reading is necessary. IMHO, we should update

Re: pg_stat_statements issue with parallel maintenance (Was Re: WAL usage calculation patch)

2020-04-07 Thread Masahiko Sawada
On Tue, 7 Apr 2020 at 18:29, Masahiko Sawada wrote: > > On Tue, 7 Apr 2020 at 17:42, Amit Kapila wrote: > > > > On Tue, Apr 7, 2020 at 1:30 PM Masahiko Sawada > > wrote: > > > > > > Buffer usage statistics seem correct. The small differences would be > > > catalog lookups Peter mentioned. > > >

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-07 Thread Amit Kapila
On Tue, Apr 7, 2020 at 7:56 AM Anna Akenteva wrote: > > On 2020-04-07 00:58, Kartyshov Ivan wrote: > > Ok, here is a new version of patch with single LSN and TIMEOUT. > > I had a look at the code and did some more code cleanup, with Ivan's > permission. > This is what I did: > - Removed "WAIT

Re: backup manifests and contemporaneous buildfarm failures

2020-04-07 Thread Andrew Dunstan
On Mon, Apr 6, 2020 at 1:18 AM Fabien COELHO wrote: > > > Hello, > > >> Do I need to precede those with some recursive chmod commands? Perhaps > >> the client should refuse to run if there is still something left after > >> these. > > > > I think the latter would be a very good idea, just so that

Re: EINTR while resizing dsm segment.

2020-04-07 Thread Thomas Munro
On Tue, Apr 7, 2020 at 8:58 PM Nicola Contu wrote: > So that seems to be a bug, correct? > Just to confirm, I am not using NFS, it is directly on disk. > > Other than that, is there a particular option we can set in the postgres.conf > to mitigate the issue? Hi Nicola, Yeah, I think it's a

Re: EINTR while resizing dsm segment.

2020-04-07 Thread Nicola Contu
The only change we made on the disk, is the encryption at OS level. Not sure this can be something related. Il giorno mar 7 apr 2020 alle ore 10:58 Nicola Contu ha scritto: > So that seems to be a bug, correct? > Just to confirm, I am not using NFS, it is directly on disk. > > Other than that,

Re: [Proposal] Global temporary tables

2020-04-07 Thread Erik Rijkers
On 2020-04-07 10:57, 曾文旌 wrote: [global_temporary_table_v24-pg13.patch ] Hi, With gcc 9.3.0 (debian stretch), I see some low-key protests during the build: index.c: In function ‘index_drop’: index.c:2051:8: warning: variable ‘rel_persistence’ set but not used [-Wunused-but-set-variable]

Re: Make MemoryContextMemAllocated() more precise

2020-04-07 Thread David Rowley
On Tue, 7 Apr 2020 at 14:26, Jeff Davis wrote: > > On Mon, 2020-04-06 at 23:39 +1200, David Rowley wrote: > > 4. Do you think it would be better to have two separate functions for > > MemoryContextCount(), a recursive version and a non-recursive > > version. > > I could, but right now the only

Re: WIP/PoC for parallel backup

2020-04-07 Thread Kashif Zeeshan
On Fri, Apr 3, 2020 at 3:01 PM Kashif Zeeshan < kashif.zees...@enterprisedb.com> wrote: > Hi Asif > > When a non-existent slot is used with tablespace then correct error is > displayed but then the backup folder is not cleaned and leaves a corrupt > backup. > > Steps > === > > edb@localhost

Re: Run-time pruning for ModifyTable

2020-04-07 Thread David Rowley
On Wed, 25 Mar 2020 at 15:37, Amit Langote wrote: > Actually, I was saying in that email that the update/delete planning > overhaul being talked about will make the entirety of the > functionality this patch is adding, which is ModifyTable node being > able to prune its subplans based on run-time

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-07 Thread Anna Akenteva
On 2020-04-07 13:32, Amit Kapila wrote: First, I don't think we have a consensus on the syntax being used in the patch (various people didn't agree to LSN specific syntax). They wanted a more generic syntax and I see that we tried to implement it and it turns out to be a bit complex but that

Re: Use compiler intrinsics for bit ops in hash

2020-04-07 Thread David Rowley
On Thu, 12 Mar 2020 at 22:59, John Naylor wrote: > > On Thu, Mar 12, 2020 at 7:42 AM David Rowley wrote: > > > > I don't think Jesse's proposed solution is that great due to the > > additional function call overhead for pg_count_leading_zeros_32(). The > > (num & (num - 1)) == 0 I imagine will

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-07 Thread Amit Kapila
On Tue, Apr 7, 2020 at 5:56 AM Alexander Korotkov wrote: > > On Tue, Apr 7, 2020 at 12:58 AM Kartyshov Ivan > wrote: > > On 2020-04-04 03:14, Alexander Korotkov wrote: > > > I think that now we would be fine with single LSN and single TIMEOUT. > > > In future we may add multiple LSNs/TIMEOUTs

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-07 Thread James Coleman
On Tue, Apr 7, 2020 at 12:25 AM Justin Pryzby wrote: > > On Mon, Apr 06, 2020 at 09:57:22PM +0200, Tomas Vondra wrote: > > I've pushed the fist part of this patch series - I've reorganized it a > > I scanned through this again post-commit. Find attached some suggestions. > > Shouldn't non-text

Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

2020-04-07 Thread Alexey Kondratov
On 2020-04-06 21:44, Justin Pryzby wrote: On Mon, Apr 06, 2020 at 08:43:46PM +0300, Alexey Kondratov wrote: +/* XXX: reusing reindex_option_list */ + | CLUSTER opt_verbose '(' reindex_option_list ')' qualified_name cluster_index_specification Could we actually simply

Re: EINTR while resizing dsm segment.

2020-04-07 Thread Nicola Contu
So that seems to be a bug, correct? Just to confirm, I am not using NFS, it is directly on disk. Other than that, is there a particular option we can set in the postgres.conf to mitigate the issue? Thanks a lot for your help. Il giorno sab 4 apr 2020 alle ore 02:49 Thomas Munro ha scritto: >

Re: proposal \gcsv

2020-04-07 Thread Isaac Morland
On Tue, 7 Apr 2020 at 03:30, Pavel Stehule wrote: > your patch supports syntax > > (option1=value option2=value) > > It looks little bit inconsistent and unusual > >> It's the same as a connection string. Actually, maybe that's the key to allowing parentheses, etc. in option values if needed -

Re: Don't try fetching future segment of a TLI.

2020-04-07 Thread David Steele
On 4/7/20 3:48 AM, Kyotaro Horiguchi wrote: At Tue, 7 Apr 2020 12:15:00 +0900, Fujii Masao wrote in This doesn't seem a bug, so I'm thinking to merge this to next *major* version release, i.e., v13. Not a bug, perhaps, but I think we do consider back-patching performance problems. The rise

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Andres Freund
On 2020-04-07 05:15:03 -0700, Andres Freund wrote: > Attached is a substantially polished version of my patches. Note that > the first three patches, as well as the last, are not intended to be > committed at this time / in this form - they're there to make testing > easier. I didn't actually

Re: WIP/PoC for parallel backup

2020-04-07 Thread Asif Rehman
Hi, Thanks, Kashif and Rajkumar. I have fixed the reported issues. I have added the shared state as previously described. The new grammar changes are as follows: START_BACKUP [LABEL ''] [FAST] [MAX_RATE %d] - This will generate a unique backupid using pg_strong_random(16) and hex-encoded

Re: pgsql: Generate backup manifests for base backups, and validate them.

2020-04-07 Thread Robert Haas
On Tue, Apr 7, 2020 at 5:51 AM Peter Eisentraut wrote: > On 2020-04-03 21:07, Robert Haas wrote: > > A new tool called pg_validatebackup can validate a backup against the > > manifest. > > In software engineering, "verify" and "validate" have standardized > distinct meanings. I'm not going to

Re: WIP/PoC for parallel backup

2020-04-07 Thread Jeevan Chalke
On Tue, Apr 7, 2020 at 10:14 PM Asif Rehman wrote: > Hi, > > Thanks, Kashif and Rajkumar. I have fixed the reported issues. > > I have added the shared state as previously described. The new grammar > changes > are as follows: > > START_BACKUP [LABEL ''] [FAST] [MAX_RATE %d] > - This will

Re: SyncRepLock acquired exclusively in default configuration

2020-04-07 Thread Ashwin Agrawal
On Mon, Apr 6, 2020 at 2:14 PM Andres Freund wrote: > > How about we change it to this ? > > Hm. Better. But I think it might need at least a compiler barrier / > volatile memory load? Unlikely here, but otherwise the compiler could > theoretically just stash the variable somewhere locally

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Andres Freund
Hi, On 2020-04-07 14:51:52 -0400, Robert Haas wrote: > On Tue, Apr 7, 2020 at 2:28 PM Andres Freund wrote: > > Does that make some sense? Do you have a better suggestion for a name? > > I think it makes sense. I have two basic problems with the name. The > first is that "on disk" doesn't seem

Re: WIP/PoC for parallel backup

2020-04-07 Thread Robert Haas
On Fri, Apr 3, 2020 at 4:46 AM Asif Rehman wrote: > Non-parallel backup already does the early error checking. I only intended > to make parallel behave the same as non-parallel here. So, I agree with > you that the behavior of parallel backup should be consistent with the > non-parallel one.

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Robert Haas
On Tue, Apr 7, 2020 at 2:28 PM Andres Freund wrote: > Does that make some sense? Do you have a better suggestion for a name? I think it makes sense. I have two basic problems with the name. The first is that "on disk" doesn't seem to be a very clear way of describing what you're actually

Re: Index Skip Scan

2020-04-07 Thread Dmitry Dolgov
> On Mon, Apr 06, 2020 at 06:31:08PM +, Floris Van Nee wrote: > > > Hm, I wasn't aware about this one, thanks for bringing this up. Btw, > > Floris, I > > would appreciate if in the future you can make it more visible that changes > > you > > suggest contain some fixes. E.g. it wasn't clear

Re: [HACKERS] advanced partition matching algorithm for partition-wise join

2020-04-07 Thread Etsuro Fujita
Hi Tomas, On Wed, Apr 8, 2020 at 12:15 AM Tomas Vondra wrote: > On Mon, Apr 06, 2020 at 05:28:52PM +0900, Etsuro Fujita wrote: > >On Sat, Apr 4, 2020 at 12:15 AM Etsuro Fujita > >wrote: > >> Attached is the original patch (0001) and one patch (0002) with > >> changes including those by Tomas

Re: WIP/PoC for parallel backup

2020-04-07 Thread Asif Rehman
On Tue, Apr 7, 2020 at 10:03 PM Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > > > On Tue, Apr 7, 2020 at 10:14 PM Asif Rehman > wrote: > >> Hi, >> >> Thanks, Kashif and Rajkumar. I have fixed the reported issues. >> >> I have added the shared state as previously described. The new

Re: proposal \gcsv

2020-04-07 Thread Pavel Stehule
út 7. 4. 2020 v 19:27 odesílatel Tom Lane napsal: > Here's a more fully fleshed-out patch, with documentation and some > test cases. (0001 patch is identical to last time.) > > Considering this is the last day before v13 feature freeze, should > I push this, or sit on it till v14? I feel

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Andres Freund
Hi, Thanks for the review! On 2020-04-07 12:41:07 -0400, Robert Haas wrote: > In 0002, the comments in SnapshotSet() are virtually incomprehensible. > There's no commit message so the reasons for the changes are unclear. > But mostly looks unproblematic. I was planning to drop that patch

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Robert Haas
On Tue, Apr 7, 2020 at 3:31 PM Andres Freund wrote: > Well, it *is* only a vague test :). It shouldn't ever have a false > positive, but there's plenty chance for false negatives (if wrapped > around far enough). Sure, but I think you get my point. Asserting that something "might be" true isn't

Re: adding partitioned tables to publications

2020-04-07 Thread Amit Langote
Thanks for the review. On Tue, Apr 7, 2020 at 6:01 PM Peter Eisentraut wrote: > On 2020-04-07 08:44, Amit Langote wrote: > > I updated the patch to make the following changes: > > > > * Rewrote the tests to match in style with those committed yesterday > > * Renamed all variables that had

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Robert Haas
Comments: In 0002, the comments in SnapshotSet() are virtually incomprehensible. There's no commit message so the reasons for the changes are unclear. But mostly looks unproblematic. 0003 looks like a fairly unrelated bug fix that deserves to be discussed on the thread related to the original

Re: pgsql: Generate backup manifests for base backups, and validate them.

2020-04-07 Thread David Steele
On 4/7/20 12:44 PM, Robert Haas wrote: On Tue, Apr 7, 2020 at 5:51 AM Peter Eisentraut wrote: On 2020-04-03 21:07, Robert Haas wrote: A new tool called pg_validatebackup can validate a backup against the manifest. In software engineering, "verify" and "validate" have standardized distinct

Re: WIP/PoC for parallel backup

2020-04-07 Thread Robert Haas
On Tue, Apr 7, 2020 at 1:25 PM Asif Rehman wrote: > I will, however parallel backup is already quite a large patch. So I think we > should first > agree on the current work before adding a backup manifest and > progress-reporting support. It's going to be needed for commit, but it may make

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Robert Haas
0008 - Here again, I greatly dislike putting Copy in the name. It makes little sense to pretend that either is the original and the other is the copy. You just have the same data in two places. If one of them is more authoritative, the place to explain that is in the comments, not by elongating

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Andres Freund
Hi, On 2020-04-07 10:51:12 -0700, Andres Freund wrote: > > +void AssertTransactionIdMayBeOnDisk(TransactionId xid) > > > > Formatting. > > > > + * Assert that xid is one that we could actually see on disk. > > > > I don't know what this means. The whole purpose of this routine is > > very

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Robert Haas
More review, since it sounds like you like it: 0006 - Boring. But I'd probably make this move both xmin and xid back, with related comment changes; see also next comment. 0007 - + TransactionId xidCopy; /* this backend's xid, a copy of this proc's +ProcGlobal->xids[] entry. */ Can we

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Peter Geoghegan
On Tue, Apr 7, 2020 at 11:28 AM Andres Freund wrote: > There is a lot of code that is pretty unsafe around wraparounds... They > are getting easier and easier to hit on a regular schedule in production > (plenty of databases that hit wraparounds multiple times a week). And I > don't think we as

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Andres Freund
Hi, On 2020-04-07 15:03:46 -0400, Robert Haas wrote: > On Tue, Apr 7, 2020 at 1:51 PM Andres Freund wrote: > > > ComputedHorizons seems like a fairly generic name. I think there's > > > some relationship between InvisibleToEveryoneState and > > > ComputedHorizons that should be brought out more

Default setting for enable_hashagg_disk

2020-04-07 Thread Jeff Davis
This is just a placeholder thread for an open item that I'm adding to the Open Items list. We can make a decision later. Now that we have Disk-based Hash Aggregation, there are a lot more situations where the planner can choose HashAgg. The enable_hashagg_disk GUC, if set to true, chooses HashAgg

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Robert Haas
On Tue, Apr 7, 2020 at 1:51 PM Andres Freund wrote: > > ComputedHorizons seems like a fairly generic name. I think there's > > some relationship between InvisibleToEveryoneState and > > ComputedHorizons that should be brought out more clearly by the naming > > and the comments. > > I don't like

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-07 Thread Anna Akenteva
On 2020-04-07 12:58, Amit Kapila wrote: Review comments: 1. +static void +DeleteEvent(void) I don't see how this is implemented or called to handle any errors. 2. + if (InterruptPending) + { + DeleteEvent(); + ProcessInterrupts(); + } We generally do this type of handling via

Re: Don't try fetching future segment of a TLI.

2020-04-07 Thread Fujii Masao
On 2020/04/07 20:21, David Steele wrote: On 4/7/20 3:48 AM, Kyotaro Horiguchi wrote: At Tue, 7 Apr 2020 12:15:00 +0900, Fujii Masao wrote in This doesn't seem a bug, so I'm thinking to merge this to next *major* version release, i.e., v13. Not a bug, perhaps, but I think we do consider

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Andres Freund
Hi, On 2020-04-07 14:28:09 -0400, Robert Haas wrote: > More review, since it sounds like you like it: > > 0006 - Boring. But I'd probably make this move both xmin and xid back, > with related comment changes; see also next comment. > > 0007 - > > + TransactionId xidCopy; /* this backend's xid, a

Re: Binary support for pgoutput plugin

2020-04-07 Thread Dave Cramer
On Fri, 3 Apr 2020 at 16:44, Dave Cramer wrote: > > > On Fri, 3 Apr 2020 at 03:43, Petr Jelinek wrote: > >> Hi, >> >> On 08/03/2020 00:18, Dave Cramer wrote: >> > On Fri, 6 Mar 2020 at 08:54, Petr Jelinek > > > wrote: >> > >> > Hi Dave, >> > >> > On

Re: proposal \gcsv

2020-04-07 Thread Tom Lane
Here's a more fully fleshed-out patch, with documentation and some test cases. (0001 patch is identical to last time.) Considering this is the last day before v13 feature freeze, should I push this, or sit on it till v14? I feel reasonably good that we have a nice feature definition here, but

Re: SLRU statistics

2020-04-07 Thread Tomas Vondra
On Tue, Apr 07, 2020 at 05:01:37PM +0530, Kuntal Ghosh wrote: Hello Tomas, On Thu, Apr 2, 2020 at 5:59 PM Tomas Vondra wrote: Thank you for the patch, pushed. In SimpleLruReadPage_ReadOnly, we first try to find the SLRU page in shared buffer under shared lock, then conditionally visit

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Andres Freund
Hi, On 2020-04-07 15:26:36 -0400, Robert Haas wrote: > 0008 - > > Here again, I greatly dislike putting Copy in the name. It makes > little sense to pretend that either is the original and the other is > the copy. You just have the same data in two places. If one of them is > more authoritative,

Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly

2020-04-07 Thread Justin Pryzby
On Tue, Apr 07, 2020 at 03:40:18PM +0300, Alexey Kondratov wrote: > On 2020-04-06 21:44, Justin Pryzby wrote: > > On Mon, Apr 06, 2020 at 08:43:46PM +0300, Alexey Kondratov wrote: > > > > > > +/* XXX: reusing reindex_option_list */ > > > + | CLUSTER opt_verbose '('

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-07 Thread James Coleman
On Tue, Apr 7, 2020 at 7:02 PM Tomas Vondra wrote: > > On Mon, Apr 06, 2020 at 11:25:21PM -0500, Justin Pryzby wrote: > >On Mon, Apr 06, 2020 at 09:57:22PM +0200, Tomas Vondra wrote: > >> I've pushed the fist part of this patch series - I've reorganized it a > > > >I scanned through this again

Re: A bug when use get_bit() function for a long bytea string

2020-04-07 Thread Tom Lane
I wrote: > It would be easier to get this done if you had addressed any of the > objections to the patch as given. Integer-overflow handling is still > missing, and you still are assuming that it's okay to change catalog > entries in released branches. Since we are hard upon the feature freeze

Re: proposal \gcsv

2020-04-07 Thread Tom Lane
Pavel Stehule writes: > út 7. 4. 2020 v 19:27 odesílatel Tom Lane napsal: >> Considering this is the last day before v13 feature freeze, should >> I push this, or sit on it till v14? I feel reasonably good that we >> have a nice feature definition here, but it's awfully late in the >> cycle to

Re: Internal key management system

2020-04-07 Thread Cary Huang
Hello Thanks a lot for the patch, I think in terms of functionality, the patch provides very straightforward functionalities regarding key management. In terms of documentation, I think the patch is still lacking some pieces of information that kind of prevent people from fully understanding

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-04-07 Thread Tomas Vondra
On Tue, Apr 07, 2020 at 12:17:44PM +0530, Amit Kapila wrote: On Mon, Mar 30, 2020 at 8:58 PM Tomas Vondra wrote: On Mon, Mar 30, 2020 at 11:47:57AM +0530, Amit Kapila wrote: > >I think we need to cache the subxids on the replica somehow but I >don't have a very good idea for it. Basically,

Re: BUG #16346: pg_upgrade fails on a trigger with a comment

2020-04-07 Thread Hamid Akhtar
As you have mentioned, I have verified that indeed commit 4c40b27b broke this. In this particular commit moves restoration of materialized views and event triggers to the last phase. Perhaps, comments should also be moved to this phase as there may comments on either of these types of objects.

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-07 Thread Alexander Korotkov
On Tue, Apr 7, 2020 at 10:58 PM Anna Akenteva wrote: > Thank you for your review! > Ivan and I have worked on the patch and tried to address your comments: I've pushed this. I promise to do careful post-commit review and resolve any issues arising. -- Alexander Korotkov Postgres

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-07 Thread James Coleman
On Tue, Apr 7, 2020 at 7:58 PM Tomas Vondra wrote: > > On Tue, Apr 07, 2020 at 07:50:26PM -0400, James Coleman wrote: > >On Tue, Apr 7, 2020 at 7:02 PM Tomas Vondra > > wrote: > >> > >> On Mon, Apr 06, 2020 at 11:25:21PM -0500, Justin Pryzby wrote: > >> >On Mon, Apr 06, 2020 at 09:57:22PM +0200,

Re: FETCH FIRST clause WITH TIES option

2020-04-07 Thread Alvaro Herrera
Hello On 2020-Apr-07, Andres Freund wrote: > On 2020-04-07 16:36:54 -0400, Alvaro Herrera wrote: > > Pushed, with some additional changes. > > This triggers a new warning for me (gcc-10): > /home/andres/src/postgresql/src/backend/executor/nodeLimit.c: In function > ‘ExecLimit’: >

Re: ERROR: invalid input syntax for type circle

2020-04-07 Thread Tom Lane
David Zhang writes: > Generated a new patch v2 (attached) following your suggestion and > performed the same test again. The test results looks good including the > "make check". Pushed, with some work on the regression tests so this doesn't get busted again. regards,

Re: Use compiler intrinsics for bit ops in hash

2020-04-07 Thread David Rowley
On Wed, 8 Apr 2020 at 01:16, John Naylor wrote: > > On Tue, Apr 7, 2020 at 8:26 PM David Rowley wrote: > > > > Hi John, > > > > Thanks for having a look at this. > > > > On Wed, 8 Apr 2020 at 00:16, John Naylor > > wrote: > > > Overall looks good to me. Just a couple things I see: > > > > > >

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Robert Haas
On Tue, Apr 7, 2020 at 3:24 PM Andres Freund wrote: > > 0007 - > > > > + TransactionId xidCopy; /* this backend's xid, a copy of this proc's > > +ProcGlobal->xids[] entry. */ > > > > Can we please NOT put Copy into the name like that? Pretty please? > > Do you have a suggested naming scheme?

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-07 Thread Tomas Vondra
On Tue, Apr 07, 2020 at 07:50:26PM -0400, James Coleman wrote: On Tue, Apr 7, 2020 at 7:02 PM Tomas Vondra wrote: On Mon, Apr 06, 2020 at 11:25:21PM -0500, Justin Pryzby wrote: >On Mon, Apr 06, 2020 at 09:57:22PM +0200, Tomas Vondra wrote: >> I've pushed the fist part of this patch series -

Re: Improving connection scalability: GetSnapshotData()

2020-04-07 Thread Andres Freund
Hi, On 2020-04-07 16:13:07 -0400, Robert Haas wrote: > On Tue, Apr 7, 2020 at 3:24 PM Andres Freund wrote: > > > + ProcGlobal->xids[pgxactoff] = InvalidTransactionId; > > > > > > Apparently this array is not dense in the sense that it excludes > > > unused slots, but comments elsewhere don't

Re: WAL usage calculation patch

2020-04-07 Thread Justin Pryzby
On Tue, Apr 07, 2020 at 12:00:29PM +0200, Peter Eisentraut wrote: > We also have existing cases for the other way: > > actual time=0.050..0.052 > Buffers: shared hit=3 dirtied=1 > > The cases mentioned by Justin are not formatted in a key=value format, so > it's not quite the same, but

Re: Using the rr debugging tool to debug Postgres

2020-04-07 Thread Peter Geoghegan
On Tue, Apr 7, 2020 at 3:36 AM Jehan-Guillaume de Rorthais wrote: > Thank you Peter! No problem! I'm just glad that we have a straightforward workflow for this now. -- Peter Geoghegan

Re: [PATCH] Incremental sort (was: PoC: Partial sort)

2020-04-07 Thread Tomas Vondra
On Mon, Apr 06, 2020 at 11:25:21PM -0500, Justin Pryzby wrote: On Mon, Apr 06, 2020 at 09:57:22PM +0200, Tomas Vondra wrote: I've pushed the fist part of this patch series - I've reorganized it a I scanned through this again post-commit. Find attached some suggestions. Thanks. The typo

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-07 Thread Kartyshov Ivan
On 2020-04-08 00:27, Tom Lane wrote: Alexander Korotkov writes: » WAIT FOR LSN lsn [ TIMEOUT timeout ] This seems like a really carelessly chosen syntax —- *three* new keywords, when you probably didn't need any. Are you not aware that there is distributed overhead in the grammar for

Re: [HACKERS] make async slave to wait for lsn to be replayed

2020-04-07 Thread Alexander Korotkov
On Wed, Apr 8, 2020 at 2:14 AM Kartyshov Ivan wrote: > On 2020-04-08 00:27, Tom Lane wrote: > > Alexander Korotkov writes: > » WAIT FOR LSN lsn [ TIMEOUT timeout ] > > > > This seems like a really carelessly chosen syntax —- *three* new > > keywords, when you probably didn't need any. Are you

Re: Make MemoryContextMemAllocated() more precise

2020-04-07 Thread Jeff Davis
On Mon, 2020-03-16 at 11:45 -0700, Jeff Davis wrote: > AllocSet allocates memory for itself in blocks, which double in size > up > to maxBlockSize. So, the current block (the last one malloc'd) may > represent half of the total memory allocated for the context itself. Narrower approach that

Re: implicit declaration of datumIsEqual in parse_coerce.c

2020-04-07 Thread Tom Lane
Tomas Vondra writes: > Not sure what changed, but I'm seeing this failure: > parse_coerce.c: In function ‘coerce_type’: > parse_coerce.c:345:9: warning: implicit declaration of function > ‘datumIsEqual’ [-Wimplicit-function-declaration] >345 |if (!datumIsEqual(newcon->constvalue, val2,

Re: [HACKERS] Restricting maximum keep segments by repslots

2020-04-07 Thread Alvaro Herrera
On 2020-Apr-07, Kyotaro Horiguchi wrote: > > Mmm. Couldn't we have a new member 'invalidated' in ReplicationSlot? > > I did that in the attached. The invalidated is shared-but-not-saved > member of a slot and initialized to false then irreversibly changed to > true when the slot loses required

  1   2   >