Re: [GENERAL] Re: Restoring tables with circular references dumped to separate files

2017-10-22 Thread Francisco Olarte
On Sat, Oct 21, 2017 at 10:48 PM, doganmeh wrote: ... > On another note, I used to take full backups (entire database), however > switched to table by table scheme in order to make it more VCS friendly. > Namely, so I only check into github the dumps of the tables that are updated > only. > So, fr

Re: [GENERAL] Re: Restoring tables with circular references dumped to separate files

2017-10-21 Thread Melvin Davidson
On Sat, Oct 21, 2017 at 4:48 PM, doganmeh wrote: > The list approach for partial restore is also useful, thank you. > > On another note, I used to take full backups (entire database), however > switched to table by table scheme in order to make it more VCS friendly. > Namely, so I only check into

Re: [GENERAL] Re: Restoring tables with circular references dumped to separate files

2017-10-21 Thread Melvin Davidson
On Sat, Oct 21, 2017 at 8:24 AM, doganmeh wrote: > Seems that would be easier and less error prone. Thanks, > > > > -- > Sent from: http://www.postgresql-archive.org/PostgreSQL-general- > f1843780.html > > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes

Re: [GENERAL] Re: Feature proposal, DBURL: psql pgsql://joe:p4zzw...@example.org:2345/dbname

2017-07-05 Thread Hans Schou
2017-07-05 16:29 GMT+02:00 Thomas Kellerer : > Hans Schou schrieb am 05.07.2017 um 14:27: > > The dburl (or dburi) has become common to use by many systems > > connecting to a database. The feature is that one can pass all > > parameters in a string, which has similar pattern as http-URI do. > > >

Re: [GENERAL] Re: have trouble understanding xmin and xmax with update operations from two different sessions

2017-07-04 Thread Jeff Janes
On Mon, Jul 3, 2017 at 10:39 AM, rajan wrote: > Thanks, Jeff. > > Now I am going back to my old question. > > Even though *Session 2* fails to update with UPDATE 0 message, its txid is > saved in xmax of updated(by *Session 1*) tuple. > > As it becomes an old txid, how come new txids are able to

Re: [GENERAL] Re: have trouble understanding xmin and xmax with update operations from two different sessions

2017-07-03 Thread Jeff Janes
On Mon, Jul 3, 2017 at 3:02 AM, rajan wrote: > Thanks for the explanation. > > will I be able to view the information using this function, > SELECT * FROM heap_page_items(get_raw_page('testnumbers', 0)); > > Also, please let me know which column I should refer for viewing the > pointer. > It is

Re: [GENERAL] Re: have trouble understanding xmin and xmax with update operations from two different sessions

2017-07-02 Thread Jeff Janes
On Sat, Jul 1, 2017 at 8:55 PM, rajan wrote: > Thanks, Jeff. That helps understanding it 50%. > > *Session 2* fails to UPDATE the record which is in *(0,2)* and this tuple > is > marked for deletion. It means that *(0,2) never exists* when Session 2 is > trying to perform the update. > That it n

Re: [GENERAL] Re: have trouble understanding xmin and xmax with update operations from two different sessions

2017-07-01 Thread Jeff Janes
On Sat, Jul 1, 2017 at 6:32 PM, rajan wrote: > hello, > > thanks for replies, Adrian, Steven. > > >So calling it can advance the xid manually. Some testing here showed > >that what xmin or xmax is created depends on when you call txid_current > >in either the original session or the concurrent se

Re: [GENERAL] Re: Unable to understand index only scan as it is not happening for one table while it happens for other

2017-06-27 Thread Gary Evans
Hi Rajan, I would say that the optimiser has calculated that it would be quicker to sequentially read thought the table to get the 354 rows returned without the limit. By introducing the limit, it is much faster to pick out the first 10 rows using the index. Using an index is usually only quicke

Re: [GENERAL] Re: Unable to understand index only scan as it is not happening for one table while it happens for other

2017-06-27 Thread Albe Laurenz
rajan wrote: > why the index-only scan *works only* with an *order by*? > localdb=# explain analyse verbose select uid from mm where uid>100 *order > by* uid; > QUERY > PLAN > ---

Re: [GENERAL] Re: Is there possibility btree_redo with XLOG_BTREE_DELETE done between standby_redo and the end of backup

