Re: [HACKERS] [PATCH] Lockable views

2017-10-16 Thread Yugo Nagata
from tbl; > > > BTW, though you mentioned the risk of deadlocks, even when there > > are no subquery, deadlock can occur in the current patch. > > > > For example, lock a table T in Session1, and then lock a view V > > whose base relation is T in Session2. Session2 will wait for > > Session1 to release the lock on T. After this, when Session1 try to > > lock view V, the deadlock occurs and the query is canceled. > > You are right. Dealocks could occur in any case. > > Best regards, > -- > Tatsuo Ishii > SRA OSS, Inc. Japan > English: http://www.sraoss.co.jp/index_en.php > Japanese:http://www.sraoss.co.jp -- Yugo Nagata -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [PATCH] Lockable views

2017-10-13 Thread Yugo Nagata
n when there are no subquery, deadlock can occur in the current patch. For example, lock a table T in Session1, and then lock a view V whose base relation is T in Session2. Session2 will wait for Session1 to release the lock on T. After this, when Session1 try to lock view V, the deadloc

[HACKERS] [PATCH] Lockable views

2017-10-11 Thread Yugo Nagata
rg INSTEAD OF INSERT ON v1 FOR EACH ROW EXECUTE PROCEDURE fnc(); CREATE TRIGGER test=# BEGIN; BEGIN test=# LOCK TABLE v1; ERROR: cannot lock view "v1" DETAIL: views that have an INSTEAD OF trigger are not lockable test=# END; ROLLBACK Regards, -- Yugo Nagata diff --git a/doc/s

Re: [HACKERS] Optional message to user when terminating/cancelling backend

2017-09-28 Thread Yugo Nagata
ckRelease(&slot->mutex); > 444 + > 445 + return message_len; This can return slot->len directly and the variable message_len is unnecessary. However, if we handle the "too long message" error in this function as suggested above, this does not have to return any

Re: [HACKERS] [POC] hash partitioning

2017-08-28 Thread Yugo Nagata
--- > Append (cost=0.00..96.50 rows=50 width=4) (actual time=0.017..0.078 rows=2 > loops=1) >-> Seq Scan on h1 (cost=0.00..48.25 rows=25 width=4) (actual > time=0.015..0.019 rows=1 loops=1) >

Re: [HACKERS] A suspicious code in pgoutput_startup().

2017-08-21 Thread Yugo Nagata
On Tue, 15 Aug 2017 16:23:35 -0400 Peter Eisentraut wrote: > On 7/27/17 20:52, Yugo Nagata wrote: > > 175 /* Check if we support requested protocol */ > > 176 if (data->protocol_version != LOGICALREP_PROTO_VERSION_NUM) > > 177

Re: [HACKERS] A little improvementof ApplyLauncherMain loop code

2017-08-21 Thread Yugo Nagata
On Tue, 15 Aug 2017 15:17:06 -0400 Peter Eisentraut wrote: > On 8/1/17 02:28, Yugo Nagata wrote: > > When reading the logical replication code, I found that the following > > part could be improved a bit. In the foreach, LWLockAcquire and > > logicalrep_worker_find are call

Re: [HACKERS] Notice message of ALTER SUBSCRIPTION ... RERESH PUBLICATIION

2017-08-07 Thread Yugo Nagata
On Mon, 7 Aug 2017 09:46:56 -0400 Peter Eisentraut wrote: > On 7/27/17 20:51, Yugo Nagata wrote: > > When we run ALTER SUBSCRIPTION ... REFRESH PUBLICATION and there is > > an unkown table at local, it says; > > > > NOTICE: added subscription for table public.tbl

Re: [HACKERS] Incorrect comment of XLByteToSeg() and XLByteToPrevSeg()

2017-08-01 Thread Yugo Nagata
pan > English: http://www.sraoss.co.jp/index_en.php > Japanese:http://www.sraoss.co.jp > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers -- Yugo Na

