Re: setLastTid() and currtid()

2019-04-11 Thread Michael Paquier
On Thu, Apr 11, 2019 at 02:06:13PM -0400, Tom Lane wrote: > Yeah, if we could simplify the tableam API, that would be sufficient > reason to remove the stuff in v12, IMO. But if it is outside of that > API, I'd counsel waiting till v13. Yes, I agree that simplifying the table AM interface would

Re: Adding Unix domain socket path and port to pg_stat_get_wal_senders()

2019-04-11 Thread Michael Paquier
On Thu, Apr 11, 2019 at 10:19:01PM -0300, Euler Taveira wrote: > application_name. I'm not sure if it solves your complain but Peter > committed a patch [1] for v12 that distinguishes replicas in the same > host via cluster_name. Let's be honest, this is just a workaround. > Socket has different

Re: How to include the header files effectively

2019-04-11 Thread Michael Paquier
On Thu, Apr 11, 2019 at 10:22:56PM -0400, Alvaro Herrera wrote: > What are you trying to do? Your .c file must include "postgres.h" > before any other header file. There should be no other dependencies. The usual rule when it comes to develop extensions or a patch is to include headers in the

Re: Attempt to consolidate reading of XLOG page

2019-04-11 Thread Michael Paquier
On Fri, Apr 12, 2019 at 12:27:11PM +0900, Kyotaro HORIGUCHI wrote: > This patch changes XLogRead to allow using other than > BasicOpenFile to open a segment, and use XLogReaderState.private > to hold a new struct XLogReadPos for the segment reader. The new > struct is heavily duplicated with

Re: Experimenting with hash join prefetch

2019-04-11 Thread Thomas Munro
On Fri, Apr 12, 2019 at 1:35 AM Robert Haas wrote: > It would be interesting to see how this does with moderately-long text > keys, say 32 or 64 byte strings, and with actually-long text keys, say > several kB, and then with gigantic text keys, say several MB. At some > point the key probably

Re: Minor fix in reloptions.c comments

2019-04-11 Thread Michael Paquier
On Fri, Apr 12, 2019 at 02:41:37AM +, Jamison, Kirk wrote: > I found some minor grammar mistake while reading reloptions.c code comments. > Attached is the fix. > I just changed "affect" to "effect", for both n_distinct and vacuum_truncate. > - * values has no affect until the ... > + *

Re: Attempt to consolidate reading of XLOG page

2019-04-11 Thread Kyotaro HORIGUCHI
Hello. At Thu, 11 Apr 2019 18:05:42 +0200, Antonin Houska wrote in <14984.1554998...@spoje.net> > While working on the instance encryption I found it annoying to apply > decyption of XLOG page to three different functions. Attached is a patch that > tries to merge them all into one function,

Re: REINDEX CONCURRENTLY 2.0

2019-04-11 Thread Michael Paquier
On Thu, Apr 11, 2019 at 09:49:47AM -0400, Alvaro Herrera wrote: > Hmm, I suppose that makes sense for REINDEX TABLE or anything that > reindexes more than one index, but if you do REINDEX INDEX surely it > is reasonable to allow the case? Yes, we could revisit the REINDEX INDEX portion of the

Minor fix in reloptions.c comments

2019-04-11 Thread Jamison, Kirk
Hi, I found some minor grammar mistake while reading reloptions.c code comments. Attached is the fix. I just changed "affect" to "effect", for both n_distinct and vacuum_truncate. - * values has no affect until the ... + * values has no effect until the ... Regards, Kirk Jamison

Re: Should we add GUCs to allow partition pruning to be disabled?

2019-04-11 Thread Justin Pryzby
On Fri, Apr 12, 2019 at 02:01:39PM +1200, David Rowley wrote: > On Thu, 11 Apr 2019 at 17:40, Justin Pryzby wrote: > > I tweaked this patch some more (sorry): > > - remove "especially"; > > I think that likely needs to be kept for the PG11 version. I was > hoping it was stop a casual tester

Re: How to include the header files effectively

2019-04-11 Thread Alvaro Herrera
On 2019-Apr-12, Andy Fan wrote: > for example, when I want the LOCKTAG in .c file, which is defined in > "storage/lock.h". then I wrote the code like this: > > #include "storage/lock.h" > ... > > /../../../src/include/storage/lockdefs.h:50:2: error: unknown type name > 'TransactionId'

Re: How to include the header files effectively

2019-04-11 Thread Tom Lane
Andy Fan writes: > for example, when I want the LOCKTAG in .c file, which is defined in > "storage/lock.h". then I wrote the code like this: > #include "storage/lock.h" > ... > LOCKTAG tag; > compile and get errors. > In file included from > .../src/include/storage/lock.h:21: >

