Re: [GENERAL] pgpool-II: cannot use serializable mode in a hot standby

2016-04-12 Thread Alexander Pyhalov
Tatsuo Ishii писал 13.04.2016 02:36: On 04/12/2016 16:50, Adrian Klaver wrote: On 04/12/2016 01:06 AM, Alexander Pyhalov wrote: I understand. I mean perhaps pgpool shouldn't forward these statements to slaves. Yeah, PostgreSQL used to accept the command on standbys (at least in 9.0). The rest

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread Adrian Klaver
On 04/12/2016 10:14 AM, Alex Ignatov wrote: On 12.04.2016 19:45, David G. Johnston wrote: On Tue, Apr 12, 2016 at 8:37 AM, Alex Ignatov <a.igna...@postgrespro.ru>wrote: On 12.04.2016 18:01, Adrian Klaver wrote: >>I do it by having the date be one of

Re: [GENERAL] Table seems empty but its size is in gigabytes

2016-04-12 Thread Adrian Klaver
On 04/12/2016 09:11 AM, Juan Carlos Michaca Lucero wrote: Hi PostgreSQL, I'm using PostgreSQL 9.3 running on Ubuntu Server. I have a complex function to populate a big table, in order to improve performance; data is prepared in temporary tables before it will be inserted. I called this function m

Re: [GENERAL] pgpool-II: cannot use serializable mode in a hot standby