[HACKERS] A little improvementof ApplyLauncherMain loop code

2017-07-31 Thread Yugo Nagata
;m not sure whether these call are expensive enough to fix. Is it worth to fix? A patch attached. Regards, -- Yugo Nagata diff --git a/src/backend/replication/logical/launcher.c b/src/backend/replication/logical/launcher.c index d165d51..4816a5b 100644 --- a/src/backend/replication/logical/launch

[HACKERS] A suspicious code in pgoutput_startup().

2017-07-27 Thread Yugo Nagata
d or lower". Is this intentional? Or should this be fixed as below? 176 if (data->protocol_version > LOGICALREP_PROTO_VERSION_NUM) Attached is a simple patch in case of fixing. Regards, -- Yugo Nagata diff --git a/src/backend/replication/pgoutput/pgoutput.c b/src/backend/repli

[HACKERS] Notice message of ALTER SUBSCRIPTION ... RERESH PUBLICATIION

2017-07-27 Thread Yugo Nagata
. Regards, -- Yugo Nagata diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c index 6dc3f6e..5a7e6d5 100644 --- a/src/backend/commands/subscriptioncmds.c +++ b/src/backend/commands/subscriptioncmds.c @@ -573,9 +573,10 @@ AlterSubscription_refresh

Re: [HACKERS] Missing comment for max_logical_replication_workers in postgresql.conf.sample

2017-07-27 Thread Yugo Nagata
On Thu, 27 Jul 2017 14:38:29 +0900 Masahiko Sawada wrote: > On Thu, Jul 27, 2017 at 10:14 AM, Yugo Nagata wrote: > > Hi, > > > > I found that postgresql.conf.sample is missing a comment > > to note that changing max_logical_replication_workers requires > > res

[HACKERS] Missing comment for max_logical_replication_workers in postgresql.conf.sample

2017-07-26 Thread Yugo Nagata
Hi, I found that postgresql.conf.sample is missing a comment to note that changing max_logical_replication_workers requires restart of the server. Other such parameters has the comments, so I think the new parameter also needs this. Attached is a simple patch to fix this. Regards, -- Yugo

Re: [HACKERS] [PATCH] A hook for session start

2017-07-21 Thread Yugo Nagata
On Fri, 21 Jul 2017 10:31:57 -0300 Fabrízio de Royes Mello wrote: > On Fri, Jul 21, 2017 at 9:35 AM, Yugo Nagata wrote: > > > > On Fri, 21 Jul 2017 09:53:19 +0800 > > Craig Ringer wrote: > > > > > On 21 July 2017 at 08:42, Robert Haas wrote: > >

Re: [HACKERS] [PATCH] Make sure all statistics is sent after a few DML are performed

