Re: [GENERAL] pg_stat_statements -- Historical Query

2017-08-10 Thread Julien Rouhaud
On Thu, Aug 10, 2017 at 3:00 PM, Melvin Davidson wrote: > > If you are interested in historical stats, you would probably fair a lot > better with PgBadger. It is free > and highly customizable. In addition to SQL call rates at different times, > it provides analysis of > most used queries, slo

Re: [GENERAL] pg_stat_statements -- Historical Query

2017-08-10 Thread Julien Rouhaud
On Thu, Aug 10, 2017 at 6:41 AM, Michael Paquier wrote: > On Thu, Aug 10, 2017 at 6:23 AM, anand086 wrote: >> I was looking for a way to maintain historical query details in Postgres to >> answer questions like >> >> What was the sql call rate between time X and Y? >> Did the execution count incr

Re: [GENERAL] Ora2Pg-Database migration report

2017-05-31 Thread Julien Rouhaud
ou want more details, you can either look at the code or open an issue on the repo (https://github.com/darold/ora2pg/). -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.po

Re: [GENERAL] Difficult while acquiring LWLocks

2017-05-03 Thread Julien Rouhaud
On 03/05/2017 15:01, hariprasath nallasamy wrote: > > AFAIK yes this is the correct way to use multiple lwlocks. > > > Thanks.! > > Just curious, Is there any other way to do this.? Probably no, except asking for 10 different tranches :) -- Julien Rouhaud htt

Re: [GENERAL] Difficult while acquiring LWLocks

2017-05-03 Thread Julien Rouhaud
t; *" LWLockPadded *lwLockPadded = GetNamedLWLockTranche("Some_10_LWLocks"); >LWLock *lock = &(lwLockPadded[index in 0 to 9]).lock; "* > > Is the above code snippet a valid for requesting some 10 LWLocks? > > AFAIK yes this is the correct way to use multiple lwl

Re: [GENERAL] too may LWLocks

2017-03-08 Thread Julien Rouhaud
afraid. You could also try on a postgres build having LWLOCK_STATS defined. -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] ShmemAlloc maximum size

2017-02-23 Thread Julien Rouhaud
ments.c how it's done (_PG_INIT() and pgss_shmem_startup()). Asking a small amount probably works because some shared memory is requested but not totally used as soon as the server starts. Regards. -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-general mailing list (pgsql-

Re: [GENERAL] ora2pg - Java Message Service (JMS) Type

2016-12-12 Thread Julien Rouhaud
On Mon, Dec 12, 2016 at 04:15:59PM +, Joanna Xu wrote: > On Fri, Dec 11, 2016 12:43 PM, Julien Rouhaud wrote: > >>I forwarded your mail to the author, since he's not on this mailing-list. > >>This issue should be fixed with commit > >>>&g

Re: [GENERAL] ora2pg - Java Message Service (JMS) Type