2016-04-12 Thread Tatsuo Ishii
> On 04/12/2016 16:50, Adrian Klaver wrote: >> On 04/12/2016 01:06 AM, Alexander Pyhalov wrote: >>> Hi. >>> >>> We have application which explicitly does >>> set default_transaction_isolation to 'serializable' . >>> It is connected to PostgreSQL master/slave cluster through pgpool-II >>> (pgpool2 3

Re: [GENERAL] pg_upgrade error regarding hstore operator

2016-04-12 Thread Tom Lane
"Feld, Michael (IMS)" writes: > Thanks for the reply Tom. template1 is definitely empty and does not contain > any hstore objects. I did a little debugging and placed the below SQL before > and after the hstore creation in the file produced by the pg_dump and > determined that these operator ob

Re: [GENERAL] Table seems empty but its size is in gigabytes

2016-04-12 Thread Juan Carlos Michaca Lucero
I want to recover the dead data El Martes, 12 de abril, 2016 11:38:22, David G. Johnston escribió: Send all replies to the list please.  In this specific case I'm not going to be of much help but others should be.  You are likely going to need to supply additional context. On Tue, Apr

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread Tom Lane
I wrote: > 3. While I can see the point of wanting to, say, test weekend behavior > on a weekday, I do not see how a value of now() that doesn't advance > between transactions would represent a realistic test environment for > an app with time-dependent behavior. BTW, one possible way of meeting t

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread Tom Lane
Alex Ignatov writes: > You always should keep in mind that your application may run in test > mode (future/past time) and maintain this code. While with my proposal > you can always use some time function(now or localtimestamp or > whatever) which you can freeze at anytime on DB level, not o

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread David G. Johnston
On Tue, Apr 12, 2016 at 10:14 AM, Alex Ignatov wrote: > > > On 12.04.2016 19:45, David G. Johnston wrote: > > On Tue, Apr 12, 2016 at 8:37 AM, Alex Ignatov < > a.igna...@postgrespro.ru> wrote: > >> >> On 12.04.2016 18:01, Adrian Klaver wrote: >> >>> >>> >>I do it by having the date be one of the

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread Alex Ignatov
On 12.04.2016 19:45, David G. Johnston wrote: On Tue, Apr 12, 2016 at 8:37 AM, Alex Ignatov mailto:a.igna...@postgrespro.ru>>wrote: On 12.04.2016 18:01, Adrian Klaver wrote: >>I do it by having the date be one of the function arguments and have the default be something like cur

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread David G. Johnston
On Tue, Apr 12, 2016 at 8:37 AM, Alex Ignatov wrote: > > On 12.04.2016 18:01, Adrian Klaver wrote: > >> >> >>I do it by having the date be one of the function arguments and have > the default be something like current_date. When I test I supply a date to > override the default. This allows for te

Re: [GENERAL] Table seems empty but its size is in gigabytes

2016-04-12 Thread David G. Johnston
On Tue, Apr 12, 2016 at 9:30 AM, John R Pierce wrote: > On 4/12/2016 9:16 AM, David G. Johnston wrote: > > Now my big table statistics shows tuples inserted and its size is in order >> of gigabytes, but a simple SELECT has no rows, is there any way to recover >> the data in this table? >> > > ​Do

Re: [GENERAL] Table seems empty but its size is in gigabytes

2016-04-12 Thread John R Pierce
On 4/12/2016 9:16 AM, David G. Johnston wrote: Now my big table statistics shows tuples inserted and its size is in order of gigabytes, but a simple SELECT has no rows, is there any way to recover the data in this table? ​Do you want to recover the dead data or the space ​that it c

Re: [GENERAL] Table seems empty but its size is in gigabytes

2016-04-12 Thread David G. Johnston
On Tue, Apr 12, 2016 at 9:11 AM, Juan Carlos Michaca Lucero < jc_mich2c...@yahoo.com.mx> wrote: > Hi PostgreSQL, > > I'm using PostgreSQL 9.3 running on Ubuntu Server. > > I have a complex function to populate a big table, in order to improve > performance; data is prepared in temporary tables bef

[GENERAL] Table seems empty but its size is in gigabytes

2016-04-12 Thread Juan Carlos Michaca Lucero
Hi PostgreSQL,  I'musing PostgreSQL 9.3 running on Ubuntu Server.   Ihave a complex function to populate a big table, in order to improve performance;data is prepared in temporary tables before it will be inserted. I called thisfunction many times from my application, but something goes wrong

RES: [GENERAL] Fastest way to duplicate a quite large database

2016-04-12 Thread Edson Richter
De: Adrian Klaver Enviado:terça-feira, 12 de abril de 2016 12:04 Para: Edson Richter; pgsql-general@postgresql.org Assunto: Re: [GENERAL] Fastest way to duplicate a quite large database On 04/12/2016 07:51 AM, Edson Richter wrote: > Same machine, same cluster - just different database name. Hmm,

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread Alex Ignatov
On 12.04.2016 18:01, Adrian Klaver wrote: On 04/12/2016 07:36 AM, Alex Ignatov wrote: On 12.04.2016 16:57, George Neuner wrote: On Tue, 12 Apr 2016 13:50:11 +0300, Alex Ignatov wrote: Is there any method to freeze localtimestamp and other time function value. Say after freezing on some val

Re: [GENERAL] Fastest way to duplicate a quite large database

2016-04-12 Thread Louis Battuello
> On Apr 12, 2016, at 11:14 AM, John R Pierce wrote: > > On 4/12/2016 7:55 AM, John McKown wrote: >> Hum, I don't know exactly how to do it, but on Linux, you could put the >> "Customer" database in a tablespace which resides on a BTRFS filesystem. >> BTRFS can do a quick "snapshot" of the fil

Re: [GENERAL] Fastest way to duplicate a quite large database

2016-04-12 Thread John McKown
On Tue, Apr 12, 2016 at 10:14 AM, John R Pierce wrote: > On 4/12/2016 7:55 AM, John McKown wrote: > >> Hum, I don't know exactly how to do it, but on Linux, you could put the >> "Customer" database in a tablespace which resides on a BTRFS filesystem. >> BTRFS can do a quick "snapshot" of the file

Re: [GENERAL] Fastest way to duplicate a quite large database

2016-04-12 Thread John R Pierce
On 4/12/2016 7:55 AM, John McKown wrote: Hum, I don't know exactly how to do it, but on Linux, you could put the "Customer" database in a tablespace which resides on a BTRFS filesystem. BTRFS can do a quick "snapshot" of the filesystem except, tablespaces aren't standalone, and there's no

Re: [GENERAL] Fastest way to duplicate a quite large database

2016-04-12 Thread Adrian Klaver
On 04/12/2016 07:51 AM, Edson Richter wrote: Same machine, same cluster - just different database name. Hmm, running tests against the same cluster you are running the production database would seem to be a performance hit against the production database and potentially dangerous should the t

Re: [GENERAL] Fastest way to duplicate a quite large database

2016-04-12 Thread Louis Battuello
> On Apr 12, 2016, at 10:51 AM, Edson Richter wrote: > > Same machine, same cluster - just different database name. > > Atenciosamente, > > Edson Carlos Ericksson Richter > > Em 12/04/2016 11:46, John R Pierce escreveu: >> On 4/12/2016 7:25 AM, Edson Richter wrote: >>> >>> I have a database

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread Adrian Klaver
On 04/12/2016 07:36 AM, Alex Ignatov wrote: On 12.04.2016 16:57, George Neuner wrote: On Tue, 12 Apr 2016 13:50:11 +0300, Alex Ignatov wrote: Is there any method to freeze localtimestamp and other time function value. Say after freezing on some value sequential calls to these functions give y

Re: [GENERAL] Fastest way to duplicate a quite large database

2016-04-12 Thread John McKown
On Tue, Apr 12, 2016 at 9:25 AM, Edson Richter wrote: > Hi! > > I have a database "Customer" with about 60Gb of data. > I know I can backup and restore, but this seems too slow. > > Is there any other option to duplicate this database as "CustomerTest" as > fast as possible (even fastar than back

Re: [GENERAL] Fastest way to duplicate a quite large database

2016-04-12 Thread Edson Richter
Same machine, same cluster - just different database name. Atenciosamente, Edson Carlos Ericksson Richter Em 12/04/2016 11:46, John R Pierce escreveu: On 4/12/2016 7:25 AM, Edson Richter wrote: I have a database "Customer" with about 60Gb of data. I know I can backup and restore, but this se

Re: [GENERAL] Fastest way to duplicate a quite large database

2016-04-12 Thread John R Pierce
On 4/12/2016 7:25 AM, Edson Richter wrote: I have a database "Customer" with about 60Gb of data. I know I can backup and restore, but this seems too slow. Is there any other option to duplicate this database as "CustomerTest" as fast as possible (even fastar than backup/restore) - better if in

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread Alex Ignatov
On 12.04.2016 16:57, George Neuner wrote: On Tue, 12 Apr 2016 13:50:11 +0300, Alex Ignatov wrote: Is there any method to freeze localtimestamp and other time function value. Say after freezing on some value sequential calls to these functions give you the same value over and over again. This

[GENERAL] Fastest way to duplicate a quite large database

2016-04-12 Thread Edson Richter
Hi! I have a database "Customer" with about 60Gb of data. I know I can backup and restore, but this seems too slow. Is there any other option to duplicate this database as "CustomerTest" as fast as possible (even fastar than backup/restore) - better if in one operation (something like "copy da

Re: [GENERAL] pgpool-II: cannot use serializable mode in a hot standby

2016-04-12 Thread Adrian Klaver
On 04/12/2016 07:02 AM, Alexander Pyhalov wrote: On 04/12/2016 16:50, Adrian Klaver wrote: On 04/12/2016 01:06 AM, Alexander Pyhalov wrote: Hi. We have application which explicitly does set default_transaction_isolation to 'serializable' . It is connected to PostgreSQL master/slave cluster thr

Re: [GENERAL] pgpool-II: cannot use serializable mode in a hot standby

2016-04-12 Thread Alexander Pyhalov
On 04/12/2016 16:50, Adrian Klaver wrote: On 04/12/2016 01:06 AM, Alexander Pyhalov wrote: Hi. We have application which explicitly does set default_transaction_isolation to 'serializable' . It is connected to PostgreSQL master/slave cluster through pgpool-II (pgpool2 3.4.3-1.pgdg70+1). Our log

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread George Neuner
On Tue, 12 Apr 2016 13:50:11 +0300, Alex Ignatov wrote: >Is there any method to freeze localtimestamp and other time function value. >Say after freezing on some value sequential calls to these functions >give you the same value over and over again. >This is useful primarily for testing. > >In o

Re: [GENERAL] pgpool-II: cannot use serializable mode in a hot standby

2016-04-12 Thread Adrian Klaver
On 04/12/2016 01:06 AM, Alexander Pyhalov wrote: Hi. We have application which explicitly does set default_transaction_isolation to 'serializable' . It is connected to PostgreSQL master/slave cluster through pgpool-II (pgpool2 3.4.3-1.pgdg70+1). Our logs are filling with ERROR: 0A000: cannot

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread Alex Ignatov
On 12.04.2016 15:13, Rakesh Kumar wrote: I think PG does fixed time within a tran. check the output of the following sql begin; select now() ; select pg_sleep(10); select now() ; commit; select now() ; select pg_sleep(10); select now() ; ~ On Tue, Apr 12, 2016 at 6:50 AM, Alex Ignatov wrote:

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread Rakesh Kumar
I think PG does fixed time within a tran. check the output of the following sql begin; select now() ; select pg_sleep(10); select now() ; commit; select now() ; select pg_sleep(10); select now() ; ~ On Tue, Apr 12, 2016 at 6:50 AM, Alex Ignatov wrote: > Hello! > Is there any method to freeze loc

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread Petr Korobeinikov
Sorry. I have re-read my previous message. It looks unclean. For sequential calls in same transaction `now()` and `current_timestamp` will produce the same output. ``` begin; -- start a transaction select now() immutable_now, current_timestamp immutable_current_ts, clock_timestamp() mutabl

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread Pavel Stehule
Hi 2016-04-12 12:50 GMT+02:00 Alex Ignatov : > Hello! > Is there any method to freeze localtimestamp and other time function value. > Say after freezing on some value sequential calls to these functions give > you the same value over and over again. > This is useful primarily for testing. > > In

Re: [GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread Petr Korobeinikov
2016-04-12 13:50 GMT+03:00 Alex Ignatov : > Hello! > Is there any method to freeze localtimestamp and other time function value. > Say after freezing on some value sequential calls to these functions give > you the same value over and over again. > This is useful primarily for testing. > Hello!

[GENERAL] Freezing localtimestamp and other time function on some value

2016-04-12 Thread Alex Ignatov
Hello! Is there any method to freeze localtimestamp and other time function value. Say after freezing on some value sequential calls to these functions give you the same value over and over again. This is useful primarily for testing. In oracle there is alter system set fixed_date command. Hav

[GENERAL] pgpool-II: cannot use serializable mode in a hot standby

2016-04-12 Thread Alexander Pyhalov
Hi. We have application which explicitly does set default_transaction_isolation to 'serializable' . It is connected to PostgreSQL master/slave cluster through pgpool-II (pgpool2 3.4.3-1.pgdg70+1). Our logs are filling with ERROR: 0A000: cannot use serializable mode in a hot standby DETAIL: "