2017-07-21 Thread Yugo Nagata
On Fri, 21 Jul 2017 04:58:47 -0700 Andres Freund wrote: > Hi, > > (please don't top-reply on this list) > > On 2017-07-19 14:04:39 +0900, Yugo Nagata wrote: > > On Tue, 18 Jul 2017 10:10:49 -0400 > > Tom Lane wrote: > > > > Thank you for your comme

Re: [HACKERS] [PATCH] A hook for session start

2017-07-21 Thread Yugo Nagata
hank you for your suggestion. Certainly, we can do the similar job of a session-start hook using these existing hooks, although these hooks are triggered when the first query is executed not when the session is started. Now I come to think that an additional hook is not need. Thanks, > > -

Re: [HACKERS] xlogfilename

2017-07-21 Thread Yugo Nagata
On Fri, 21 Jul 2017 10:11:05 +0800 Craig Ringer wrote: > On 20 July 2017 at 21:33, Yugo Nagata wrote: > > > On Thu, 20 Jul 2017 11:02:25 +0200 > > Michael Paquier wrote: > > > > > On Thu, Jul 20, 2017 at 10:58 AM, DEV_OPS wrote: > > > > I think yo

[HACKERS] Incorrect comment of XLByteToSeg() and XLByteToPrevSeg()

2017-07-20 Thread Yugo Nagata
were modified by the following commit, but the comment were not. commit dfda6ebaec6763090fb78b458a979b558c50b39b Author: Heikki Linnakangas Date: Sun Jun 24 18:06:38 2012 +0300 Regards, -- Yugo Nagata diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h in

Re: [HACKERS] xlogfilename

2017-07-20 Thread Yugo Nagata
he sequencial number of the segment in this xlog. Regards, > -- > Michael > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers -- Yugo

[HACKERS] [PATCH] A hook for session start

2017-07-20 Thread Yugo Nagata
ery simple example of this hook that changes work_mem values for sessions of a specific database. I would appreciate hearing your opinion on this hook. Regards, -- Yugo Nagata diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index b8d860e..7a1fa3b 100644 --- a/src/ba

Re: [HACKERS] [PATCH] Make sure all statistics is sent after a few DML are performed

2017-07-18 Thread Yugo Nagata
> If somebody wanted to do the work, that'd be a viable answer IMO. You'd > really want to not wake backends that have nothing more to send, but > I agree that it'd be possible to advertise that in shared memory. > > regards, tom lane -- Yugo Naga

[HACKERS] [PATCH] Make sure all statistics is sent after a few DML are performed

2017-07-18 Thread Yugo Nagata
pgsent_report_sent() again with a delay after the last DML to make sure to send the statistics. The attached patch implements this. Any comments would be appreciated. Regards, -- Yugo Nagata diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index b8d860e..928d479 100644 --- a/src

Re: [HACKERS] Fix doc of DROP SUBSCRIPTION

2017-06-30 Thread Yugo Nagata
On Fri, 30 Jun 2017 20:17:39 +0900 Masahiko Sawada wrote: > On Fri, Jun 30, 2017 at 7:01 PM, Yugo Nagata wrote: > > Hi, > > > > The documentation says that a subscription that has a replication slot > > cannot be dropped in a transaction block, but it is not al

[HACKERS] Fix doc of DROP SUBSCRIPTION

2017-06-30 Thread Yugo Nagata
Hi, The documentation says that a subscription that has a replication slot cannot be dropped in a transaction block, but it is not allowed even outside of a transaction block. Attached is a patch to fix it. Regards, -- Yugo Nagata diff --git a/doc/src/sgml/ref/drop_subscription.sgml b/doc

Re: [HACKERS] [PATCH] pg_reload_backend to signal SIGHUP to a specific backend

2017-06-28 Thread Yugo Nagata
ing). > And provide a pid argument to signal a given backend. Actually, I proposed that version patch in the previous thread[1], but there as a suggestion to use other function name, so I attached fixed version in this thread. [1] https://www.postgresql.org/message-id/20170624000156.74ca948

Re: [HACKERS] [PATCH] pg_reload_backend to signal SIGHUP to a specific backend

2017-06-28 Thread Yugo Nagata
On Wed, 28 Jun 2017 13:35:12 +0200 Dmitry Dolgov <9erthali...@gmail.com> wrote: > > On 28 June 2017 at 12:17, Yugo Nagata wrote: > > > > Hi, > > > > Attached is a patch of pg_reload_backend that is a function signaling > > SIGHUP to a specific backend. T

[HACKERS] [PATCH] pg_reload_backend to signal SIGHUP to a specific backend

2017-06-28 Thread Yugo Nagata
gresql.org/message-id/CAB7nPqT4y8-QoGKEugk99_tFuEOtAshcs5kxOeZ_0w27UtdGyA%40mail.gmail.com -- Yugo Nagata diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql index 0fdad0c..3a9a020 100644 --- a/src/backend/catalog/system_views.sql +++ b/src/backend/catalog/system

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-27 Thread Yugo Nagata
On Fri, 23 Jun 2017 19:43:35 -0400 Stephen Frost wrote: > Alvaro, all, > > * Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > > Yugo Nagata wrote: > > > > > I tried to make it. Patch attached. > > > > > > It is easy and simple. Althoug

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-27 Thread Yugo Nagata
On Sat, 24 Jun 2017 08:09:52 +0900 Michael Paquier wrote: > On Sat, Jun 24, 2017 at 5:07 AM, Alvaro Herrera > wrote: > > Yugo Nagata wrote: > > > >> I tried to make it. Patch attached. > >> > >> It is easy and simple. Although I haven't tried fo