How to include the header files effectively

2019-04-11 Thread Andy Fan
I find the dependency is complex among header files in PG. At the same time, I find the existing code still can use the header file very cleanly/alphabetically. so I probably missed some knowledge here. for example, when I want the LOCKTAG in .c file, which is defined in "storage/lock.h".

Re: Should we add GUCs to allow partition pruning to be disabled?

2019-04-11 Thread David Rowley
On Thu, 11 Apr 2019 at 17:40, Justin Pryzby wrote: > I tweaked this patch some more (sorry): > - remove "currently" since that's not expected to be changed (right?); Seems like a good idea. I think the way we exclude inheritance child relations will never scale well. Other improvements that

Re: Switch TAP tests of pg_rewind to use role with only function permissions

2019-04-11 Thread Michael Paquier
On Thu, Apr 11, 2019 at 09:40:36AM +0200, Magnus Hagander wrote: > If we haven't already (and knowing you it wouldn't surprise me if you had > :P), we should probably look through the rest of the tests to see if we > have other similar cases. In general I think any case where "can be run by >

Re: Issue in ExecCleanupTupleRouting()

2019-04-11 Thread Amit Langote
On 2019/04/11 22:28, David Rowley wrote: > On Fri, 12 Apr 2019 at 01:06, Etsuro Fujita > wrote: >> + /* >> +* Check if this result rel is one belonging to the node's subplans, >> +* if so, let ExecEndPlan() clean it up. >> +*/ >> + if (htab) >> + { >> +

Re: Adding Unix domain socket path and port to pg_stat_get_wal_senders()

2019-04-11 Thread Euler Taveira
Em qui, 11 de abr de 2019 às 21:16, Tatsuo Ishii escreveu: > > Currently pg_stat_replication view does not tell useful information > regarding client connections if UNIX domain sockets are used for > communication between sender and receiver. So it is not possible to > tell which row corresponds

Re: finding changed blocks using WAL scanning

2019-04-11 Thread Kyotaro HORIGUCHI
At Thu, 11 Apr 2019 10:00:35 -0700, Ashwin Agrawal wrote in > On Thu, Apr 11, 2019 at 6:27 AM Robert Haas wrote: > > > On Thu, Apr 11, 2019 at 3:52 AM Peter Eisentraut > > wrote: > > > I had in mind that you could have different overlapping incremental > > > backup jobs in existence at the

Adding Unix domain socket path and port to pg_stat_get_wal_senders()

2019-04-11 Thread Tatsuo Ishii
Currently pg_stat_replication view does not tell useful information regarding client connections if UNIX domain sockets are used for communication between sender and receiver. So it is not possible to tell which row corresponds to which standby server. test=# select client_addr, client_hostname,

Re: Enable data checksums by default

2019-04-11 Thread Daniel Gustafsson
On Thursday, April 11, 2019 8:56 PM, Andres Freund wrote: > On 2019-04-11 18:15:41 +, Daniel Gustafsson wrote: > > > On Thursday, April 11, 2019 6:58 PM, Andres Freund and...@anarazel.de wrote: > > > > > On 2019-04-09 23:11:03 -0400, Bruce Momjian wrote: > > > > > > > Enabling checksums by

Re: fix memory overflow in ecpg preproc module

2019-04-11 Thread Michael Meskes
Hi, > I have found a potential memory overflow in ecpg preproc module. > ... Thanks for finding and fixing, committed. Michael -- Michael Meskes Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) Meskes at (Debian|Postgresql) dot Org Jabber: michael at xmpp dot meskes dot

Re: Enable data checksums by default

2019-04-11 Thread Andres Freund
Hi, On 2019-04-11 18:15:41 +, Daniel Gustafsson wrote: > On Thursday, April 11, 2019 6:58 PM, Andres Freund wrote: > > > On 2019-04-09 23:11:03 -0400, Bruce Momjian wrote: > > > > > Enabling checksums by default will require anyone using pg_upgrade to > > > run initdb to disable checksums

Re: Reducing the runtime of the core regression tests

2019-04-11 Thread Peter Geoghegan
On Thu, Apr 11, 2019 at 11:00 AM Alvaro Herrera wrote: > ./configure --enable-depend --enable-coverage --enable-tap-tests --enable-nls > --with-python --with-perl --with-tcl --with-openssl --with-libxml --with-ldap > --with-pam >> $LOG 2>&1 > > make -j4 >> $LOG 2>&1 > make -j4 -C contrib >>