2017-05-25 Thread Tom Lane
y39chen writes: > We found the panic happened when adding one of our patch. > switch (port->canAcceptConnections) > { > case CAC_STARTUP: > ereport(*LOG*, > (errcode(ERRCODE_CANNOT_CONNECT_NOW), >

Re: [GENERAL] Re: Is there possibility btree_redo with XLOG_BTREE_DELETE done between standby_redo and the end of backup

2017-05-25 Thread Michael Paquier
On Thu, May 25, 2017 at 5:23 AM, y39chen wrote: > My doubt is Standby is redoing the records in WAL from master. how accept > connection in standby side while recovering would trigger > btree_xlog_delete_get_latestRemovedXid() and panic happen. You should look at the relationship between the code

Re: [GENERAL] Re: Debian Bug#859033: pg_dump: creates dumps that cannot be restored

2017-03-31 Thread Adrian Klaver
On 03/31/2017 07:34 AM, Thorsten Glaser wrote: Hi *, while I’d still appreciate help on the bugreport (context is this… https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=859033 … one), I’ve found this… http://dba.stackexchange.com/a/75635/65843 … which says ① that using a CHECK constraint to che

Re: [GENERAL] Re: Causeless CPU load waves in backend, on windows, 9.5.5 (EDB binary).

2017-03-01 Thread Nikolai Zhubr
27.02.2017 10:08, I wrote: [...] So, what I've observed is that Wait* functions _usually_ go to sleep nicely when the state is not signalled, but _sometimes_, depending on unknown criteria, it can choose to instead do a busy-loop wait or something CPU-expensive. Maybe it tries to optimize the del

Re: [GENERAL] Re: GMT FATAL: remaining connection slots are reserved for non-replication superuser connections, but I'm using pgBouncer for connection pooling

2017-02-28 Thread Scott Marlowe
On Tue, Feb 28, 2017 at 10:00 AM, Lisandro wrote: > Hi Steve, thanks for your help. > Your comment made me realise that maybe the problem is my pgBouncer > configuration, specifically default_pool_size. It took me a while to > understand pgbouncer, and I still had some doubts when I configured it.

Re: [GENERAL] Re: GMT FATAL: remaining connection slots are reserved for non-replication superuser connections, but I'm using pgBouncer for connection pooling

2017-02-28 Thread Adrian Klaver
On 02/28/2017 06:01 AM, Lisandro wrote: Thank you Adrian. Yes, I confirm that all the databases are running in one PostgreSQL server/instance. I'm running this version: PostgreSQL 9.3.15 on i686-pc-linux-gnu, compiled by gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4, 32-bit Let me ask: is there a w

Re: [GENERAL] Re: GMT FATAL: remaining connection slots are reserved for non-replication superuser connections, but I'm using pgBouncer for connection pooling

2017-02-28 Thread Tom Lane
Lisandro writes: > Let me ask: is there a way to monitor the total connections to postgresql > through time? Or should I make my own script for that? I ask because every > time the error is thrown, I check the total connections with "select > count(*) from pg_stat_activity;" but the number is alwa

Re: [GENERAL] Re: Causeless CPU load waves in backend, on windows, 9.5.5 (EDB binary).

2017-02-26 Thread Nikolai Zhubr
15.02.2017 0:06, I wrote: [...] Indeed, such function is available. But essentially, this function is a (kind of) combined login+logout, therefore it would not work for my purpose. (Despite its name, it can not be used to perform some communication "ping" within an established session, such thing

Re: [GENERAL] Re: GMT FATAL: remaining connection slots are reserved for non-replication superuser connections, but I'm using pgBouncer for connection pooling

2017-02-25 Thread Adrian Klaver
On 02/25/2017 07:29 AM, lisandro wrote: Thanks for the quick answer. superuser_reserved_connections is set to 3 Actually, it's not set (the line is commented) but the default for superuser_reserved_connections is 3: https://www.postgresql.org/docs/9.2/static/runtime-config-connection.html#GUC-S

Re: [GENERAL] Re: Causeless CPU load waves in backend, on windows, 9.5.5 (EDB binary).

2017-02-14 Thread Nikolai Zhubr
14.02.2017 18:15, Rader, David: [...] Try the libpq call from pg_isready. It does actually make a round trip to the postgres server and asks the server if it is ready to accept connections. So you are running the socket communication code of postgres and a small bit of "status" check but not any

Re: [GENERAL] Re: Causeless CPU load waves in backend, on windows, 9.5.5 (EDB binary).

2017-02-14 Thread Rader, David
-- David Rader dav...@openscg.com On Tue, Feb 14, 2017 at 5:28 AM, Nikolai Zhubr wrote: > 14.02.2017 12:47, John R Pierce: > >> On 2/13/2017 11:03 PM, Nikolai Zhubr wrote: >> >>> Now I'd like to locate a CPU eater more precisely - supposedly there >>> is some issue with communication, that is wh

Re: [GENERAL] Re: Causeless CPU load waves in backend, on windows, 9.5.5 (EDB binary).

2017-02-14 Thread Nikolai Zhubr
14.02.2017 12:47, John R Pierce: On 2/13/2017 11:03 PM, Nikolai Zhubr wrote: Now I'd like to locate a CPU eater more precisely - supposedly there is some issue with communication, that is why I don't want to mix in anything else. use iperf to test the network transport layer, without any postg

Re: [GENERAL] Re: Causeless CPU load waves in backend, on windows, 9.5.5 (EDB binary).

2017-02-14 Thread John R Pierce
On 2/13/2017 11:03 PM, Nikolai Zhubr wrote: Now I'd like to locate a CPU eater more precisely - supposedly there is some issue with communication, that is why I don't want to mix in anything else. use iperf to test the network transport layer, without any postgres in the loop? -- john r pi

Re: [GENERAL] Re: Causeless CPU load waves in backend, on windows, 9.5.5 (EDB binary).

2017-02-13 Thread Nikolai Zhubr
14.02.2017 1:10, Thomas Kellerer: Nikolai Zhubr schrieb am 13.02.2017 um 23:03: Maybe I should have been more specific. What I need is debugging/profiling pure communication side of server operation, implying huge lots of requests and replies going over the wire to and from the server within som

Re: [GENERAL] Re: Causeless CPU load waves in backend, on windows, 9.5.5 (EDB binary).

2017-02-13 Thread Scott Mead
On Mon, Feb 13, 2017 at 5:10 PM, Thomas Kellerer wrote: > Nikolai Zhubr schrieb am 13.02.2017 um 23:03: > >> Maybe I should have been more specific. >> What I need is debugging/profiling pure communication side of server >> operation, implying huge lots of requests and replies going over the >> w

Re: [GENERAL] Re: Using different GCC, CFLAGS, CCFLAGS and CPPFLAGS to compile Postgres and PostGIS?

2017-02-01 Thread Tom Lane
postgres user writes: > Also can you explain if I built Postgres from source on one platform lets > say RHEL_6 and deployed its artifacts like its binaries, libs and share on > a CentOS In general I would not expect that to work. RHEL to CentOS is a special case because they're really the same p

Re: [GENERAL] Re: Is it possible to specify an ESCAPE for a wildcard search using LIKE ANY (...)

2017-01-17 Thread Vik Fearing
On Tue, Jan 17, 2017 at 1:45 PM, Thomas Kellerer wrote: > Tom Lane schrieb am 17.01.2017 um 13:41: > > Thomas Kellerer writes: > >> So my question is: Is there any way to specify an alternate wildcard > escape when using LIKE ANY (..)? > > > > No, not with ESCAPE. [ manfully resists temptation

Re: [GENERAL] Re: Is it possible to specify an ESCAPE for a wildcard search using LIKE ANY (...)

2017-01-17 Thread Karsten Hilbert
On Tue, Jan 17, 2017 at 03:27:57PM +0100, Thomas Kellerer wrote: >> Do you need to have the _ NOT be recognized as a wildcard ? > > Yes, the underscore should NOT be a wildcard in this case. Understood. So, as Tom hinted at, your best bet might be to write a function escape_underscore_

Re: [GENERAL] Re: Are new connection/security features in order, given connection pooling?

2017-01-16 Thread Kevin Grittner
On Fri, Jan 13, 2017 at 7:39 PM, Karl Czajkowski wrote: > The concern was raised about the risk of the subsequent queries being > able to reverse the "set role" to subvert such authorization. Others > in the thread provided the common advice of parametric queries to > prevent query injection, but

Re: [GENERAL] Re: Building PL/Perl procedural language without --with-perl configure flag

2017-01-15 Thread Scott Mead
On Sun, Jan 15, 2017 at 6:35 AM, postgres user wrote: > The already installed Postgres edition was built using the same > installation procedure as mentioned in the docs, but without the use of > --with-perl flag. the point I ask the question is because I want to install > PL/Perl as a separate e

Re: [GENERAL] Re: could not load library "$libdir/sslutils": in pg_upgrade process

2017-01-04 Thread Adrian Klaver
On 01/04/2017 09:27 AM, DrakoRod wrote: Teorycally, I removed the sslutils from old cluster when review the $libdir appear this: What where the exact steps you took to remove sslutils? /[postgres@server ~]$ /opt/PostgreSQL/9.3/bin/pg_config --pkglibdir /opt/PostgreSQL/9.3/lib/postgresql [po

Re: [GENERAL] Re: could not load library "$libdir/sslutils": in pg_upgrade process

2017-01-04 Thread Adrian Klaver
On 01/03/2017 09:01 PM, DrakoRod wrote: Yes I installed Postgres Enterprise Manager Agent time ago in this server to test agent, but now I don't use it. Amm if you refer the EDB install with binaries PostgreSQL one-click yes, but is not a EDB Advanced Server , is a normal Cluster installed by ED

Re: [GENERAL] Re: could not load library "$libdir/sslutils": in pg_upgrade process

2017-01-03 Thread Tom Lane
DrakoRod writes: > Yes I installed Postgres Enterprise Manager Agent time ago in this server to > test agent, but now I don't use it. Removing the sslutils extension from the old cluster might be an easy solution, then. It sounds like someone messed up the upgrade path for sslutils, but that's

Re: [GENERAL] Re: Re: [GENERAL] PostgreSQL mirroring from RPM install to Source install

2016-12-19 Thread John R Pierce
On 12/15/2016 2:16 PM, Richard Brosnahan wrote: gdb is not available on this machine. Neither which or locate could find it. The servers we're given are truly, shockingly, stripped down models. what OS is this, what compiler toolchain did you use to build postgres on them? -- john r pie

Re: [GENERAL] Re: [GENERAL] PostgreSQL mirroring from RPM install to Source install

2016-12-15 Thread Tom Lane
Richard Brosnahan =?utf-8?B?UmU6IFtHRU5FUkFMXSBQb3N0Z3JlU1FMIG1pcnJvcmluZyBmcm9tIFJQTSBp?= =?utf-8?B?bnN0YWxsIHRvIFNvdXJjZSBpbnN0YWxs?= writes: > The slave: > $ pg_controldata --version > pg_controldata (PostgreSQL) 9.4.1 > $ echo $PGDATA > /apps/database/postgresql-data > $ pg_controldata $PGDA

Re: [GENERAL] Re: [ADMIN] Would like to below scenario is possible for getting page/block corruption

2016-12-11 Thread Michael Paquier
On Sun, Dec 11, 2016 at 12:00 PM, Sreekanth Palluru wrote: > I am looking at possibility of PG introducing corruption if relation extends > and before it updates new page with pageheader in memory and crash happens? > > Is this possible? No. > Does PG updates pageheader when relation get extend

Re: [GENERAL] Re: [GENERAL] FTS query, statistics and planner estimations…

2016-11-09 Thread Pierre Ducroquet
On Wednesday, November 9, 2016 10:51:11 AM CET Pavel Stehule wrote: > 2016-11-09 10:40 GMT+01:00 Francisco Olarte : > > Pierre: > > > > On Wed, Nov 9, 2016 at 10:22 AM, Pierre Ducroquet > > > > wrote: > > > The query does a few joins «after» running a FTS query on a main table. > > > The FTS que

[GENERAL] Re: [GENERAL] Re: [GENERAL] FTS query, statistics and planner estimations…

2016-11-09 Thread Pavel Stehule
2016-11-09 10:40 GMT+01:00 Francisco Olarte : > Pierre: > > On Wed, Nov 9, 2016 at 10:22 AM, Pierre Ducroquet > wrote: > > The query does a few joins «after» running a FTS query on a main table. > > The FTS query returns a few thousand rows, but the estimations are wrong, > > leading the optimize

Re: [GENERAL] Re: performance problems with bulk inserts/updates on tsrange with gist-based exclude constrains

2016-09-21 Thread Jeff Janes
On Wed, Sep 21, 2016 at 2:18 PM, pinker wrote: > Jeff Janes wrote > > Try swapping the order of the columns in the exclude constraint. You > want > > the more selective criterion to appear first in the index/constraint. > > Presumably "key with =" is the most selective, especially if many of you

Re: [GENERAL] Re: Clustered index to preserve data locality in a multitenant application?

2016-08-30 Thread Mike Sofen
From: Thomas Kellerer Sent: Tuesday, August 30, 2016 4:39 AM Nicolas Grilly schrieb am 30.08.2016 um 13:12: > We rely on clustered indexes to preserve data locality for each > tenant. Primary keys start with the tenant ID. This way, rows > belonging to the same tenant are stored next to each o

Re: [GENERAL] Re: Easiest way to compare the results of two queries row by row and column by column

2016-08-18 Thread Vik Fearing
On 17/08/16 10:58, gilad905 wrote: > Vik, note that your new suggestion for a query might be more > readable/efficient than Jeff's, but IT STILL DOESN'T SOLVE THE PROBLEM OF > DETECTING DUPLICATE ROWS. Yes, it does. And please don't shout at me. -- Vik Fearing

Re: [GENERAL] Re: Easiest way to compare the results of two queries row by row and column by column

2016-08-17 Thread Branden Visser
On Wed, Aug 17, 2016 at 4:58 AM, gilad905 wrote: > Vik, note that your new suggestion for a query might be more > readable/efficient than Jeff's, but IT STILL DOESN'T SOLVE THE PROBLEM OF > DETECTING DUPLICATE ROWS. > I've done this in the past and in my use-case it was easy enough to export the

Re: [GENERAL] Re: Query planner using hash join when merge join seems orders of magnitude faster

2016-08-02 Thread Branden Visser
Thanks for your reply Tom. On Mon, Aug 1, 2016 at 6:56 PM, Tom Lane wrote: > Branden Visser writes: >> I just wanted to update that I've found evidence that fixing the >> planner row estimation may not actually influence it to use the more >> performant merge join instead of hash join. I have fo

Re: [GENERAL] Re: Query planner using hash join when merge join seems orders of magnitude faster

2016-08-01 Thread Tom Lane
Branden Visser writes: > I just wanted to update that I've found evidence that fixing the > planner row estimation may not actually influence it to use the more > performant merge join instead of hash join. I have found instances > where the row estimation is *overestimated* by a magnitude of 4x >

Re: [GENERAL] RE: [GENERAL] Re: [GENERAL] A simple extension immitating pg_notify‏

2016-07-26 Thread Adrian Klaver
On 07/25/2016 05:52 PM, Mehran Ziadloo wrote: Sorry if my terminology is not accurate. But by an instance, I mean a PostgreSQL installation. And I call it an instance (and not a database) not to confuse it with the concept of databases (as in databases / schemas). Even when I'm trying to clarify

[GENERAL] Re: [GENERAL] RE: [GENERAL] Re: [GENERAL] A simple extension immitating pg_notify‏

2016-07-26 Thread Alban Hertroys
> On 26 Jul 2016, at 2:52, Mehran Ziadloo wrote: > > Sorry if my terminology is not accurate. But by an instance, I mean a > PostgreSQL > installation. And I call it an instance (and not a database) not to confuse it > with the concept of databases (as in databases / schemas). Even when I'm >

[GENERAL] RE: [GENERAL] Re: [GENERAL] A simple extension immitating pg_notify‏

2016-07-25 Thread Mehran Ziadloo
Sorry if my terminology is not accurate. But by an instance, I mean a PostgreSQLinstallation. And I call it an instance (and not a database) not to confuse itwith the concept of databases (as in databases / schemas). Even when I'm tryingto clarify the terminology, it's hard due to lack of distin

Re: [GENERAL] Re: [GENERAL] A simple extension immitating pg_notify‏

2016-07-25 Thread Adrian Klaver
On 07/25/2016 08:34 AM, Mehran Ziadloo wrote: I understand that: 1) you like to use postgres as a "bus" to transfer messages between connected clients; 2) only one database server is concerned (no redundancy at all); 3) it is the client code (perl, php ...) that send the notification (ie, notif

Re: [GENERAL] Re: ERROR: missing chunk number 0 for toast value while using logical decoder.\

2016-07-18 Thread Michael Paquier
On Mon, Jul 18, 2016 at 7:08 PM, sudalai wrote: > thank u. > why (select * from pg_logical_slot_peek_changes('slot',NULL,1) ) take share > lock ? > any idea ? My guess is that this lock comes from your plugin code. Please double-check it. -- Michael -- Sent via pgsql-general mailing list (p

Re: [GENERAL] Re: ERROR: missing chunk number 0 for toast value while using logical decoder.\

2016-07-18 Thread Michael Paquier
On Mon, Jul 18, 2016 at 4:31 PM, sudalai wrote: > Please help me, I am using PostgreSQL 9.5.0. > I don't know much in postgres internals. why does peek_changes trying > to take share lock on 248486 (primary key of one table). > Its postgres logical decoder takes share lock or outpu

Re: [GENERAL] Re: pg_basebackup vs archive_command - looking for WAL archive older than archive_command start

2016-07-17 Thread Adrian Klaver
On 07/17/2016 04:03 PM, Francisco Reyes wrote: On 07/17/2016 06:35 PM, Francisco Reyes wrote: Why is the pg_basebackup restore looking for a WAL file that is even older than the ones I have, when I turned on WAL archiving before I started the pg_basebackup? Figured it out.. the error is from

Re: [GENERAL] Re: ERROR: missing chunk number 0 for toast value while using logical decoder.\

2016-06-23 Thread Michael Paquier
On Thu, Jun 23, 2016 at 4:55 PM, sudalai wrote: > Thanks for : https://github.com/michaelpq/pg_plugins/tree/master/decoder_raw > I will upgrade my servers to PostgreSQL 9.5.3, but i want to find the > problem. > Please help me. > I don't have SQL sequence. > Does anything i can get from server, th

Re: [GENERAL] Re: regarding schema only migration from sqlserver to postgres with runmtk.sh

2016-06-17 Thread Durgamahesh Manne
On Fri, Jun 17, 2016 at 2:16 PM, Durgamahesh Manne < maheshpostgr...@gmail.com> wrote: > hi sir > > as you mentioned above > > members in pgsql mailing list were not frustrating about my tone & mail > which i sent related to postgres > > as i believe they are always happy to serve for postgres >

Re: [GENERAL] Re: regarding schema only migration from sqlserver to postgres with runmtk.sh

2016-06-17 Thread Durgamahesh Manne
hi sir as you mentioned above members in pgsql mailing list were not frustrating about my tone & mail which i sent related to postgres as i believe they are always happy to serve for postgres as well as i like very much postgres On Thu, Jun 16, 2016 at 9:33 PM, Sameer Kumar wrote: > Discla

Re: [GENERAL] Re: regarding schema only migration from sqlserver to postgres with runmtk.sh

2016-06-17 Thread Durgamahesh Manne
hi sir as per above conversation i need to download jdbc driver as sameer suggested on migration with runmtk.sh from sql to postgres thank you sir super fast response only from postgres pgdg regarding postgres issues On Fri, Jun 17, 2016 at 1:18 AM, Adrian Klaver wrote: > On 06/16/2016 11:

Re: [GENERAL] Re: regarding schema only migration from sqlserver to postgres with runmtk.sh

2016-06-16 Thread Adrian Klaver
On 06/16/2016 11:28 AM, Durgamahesh Manne wrote: i can able to resolve the issue on migration from sql to postgres with runmtk.sh without taking any support from edb even i frustated with runmtk.sh as i wanted to use postgresql life long in my company For completeness and to help anyone else

Re: [GENERAL] Re: regarding schema only migration from sqlserver to postgres with runmtk.sh

2016-06-16 Thread Durgamahesh Manne
i can able to resolve the issue on migration from sql to postgres with runmtk.sh without taking any support from edb even i frustated with runmtk.sh as i wanted to use postgresql life long in my company thank you for information On Thu, Jun 16, 2016 at 11:43 PM, Durgamahesh Manne < maheshpos

Re: [GENERAL] Re: regarding schema only migration from sqlserver to postgres with runmtk.sh

2016-06-16 Thread Durgamahesh Manne
thank you for the information related to postgres -- 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] Re: regarding schema only migration from sqlserver to postgres with runmtk.sh

2016-06-16 Thread Sameer Kumar
Disclaimer: My company is a partner of EnterpriseDB and provides services and consultation on EnterpriseDB tools On Thu, 16 Jun 2016, 11:52 p.m. Neil Anderson, wrote: > On 2016-06-16 11:42 AM, Durgamahesh Manne wrote: > > i got another error even i specified -targetdbtype > > like > > ./runMTK.s

Re: [GENERAL] Re: regarding schema only migration from sqlserver to postgres with runmtk.sh

2016-06-16 Thread Durgamahesh Manne
i got another error even i specified -targetdbtype like ./runMTK.sh -sourcedbtype sqlserver -targetdbtype postgresql -targetSchema public -schemaOnly -allTables dbo Running EnterpriseDB Migration Toolkit (Build 49.0.4) ... Source database connectivity info... conn =jdbc:jtds:sqlserver://fxserver.tr

Re: [GENERAL] Re-sync slave server

2016-06-08 Thread Adrian Klaver
On 06/08/2016 01:47 PM, Patrick B wrote: 2016-06-08 11:03 GMT+12:00 Adrian Klaver mailto:adrian.kla...@aklaver.com>>: On 06/07/2016 03:22 PM, Patrick B wrote: One more question guys... Does the pg_basebackup re-write the data? or do I have to have free space?

Re: [GENERAL] Re-sync slave server

2016-06-08 Thread Patrick B
2016-06-08 11:03 GMT+12:00 Adrian Klaver : > On 06/07/2016 03:22 PM, Patrick B wrote: > >> One more question guys... >> >> Does the pg_basebackup re-write the data? or do I have to have free space? >> >> Like.. the DB is 2 TB.. do I have to have more 2TB? or it will use those >> 2TB that already a

Re: [GENERAL] Re-sync slave server

2016-06-07 Thread Adrian Klaver
On 06/07/2016 03:22 PM, Patrick B wrote: One more question guys... Does the pg_basebackup re-write the data? or do I have to have free space? Like.. the DB is 2 TB.. do I have to have more 2TB? or it will use those 2TB that already are there? I would suggest taking a tour of: https://www.pos

Re: [GENERAL] Re-sync slave server

2016-06-07 Thread Patrick B
One more question guys... Does the pg_basebackup re-write the data? or do I have to have free space? Like.. the DB is 2 TB.. do I have to have more 2TB? or it will use those 2TB that already are there? cheers

Re: [GENERAL] Re-sync slave server

2016-06-07 Thread Patrick B
Anyway.. will do the pg_basebackup and see how it goes... cheers guys Patrick 2016-06-08 8:41 GMT+12:00 Patrick B : > yep.. pg_basebackup the problem is that the servers are in a > different country.. and the DB is 2TB > > the pg_basebackup will probably fail and I'll have to do a DUMP as I'

Re: [GENERAL] Re-sync slave server

2016-06-07 Thread Patrick B
yep.. pg_basebackup the problem is that the servers are in a different country.. and the DB is 2TB the pg_basebackup will probably fail and I'll have to do a DUMP as I've already done with another slave time ago

Re: [GENERAL] Re-sync slave server

2016-06-07 Thread bricklen
On Mon, Jun 6, 2016 at 5:32 PM, Patrick B wrote: > My set up: > > > Master --> slave01 (streaming replication) --> slave02 (streaming > replication) > Master --> slave03 (wal_files 4 days old, not streaming replication) > > The wal_files are stored into each server. > But when the slave03 was dow

Re: [GENERAL] Re-sync slave server

2016-06-07 Thread Adrian Klaver
On 06/06/2016 05:32 PM, Patrick B wrote: My set up: Master --> slave01 (streaming replication) --> slave02 (streaming replication) Master --> slave03 (wal_files 4 days old, not streaming replication) The wal_files are stored into each server. But when the slave03 was down, the wal_files weren'

Re: [GENERAL] Re-sync slave server

2016-06-06 Thread Patrick B
My set up: Master --> slave01 (streaming replication) --> slave02 (streaming replication) Master --> slave03 (wal_files 4 days old, not streaming replication) The wal_files are stored into each server. But when the slave03 was down, the wal_files weren't being copied into it. We took too long to

Re: [GENERAL] Re-sync slave server

2016-06-06 Thread Adrian Klaver
On 06/06/2016 05:11 PM, Patrick B wrote: Hi guys, I'm using PostgreSQL 9.2 There is a backup server that is 4 days old replication by wal_files (not streaming) However, the server went down and I lost some wal_files.. and now the replication is not working... What is your set up?:

Re: [GENERAL] Re: what's the exact command definition in read committed isolation level?

2016-04-19 Thread Jinhua Luo
2016-04-18 23:16 GMT+08:00 Tom Lane : > > No, that's not true: a trigger is a function and what it can see is > determined by the rules of the PL it's written in. Typically a > function that's marked STABLE or IMMUTABLE will see the same snapshot > as the calling query, but a function that's VOLAT

Re: [GENERAL] Re: what's the exact command definition in read committed isolation level?

2016-04-19 Thread Jinhua Luo
> > First session: > postgres=# create table t(id integer); > CREATE TABLE > postgres=# insert into t values (1); > INSERT 0 1 > postgres=# begin; > BEGIN > postgres=# select count(*) from t; > count > --- > 1 > (1 row) > > 1 row in the table. In another session, insert another row in t:

Re: [GENERAL] Re: what's the exact command definition in read committed isolation level?

2016-04-18 Thread Guillaume Lelarge
2016-04-19 5:41 GMT+02:00 Jinhua Luo : > > Does that mean a VOLATILE function runs in a different transaction? > > No, all statements triggered by the outer statement is within the same > transaction. If the trigger fails (without trapping the error), all > affects including changes by outer state

Re: [GENERAL] Re: what's the exact command definition in read committed isolation level?

2016-04-18 Thread Jinhua Luo
> Does that mean a VOLATILE function runs in a different transaction? No, all statements triggered by the outer statement is within the same transaction. If the trigger fails (without trapping the error), all affects including changes by outer statement would be rollback. > And does that mean it

Re: [GENERAL] Re: what's the exact command definition in read committed isolation level?

2016-04-18 Thread Tom Lane
Thomas Kellerer writes: > Jinhua Luo schrieb am 18.04.2016 um 16:47: >> For trigger, e.g. written in pl/pgsql, each sql command within the >> function may see more new data beyond the (entry) snapshot of outer >> command. > No it will not see "more data") > It runs in the same _transaction_ as t

Re: [GENERAL] Re: Why is the comparison between timestamp and date so much slower then between two dates

2016-04-14 Thread Tom Lane
Thomas Kellerer writes: > So the optimizer _should_ be smart enough to do the conversion only > once at the beginning of the statement and then use that converted > value during the execution of the statement without the need > to re-evaluate it for each row. It's not; especially not in your o

Re: [GENERAL] Re: Why is the comparison between timestamp and date so much slower then between two dates

2016-04-14 Thread Mike Sofen
|-Original Message- |From: Thomas Kellerer Sent: Wednesday, April 13, 2016 11:37 PM | |Alban Hertroys schrieb am 13.04.2016 um 16:39: |>>> So my question is: why is comparing a timestamp to a date so much slower? |> |> The reason that the other way around is so much more expensive is that

Re: [GENERAL] Re: Postgres 9.4.4/9.4.6: plpython2/3 intallation issues on a Windows 7 machine

2016-03-31 Thread Adrian Klaver
On 03/31/2016 02:53 AM, margrit drescher wrote: I originally used the 9.4.6 version on http://www.enterprisedb.com/products-services-training/pgdownload#windows for 64-bit windows and loaded the language pack recommended in the readme file. Did you do this?: If you are using Windows 64, you mu

Re: [GENERAL] Re: Postgres 9.4.4/9.4.6: plpython2/3 intallation issues on a Windows 7 machine

2016-03-31 Thread Alex Ignatov
May be this would be the cause of you issue: http://www.postgresql.org/docs/9.2/static/plpython-python23.html It is not allowed to use PL/Python based on Python 2 and PL/Python based on Python 3 in the same session, because the symbols in the dynamic modules would clash, which could result in c

Re: [GENERAL] Re: how to switch old replication Master to new Standby after promoting old Standby

2016-03-15 Thread Adrian Klaver
ter and commission it from the start as described next Cheers, John Lumby ---------------- Date: Mon, 14 Mar 2016 23:46:28 +0100 Subject: Re: [GENERAL] Re: how to switch old replication Master to new Standby after promoting old Standby From: michael.paqu...@gmail.c

Re: [GENERAL] Re: how to switch old replication Master to new Standby after promoting old Standby

2016-03-14 Thread Michael Paquier
On Mon, Mar 14, 2016 at 11:08 PM, John Lumby wrote: > And indeed in its debug I found > received chunk for file "postgresql.conf", offset 0, size 16482 > received chunk for file "postgresql.conf.20160314114055", offset 0, size 16464 > > And I now see in its description in the Doc that it intends t

Re: [GENERAL] Re: "missing chunk number XX for toast value YY in pg_toast ..." after pg_basebackup.

2016-03-10 Thread fredrik
Hi Adrian, thank you again for your continued patience. On 10 March 2016 00:20:13 +01:00, Adrian Klaver wrote: > On 03/09/2016 10:41 AM, wrote: > > > Hi Adrian, > > > > thank you very much for your patience. I apologise for the missing > > information. > > > > On 9 March 2016 16:13:00 +01:

Re: [GENERAL] Re: "missing chunk number XX for toast value YY in pg_toast ..." after pg_basebackup.

2016-03-09 Thread Adrian Klaver
On 03/09/2016 10:41 AM, fred...@huitfeldt.com wrote: Hi Adrian, thank you very much for your patience. I apologise for the missing information. On 9 March 2016 16:13:00 +01:00, Adrian Klaver wrote: On 03/09/2016 04:56 AM, fred...@huitfeldt.com wrote: Hi Adr

Re: [GENERAL] Re: "missing chunk number XX for toast value YY in pg_toast ..." after pg_basebackup.

2016-03-09 Thread fredrik
Hi Adrian, thank you very much for your patience. I apologise for the missing information. On 9 March 2016 16:13:00 +01:00, Adrian Klaver wrote: > On 03/09/2016 04:56 AM, wrote: > > > Hi Adrian, > > > > thank you very much for your response. > > > > I ran the "VACUUM ANALYZE" command on th

Re: [GENERAL] Re: "missing chunk number XX for toast value YY in pg_toast ..." after pg_basebackup.

2016-03-09 Thread Adrian Klaver
On 03/09/2016 04:56 AM, fred...@huitfeldt.com wrote: Hi Adrian, thank you very much for your response. I ran the "VACUUM ANALYZE" command on the master node. Regarding log messages. Here is the contents of the log (excluding connections/disconnections): Assuming the below is from the replic

Re: [GENERAL] Re: "missing chunk number XX for toast value YY in pg_toast ..." after pg_basebackup.

2016-03-09 Thread fredrik
Hi Adrian, thank you very much for your response. I ran the "VACUUM ANALYZE" command on the master node. Regarding log messages. Here is the contents of the log (excluding connections/disconnections): 2016-02-22 02:30:08 GMT 24616 LOG: recovery has paused 2016-02-22 02:30:08 GMT 24616 HINT: Ex

Re: [GENERAL] Re: "missing chunk number XX for toast value YY in pg_toast ..." after pg_basebackup.

2016-03-07 Thread Adrian Klaver
On 03/06/2016 10:18 PM, fred...@huitfeldt.com wrote: HI All, i would really appreciate any help I can get on this issue. basically, a pg_basebackup + streaming attach, led to a database that we could not read from afterwards. From original post: http://www.postgresql.org/message-id/14569196

Re: [GENERAL] Re: could not migrate 8.0.13 database with large object data to 9.5.1

2016-03-04 Thread Rader, David
Wow -- you have an old db version there! When doing a little research, I found that back in 2005 you actually had the same basic issue - that the way you were using the "lo" contrib module in 7.x and 8.0 was not supported in 8.1 anymore: http://www.postgresql.org/message-id/439ffa3f.c5f7.004...@nsa

Re: [GENERAL] Re: could not migrate 8.0.13 database with large object data to 9.5.1

2016-03-03 Thread John R Pierce
On 3/3/2016 3:53 AM, Premsun Choltanwanich wrote: I have no source code for this contrib/lo and dll/function seem already be stored with my 8.0.13 installation package. upon looking at the current docs again in the light of day, I see that there *IS* a contrib/lo module in all recent version

Re: [GENERAL] Re: could not migrate 8.0.13 database with large object data to 9.5.1

2016-03-02 Thread John R Pierce
On 3/2/2016 5:52 PM, Premsun Choltanwanich wrote: And, almost tables are transferred to new server except tables which contain lo data (all those tables are missing from the database) after running pg_dump and psql following as per your suggestion. The attachment is a log file created after

Re: [GENERAL] Re: Moving Postgresql 9.1 instance from FreeBSD 9.0 machine to FreeBSD 10.2

2015-12-20 Thread Jim Nasby
On 12/20/15 3:43 PM, Amitabh Kant wrote: Just did a transfer without a hitch on a 1 TB (approx) production database . Everything is working fine. Saved a ton of time and complications. Note that that would not work if there were any binary incompatibilities between the two systems. Something l

Re: [GENERAL] Re: [webmaster] How to commit/vacuum a batch of delete statements in a postgresql function

2015-11-27 Thread Adrian Klaver
On 11/26/2015 08:16 PM, Nava Jyothi wrote: /Hi PostGresSQL Team Could you advise us on how to commit records in a batch when one is doing batch wise deletion/. I came across http://www.postgresql.org/message-id/60644bymua@dba2.int.libertyrms.com, That post references untested pseudo code.

[GENERAL] Re: Re: [GENERAL] Re: Re: [GENERAL] 回复: postgres cpu 100% need help

2015-10-28 Thread 657985...@qq.com
from tshow.p_hpart_liveingroomlist_count($1)","parameters: $1 = '46' thanks 657985...@qq.com 发件人: 657985...@qq.com 发送时间: 2015-10-28 16:53 收件人: John R Pierce; pgsql-general 主题: Re: Re: [GENERAL] Re: Re: [GENERAL] 回复: postgres cpu 100% need help thanks , I can change the sql . Needed a lit

[GENERAL] Re: Re: [GENERAL] Re: Re: [GENERAL] 回复: postgres cpu 100% need help

2015-10-28 Thread 657985...@qq.com
from tshow.p_hpart_liveingroomlist_count($1)","parameters: $1 = '46' 657985...@qq.com 发件人: John R Pierce 发送时间: 2015-10-28 16:28 收件人: pgsql-general 主题: Re: [GENERAL] Re: Re: [GENERAL] 回复: postgres cpu 100% need help On 10/28/2015 12:12 AM, 657985...@qq.com wrote: Thank you for your reply.

Re: [GENERAL] Re: Re: [GENERAL] 回复: postgres cpu 100% need help

2015-10-28 Thread John R Pierce
On 10/28/2015 12:12 AM, 657985...@qq.com wrote: Thank you for your reply. tshow=> explain (analyze, buffers) select count(t.*) from tshow.res_room_weight t,tshow.res_room_info r tshow-> where t.subcatlg_id=46 tshow-> and t.roomid = r.actorid tshow-> and r.levels>=0; http://explain.de

[GENERAL] Re: [GENERAL] Re: [GENERAL] 回复: postgres cpu 100% need help

2015-10-27 Thread Merlin Moncure
On Tue, Oct 27, 2015 at 4:04 PM, Merlin Moncure wrote: > On Tue, Oct 27, 2015 at 2:33 PM, Jeff Janes wrote: >> On Mon, Oct 26, 2015 at 8:30 PM, 657985...@qq.com <657985...@qq.com> wrote: >>> >>> Dear sir: >>> Recently a wired question about postgresql database really >>> bothered me a lo

[GENERAL] Re: [GENERAL] Re: [GENERAL] 回复: postgres cpu 100% need help

2015-10-27 Thread Merlin Moncure
On Tue, Oct 27, 2015 at 2:33 PM, Jeff Janes wrote: > On Mon, Oct 26, 2015 at 8:30 PM, 657985...@qq.com <657985...@qq.com> wrote: >> >> Dear sir: >> Recently a wired question about postgresql database really >> bothered me a lot, so i really need your help. Here is the problem, in the >> m

Re: [GENERAL] Re: (expert) "insert into VIEW returning" inside an instead of trigger returns nothing

2015-09-02 Thread Willy-Bas Loos
On Wed, Sep 2, 2015 at 2:16 PM, Rémi Cura wrote: > I think I got it, > I have to always return something (like NEW) in the instead of trigger, > but fill NEW > with returnings of INSERT into regular table. > > Yes, the GID is detemined for the table. But in test.rc_editing_generic_object( ) you

Re: [GENERAL] Re: ERROR: collation "latin1_general_ci" for encoding "UTF8" does not exist

2015-08-28 Thread Adrian Klaver
On 08/27/2015 10:51 AM, ss wrote: Thanks for the reply Adrian. I have been given mysql schema and i have to create table using postgres..this is the information I have. Could u still help me ? If not then please let me know precisely that what should I ask the task giver in order to make you und

Re: [GENERAL] Re: Postgresql 9.3 hotstandby replication error, icorrect checksome in control file

2015-08-21 Thread Amit Bondwal
Michael, Thanks for your reply, I found the issue, the person who setup OS mix up some 64 and 32 bit package. I am starting it again. Thanks again. On Fri, Aug 21, 2015 at 5:12 PM, Michael Paquier wrote: > > > On Fri, Aug 21, 2015 at 7:56 PM, Amit Bondwal > wrote: > >> 2015-08-21 15:35:03 IST

  1   2   3   4   5   6   7   8   9   10   >