Re: [HACKERS] Same expression more than once in partition key

2017-06-23 Thread Yugo Nagata
On Fri, 23 Jun 2017 09:54:17 -0400 Tom Lane wrote: > Yugo Nagata writes: > > When we create a range partitioned table, we cannot use > > a column more than once in the partition key. > > > postgres=# create table t (i int) partition by range(i,i); > > ERROR:

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-23 Thread Yugo Nagata
On Thu, 22 Jun 2017 14:08:30 +0900 Michael Paquier wrote: > On Thu, Jun 22, 2017 at 1:52 PM, Yugo Nagata wrote: > > On Thu, 22 Jun 2017 12:05:19 +0900 > > Michael Paquier wrote: > >> signal-able). Different thought, but I'd love to see a SQL function > >&

Re: [HACKERS] Same expression more than once in partition key

2017-06-23 Thread Yugo Nagata
On Fri, 23 Jun 2017 15:57:54 +0900 Yugo Nagata wrote: > Hi, > > When we create a range partitioned table, we cannot use > a column more than once in the partition key. > > postgres=# create table t (i int) partition by range(i,i); > ERROR: column "i" appears

[HACKERS] Same expression more than once in partition key

2017-06-22 Thread Yugo Nagata
e internal of partitioning? If not, we might not need to check column that apears more than once in the partition key. Regards, -- Yugo Nagata -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] [POC] hash partitioning

2017-06-22 Thread Yugo Nagata
On Fri, 23 Jun 2017 13:41:15 +0900 Yugo Nagata wrote: > On Tue, 6 Jun 2017 13:03:58 +0530 > amul sul wrote: > > > > Updated patch attached. > > I looked into the latest patch (v13) and have some comments > althogh they might be trivial. One more comment: +

Re: [HACKERS] Autovacuum launcher occurs error when cancelled by SIGINT

2017-06-22 Thread Yugo Nagata
On Thu, 22 Jun 2017 13:55:26 -0400 Alvaro Herrera wrote: > Yugo Nagata wrote: > > Hi, > > > > As I report in another thread[1], I found the autovacuum launcher occurs > > the following error in PG 10 when this received SIGINT. I can repuroduce > > this

Re: [HACKERS] [POC] hash partitioning

