Greetings
Have anyone got postgres with high availability setup to work with django ?
If yes can you please share any resources on how to do the right configuration?
Thanks
Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups
"Django users" group
Hey James,
Just to add to what was already said there's a ticket tracking the addition
of
database level foreign constraints.[0]
Cheers,
Simon
[0] https://code.djangoproject.com/ticket/21961
Le samedi 23 juin 2018 09:56:23 UTC-4, Tomasz Knapik a écrit :
>
> If you search about it on the Intern
Indeed! I have actually used the admin site to do it before I posted this
it's just something I didn't know was by design. After numerous searches I
came here but I may have been asking the wrong questions in google :).
The shell would be good if I have quite a few I need to delete. Thankfully
If you search about it on the Internet many sources claim that Django
does not set those constraints on the database level.
If you look at the code of the base code for database backends, you'll
notice that they don't mention on_delete at all. - https://github.com/d
jango/django/blob/6dd4edb1b4f54
well, nothing stopping you from doing the same in the django shell and
doing `Group.objects.get(pk = some_pk).delete`. that would be an
alternative for going straight to the db.
I can see some issues with this coming up, especially if you're doing
deletes with django's raw sql capability. But
OK. So it's by design.
So during development I can't go straight to the database and delete a
"Group" quickly due to an error I made. I'd have to set up tests to deal
with it at an application level.
No probs though. I'm just happy I know it can't be done and not that it's a
bug I'd have to wa
On zaterdag 23 juni 2018 14:40:30 CEST Jason wrote:
> Not quite. If you run python manage.py sqlmigrate
> , you can see the SQL generated for that migration.
>
> https://docs.djangoproject.com/en/2.0/ref/django-admin/#django-admin-sqlmigr
> ate
>
> Because Django emulates Cascade, its done outs
Not quite. If you run python manage.py sqlmigrate
, you can see the SQL generated for that migration.
https://docs.djangoproject.com/en/2.0/ref/django-admin/#django-admin-sqlmigrate
Because Django emulates Cascade, its done outside of the db, and therefore
shouldn't be a db-level constraint.
OK, understood. However, If you set up CASCADE on the model surely when it
creates the table on the database level it surely should set ON DELETE
CASCADE not ON DELETE NO ACTION on the CONSTRAINT?
On Saturday, 23 June 2018 10:54:44 UTC+1, Melvyn Sopacua wrote:
>
> On zaterdag 23 juni 2018 00:56:
On zaterdag 23 juni 2018 00:56:36 CEST James Bellaby wrote:
> However when looking are the SQL in Postgresql it's created the Membership
> table constraint for the Group id with "ON DELETE NO ACTION"
>
> CONSTRAINT groups_membership_group_id_d4404a8c_fk_groups_group_id FOREIGN
> KEY (group_id)
>
I'm having a little trouble with my "through" table. I've set the modal to
have two Foreign Key fields. Ex. below:
class Person(models.Model):
title = models.CharField(max_length=255)
class Group(models.Model):
title = models.CharField(max_length=255)
members= models.ManyToManyField
Hello, I do use nginx + uwsgi + postgres. Maybe you could try one of
following points below ?
Cheers.
1) there is a very good tutorial to install nginx, see below. This is the
one I used for step by step installation on production server :
http://uwsgi-docs.readthedocs.io/en/latest/tutorials/Dja
>
> nginx + uwsgi + postgres here
>
> On Thu, Jul 14, 2016 at 10:43 AM, Rafael E. Ferrero > wrote:
>
>> YES, I do !!
>>
>>
>> Rafael E. Ferrero
>>
>> 2016-07-14 11:16 GMT-03:00 >:
>>
>>>
>>> Any one tried of Django P
nginx + uwsgi + postgres here
On Thu, Jul 14, 2016 at 10:43 AM, Rafael E. Ferrero <
rafael.ferr...@gmail.com> wrote:
> YES, I do !!
>
>
> Rafael E. Ferrero
>
> 2016-07-14 11:16 GMT-03:00 :
>
>>
>> Any one tried of Django Postgres with Ngnix?
>>
>&
YES, I do !!
Rafael E. Ferrero
2016-07-14 11:16 GMT-03:00 :
>
> Any one tried of Django Postgres with Ngnix?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop re
Any one tried of Django Postgres with Ngnix?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to
Same problem with postgis database backend when running a development
server.
среда, 30 июля 2014 г., 17:41:58 UTC+3 пользователь Jani Kajala написал:
>
> Hi,
>
> I have a problem with leaking Postgres DB connections even if I
> have CONN_MAX_AGE=0. Every time I start the server and stop it by
ons through Jenkins. If I manually run the
> command inside of a VirtualBox session, it works as expected.
>
> Jon
>
> On Friday, August 1, 2014 at 6:41:53 AM UTC-7, Jani Kajala wrote:
>>
>> Haven't tried (yet), I'm new to Python & Django & Postgres, g
ven't tried (yet), I'm new to Python & Django & Postgres, got on board
> with Python 3.4.1 and Django 1.7c1. I'm starting to suspect this isn't
> really Django related directly, since I can consistently reproduce the
> problem following way: 1) Run e.g. test cas
Haven't tried (yet), I'm new to Python & Django & Postgres, got on board
with Python 3.4.1 and Django 1.7c1. I'm starting to suspect this isn't
really Django related directly, since I can consistently reproduce the
problem following way: 1) Run e.g. test case,
Does it work fine on django 1.6? It could be a regression.
On Wednesday, July 30, 2014 10:41:58 AM UTC-4, Jani Kajala wrote:
>
> Hi,
>
> I have a problem with leaking Postgres DB connections even if I
> have CONN_MAX_AGE=0. Every time I start the server and stop it by
> Ctrl+Break a DB connectio
Hi,
I have a problem with leaking Postgres DB connections even if I
have CONN_MAX_AGE=0. Every time I start the server and stop it by
Ctrl+Break a DB connection is leaked.
When I check from Postgres there is bunch of "idle" connections with
following content:
SELECT "django_migrations"."app",
or database
> > function call?
>
> > I need to create SQL like this one ... select * from
> > function_name(params_count, ARRAY[(param, param, param), (param,
> > param, param), (param, param, param)...
>
> > Also
> > here:http://stackoverflow.com/questions/
param), (param, param, param)...
>
> Also here:
> http://stackoverflow.com/questions/5064637/django-postgres-explicit-sql-parameters-escape
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group,
e any difference if you escape standard SQL request or database
function call?
I need to create SQL like this one ... select * from
function_name(params_count, ARRAY[(param, param, param), (param,
param, param), (param, param, param)...
Also here:
http://stackoverflow.com/questions/5064637/django-pos
ok, thanks a lot.
savepoints saved my day :p
It just worked out of the box while the other methods didn't seem to work.
Back on a more serious topic, could someone confirm or not that the transaction
rollback
(http://docs.djangoproject.com/en/1.2/topics/db/transactions/#transaction-rollback)
d
thanks,
I'll give it a try tomorrow and let you know.
Xavier.
Le 1 févr. 2011 à 19:57, Casey S. Greene a écrit :
> Also (sorry for the follow-up spam but I just remembered this) if you are
> hoping to use the database level autocommit (postgres 8.2 or later), you need
> to configure it:
>
>
Also (sorry for the follow-up spam but I just remembered this) if you
are hoping to use the database level autocommit (postgres 8.2 or later),
you need to configure it:
Autocommit mode
New in Django 1.1: Please, see the release notes
If your application is particularly read-heavy and doesn’t m
Here is some code pulled from my (using postgres) django application
that recovers fine. Perhaps this is helpful to you. I am storing the
non-unique values and dealing with them later (pulling from an external
source that is supposed to have unique IDs assigned but they don't
always pan out s
Le 1 févr. 2011 à 15:59, bruno desthuilliers wrote :
> On 1 fév, 15:24, Xavier Ordoquy wrote:
>> Hi all,
>>
>> I got a project which sometime outputs database integrity errors (key
>> violates unique constraint).
>> It is fine since I'm keeping an events table which may have several creation
>
On 1 fév, 15:24, Xavier Ordoquy wrote:
> Hi all,
>
> I got a project which sometime outputs database integrity errors (key
> violates unique constraint).
> It is fine since I'm keeping an events table which may have several creation
> messages for the same object.
Hmmm... Either I misunderstood
Hi all,
I got a project which sometime outputs database integrity errors (key violates
unique constraint).
It is fine since I'm keeping an events table which may have several creation
messages for the same object.
Until now, I was just catching the exception and forgot about it.
Today, I'm not
> So I have installed postgres, pyscopg2.
>
> su postgres
> created a database
> updated my settings.py:
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
> 'NAME': 'template1',
> 'USER': 'postgres',
> 'PASSWORD': 'postgres',
>
Hi,
Actually, there is a confusion between the administrative data django fills and
the data the admin application owns itself.
Unless I'm mistaken, Django admin application only creates 1 table I named in
my previous message (django_admin_log).
Can you check this table has been created ?
If it
Apologies I should have been more clear,
'It' refers to my domain name when visited "/admin"
All the django settings are correct, I've used sqlite3 and got the
admin up and working.
So I have installed postgres, pyscopg2.
su postgres
created a database
updated my settings.py:
DATABASES = {
'
Also, what kind of users are you speaking about ? system, database or django
users ?
Do you have the admin site available in the urls ? Did you uncomment both the
url and the auto discovering part ?
Did syncdb showed django_admin_log table being created (or can you check it has
been created) ?
On Tue, 2010-08-31 at 04:30 -0700, Robbington wrote:
> Hi,
>
> I seem to be having a problem setting up django and postgresql.
>
> I have created a database and switched users to postgres then sync'd
> the database successfully in my django project directory. But it isn't
> finding the admin page
Hi,
I seem to be having a problem setting up django and postgresql.
I have created a database and switched users to postgres then sync'd
the database successfully in my django project directory. But it isn't
finding the admin page still. No errors, just cant find them.
Can any one help with Pos
Hi,
I am running postgresql with pyscopg2. I have put the details on my
blog post at http://www.vyomtech.com/vyomcms/pyscopg2onubuntu64bit.html
The essence is first you uninstall your existing python-psycopg2
package. Then install python-dev (in your case it would be 2.5) and
then download the ps
On Sat, 26 May 2007 19:28:03 +1000, Malcolm Tredinnick wrote:
> On Sat, 2007-05-26 at 02:20 -0700, Grant D. Watson wrote:
>> Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>>
>> > > In an unusually (for Ubuntu) boneheaded move, it
>> > looks
>> > > like Ubuntu doesn't leave core files for packaged
Hello,
Here it is: https://bugs.launchpad.net/bugs/108067
I've planned to make a public repository with fixed packages, but I'm
too busy for this.
Anyway, you can take Feisty package, replace source code with
downloaded 2.0.6 source code from psycopg site, bump version number in
debian changelog
On Sat, 2007-05-26 at 12:42 +, Eugene Morozov wrote:
> python-psycopg2 package in Ubuntu Feisty for x86-64 is completely
> broken. I've reported it in the Launchpad on the next day after
> release, but maintainer is still reluctant to apply patch which should
> fix 64 bit issues.
Ha ha! Probl
python-psycopg2 package in Ubuntu Feisty for x86-64 is completely
broken. I've reported it in the Launchpad on the next day after
release, but maintainer is still reluctant to apply patch which should
fix 64 bit issues.
I've solved the problem by downloading upstream beta version and
compiling a
Of course I omitted the part that might be marginally more useful:
(gdb) bt
#0 0x00418f22 in ?? ()
#1 0x00419a10 in PyObject_CallMethod ()
#2 0x2b062bf4c7e3 in microprotocol_getquoted ()
from /usr/lib/python2.5/site-packages/psycopg2/_psycopg.so
#3 0x2b062bf4e29b in
--- Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> I think you're a little bit doomed here, if Ubuntu
> ships stripped
> binaries. On a Fedora system I would install the
> *-debuginfo at this
> point. Then you could try
>
> gdb python
> ...
> (gdb) run manage.py syncdb
>
On Sat, 2007-05-26 at 02:20 -0700, Grant D. Watson wrote:
> Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> > > In an unusually (for Ubuntu) boneheaded move, it
> > looks
> > > like Ubuntu doesn't leave core files for packaged
> > > programs, even after a "ulimit -c unlimited". Any
> > > other
Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> > In an unusually (for Ubuntu) boneheaded move, it
> looks
> > like Ubuntu doesn't leave core files for packaged
> > programs, even after a "ulimit -c unlimited". Any
> > other way to pull this off?
>
> I wouldn't have thought it was possible to
>
On Fri, 2007-05-25 at 22:46 -0700, Grant D. Watson wrote:
> > No idea about the core dump -- it's not very usual
> > (for Python).
>
> Definitely my experience.
>
> > However, you will have to do something about your
> > Python version. Either
>
> I checked, and as Jeremy said an update was jus
> No idea about the core dump -- it's not very usual
> (for Python).
Definitely my experience.
> However, you will have to do something about your
> Python version. Either
I checked, and as Jeremy said an update was just
released recently; I've upgraded to 2.5.1. Thanks for
the heads-up.
> Is
On 5/25/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> However, you will have to do something about your Python version. Either
> downgrade to 2.5.0 or upgrade to 2.5.1 proper. The problem is that there
> was a regression in the 2.5.1-pre-releases with the way dictionary
> subclasses are init
On Fri, 2007-05-25 at 20:51 -0700, Grant D. Watson wrote:
> I'm a newbie to Django. It looks amazing, and I've
> decided to give it a whirl, but when I try a syncdb on
> my new project I get a core dump; the only things I've
> changed in settings.py are ADMINS and DATABASE_*.
> Given the context
I'm a newbie to Django. It looks amazing, and I've
decided to give it a whirl, but when I try a syncdb on
my new project I get a core dump; the only things I've
changed in settings.py are ADMINS and DATABASE_*.
Given the context I assume it's something to do with
the psycopg2 library and Django?
On Mon, 2006-10-16 at 13:45 -0500, James Bennett wrote:
> On 10/16/06, Mike <[EMAIL PROTECTED]> wrote:
> > The server is rather new. 2GB of memory with a top grade Opteron (not
> > sure which). Once again, the server is running with low load for most
> > of the day, and as much as I want to, I hav
On 10/16/06, Mike <[EMAIL PROTECTED]> wrote:
> The server is rather new. 2GB of memory with a top grade Opteron (not
> sure which). Once again, the server is running with low load for most
> of the day, and as much as I want to, I have hard time believing its
> the server that is to blame.
FWIW,
On 10/16/06, Mike <[EMAIL PROTECTED]> wrote:
> I just svn update my django directory. Doesn't the latest django
> version reflect all the bug fixes? Do I have to check out
> 0.91-bugfixes?
The "bugfixes" branches are only for the older (0.90 and 0.91)
versions of Django, and I only mentioned them
On Monday 16 October 2006 18:01, Mike wrote:
> The server is rather new. 2GB of memory with a top grade Opteron (not
> sure which). Once again, the server is running with low load for most
> of the day, and as much as I want to, I have hard time believing its
> the server that is to blame.
But it
> Pressing 'c' on top clears everything a little bit. One thing
> I think I forgot to mention is 90% of the time the server load
> is moderate. It is 3 times a week around early in the morning
> that my django and postgres start dancing to death for me.
> Given that my server hardware handles the
> What are the specs of the server? Specifically, how much RAM does it
> have and how fast are its disks? What processors are in the machine
> (for postgres, Xeons are bad, Opterons are very, very good)?
The server is rather new. 2GB of memory with a top grade Opteron (not
sure which). Once agai
James,
Thanks for your response.
I just svn update my django directory. Doesn't the latest django
version reflect all the bug fixes? Do I have to check out
0.91-bugfixes?
Pressing 'c' on top clears everything a little bit. One thing I think I
forgot to mention is 90% of the time the server load
On 10/16/06, Siah <[EMAIL PROTECTED]> wrote:
> I tried increasing the number of postgres connections, and it ended up
> completely killing the server. The server I'm working with has 2 django
> sites running, one of which receives around 3M hits a month. The other
> one somewhere around 200K hits,
Per connection? Does it mean per request, or page view?
I tried increasing the number of postgres connections, and it ended up
completely killing the server. The server I'm working with has 2 django
sites running, one of which receives around 3M hits a month. The other
one somewhere around 200K h
On 10/16/06, Siah <[EMAIL PROTECTED]> wrote:
> How many postmaster instances should be running at once?
Also, if you're running an older version of Django, be sure to update
to the "bugfixes" branch for it; the mod_python handler had a bug in
it which could leak DB connections, and which has sinc
On 10/16/06, Siah <[EMAIL PROTECTED]> wrote:
> How many postmaster instances should be running at once?
Are you talking about 'postmaster', or 'postgres'? The default
behavior of top has a nasty habit of confusing the two; press 'c' to
have it show the full info.
That said, we have a bunch of po
Postgres uses one process per connection. How many simultaneous
connections have you got in total? If you don't have that many
simultaneous users then you may not be closing database connections
somewhere.
You can increase the number of connections that Postgres can handle,
but it looks like you
Hello,
I am running django on heavy load server, and multiple times a week I
have my postgres crashing due to high server load. When I get TOP, I
see many many postmasters running at the same time, until I get 'Too
many connections' postgres failiour error from postmaster emailed to me
from djang
65 matches
Mail list logo