Re: Enable data checksums by default

2019-04-11 Thread Daniel Gustafsson
On Thursday, April 11, 2019 6:58 PM, Andres Freund wrote: > On 2019-04-09 23:11:03 -0400, Bruce Momjian wrote: > > > Enabling checksums by default will require anyone using pg_upgrade to > > run initdb to disable checksums before running pg_upgrade, for one > > release. We could add checksums

Re: setLastTid() and currtid()

2019-04-11 Thread Tom Lane
Andres Freund writes: > On 2019-04-11 13:27:03 -0400, Tom Lane wrote: >> I think removing it after feature freeze is not something to do, >> but +1 for nuking it as soon as the v13 branch opens. Unless >> there's some important reason we need it to be gone in v12? > No, I don't think there

Re: Retronym: s/magnetic disk/main data/

2019-04-11 Thread Bruce Momjian
On Thu, Apr 4, 2019 at 05:49:36PM +1300, Thomas Munro wrote: > Hello, > > I propose that in v13 we redefine "MD" (from md.c) to mean "main data" > (instead of "magnetic disk"). That's the standard storage layout for > typical table and index AMs. As opposed to the proposed undo and SLRU >

Re: setLastTid() and currtid()

2019-04-11 Thread Andres Freund
Hi, On 2019-04-11 13:52:08 -0400, Alvaro Herrera wrote: > As I understand, this setLastTid stuff would cause trouble if used > with a non-core table AM. I'm not sure there'd actually be trouble. I mean, what it does for heap is basically meaningless already, so it's not going to be meaningfully

Re: serializable transaction: exclude constraint violation (backed by GIST index) instead of ssi conflict

2019-04-11 Thread Peter Billen
On Thu, Apr 11, 2019 at 6:12 PM Peter Billen wrote: > > I believe we are after multiple issues/improvements: > > 1. Could we extend > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=fcff8a575198478023ada8a48e13b50f70054766 > by adding support for exclude constraints? > 2. Fully

Re: Reducing the runtime of the core regression tests

2019-04-11 Thread Alvaro Herrera
On 2019-Apr-11, Peter Geoghegan wrote: > I've noticed that the coverage reported on coverage.postgresql.org > sometimes looks contradictory, which can happen due to compiler > optimizations. I wonder if that could be addressed in some way, > because I find the site to be a useful resource. I

Re: setLastTid() and currtid()

2019-04-11 Thread Alvaro Herrera
On 2019-Apr-11, Tom Lane wrote: > Andres Freund writes: > > On 2019-03-27 10:01:08 +0900, Inoue, Hiroshi wrote: > >> The above code remains only for PG servers whose version < 8.2. > >> Please remove the code around setLastTid(). > > > Does anybody else have concerns about removing this

Re: setLastTid() and currtid()

2019-04-11 Thread Andres Freund
Hi, On 2019-04-11 13:27:03 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2019-03-27 10:01:08 +0900, Inoue, Hiroshi wrote: > >> The above code remains only for PG servers whose version < 8.2. > >> Please remove the code around setLastTid(). > > > Does anybody else have concerns about

Re: [PATCH v20] GSSAPI encryption support

2019-04-11 Thread Robbie Harwood
Stephen Frost writes: > Robbie Harwood (rharw...@redhat.com) wrote: >> Bruce Momjian writes: >>> Magnus Hagander wrote: Joe Conway wrote: If it was on the table it might have been better to keep hostgss and change the authentication method to gssauth or something, but

Re: Pluggable Storage - Andres's take

2019-04-11 Thread Tom Lane
Andres Freund writes: > On 2019-04-11 14:52:40 +0300, Heikki Linnakangas wrote: >> + * HEIKKI: A flags bitmask argument would be more readable than 6 >> booleans > I honestly don't have strong feelings about it. Not sure that I buy that > bitmasks would be much more readable Sure they

Re: block-level incremental backup

2019-04-11 Thread Anastasia Lubennikova
09.04.2019 18:48, Robert Haas writes: Thoughts? Hi, Thank you for bringing that up. In-core support of incremental backups is a long-awaited feature. Hopefully, this take will end up committed in PG13. Speaking of UI: 1) I agree that it should be implemented as a new replication command. 2)

Re: setLastTid() and currtid()

2019-04-11 Thread Tom Lane
Andres Freund writes: > On 2019-03-27 10:01:08 +0900, Inoue, Hiroshi wrote: >> The above code remains only for PG servers whose version < 8.2. >> Please remove the code around setLastTid(). > Does anybody else have concerns about removing this interface? Does > anybody think we should have a