2017-06-22 Thread Yugo Nagata
und at offset is Fixing the comment of pg_get_partkeydef() is missing. * pg_get_partkeydef * * Returns the partition key specification, ie, the following: * * PARTITION BY { RANGE | LIST } (column opt_collation opt_opclass [, ...]) */ Datum pg_get_partkeydef(PG_FUNCTION_ARGS) { Regards, > > Regards, > Amul Sul -- Yugo Nagata -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Incorrect documentation about pg_stat_activity

2017-06-22 Thread Yugo Nagata
On Thu, 22 Jun 2017 14:14:53 +0530 Ashutosh Bapat wrote: > On Wed, Jun 21, 2017 at 7:48 PM, Simon Riggs wrote: > > On 21 June 2017 at 16:15, Yugo Nagata wrote: > >> On Wed, 21 Jun 2017 19:08:35 +0530 > >> Kuntal Ghosh wrote: > >> > >>> On

Re: [HACKERS] Optional message to user when terminating/cancelling backend

2017-06-22 Thread Yugo Nagata
f helpful information rather than a likely problem as long as pg_terminated_backend exits successfully. https://www.postgresql.org/docs/10/static/runtime-config-logging.html#runtime-config-severity-levels > -- > Michael -- Yugo Nagata -- Sent via pgsql-hackers mailing list (pgsql

Re: [HACKERS] Logical replication launcher never been restarted when terminated

2017-06-21 Thread Yugo Nagata
On Wed, 21 Jun 2017 15:17:20 -0400 Peter Eisentraut wrote: > On 6/21/17 13:03, Yugo Nagata wrote: > > As I report in another thread[1], when the logical replication launcher > > is terminated by SIGTERM, it never been restarted and we need to restart > > the server to enabl

Re: [HACKERS] Autovacuum launcher occurs error when cancelled by SIGINT

2017-06-21 Thread Yugo Nagata
On Thu, 22 Jun 2017 13:12:48 +0900 Michael Paquier wrote: > On Wed, Jun 21, 2017 at 9:15 PM, Yugo Nagata wrote: > > This errors continue until this process is terminated or the server is > > restarted. > > > > When SIGINT is issued, the process exits from the m

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-21 Thread Yugo Nagata
On Thu, 22 Jun 2017 12:05:19 +0900 Michael Paquier wrote: > On Thu, Jun 22, 2017 at 11:52 AM, Andres Freund wrote: > > On 2017-06-22 11:49:47 +0900, Yugo Nagata wrote: > >> I agree that we can kill theses processes by the OS command. However, > >> It seems to m

Re: [HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-21 Thread Yugo Nagata
On Wed, 21 Jun 2017 11:04:34 -0400 Robert Haas wrote: > On Wed, Jun 21, 2017 at 7:56 AM, Yugo Nagata wrote: > > I have found that we can cancel/terminate autovacuum launchers and > > background worker processes by pg_cancel/terminate_backend function. > > I'm wond

[HACKERS] Logical replication launcher never been restarted when terminated

2017-06-21 Thread Yugo Nagata
er process: logical replication launcher (PID 11526) exited with exit code 1 If we don't want to get this message, we need more fixes in CleanupBackgroundWorker() or around it. [1] https://www.postgresql.org/message-id/20170621205657.61d90605.nagata%40sraoss.co.jp -- Yugo Nagata diff --gi

Re: [HACKERS] Incorrect documentation about pg_stat_activity

2017-06-21 Thread Yugo Nagata
On Wed, 21 Jun 2017 16:18:50 +0200 Simon Riggs wrote: > On 21 June 2017 at 16:15, Yugo Nagata wrote: > > On Wed, 21 Jun 2017 19:08:35 +0530 > > Kuntal Ghosh wrote: > > > >> On Wed, Jun 21, 2017 at 6:05 PM, Yugo Nagata wrote: > >> > > >&

Re: [HACKERS] Optional message to user when terminating/cancelling backend

2017-06-21 Thread Yugo Nagata
. Or, maybe we should prohibit too long message is passed in pg_teminate_backend() > -- > Michael > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers -- Yu

Re: [HACKERS] Incorrect documentation about pg_stat_activity

2017-06-21 Thread Yugo Nagata
On Wed, 21 Jun 2017 19:08:35 +0530 Kuntal Ghosh wrote: > On Wed, Jun 21, 2017 at 6:05 PM, Yugo Nagata wrote: > > > > Attached is a patch for the documentation fix. > > > Please attach the patch as well. :-) I'm sorry, I forgot it. I attahed this. > > >

Re: [HACKERS] Optional message to user when terminating/cancelling backend

2017-06-21 Thread Yugo Nagata
l buffer is kept per backend for the > message. If deemed too costly, keeping a central buffer from which slabs are > allocated can be done (but seemed rather complicated for little gain compared > to the quite moderate memory spend.) > > cheers ./daniel > -- Yugo Nagata -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] Incorrect documentation about pg_stat_activity

2017-06-21 Thread Yugo Nagata
hot-standby.html#hot-standby-admin -- Yugo Nagata -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] Autovacuum launcher occurs error when cancelled by SIGINT

