pgsql: tableam: relation creation, VACUUM FULL/CLUSTER, SET TABLESPACE.

2019-03-28 Thread Andres Freund
tableam: relation creation, VACUUM FULL/CLUSTER, SET TABLESPACE. This moves the responsibility for: - creating the storage necessary for a relation, including creating a new relfilenode for a relation with existing storage - non-transactional truncation of a relation - VACUUM FULL / CLUSTER's

Re: pgsql: Compute XID horizon for page level index vacuum on primary.

2019-03-28 Thread Peter Geoghegan
On Thu, Mar 28, 2019 at 8:30 AM Peter Geoghegan wrote: > I would just hard code something if there needs to be a temporary band-aid > fix. I also suggest that you remove the #include for heapam_xlog.h from both nbtxlog.c and hash_xlog.c. -- Peter Geoghegan

Re: pgsql: Use FullTransactionId for the transaction stack.

2019-03-28 Thread Thomas Munro
On Thu, Mar 28, 2019 at 11:55 PM Masahiko Sawada wrote: > /* > + * Serialized representation used to transmit transaction state to parallel > + * workers though shared memory. > > The second line of the above comment must be "workers *through* shared > memory"? Attached the patch. Right,

pgsql: Fix typo.

2019-03-28 Thread Thomas Munro
Fix typo. Author: Masahiko Sawada Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/7e69323bf72a924fd1b04a7a91da343a0cda91cf Modified Files -- src/backend/access/transam/xact.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

pgsql: Fix a few comment copy & pastos.

2019-03-28 Thread Andres Freund
Fix a few comment copy & pastos. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/46bcd2af18b0406207c9dd31ff5e0dab64a76f0a Modified Files -- src/include/access/tableam.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

Re: pgsql: Add support for multivariate MCV lists

2019-03-28 Thread Tomas Vondra
On Thu, Mar 28, 2019 at 07:33:36PM +0100, Tomas Vondra wrote: On Thu, Mar 28, 2019 at 11:29:12AM -0700, Peter Geoghegan wrote: On Wed, Mar 27, 2019 at 6:27 PM Tomas Vondra wrote: It's a bit too late for pushing emergency fixes over here, so I'll do more testing tomorrow and then push. The

pgsql: Fix deserialization of pg_mcv_list values

2019-03-28 Thread Tomas Vondra
Fix deserialization of pg_mcv_list values There were multiple issues in deserialization of pg_mcv_list values. Firstly, the data is loaded from syscache, but the deserialization was performed after ReleaseSysCache(), at which point the data might have already disappeared. Fixed by moving the

Re: pgsql: Add support for multivariate MCV lists

2019-03-28 Thread Tomas Vondra
On Thu, Mar 28, 2019 at 11:29:12AM -0700, Peter Geoghegan wrote: On Wed, Mar 27, 2019 at 6:27 PM Tomas Vondra wrote: It's a bit too late for pushing emergency fixes over here, so I'll do more testing tomorrow and then push. The buildfarm is still almost all-red now. Can you estimate how long

Re: pgsql: Add support for multivariate MCV lists

2019-03-28 Thread Peter Geoghegan
On Wed, Mar 27, 2019 at 6:27 PM Tomas Vondra wrote: > It's a bit too late for pushing emergency fixes over here, so I'll do > more testing tomorrow and then push. The buildfarm is still almost all-red now. Can you estimate how long it will take to push a fix? -- Peter Geoghegan

Re: pgsql: Compute XID horizon for page level index vacuum on primary.

2019-03-28 Thread Peter Geoghegan
On Thu, Mar 28, 2019 at 8:27 AM Andres Freund wrote: > I'm mildly inclined to push a commented version of this. And add a open items > entry. Alternatively I'm thinking of just but taking the tablespace setting > into account. I would just hard code something if there needs to be a temporary

Re: pgsql: Compute XID horizon for page level index vacuum on primary.

2019-03-28 Thread Andres Freund
Hi, On March 28, 2019 11:24:46 AM EDT, Peter Geoghegan wrote: >On Thu, Mar 28, 2019 at 5:28 AM Andres Freund >wrote: >> Hm, good catch. I don't like this fix very much (even if it were >> commented), but I don't have a great idea right now. > >That was just a POC, to verify the problem. Not a

Re: pgsql: Compute XID horizon for page level index vacuum on primary.

2019-03-28 Thread Peter Geoghegan
On Thu, Mar 28, 2019 at 5:28 AM Andres Freund wrote: > Hm, good catch. I don't like this fix very much (even if it were > commented), but I don't have a great idea right now. That was just a POC, to verify the problem. Not a proposal. -- Peter Geoghegan

Re: pgsql: Compute XID horizon for page level index vacuum on primary.

2019-03-28 Thread Andres Freund
On 2019-03-28 17:34:52 +1300, Thomas Munro wrote: > On Wed, Mar 27, 2019 at 1:06 PM Andres Freund wrote: > > Compute XID horizon for page level index vacuum on primary. > > Hi Andres, > > I have a virtual machine running FreeBSD 12.0 on i386 on which > contrib/test_decoding consistently

Re: pgsql: Use FullTransactionId for the transaction stack.

2019-03-28 Thread Masahiko Sawada
On Thu, Mar 28, 2019 at 2:27 PM Thomas Munro wrote: > > Use FullTransactionId for the transaction stack. > > Provide GetTopFullTransactionId() and GetCurrentFullTransactionId(). > The intended users of these interfaces are access methods that use > xids for visibility checks but don't want to

Re: pgsql: Add support for multivariate MCV lists

2019-03-28 Thread Tomas Vondra
On Wed, Mar 27, 2019 at 08:15:35PM -0700, Andres Freund wrote: Hi, On 2019-03-27 21:13:46 +0100, Tomas Vondra wrote: On Wed, Mar 27, 2019 at 12:32:34PM -0700, Peter Geoghegan wrote: > On Wed, Mar 27, 2019 at 12:04 PM Andres Freund wrote: > > Congrats, this was long in the making! > > +1 >

pgsql: doc: Fix typo

2019-03-28 Thread Peter Eisentraut
doc: Fix typo Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f3afbbdae9b6ca04a6d2b224a8dfd5959d8a17ea Modified Files -- doc/src/sgml/storage.sgml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)