Re: cache lookup failed for collation 0

2019-04-11 Thread Tom Lane
Jeevan Chalke writes: > Do you mean, the code in get_collation_isdeterministic() should look like > something like below? > If colloid = InvalidOid then > return TRUE > ELSE IF tuple is valid then > return collisdeterministic from the tuple > ELSE > return FALSE I think it's appropriate to

Re: Pluggable Storage - Andres's take

2019-04-11 Thread Robert Haas
On Thu, Apr 11, 2019 at 12:49 PM Andres Freund wrote: > > @@ -179,6 +184,12 @@ typedef struct TableAmRoutine > >* > >* if temp_snap is true, the snapshot will need to be deallocated at > >* scan_end. > > + * > > + * HEIKKI: table_scan_update_snapshot() changes

Re: Reducing the runtime of the core regression tests

2019-04-11 Thread Peter Geoghegan
On Thu, Apr 11, 2019 at 9:55 AM Tom Lane wrote: > So I concur that indexing.sql's fastpath test > isn't adding anything useful coverage-wise, and will just nuke it. Good. > (It'd be interesting perhaps to check whether the results shown > by coverage.postgresql.org are similarly unstable. They

Re: finding changed blocks using WAL scanning

2019-04-11 Thread Ashwin Agrawal
On Thu, Apr 11, 2019 at 6:27 AM Robert Haas wrote: > On Thu, Apr 11, 2019 at 3:52 AM Peter Eisentraut > wrote: > > I had in mind that you could have different overlapping incremental > > backup jobs in existence at the same time. Maybe a daily one to a > > nearby disk and a weekly one to a

Re: Enable data checksums by default

2019-04-11 Thread Andres Freund
Hi, On 2019-04-09 23:11:03 -0400, Bruce Momjian wrote: > Enabling checksums by default will require anyone using pg_upgrade to > run initdb to disable checksums before running pg_upgrade, for one > release. We could add checksums for non-link pg_upgrade runs, but we > don't have code to do that

Re: cache lookup failed for collation 0

2019-04-11 Thread Jeevan Chalke
On Thu, Apr 11, 2019 at 9:07 PM Tom Lane wrote: > Jeevan Chalke writes: > > Following test-sequence causing an error "cache lookup failed for > collation 0"; > > postgres:5432 [42106]=# create table foobar(a bytea primary key, b int); > > CREATE TABLE > > postgres:5432 [42106]=# insert into

Re: Reducing the runtime of the core regression tests

2019-04-11 Thread Tom Lane
Peter Geoghegan writes: > On Wed, Apr 10, 2019 at 4:56 PM Peter Geoghegan wrote: >> The original fastpath tests don't seem particularly effective to me, >> even without the oversight I mentioned. I suggest that you remove >> them, since the minimal btree_index.sql fast path test is sufficient.

Re: finding changed blocks using WAL scanning

2019-04-11 Thread Ashwin Agrawal
On Wed, Apr 10, 2019 at 2:50 PM Robert Haas wrote: > Over at > https://www.postgresql.org/message-id/CA%2BTgmobFVe4J4AA7z9OMUzKnm09Tt%2BsybhxeL_Ddst3q3wqpzQ%40mail.gmail.com > I mentioned parsing the WAL to extract block references so that > incremental backup could efficiently determine which

Re: setLastTid() and currtid()

2019-04-11 Thread Andres Freund
Hi, On 2019-03-27 10:01:08 +0900, Inoue, Hiroshi wrote: > Hi Andres, > Sorry for the late reply. Not late at all. Sorry for *my* late reply :) > On 2019/03/26 9:44, Andres Freund wrote: > > Hi, > > > > For the tableam work I'd like to remove heapam.h from > > nodeModifyTable.c. The only

Re: Pluggable Storage - Andres's take

2019-04-11 Thread Andres Freund
Hi, On 2019-04-11 14:52:40 +0300, Heikki Linnakangas wrote: > Here is another iteration on the comments. The patch is a mix of > copy-editing and questions. The questions are marked with "HEIKKI:". I can > continue the copy-editing, if you can reply to the questions, clarifying the > intention on

Re: [HACKERS][Proposal] LZ4 Compressed Storage Manager

2019-04-11 Thread Pavel Stehule
čt 11. 4. 2019 v 18:18 odesílatel Bruce Momjian napsal: > On Sun, Mar 31, 2019 at 05:25:51PM +0300, Николай Петров wrote: > > Why it should be implemented on Storage Manager level instead of usage > > Pluggable storage API [9]? > > - From my perspective view Storage Manager level