2017-06-21 Thread Yugo Nagata
atch. Regards, [1] https://www.postgresql.org/message-id/20170621205657.61d90605.nagata%40sraoss.co.jp -- Yugo Nagata diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index 89dd3b3..8a41a98 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/bac

[HACKERS] pg_terminate_backend can terminate background workers and autovacuum launchers

2017-06-21 Thread Yugo Nagata
er receive SIGTERM, this exits with exitstatus 0, so this is not restarted by the postmaster. [2] On the other hand, when we use pg_cancel_backend for autovacuum launcher, it causes the following error. I'll report the detail in another thread. ERROR: can't attach the same segment m

[HACKERS] improve release-note for pg_current_logfile()

2017-06-13 Thread Yugo Nagata
Attached is a patch to fix it. Regards, -- Yugo Nagata release_note_pg_current_logfile.pach Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] type of release note of PG10

2017-06-13 Thread Yugo Nagata
Hi, I found a typo in the PG10 release note and attached is a patch to fix it. Regards, -- Yugo Nagata diff --git a/doc/src/sgml/release-10.sgml b/doc/src/sgml/release-10.sgml index b10086bd..f3e4a70 100644 --- a/doc/src/sgml/release-10.sgml +++ b/doc/src/sgml/release-10.sgml @@ -525,7 +525,7

[HACKERS] documentation typo in ALTER TABLE example

2017-06-11 Thread Yugo Nagata
Hi, Attached is a simple patch to fix a documentation typo in the ALTER TABLE example. Regards, -- Yugo Nagata diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml index 56ea830..4c61c44 100644 --- a/doc/src/sgml/ref/alter_table.sgml +++ b/doc/src/sgml/ref

[HACKERS] CREATE TRIGGER document typo

2017-04-17 Thread Yugo Nagata
Hi, Attached is a patch fixing simple typos in the CREATE TRIGGER document. -- Yugo Nagata diff --git a/doc/src/sgml/ref/create_trigger.sgml b/doc/src/sgml/ref/create_trigger.sgml index 24195b3..c5f7c75 100644 --- a/doc/src/sgml/ref/create_trigger.sgml +++ b/doc/src/sgml/ref

Re: [HACKERS] [POC] hash partitioning

2017-04-17 Thread Yugo Nagata
On Fri, 14 Apr 2017 09:05:14 -0400 Robert Haas wrote: > On Fri, Apr 14, 2017 at 4:23 AM, Yugo Nagata wrote: > > On Thu, 13 Apr 2017 16:40:29 -0400 > > Robert Haas wrote: > >> On Fri, Mar 17, 2017 at 7:57 AM, Yugo Nagata wrote: > >> > I also understanded

Re: [HACKERS] [POC] hash partitioning

2017-04-14 Thread Yugo Nagata
On Thu, 13 Apr 2017 16:40:29 -0400 Robert Haas wrote: > On Fri, Mar 17, 2017 at 7:57 AM, Yugo Nagata wrote: > > I also understanded that my design has a problem during pg_dump and > > pg_upgrade, and that some information to identify the partition > > is required not depend

Re: [HACKERS] [POC] hash partitioning

2017-03-17 Thread Yugo Nagata
at creating partitioned table. If the hash function is omitted, we will be able to use default hash operator class as well as in Amul's patch. Attached is the updated patch taking the comments from Aleksander and Rushabh. HASH keyword and unnecessary spaces are removed, and some comments

Re: [HACKERS] Report the number of skipped frozen pages by manual VACUUM

2017-03-15 Thread Yugo Nagata
u frozen pages.\n", vacrelstats->frozenskipped_pages), vacrelstats->frozenskipped_pages); > > > BTW, I think there's already a function that handles the pluralization for > > you. IIRC it's one of the

Re: [HACKERS] Report the number of skipped frozen pages by manual VACUUM