2016-12-11 Thread Julien Rouhaud
his bugfix is not enough or if you find other issues, could you report them directly on github (https://github.com/darold/ora2pg/issues)? Thanks! -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] How to config start/stop scripts in a different data dir for CentOS7/systemctl/PG9.6

2016-12-08 Thread Julien Rouhaud
resql.org/devrim/index.php?/archives/82-Running-more-than-one-9.4-9.3-instance-in-parallel-on-RHEL-7.html (This link is available in the "Yum Howto" section of yum.postgresql.org) Last time I tried it worked as intended. -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent

Re: [GENERAL] Migrating data from DB2 zOS to PostgreSQL

2016-12-05 Thread Julien Rouhaud
https://github.com/dalibo/db2topg The README should provide all needed informations. -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] No select privileges when not connecting from login postgres

2016-12-03 Thread Julien Rouhaud
in/psql --dbname=doom --username=doom > doom=# select 'world' as hello; > select 'world' as hello; > hello >--- > world >(1 row) > [...] > I'm running out of ideas for things to check. Any suggestions? > Any unusual

Re: [GENERAL] Why is this query not using GIN index?

2016-11-13 Thread Julien Rouhaud
>>> Limit (cost=0.00..277.35 rows=10 width=83) (actual >>> time=0.111..75.549 rows=10 loops=1) >>>-> Seq Scan on mytable (cost=0.00..381187.45 rows=1

Re: [GENERAL] forcing a table (parent in inheritance) tor emain empty

2016-10-11 Thread Julien Rouhaud
aints > * Primary Keys > * Foreign keys > * Rules and Triggers > you can specify a "NO INHERIT" on the check constraint, that should solve your issue. -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.o

Re: [GENERAL] Query generator

2016-10-02 Thread Julien Rouhaud
On 29/09/2016 23:23, Vinicius Segalin wrote: > 2016-09-29 16:32 GMT-03:00 Julien Rouhaud <mailto:julien.rouh...@dalibo.com>>: > You should try sqlsmith (https://github.com/anse1/sqlsmith > <https://github.com/anse1/sqlsmith>), which works > very well. &

Re: [GENERAL] Query generator

2016-09-29 Thread Julien Rouhaud
https://github.com/anse1/sqlsmith), which works very well. -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Why are no NEGATORS defined in the standard operators

2016-06-11 Thread Julien Rouhaud
rcode, o1.oprnegate, o2.oprname as negate from pg_operator o1 join pg_operator o2 on o1.oprnegate = o2.oid where o1.oprname = '=' and o1.oprleft = 'int8'::regtype and o1.oprright = 'int8'::regtype; oprname │ oprcode │ oprnegate │ negate ═╪═╪

Re: [GENERAL] plugin dev, oid to pointer map

2016-05-29 Thread Julien Rouhaud
or key-value storage solution in the pg code? > if so, please point me to the right part of the source. > Yes, there's an hashtable implementation, see dynahash.c If you want to use that in shared memory in your extension, you can look at the pg_stat_statements extension (look for pgss_ha

Re: [GENERAL] index question

2016-05-02 Thread Julien Rouhaud
indisunique) and exclusion constraint (indisexclusion) indexes should also be excluded, and also probably indexes used to cluster tables (indisclustered). You should also check since when the idsx_scan and other counters are aggregating before dropping any index. Check pg_stat_get_d

Re: [GENERAL] Confused by the behavior of pg_basebackup with replication slot

2016-03-19 Thread Julien Rouhaud
On 19/03/2016 15:58, Julien Rouhaud wrote: > Hello, > > On 19/03/2016 15:41, Yi, Yi wrote: >> Hello, >> >> I had an issue with the behavior of pg_basebackup command. I was convinced >> previously that pg_basebackup command always made the binary copy of the

Re: [GENERAL] Confused by the behavior of pg_basebackup with replication slot

2016-03-19 Thread Julien Rouhaud
n.html Regards. > Any help will be greatly appreciated. Thanks. > > Best Regards. > -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] bloated postgres data folder, clean up

2016-03-03 Thread Julien Rouhaud
ation, use or reliance upon this information by unintended > recipients is prohibited. Any opinions expressed in this email are > those of the author personally.____ > > > > This message and any attachments have been scanned for viruses prior > leaving PAY

Re: [GENERAL] RLS on catalog tables would be helpful

2016-03-02 Thread Julien Rouhaud
; archives), save it locally, and then open it in your email client, you > can then hit "reply-all". > > HTH, > > Joe > -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Creating table with data from a join

2015-07-14 Thread Julien Rouhaud
ttp://www.postgresql.org/docs/current/static/sql-createtable.html and the "UNLOGGED" part to check if an unlogged table is suitable for you. > > On Tue, Jul 14, 2015 at 6:37 PM Julien Rouhaud > mailto:julien.rouh...@dalibo.com>> wrote: > > On 14/07/2015 18:21, Igor Sta

Re: [GENERAL] Creating table with data from a join

2015-07-14 Thread Julien Rouhaud
;s hard to help you much more. If you don't care about losing data on this table if your server crashes, you can try option #3 with an unlogged table. > On Tue, Jul 14, 2015 at 6:19 PM Julien Rouhaud > mailto:julien.rouh...@dalibo.com>> wrote: > > On 14/07/201

Re: [GENERAL] Creating table with data from a join

2015-07-14 Thread Julien Rouhaud
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 14/07/2015 18:21, Igor Stassiy wrote: > Julien, I have the following setting for WAL level: #wal_level = > minimal (which defaults to minimal anyway) > > On Tue, Jul 14, 2015 at 6:19 PM Julien Rouhaud > mailto:julien.rouh...@dalib

Re: [GENERAL] Creating table with data from a join

2015-07-14 Thread Julien Rouhaud
al_level = minimal: "In minimal level, WAL-logging of some bulk operations can be safely skipped, which can make those operations much faster" see http://www.postgresql.org/docs/current/static/runtime-config-wal.html > So is option 2 a winner by design? Could you please su

Re: [GENERAL] Oracle to PostgreSQL Migration - Need Information

2015-07-09 Thread Julien Rouhaud
pg.darold.net/ > > We've done several client migrations with it, quite successfully > > > ora2pg is definitely the tool you need. It can give you a total migration estimated time (in man-day unit), with a call like ora2pg -c ora2pg.conf -t SHOW_REPORT --dump_as_html --estim