Re: [HACKERS][Proposal] LZ4 Compressed Storage Manager

2019-04-11 Thread Bruce Momjian
On Sun, Mar 31, 2019 at 05:25:51PM +0300, Николай Петров wrote: > Why it should be implemented on Storage Manager level instead of usage > Pluggable storage API [9]? > - From my perspective view Storage Manager level implementation > allows to focus on proper I/O operations and compression.

Re: serializable transaction: exclude constraint violation (backed by GIST index) instead of ssi conflict

2019-04-11 Thread Peter Billen
On Thu, Apr 11, 2019 at 1:14 AM Thomas Munro wrote: > On Thu, Apr 11, 2019 at 10:54 AM Thomas Munro > wrote: > > On Thu, Apr 11, 2019 at 9:43 AM Peter Billen > wrote: > > > I kinda expected/hoped that transaction t2 would get aborted by a > serialization error, and not an exclude constraint

Attempt to consolidate reading of XLOG page

2019-04-11 Thread Antonin Houska
While working on the instance encryption I found it annoying to apply decyption of XLOG page to three different functions. Attached is a patch that tries to merge them all into one function, XLogRead(). The existing implementations differ in the way new segment is opened. So I added a pointer to

Re: Cleanup/remove/update references to OID column

2019-04-11 Thread Justin Pryzby
On Thu, Apr 11, 2019 at 08:39:42AM -0700, Andres Freund wrote: > Yes, I was planning to commit that soon-ish. There still seemed > review / newer versions happening, though, so I was thinking of waiting > for a bit longer. I don't expect anything new. I got all that from: git grep '>oid'

Re: Cleanup/remove/update references to OID column

2019-04-11 Thread Andres Freund
Hi, On 2019-04-11 13:26:38 +0900, Michael Paquier wrote: > On Wed, Apr 10, 2019 at 11:59:18AM -0500, Justin Pryzby wrote: > > I found and included fixes for a few more references: > > > > doc/src/sgml/catalogs.sgml | 2 +- > > doc/src/sgml/ddl.sgml| 3 +-- > >

Re: cache lookup failed for collation 0

2019-04-11 Thread Tom Lane
Jeevan Chalke writes: > Following test-sequence causing an error "cache lookup failed for collation > 0"; > postgres:5432 [42106]=# create table foobar(a bytea primary key, b int); > CREATE TABLE > postgres:5432 [42106]=# insert into foobar > values('\x4c835521685c46ee827ab83d376cf028', 1); >

Re: pg_dump is broken for partition tablespaces