2017-03-05 Thread Yugo Nagata
s Date: Fri Mar 3 19:18:25 2017 +0530 Allow vacuums to report oldestxmin Regards, Yugo Nagata On Tue, 28 Feb 2017 16:40:28 +0900 Masahiko Sawada wrote: > On Fri, Feb 24, 2017 at 1:30 AM, Masahiko Sawada > wrote: > > Hi all, > > > > The autovacuum reports the nu

Re: [HACKERS] [POC] hash partitioning

2017-03-03 Thread Yugo Nagata
On Thu, 2 Mar 2017 18:33:42 +0530 amul sul wrote: Thank you for the patch. This is very interesting. I'm going to look into your code and write a feedback later. > On Wed, Mar 1, 2017 at 3:50 PM, Yugo Nagata wrote: > > > ​[]​ > > > > I Agree that it is una

Re: [HACKERS] [POC] hash partitioning

2017-03-02 Thread Yugo Nagata
l > the changes to be accepted in current commitfest. Naturally if community > will come to a consensus regarding keywords, whether all partitions > should be created automatically, etc :) > > [1] http://afiskon.ru/s/dd/20cbe21934_regression.diffs.txt > [2] http://afiskon.ru/s/76/a4fb717

Re: [HACKERS] [POC] hash partitioning

2017-03-01 Thread Yugo Nagata
On Wed, 1 Mar 2017 10:52:58 +0530 amul sul wrote: > On Tue, Feb 28, 2017 at 8:03 PM, Yugo Nagata wrote: > > Hi all, > > > > Now we have a declarative partitioning, but hash partitioning is not > > implemented yet. Attached is a POC patch to add the hash partitioning

Re: [HACKERS] [POC] hash partitioning

2017-03-01 Thread Yugo Nagata
On Wed, 1 Mar 2017 10:30:09 +0530 Rushabh Lathia wrote: > On Tue, Feb 28, 2017 at 8:03 PM, Yugo Nagata wrote: > > > Hi all, > > > > Now we have a declarative partitioning, but hash partitioning is not > > implemented yet. Attached is a POC patch to add the hash pa

Re: [HACKERS] [POC] hash partitioning

2017-03-01 Thread Yugo Nagata
Hi Ammit, On Wed, 1 Mar 2017 11:14:15 +0900 Amit Langote wrote: > Nagata-san, > > On 2017/02/28 23:33, Yugo Nagata wrote: > > Hi all, > > > > Now we have a declarative partitioning, but hash partitioning is not > > implemented yet. Attached is a POC p

Re: [HACKERS] [POC] hash partitioning

2017-03-01 Thread Yugo Nagata
hank you for registering it to the commitfest. I have added me as an auther. > > [1] https://commitfest.postgresql.org/13/1059/ > > On Tue, Feb 28, 2017 at 11:33:13PM +0900, Yugo Nagata wrote: > > Hi all, > > > > Now we have a declarative partitioning, but hash partiti

[HACKERS] [POC] hash partitioning

2017-02-28 Thread Yugo Nagata
(cost=0.00..61.00 rows=13 width=4) Filter: ((abs(hashint4(i)) % 3) = 2) (5 rows) Best regards, Yugo Nagata -- Yugo Nagata diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 41c0056..3820920 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/

Re: [HACKERS] Declarative partitioning - another take

2017-02-23 Thread Yugo Nagata
s updated. Thanks, -- Yugo Nagata diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 6332ea0..af3367a 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -326,6 +326,7 @@ typedef struct JunkFilter * onConflictSetWhere list of ON

Re: [HACKERS] Declarative partitioning - another take

2017-02-22 Thread Yugo Nagata
Hi, I found that a comment for PartitionRoot in ResultRelInfo is missing. Although this is trivial, since all other members have comments, I think it is needed. Attached is the patch to fix it. Regards, Yugo Nagata On Tue, 27 Dec 2016 17:59:05 +0900 Amit Langote wrote: > On 2016/12/26 19

Re: [HACKERS] Documentation improvements for partitioning