Re: [GENERAL] Why does the range type's upper function behave inconsistently?

2015-07-05 Thread Julien Rouhaud
zed > that upper doesn't consistently work the way I expected. Of course > my assumptions are probably wrong so that's why I'm asking for > clarification. > Because for discrete range types, the canonical form is used, which is [). Check http://www.postgresql.org/docs/current/

Re: [GENERAL] Is there any way to measure disk activity for each query?

2015-06-19 Thread Julien Rouhaud
r a query, you can use tools like pg_activity of pg_view to monitor it. And if you are using postgres 9.4 or more, you can also use pg_stat_statement and pg_stat_kcache extensions to get actual disk reads and writes for all normalized queries. Regards. > Cheers, > > Jeff -- Julie

Re: [GENERAL] POWA tool

2014-08-20 Thread Julien Rouhaud
n you of missing dependancy if any. You can also refer to the installation documentation ( https://github.com/dalibo/powa/blob/master/README.md). Regards. -- Julien Rouhaud http://www.dalibo.com

Re: [GENERAL] pg_database_size differs from df -s

2012-06-06 Thread Julien Rouhaud
On Wed, Jun 6, 2012 at 6:28 PM, Tom Lane wrote: > Frank Lanitz writes: > > Am 06.06.2012 17:49, schrieb Tom Lane: > >> For me, pg_database_size gives numbers that match up fairly well with > >> what "du" says. I would not expect an exact match, since du probably > >> knows about filesystem over

Re: [GENERAL] [ADMIN] pg_dump : no tables were found.

2012-03-06 Thread Julien Rouhaud
On Tue, Mar 6, 2012 at 7:22 AM, Piyush Lenka wrote: > Hi, > > I m trying to take backup of data of a particular table using pg_dump. > I used double quotes for table name but output is : > pg_dump : no tables were found. > > Command used : > -h localhost -p 5432 -U postgres -W -F p -a -t '"TestTa

Re: [GENERAL] Confused About pg_* Tables

2011-10-14 Thread Julien Rouhaud
On Fri, Oct 14, 2011 at 6:57 PM, Julien Rouhaud wrote: > On Fri, Oct 14, 2011 at 6:06 PM, Carlos Mennens > wrote: > >> I'm confused about how I'm able to access the following pg_* tables >> regardless of connected database. I thought these tables were hidde

Re: [GENERAL] Confused About pg_* Tables

2011-10-14 Thread Julien Rouhaud
On Fri, Oct 14, 2011 at 6:06 PM, Carlos Mennens wrote: > I'm confused about how I'm able to access the following pg_* tables > regardless of connected database. I thought these tables were hidden > or stored in the 'postgres' database but I'm still able to access this > data regardless of which da

Re: [GENERAL] Postgres Account Inherit Question

2011-10-14 Thread Julien Rouhaud
On Fri, Oct 14, 2011 at 6:38 PM, Carlos Mennens wrote: > I've configured my 'pg_hba.conf' file to look as follows: > > # "local" is for Unix domain socket connections only > local all all md5 > # IPv4 local connections: > hostall all 127.

Re: [GENERAL] Are file system level differential/incremental backups possible?

2011-10-12 Thread Julien Rouhaud
On Thu, Oct 13, 2011 at 12:04 AM, Bob Hatfield wrote: > > Anyway, a better way for you would be to do a regular backup (with > pg_start_backup, copy and pg_stop_backup) and then use wal archive_command > to keep the xlogs between 2 full backups. > > Thanks Julien. Can pg_start/stop_backup() be us

Re: [GENERAL] Are file system level differential/incremental backups possible?

2011-10-12 Thread Julien Rouhaud
As there's one file for each object, a single update on each would make you to copy the all the file again. I heard there was tool to make differentiel copy of a part of a file but I don't know if it's really efficient. Anyway, a better way for you would be to do a regular backup (with pg_start_ba

Re: [GENERAL] Using constraint exclusion with 2 floats

2011-10-12 Thread Julien Rouhaud
ething similar or if there's is an easier way On Wed, Oct 12, 2011 at 11:23 PM, Simon Riggs wrote: > On Wed, Oct 12, 2011 at 10:16 AM, Julien Rouhaud > wrote: > > Hi everyone, > > Is there an easy way (that I maybe missed) to use constraint exclusion > with > > 2

[GENERAL] Using constraint exclusion with 2 floats

2011-10-12 Thread Julien Rouhaud
Hi everyone, Is there an easy way (that I maybe missed) to use constraint exclusion with 2 floats ? Must I find an extension the temporal extension which create a new type with 2 timestamp or can I usethe && operator with 2 fields ? Thank you