2019-04-11 Thread Alvaro Herrera
On 2019-Apr-10, Alvaro Herrera wrote: > This is because ruleutils.c attaches a TABLESPACE clause when asked to > dump an index definition; and tablecmds.c uses ruleutils to deparse the > index definition into something that can be replayed via CREATE INDEX > commands (or ALTER TABLE ADD

Re: Zedstore - compressed in-core columnar storage

2019-04-11 Thread Heikki Linnakangas
On 11/04/2019 17:54, Tom Lane wrote: Ashwin Agrawal writes: Thank you for trying it out. Yes, noticed for certain patterns pg_lzcompress() actually requires much larger output buffers. Like for one 86 len source it required 2296 len output buffer. Current zedstore code doesn’t handle this

cache lookup failed for collation 0

2019-04-11 Thread Jeevan Chalke
Hello hackers, Following test-sequence causing an error "cache lookup failed for collation 0"; postgres:5432 [42106]=# create table foobar(a bytea primary key, b int); CREATE TABLE postgres:5432 [42106]=# insert into foobar values('\x4c835521685c46ee827ab83d376cf028', 1); INSERT 0 1

Re: Zedstore - compressed in-core columnar storage

2019-04-11 Thread Tom Lane
Ashwin Agrawal writes: > Thank you for trying it out. Yes, noticed for certain patterns > pg_lzcompress() actually requires much larger output buffers. Like for one 86 > len source it required 2296 len output buffer. Current zedstore code doesn’t > handle this case and errors out. LZ4 for same

Re: creating gist index seems to look at data ignoring transaction?

2019-04-11 Thread Tom Lane
Palle Girgensohn writes: > I noticed some bad data where end < begin, so I modified these first, and > tried to vcreate the index in the same transaction. The index creation does > not notice the data changes. It seems creating the gist index this is not > transaction safe? Index creation has

Re: Zedstore - compressed in-core columnar storage

2019-04-11 Thread Rafia Sabih
On Tue, 9 Apr 2019 at 02:27, Ashwin Agrawal wrote: > Heikki and I have been hacking recently for few weeks to implement > in-core columnar storage for PostgreSQL. Here's the design and initial > implementation of Zedstore, compressed in-core columnar storage (table > access method). Attaching

Re: Zedstore - compressed in-core columnar storage

2019-04-11 Thread Magnus Hagander
On Thu, Apr 11, 2019 at 3:15 PM Heikki Linnakangas wrote: > On 11/04/2019 16:12, Rafia Sabih wrote: > > On Tue, 9 Apr 2019 at 20:29, Robert Haas > > wrote: > > > > BTW, can I express a small measure of disappointment that the name > for > > the thing under

Re: [PATCH v20] GSSAPI encryption support

2019-04-11 Thread Magnus Hagander
On Thu, Apr 11, 2019 at 3:56 PM Robert Haas wrote: > On Wed, Apr 10, 2019 at 9:47 PM Stephen Frost wrote: > > Right, if we changed the name of the auth method then everyone who is > > using the "gss" auth method would have to update their pg_hba.conf > > files... That would be very ugly.

Re: [PATCH v20] GSSAPI encryption support

2019-04-11 Thread Robert Haas
On Wed, Apr 10, 2019 at 9:47 PM Stephen Frost wrote: > Right, if we changed the name of the auth method then everyone who is > using the "gss" auth method would have to update their pg_hba.conf > files... That would be very ugly. Also, it wasn't implicitly rejected, > it was discussed up-thread

Re: Zedstore - compressed in-core columnar storage

2019-04-11 Thread Konstantin Knizhnik
On 11.04.2019 16:18, Andreas Karlsson wrote: On 4/11/19 10:46 AM, Konstantin Knizhnik wrote: This my results of compressing pbench data using different compressors: Configuration Size (Gb) Time (sec) no compression 15.31 92 zlib (default level)2.37284 zlib (best

Re: REINDEX CONCURRENTLY 2.0

2019-04-11 Thread Alvaro Herrera
On 2019-Apr-11, Michael Paquier wrote: > > I was going to just remove the caveat, but then I discovered that > > REINDEX CONCURRENTLY doesn't work on INVALID indexes (why?). > > This is a wanted choice. The index built in parallel of the existing > one during a concurrent reindex is marked

Re: block-level incremental backup

2019-04-11 Thread Robert Haas
On Thu, Apr 11, 2019 at 12:22 AM Michael Paquier wrote: > incremental page size is reduced in the actual backup. My preference > tends toward a block-level approach if we were to do something in this > area, though I fear that performance will be bad if we begin to scan > all the relation files

Re: Experimenting with hash join prefetch

2019-04-11 Thread Robert Haas
On Wed, Apr 10, 2019 at 2:10 AM Thomas Munro wrote: > Here is an example of times for a trivial join on my laptop. Note > that this is prefetching only the probing phase, not while building > which should also be possible. I didn't get around to trying deeper > prefetch pipelines as discussed

Re: pg_rewind vs superuser

2019-04-11 Thread Michael Paquier
On Thu, Apr 11, 2019 at 10:33:13AM +0200, Magnus Hagander wrote: > And I think it would make sense to wait by default, but we could then also > have a commandline parameter that says "don't wait, instead error out in > case the checkpoint isn't done". > > Or something like that? Yes, that would

Re: Issue in ExecCleanupTupleRouting()

2019-04-11 Thread David Rowley
On Fri, 12 Apr 2019 at 01:06, Etsuro Fujita wrote: > + /* > +* Check if this result rel is one belonging to the node's subplans, > +* if so, let ExecEndPlan() clean it up. > +*/ > + if (htab) > + { > + Oid partoid; > + bool

Re: REINDEX CONCURRENTLY 2.0

2019-04-11 Thread Michael Paquier
On Thu, Apr 11, 2019 at 11:21:29AM +0100, Dagfinn Ilmari Mannsåker wrote: > I noticed that the docs for how to recover from a failed CREATE INDEX > CONCURRENTLY say that «REINDEX does not support concurrent builds», > which is no longer true. Good catch. I'll apply that in a couple of hours. >

Re: finding changed blocks using WAL scanning

2019-04-11 Thread Robert Haas
On Thu, Apr 11, 2019 at 3:52 AM Peter Eisentraut wrote: > I had in mind that you could have different overlapping incremental > backup jobs in existence at the same time. Maybe a daily one to a > nearby disk and a weekly one to a faraway cloud. Each one of these > would need a separate

Re: Zedstore - compressed in-core columnar storage

2019-04-11 Thread Andreas Karlsson
On 4/11/19 10:46 AM, Konstantin Knizhnik wrote: This my results of compressing pbench data using different compressors: Configuration Size (Gb) Time (sec) no compression 15.31 92 zlib (default level)2.37284 zlib (best speed) 2.43191 postgres internal lz

Re: Zedstore - compressed in-core columnar storage

2019-04-11 Thread Heikki Linnakangas
On 11/04/2019 16:12, Rafia Sabih wrote: On Tue, 9 Apr 2019 at 20:29, Robert Haas > wrote: BTW, can I express a small measure of disappointment that the name for the thing under discussion on this thread chose to be called "zedstore"?  That seems to

Re: Zedstore - compressed in-core columnar storage

2019-04-11 Thread Rafia Sabih
On Tue, 9 Apr 2019 at 20:29, Robert Haas wrote: > On Tue, Apr 9, 2019 at 11:51 AM Alvaro Herrera > wrote: > > This is not surprising, considering that columnar store is precisely the > > reason for starting the work on table AMs. > > > > We should certainly look into integrating some sort of

Issue in ExecCleanupTupleRouting()

2019-04-11 Thread Etsuro Fujita
Hi, (added Alvaro, Amit, and David) While working on an update-tuple-routing bug in postgres_fdw [1], I noticed this change to ExecCleanupTupleRouting() made by commit 3f2393edefa5ef2b6970a5a2fa2c7e9c55cc10cf: + /* +* Check if this result rel is one belonging to the node's

Re: Zedstore - compressed in-core columnar storage

2019-04-11 Thread Rafia Sabih
On Tue, 9 Apr 2019 at 02:27, Ashwin Agrawal wrote: > Heikki and I have been hacking recently for few weeks to implement > in-core columnar storage for PostgreSQL. Here's the design and initial > implementation of Zedstore, compressed in-core columnar storage (table > access method). Attaching

creating gist index seems to look at data ignoring transaction?

2019-04-11 Thread Palle Girgensohn
Hi, I have a table with two dates, timeframe_begin and timeframe_end. I'd like to use daterange operators on this table, and an easy way would be to set up an index using gist on daterange(timeframe_begin, timeframe_end, '[]'); I noticed some bad data where end < begin, so I modified these

Re: pgbench - add minimal stats on initialization

2019-04-11 Thread Ibrar Ahmed
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:not tested Patch works fine on my machine. The new status of this patch

Re: Pluggable Storage - Andres's take

2019-04-11 Thread Heikki Linnakangas
On 08/04/2019 20:37, Andres Freund wrote: Hi, On 2019-04-08 15:34:46 +0300, Heikki Linnakangas wrote: There were a bunch of typos in the comments in tableam.h, see attached. Some of the comments could use more copy-editing and clarification, I think, but I stuck to fixing just typos and such

Re: bug in update tuple routing with foreign partitions

2019-04-11 Thread Etsuro Fujita
(2019/04/11 14:33), Amit Langote wrote: On 2019/04/10 17:38, Etsuro Fujita wrote: (2019/03/06 18:33), Amit Langote wrote: I noticed a bug with how UPDATE tuple routing initializes ResultRelInfos to use for partition routing targets. Specifically, the bug occurs when UPDATE targets include a

Re: Failure in contrib test _int on loach

2019-04-11 Thread Anastasia Lubennikova
10.04.2019 18:25, Heikki Linnakangas writes: On 09/04/2019 19:11, Anastasia Lubennikova wrote: 05.04.2019 19:41, Anastasia Lubennikova writes: In attachment, you can find patch with a test that allows to reproduce the bug not randomly, but on every run. Now I'm trying to find a way to fix the

Re: REINDEX CONCURRENTLY 2.0

2019-04-11 Thread Dagfinn Ilmari Mannsåker
Peter Eisentraut writes: > On 2019-03-28 09:07, Sergei Kornilov wrote: >> Unfortunately patch does not apply due recent commits. Any chance >> this can be fixed (and even committed in pg12)? > > Committed :) I noticed that the docs for how to recover from a failed CREATE INDEX CONCURRENTLY say

Re: Commit message / hash in commitfest page.

2019-04-11 Thread Ibrar Ahmed
On Thu, Apr 11, 2019 at 2:44 PM Erikjan Rijkers wrote: > > On 2019-04-11 11:36, Ibrar Ahmed wrote: > > Hi, > > > > Is it possible to have commit-message or at least git hash in > > commitfest. It will be very easy to track commit against commitfest > > item. > > > > Commitfest items always point

Re: Commit message / hash in commitfest page.

2019-04-11 Thread Erikjan Rijkers
On 2019-04-11 11:36, Ibrar Ahmed wrote: Hi, Is it possible to have commit-message or at least git hash in commitfest. It will be very easy to track commit against commitfest item. Commitfest items always point to discussion threads. These threads often end with a message that says that the

RE: Qestion about .partial WAL file

2019-04-11 Thread Matsumura, Ryo
Michael-san Thank for your advice. > then a promoted standby which archives WAL segments in the same > location as the primary > if the previous primary is still running after the standby I could not come up with the combination, but I understand now. Sorry for bothering you. Regards Ryo

Commit message / hash in commitfest page.

2019-04-11 Thread Ibrar Ahmed
Hi, Is it possible to have commit-message or at least git hash in commitfest. It will be very easy to track commit against commitfest item. -- Ibrar Ahmed

Re: Failure in contrib test _int on loach

2019-04-11 Thread Andrey Lepikhov
On 11/04/2019 13:14, Heikki Linnakangas wrote: On 11/04/2019 09:10, Andrey Lepikhov wrote: On 10/04/2019 20:25, Heikki Linnakangas wrote: On 09/04/2019 19:11, Anastasia Lubennikova wrote: After introducing GistBuildNSN this code path became unreachable. To fix it, I added new flag to

RE: Problem during Windows service start

2019-04-11 Thread Higuchi, Daisuke
Hi, + case POSTMASTER_STILL_STARTING: + write_eventlog(EVENTLOG_ERROR_TYPE, _("Timed out waiting for server startup\n")); + pgwin32_SetServiceStatus(SERVICE_START_PENDING); + return; Could this patch solve first post's problem [1] ? I think

Re: Zedstore - compressed in-core columnar storage

2019-04-11 Thread Konstantin Knizhnik
On 11.04.2019 8:03, Ashwin Agrawal wrote: On Apr 10, 2019, at 9:08 PM, Mark Kirkwood wrote: On 11/04/19 4:01 PM, Mark Kirkwood wrote: On 9/04/19 12:27 PM, Ashwin Agrawal wrote: Heikki and I have been hacking recently for few weeks to implement in-core columnar storage for PostgreSQL.

Re: Minimal logical decoding on standbys

2019-04-11 Thread tushar
On 04/10/2019 09:39 PM, Andres Freund wrote: Have you reproduced this with Amit's latest version? Yes-it is very much reproducible. -- regards,tushar EnterpriseDB https://www.enterprisedb.com/ The Enterprise PostgreSQL Company

Re: finding changed blocks using WAL scanning

2019-04-11 Thread Peter Eisentraut
On 2019-04-10 23:49, Robert Haas wrote: > It seems to me that there are basically two ways of storing this kind > of information, plus a bunch of variants. One way is to store files > that cover a range of LSNs, and basically contain a synopsis of the > WAL for those LSNs. You omit all the

Re: BUG #15672: PostgreSQL 11.1/11.2 crashed after dropping a partition table

2019-04-11 Thread Amit Langote
On 2019/04/11 15:57, Michael Paquier wrote: > On Wed, Mar 27, 2019 at 11:56:20AM +0900, Michael Paquier wrote: >> Adding it to the section for older bugs sounds fine to me. Thanks for >> doing so. > > I have begun looking at this issue. Hopefully I'll be able to provide > an update soon.

RE: Protect syscache from bloating with negative cache entries

2019-04-11 Thread Ideriha, Takeshi
>From: Ideriha, Takeshi [mailto:ideriha.take...@jp.fujitsu.com] >Does this result show that hard-limit size option with memory accounting >doesn't harm >to usual users who disable hard limit size option? Hi, I've implemented relation cache size limitation with LRU list and built-in memory

Re: [HACKERS] Weaker shmem interlock w/o postmaster.pid

2019-04-11 Thread Noah Misch
On Thu, Apr 11, 2019 at 12:48:35PM +1200, Thomas Munro wrote: > On Mon, Apr 8, 2019 at 6:42 PM Noah Misch wrote: > > - AIX animals failed two ways. First, I missed a "use" statement such that > > poll_start() would fail if it needed more than one attempt. Second, I > > assumed $pid would be

Re: Failure in contrib test _int on loach

2019-04-11 Thread Andrey Lepikhov
On 10/04/2019 20:25, Heikki Linnakangas wrote: On 09/04/2019 19:11, Anastasia Lubennikova wrote: 05.04.2019 19:41, Anastasia Lubennikova writes: In attachment, you can find patch with a test that allows to reproduce the bug not randomly, but on every run. Now I'm trying to find a way to fix