2017-02-21 Thread Yugo Nagata
rs mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers -- Yugo Nagata diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml index 5779eac..ef0f7cf 100644 --- a/doc/src/sgml/ddl.sgml +++ b/doc/src/sgml/dd

Re: [HACKERS] Backport of pg_statistics typos fix

2017-02-08 Thread Yugo Nagata
On Wed, 8 Feb 2017 14:54:17 -0500 Robert Haas wrote: > On Tue, Feb 7, 2017 at 4:22 AM, Yugo Nagata wrote: > > I found typos "pg_statistics" in REL9_6_STABLE, but that has been > > fixed in the master branch. > > > > Fix typo: pg_statistics -> pg_statist

Re: [HACKERS] Postgres_fdw behaves oddly

2017-02-07 Thread Yugo Nagata
BEGIN; > BEGIN > postgres=# INSERT INTO ft1_lt VALUES *(3)*; -- Violates constraint > INSERT 0 1 > postgres=# INSERT INTO ft2_lt VALUES *(3)*; -- Violates constraint > INSERT 0 1 > postgres=# COMMIT; > . > . > . > > postgres=# select datid,datname,pid,wait_event_ty

[HACKERS] Backport of pg_statistics typos fix

2017-02-07 Thread Yugo Nagata
c0fecb6d08 I think it would be better to backport this to other branches. Regards, -- Yugo Nagata -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] Fix a comment in feelist.c

2017-01-20 Thread Yugo Nagata
+0100 Lockless StrategyGetBuffer clock sweep hot path. Attached a patch. -- Yugo Nagata diff --git a/src/backend/storage/buffer/freelist.c b/src/backend/storage/buffer/freelist.c index b68ab20..5d0a636 100644 --- a/src/backend/storage/buffer/freelist.c +++ b/src/backend/storage/buffer/freel

[HACKERS] per-statement-level INSTEAD OF triggers

2016-08-08 Thread Yugo Nagata
r other reasons for the current implementation? Best regards, -- Yugo Nagata -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

[HACKERS] T_PrivGrantee is left in NodeTag

2015-09-15 Thread Yugo Nagata
Hi, I found that codes about T_PrivGrantee was removed by the following commit; http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=31eae6028eca4365e7165f5f33fee1ed0486aee0 but T_PrivGrantee is left in NodeTag in src/include/nodes/nodes.h. Is it intended? -- Yugo Nagata

Re: Fwd: [HACKERS] Proposal: variant of regclass

2014-04-08 Thread Yugo Nagata
also updated the documents and some comments. Is this better than the previous one? > > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company -- Yugo Nagata to_regclass.patch.v7 Description: Binary data -- Sent via pgsql-hackers

Re: Fwd: [HACKERS] Proposal: variant of regclass

2014-01-23 Thread Yugo Nagata
On Thu, 23 Jan 2014 13:19:37 +0200 Marti Raudsepp wrote: > Resending to Tatsuo Ishii and Yugo Nagata, your email server was > having problems yesterday: Thanks for resending! > > This is the mail system at host sraigw2.sra.co.jp. > > : mail for srasce.sra.co.jp loops back

Re: [HACKERS] Proposal: variant of regclass

2014-01-22 Thread Yugo Nagata
On Wed, 22 Jan 2014 20:04:12 +0900 (JST) Tatsuo Ishii wrote: > > On Tue, Jan 14, 2014 at 9:28 AM, Yugo Nagata wrote: > >> Here is the patch to implement to_regclass, to_regproc, to_regoper, > >> and to_regtype. > > > > + static Datum regclass_guts(char

Re: [HACKERS] 64-bit API for large object

2012-09-21 Thread Yugo Nagata
he situation to split the case of pre-9.2 and post-9.3 > using a condition of "conn->sversion >= 90300". > Agreed. I'll fix it like that. > > 4) src/test/examples/testlo64.c added for 64-bit API example(Yugo Nagata) > > > > Comments and suggestion